diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
commit | 1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch) | |
tree | 0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-oe/recipes-support/postgresql | |
download | meta-openembedded-daisy-140929.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-support/postgresql')
8 files changed, 685 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/postgresql/files/no-ecpg-test.patch b/meta-oe/recipes-support/postgresql/files/no-ecpg-test.patch new file mode 100644 index 0000000000..c0f28f4258 --- /dev/null +++ b/meta-oe/recipes-support/postgresql/files/no-ecpg-test.patch | |||
@@ -0,0 +1,12 @@ | |||
1 | diff --git a/src/interfaces/ecpg/Makefile b/src/interfaces/ecpg/Makefile | ||
2 | index dcd578f..1428423 100644 | ||
3 | --- a/src/interfaces/ecpg/Makefile | ||
4 | +++ b/src/interfaces/ecpg/Makefile | ||
5 | @@ -8,7 +8,6 @@ all install installdirs uninstall dep depend distprep: | ||
6 | $(MAKE) -C ecpglib $@ | ||
7 | $(MAKE) -C compatlib $@ | ||
8 | $(MAKE) -C preproc $@ | ||
9 | - $(MAKE) -C test $@ | ||
10 | |||
11 | clean distclean maintainer-clean: | ||
12 | -$(MAKE) -C include $@ | ||
diff --git a/meta-oe/recipes-support/postgresql/files/postgresql-bashprofile b/meta-oe/recipes-support/postgresql/files/postgresql-bashprofile new file mode 100644 index 0000000000..1c931f37fd --- /dev/null +++ b/meta-oe/recipes-support/postgresql/files/postgresql-bashprofile | |||
@@ -0,0 +1,4 @@ | |||
1 | [ -f /etc/profile ] && source /etc/profile | ||
2 | |||
3 | PGDATA=/var/lib/postgresql/data | ||
4 | export PGDATA | ||
diff --git a/meta-oe/recipes-support/postgresql/files/postgresql.init b/meta-oe/recipes-support/postgresql/files/postgresql.init new file mode 100644 index 0000000000..ab46477606 --- /dev/null +++ b/meta-oe/recipes-support/postgresql/files/postgresql.init | |||
@@ -0,0 +1,241 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # postgresql This is the init script for starting up the PostgreSQL | ||
4 | # server. | ||
5 | # | ||
6 | # chkconfig: - 64 36 | ||
7 | # description: PostgreSQL database server. | ||
8 | # processname: postmaster | ||
9 | # pidfile: /var/run/postmaster.PORT.pid | ||
10 | |||
11 | # This script is slightly unusual in that the name of the daemon (postmaster) | ||
12 | # is not the same as the name of the subsystem (postgresql) | ||
13 | |||
14 | # PGVERSION is the full package version, e.g., 8.4.0 | ||
15 | # Note: the specfile inserts the correct value during package build | ||
16 | PGVERSION=9.2.4 | ||
17 | # PGMAJORVERSION is major version, e.g., 8.4 (this should match PG_VERSION) | ||
18 | PGMAJORVERSION=`echo "$PGVERSION" | sed 's/^\([0-9]*\.[0-9]*\).*$/\1/'` | ||
19 | |||
20 | # Source function library. | ||
21 | . /etc/init.d/functions | ||
22 | |||
23 | # Find the name of the script | ||
24 | NAME=`basename $0` | ||
25 | if [ ${NAME:0:1} = "S" -o ${NAME:0:1} = "K" ] | ||
26 | then | ||
27 | NAME=${NAME:3} | ||
28 | fi | ||
29 | |||
30 | # For SELinux we need to use 'runuser' not 'su' | ||
31 | if [ -x /sbin/runuser ] | ||
32 | then | ||
33 | SU=runuser | ||
34 | else | ||
35 | SU=su | ||
36 | fi | ||
37 | |||
38 | |||
39 | # Set defaults for configuration variables | ||
40 | PGENGINE=/usr/bin | ||
41 | PGPORT=5432 | ||
42 | PGDATA=/var/lib/postgresql/data | ||
43 | PGLOG=/var/lib/postgresql/pgstartup.log | ||
44 | # Value to set as postmaster process's oom_adj | ||
45 | PG_OOM_ADJ=-17 | ||
46 | |||
47 | # Override defaults from /etc/sysconfig/postgresql if file is present | ||
48 | [ -f /etc/default/postgresql/${NAME} ] && . /etc/default/postgresql/${NAME} | ||
49 | |||
50 | export PGDATA | ||
51 | export PGPORT | ||
52 | |||
53 | lockfile="/var/lock/subsys/${NAME}" | ||
54 | pidfile="/var/run/postmaster.${PGPORT}.pid" | ||
55 | |||
56 | script_result=0 | ||
57 | |||
58 | start(){ | ||
59 | [ -x "$PGENGINE/postmaster" ] || exit 5 | ||
60 | |||
61 | PSQL_START=$"Starting ${NAME} service: " | ||
62 | |||
63 | # Make sure startup-time log file is valid | ||
64 | if [ ! -e "$PGLOG" -a ! -h "$PGLOG" ] | ||
65 | then | ||
66 | touch "$PGLOG" || exit 4 | ||
67 | chown postgres:postgres "$PGLOG" | ||
68 | chmod go-rwx "$PGLOG" | ||
69 | [ -x /sbin/restorecon ] && /sbin/restorecon "$PGLOG" | ||
70 | fi | ||
71 | |||
72 | # Check for the PGDATA structure | ||
73 | if [ -f "$PGDATA/PG_VERSION" ] && [ -d "$PGDATA/base" ] | ||
74 | then | ||
75 | # Check version of existing PGDATA | ||
76 | if [ x`cat "$PGDATA/PG_VERSION"` != x"$PGMAJORVERSION" ] | ||
77 | then | ||
78 | SYSDOCDIR="(Your System's documentation directory)" | ||
79 | if [ -d "/usr/doc/postgresql-$PGVERSION" ] | ||
80 | then | ||
81 | SYSDOCDIR=/usr/doc | ||
82 | fi | ||
83 | if [ -d "/usr/share/doc/postgresql-$PGVERSION" ] | ||
84 | then | ||
85 | SYSDOCDIR=/usr/share/doc | ||
86 | fi | ||
87 | if [ -d "/usr/doc/packages/postgresql-$PGVERSION" ] | ||
88 | then | ||
89 | SYSDOCDIR=/usr/doc/packages | ||
90 | fi | ||
91 | if [ -d "/usr/share/doc/packages/postgresql-$PGVERSION" ] | ||
92 | then | ||
93 | SYSDOCDIR=/usr/share/doc/packages | ||
94 | fi | ||
95 | echo | ||
96 | echo $"An old version of the database format was found." | ||
97 | echo $"You need to upgrade the data format before using PostgreSQL." | ||
98 | echo $"See $SYSDOCDIR/postgresql-$PGVERSION/README.rpm-dist for more information." | ||
99 | exit 1 | ||
100 | fi | ||
101 | else | ||
102 | # No existing PGDATA! Warn the user to initdb it. | ||
103 | echo | ||
104 | echo "$PGDATA is missing. Use \"service postgresql initdb\" to initialize the cluster first." | ||
105 | echo -n " [FAILED] " | ||
106 | echo | ||
107 | exit 1 | ||
108 | fi | ||
109 | |||
110 | echo -n "$PSQL_START" | ||
111 | test x"$PG_OOM_ADJ" != x && echo "$PG_OOM_ADJ" > /proc/self/oom_score_adj | ||
112 | $SU -l postgres -c "$PGENGINE/postmaster -p '$PGPORT' -D '$PGDATA' ${PGOPTS} &" >> "$PGLOG" 2>&1 < /dev/null | ||
113 | sleep 2 | ||
114 | pid=`head -n 1 "$PGDATA/postmaster.pid" 2>/dev/null` | ||
115 | if [ "x$pid" != x ] | ||
116 | then | ||
117 | echo -n " [ OK ]" | ||
118 | touch "$lockfile" | ||
119 | echo $pid > "$pidfile" | ||
120 | echo | ||
121 | else | ||
122 | echo -n " [FAILED]" | ||
123 | echo | ||
124 | script_result=1 | ||
125 | fi | ||
126 | } | ||
127 | |||
128 | stop(){ | ||
129 | echo -n $"Stopping ${NAME} service: " | ||
130 | if [ -e "$lockfile" ] | ||
131 | then | ||
132 | $SU -l postgres -c "$PGENGINE/pg_ctl stop -D '$PGDATA' -s -m fast" > /dev/null 2>&1 < /dev/null | ||
133 | ret=$? | ||
134 | if [ $ret -eq 0 ] | ||
135 | then | ||
136 | echo -n " [ OK ] " | ||
137 | rm -f "$pidfile" | ||
138 | rm -f "$lockfile" | ||
139 | else | ||
140 | echo -n " [FAILED] " | ||
141 | script_result=1 | ||
142 | fi | ||
143 | else | ||
144 | # not running; per LSB standards this is "ok" | ||
145 | echo -n " [ OK ] " | ||
146 | fi | ||
147 | echo | ||
148 | } | ||
149 | |||
150 | restart(){ | ||
151 | stop | ||
152 | start | ||
153 | } | ||
154 | |||
155 | condrestart(){ | ||
156 | [ -e "$lockfile" ] && restart || : | ||
157 | } | ||
158 | |||
159 | reload(){ | ||
160 | $SU -l postgres -c "$PGENGINE/pg_ctl reload -D '$PGDATA' -s" > /dev/null 2>&1 < /dev/null | ||
161 | } | ||
162 | |||
163 | initdb(){ | ||
164 | if [ -f "$PGDATA/PG_VERSION" ] | ||
165 | then | ||
166 | echo -n "Data directory is not empty!" | ||
167 | echo -n " [FAILED] " | ||
168 | echo | ||
169 | script_result=1 | ||
170 | else | ||
171 | echo -n $"Initializing database: " | ||
172 | if [ ! -e "$PGDATA" -a ! -h "$PGDATA" ] | ||
173 | then | ||
174 | mkdir -p "$PGDATA" || exit 1 | ||
175 | chown postgres:postgres "$PGDATA" | ||
176 | chmod go-rwx "$PGDATA" | ||
177 | fi | ||
178 | # Clean up SELinux tagging for PGDATA | ||
179 | [ -x /sbin/restorecon ] && /sbin/restorecon "$PGDATA" | ||
180 | |||
181 | # Make sure the startup-time log file is OK, too | ||
182 | if [ ! -e "$PGLOG" -a ! -h "$PGLOG" ] | ||
183 | then | ||
184 | touch "$PGLOG" || exit 1 | ||
185 | chown postgres:postgres "$PGLOG" | ||
186 | chmod go-rwx "$PGLOG" | ||
187 | [ -x /sbin/restorecon ] && /sbin/restorecon "$PGLOG" | ||
188 | fi | ||
189 | |||
190 | # Initialize the database | ||
191 | $SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident'" >> "$PGLOG" 2>&1 < /dev/null | ||
192 | |||
193 | # Create directory for postmaster log | ||
194 | mkdir "$PGDATA/pg_log" | ||
195 | chown postgres:postgres "$PGDATA/pg_log" | ||
196 | chmod go-rwx "$PGDATA/pg_log" | ||
197 | |||
198 | if [ -f "$PGDATA/PG_VERSION" ] | ||
199 | then | ||
200 | echo -n " [ OK ] " | ||
201 | else | ||
202 | echo -n " [FAILED] " | ||
203 | script_result=1 | ||
204 | fi | ||
205 | echo | ||
206 | fi | ||
207 | } | ||
208 | |||
209 | # See how we were called. | ||
210 | case "$1" in | ||
211 | start) | ||
212 | start | ||
213 | ;; | ||
214 | stop) | ||
215 | stop | ||
216 | ;; | ||
217 | status) | ||
218 | status postmaster | ||
219 | script_result=$? | ||
220 | ;; | ||
221 | restart) | ||
222 | restart | ||
223 | ;; | ||
224 | condrestart|try-restart) | ||
225 | condrestart | ||
226 | ;; | ||
227 | reload) | ||
228 | reload | ||
229 | ;; | ||
230 | force-reload) | ||
231 | restart | ||
232 | ;; | ||
233 | initdb) | ||
234 | initdb | ||
235 | ;; | ||
236 | *) | ||
237 | echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|initdb}" | ||
238 | exit 2 | ||
239 | esac | ||
240 | |||
241 | exit $script_result | ||
diff --git a/meta-oe/recipes-support/postgresql/files/postgresql.pam b/meta-oe/recipes-support/postgresql/files/postgresql.pam new file mode 100644 index 0000000000..0b6fdc5f26 --- /dev/null +++ b/meta-oe/recipes-support/postgresql/files/postgresql.pam | |||
@@ -0,0 +1,4 @@ | |||
1 | #%PAM-1.0 | ||
2 | auth include common-auth | ||
3 | account include common-account | ||
4 | password include common-password | ||
diff --git a/meta-oe/recipes-support/postgresql/postgresql-9.2.4/ecpg-parallel-make-fix.patch b/meta-oe/recipes-support/postgresql/postgresql-9.2.4/ecpg-parallel-make-fix.patch new file mode 100644 index 0000000000..63615cd517 --- /dev/null +++ b/meta-oe/recipes-support/postgresql/postgresql-9.2.4/ecpg-parallel-make-fix.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Upstream-status: backport | ||
2 | |||
3 | From 602070f9cce790debd8d1469254e7726ab499ae7 Mon Sep 17 00:00:00 2001 | ||
4 | From: Peter Eisentraut <peter_e@gmx.net> | ||
5 | Date: Fri, 29 Mar 2013 21:39:55 -0400 | ||
6 | Subject: [PATCH] ecpg: Parallel make fix | ||
7 | |||
8 | In some parallel make situations, the install-headers target could be | ||
9 | called before the installation directories are created by installdirs, | ||
10 | causing the installation to fail. Fix that by making install-headers | ||
11 | depend on installdirs. | ||
12 | --- | ||
13 | src/interfaces/ecpg/include/Makefile | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/src/interfaces/ecpg/include/Makefile b/src/interfaces/ecpg/include/Makefile | ||
17 | index eab833b..e92e56f 100644 | ||
18 | --- a/src/interfaces/ecpg/include/Makefile | ||
19 | +++ b/src/interfaces/ecpg/include/Makefile | ||
20 | @@ -18,7 +18,7 @@ ecpg_headers = ecpgerrno.h ecpglib.h ecpgtype.h sqlca.h sql3types.h ecpg_informi | ||
21 | sqlda.h sqlda-compat.h sqlda-native.h | ||
22 | informix_headers = datetime.h decimal.h sqltypes.h | ||
23 | |||
24 | -install-headers: $(ecpg_headers) $(informix_headers) | ||
25 | +install-headers: $(ecpg_headers) $(informix_headers) installdirs | ||
26 | $(INSTALL_DATA) $(addprefix $(srcdir)/,$(ecpg_headers)) '$(DESTDIR)$(includedir)/' | ||
27 | $(INSTALL_DATA) $(addprefix $(srcdir)/,$(informix_headers)) '$(DESTDIR)$(informix_esql_dir)/' | ||
28 | $(INSTALL_DATA) $(ecpg_config_h) '$(DESTDIR)$(includedir)' | ||
29 | -- | ||
30 | 1.8.3.4 | ||
31 | |||
diff --git a/meta-oe/recipes-support/postgresql/postgresql-9.2.4/remove.autoconf.version.check.patch b/meta-oe/recipes-support/postgresql/postgresql-9.2.4/remove.autoconf.version.check.patch new file mode 100644 index 0000000000..022aa3d760 --- /dev/null +++ b/meta-oe/recipes-support/postgresql/postgresql-9.2.4/remove.autoconf.version.check.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Index: postgresql-9.2.4/configure.in | ||
2 | =================================================================== | ||
3 | --- postgresql-9.2.4.orig/configure.in | ||
4 | +++ postgresql-9.2.4/configure.in | ||
5 | @@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch un | ||
6 | |||
7 | AC_INIT([PostgreSQL], [9.2.4], [pgsql-bugs@postgresql.org]) | ||
8 | |||
9 | -m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.63], [], [m4_fatal([Autoconf version 2.63 is required. | ||
10 | -Untested combinations of 'autoconf' and PostgreSQL versions are not | ||
11 | -recommended. You can remove the check from 'configure.in' but it is then | ||
12 | -your responsibility whether the result works or not.])]) | ||
13 | AC_COPYRIGHT([Copyright (c) 1996-2012, PostgreSQL Global Development Group]) | ||
14 | AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) | ||
15 | AC_CONFIG_AUX_DIR(config) | ||
diff --git a/meta-oe/recipes-support/postgresql/postgresql.inc b/meta-oe/recipes-support/postgresql/postgresql.inc new file mode 100644 index 0000000000..e1374fb75f --- /dev/null +++ b/meta-oe/recipes-support/postgresql/postgresql.inc | |||
@@ -0,0 +1,365 @@ | |||
1 | SUMMARY = "PostgreSQL is a powerful, open source relational database system." | ||
2 | DESCRIPTION = "\ | ||
3 | PostgreSQL is an advanced Object-Relational database management system \ | ||
4 | (DBMS) that supports almost all SQL constructs (including \ | ||
5 | transactions, subselects and user-defined types and functions). The \ | ||
6 | postgresql package includes the client programs and libraries that \ | ||
7 | you'll need to access a PostgreSQL DBMS server. These PostgreSQL \ | ||
8 | client programs are programs that directly manipulate the internal \ | ||
9 | structure of PostgreSQL databases on a PostgreSQL server. These client \ | ||
10 | programs can be located on the same machine with the PostgreSQL \ | ||
11 | server, or may be on a remote machine which accesses a PostgreSQL \ | ||
12 | server over a network connection. This package contains the docs \ | ||
13 | in HTML for the whole package, as well as command-line utilities for \ | ||
14 | managing PostgreSQL databases on a PostgreSQL server. \ | ||
15 | \ | ||
16 | If you want to manipulate a PostgreSQL database on a local or remote \ | ||
17 | PostgreSQL server, you need this package. You also need to install \ | ||
18 | this package if you're installing the postgresql-server package. \ | ||
19 | " | ||
20 | HOMEPAGE = "http://www.postgresql.com" | ||
21 | LICENSE = "BSD" | ||
22 | DEPENDS = "zlib readline tzcode-native" | ||
23 | INC_PR = "r0" | ||
24 | |||
25 | ARM_INSTRUCTION_SET = "arm" | ||
26 | |||
27 | SRC_URI = "http://ftp.postgresql.org/pub/source/v${PV}/${P}.tar.bz2 \ | ||
28 | file://postgresql.init \ | ||
29 | file://postgresql-bashprofile \ | ||
30 | file://postgresql.pam \ | ||
31 | " | ||
32 | |||
33 | LEAD_SONAME = "libpq.so" | ||
34 | |||
35 | # LDFLAGS for shared libraries | ||
36 | export LDFLAGS_SL = "${LDFLAGS}" | ||
37 | |||
38 | inherit autotools pkgconfig perlnative pythonnative useradd update-rc.d | ||
39 | |||
40 | enable_pam = "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" | ||
41 | PACKAGECONFIG ??= "${enable_pam} openssl python uuid libxml tcl nls libxml perl" | ||
42 | PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam," | ||
43 | PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl," | ||
44 | PACKAGECONFIG[python] = "--with-python,--wsithout-python,python,python" | ||
45 | PACKAGECONFIG[uuid] = "--with-ossp-uuid,--without-ossp-uuid,ossp-uuid," | ||
46 | # when tcl native package is fixed change WORKDIR to STAGING_BINDIR_CROSS | ||
47 | PACKAGECONFIG[tcl] = \ | ||
48 | "--with-tcl --with-tclconfig=${STAGING_BINDIR_CROSS},--without-tcl,tcl," | ||
49 | PACKAGECONFIG[nls] = "--enable-nls,--disable-nls,," | ||
50 | PACKAGECONFIG[libxml] = "--with-libxml,--without-libxml,libxml2,libxml2" | ||
51 | PACKAGECONFIG[perl] = "--with-perl,--without-perl,perl,perl" | ||
52 | |||
53 | EXTRA_OECONF += "--enable-thread-safety --disable-rpath \ | ||
54 | --datadir=${datadir}/${BPN} \ | ||
55 | --sysconfdir=${sysconfdir}/${BPN} \ | ||
56 | --without-krb5 \ | ||
57 | " | ||
58 | EXTRA_OECONF_sh4 += "--disable-spinlocks" | ||
59 | EXTRA_OECONF_aarch64 += "--disable-spinlocks" | ||
60 | |||
61 | PACKAGES_DYNAMIC += "^${PN}-plperl ^${PN}-plperl-dbg \ | ||
62 | ^${PN}-pltcl ^${PN}-pltcl-dbg \ | ||
63 | ^${PN}-plpython ^${PN}-plpython-dbg \ | ||
64 | " | ||
65 | |||
66 | python populate_packages_prepend() { | ||
67 | |||
68 | def fill_more(name, dbg=True): | ||
69 | if name is None or name.strip() == "": | ||
70 | return | ||
71 | |||
72 | fpack=d.getVar('PACKAGES') or "" | ||
73 | fpack="${PN}-" + name + " " + fpack | ||
74 | if dbg: | ||
75 | fpack="${PN}-" + name + "-dbg" + " " + fpack | ||
76 | d.setVar('PACKAGES', fpack) | ||
77 | |||
78 | conf=(d.getVar('PACKAGECONFIG', True) or "").split() | ||
79 | pack=d.getVar('PACKAGES') or "" | ||
80 | bb.debug(1, "PACKAGECONFIG=%s" % conf) | ||
81 | bb.debug(1, "PACKAGES1=%s" % pack ) | ||
82 | |||
83 | if "perl" in conf : | ||
84 | fill_more("plperl") | ||
85 | |||
86 | if "tcl" in conf: | ||
87 | fill_more("pltcl") | ||
88 | |||
89 | if "python" in conf: | ||
90 | fill_more("plpython") | ||
91 | |||
92 | pack=d.getVar('PACKAGES', True) or "" | ||
93 | bb.debug(1, "PACKAGES2=%s" % pack) | ||
94 | |||
95 | } | ||
96 | |||
97 | do_configure() { | ||
98 | # do_configure_prepend | ||
99 | # make sure configure finds python includdirs with these envs | ||
100 | export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ | ||
101 | STAGING_INCDIR=${STAGING_INCDIR} \ | ||
102 | STAGING_LIBDIR=${STAGING_LIBDIR} | ||
103 | |||
104 | # do_configure | ||
105 | autotools_do_configure | ||
106 | |||
107 | # do_configure_append | ||
108 | # workaround perl package related bugs | ||
109 | sed -i -e "s:-L/usr/local/lib:-L=/usr/local/lib:g" \ | ||
110 | ${S}/src/Makefile.global | ||
111 | LIBPNA="\${STAGING_LIBDIR_NATIVE}/perl-native" | ||
112 | LIBNA="\${STAGING_LIBDIR_NATIVE}" | ||
113 | BLIBNA="\${STAGING_BASE_LIBDIR_NATIVE}" | ||
114 | sed -i -e "/^perl_archlibexp/s:${LIBPNA}:${STAGING_LIBDIR}:g" \ | ||
115 | ${S}/src/Makefile.global | ||
116 | sed -i -e "/^perl_privlibexp/s:${LIBPNA}:${STAGING_LIBDIR}:g" \ | ||
117 | ${S}/src/Makefile.global | ||
118 | # remove the rpath, replace with correct lib path | ||
119 | sed -i \ | ||
120 | -e "/^perl_embed_ldflags/s:-Wl,-rpath,${LIBNA}::g" \ | ||
121 | -e "/^perl_embed_ldflags/s:-Wl,-rpath,${BLIBNA}::g" \ | ||
122 | -e "/^perl_embed_ldflags/s:-Wl,-rpath-link,${LIBNA}::g" \ | ||
123 | -e "/^perl_embed_ldflags/s:-Wl,-rpath-link,${BLIBNA}::g" \ | ||
124 | -e "/^perl_embed_ldflags/s:${LIBPNA}:${STAGING_LIBDIR}:g" \ | ||
125 | -e "/^perl_embed_ldflags/s:${LIBNA}:${STAGING_LIBDIR}:g" \ | ||
126 | -e "/^perl_embed_ldflags/s:${BLIBNA}:${STAGING_BASELIBDIR}:g" \ | ||
127 | ${S}/src/Makefile.global | ||
128 | |||
129 | # workaround perl package's libperl.so problem | ||
130 | # we are using perlnative so this perl should have same version | ||
131 | perl_version=`perl -v 2>/dev/null | \ | ||
132 | sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'` | ||
133 | if [ ! -h "${STAGING_LIBDIR}/perl/$perl_version/CORE/libperl.so" -a \ | ||
134 | ! -h "${STAGING_LIBDIR}/libperl.so" ]; then | ||
135 | ln -sf ../../../libperl.so.5 \ | ||
136 | ${STAGING_LIBDIR}/perl/$perl_version/CORE/libperl.so | ||
137 | fi | ||
138 | } | ||
139 | |||
140 | do_compile_append() { | ||
141 | oe_runmake -C contrib all | ||
142 | } | ||
143 | |||
144 | # server needs to configure user and group | ||
145 | usernum = "28" | ||
146 | groupnum = "28" | ||
147 | USERADD_PACKAGES = "${PN}" | ||
148 | USERADD_PARAM_${PN} = "-M -g postgres -o -r -d ${localstatedir}/lib/${BPN} \ | ||
149 | -s /bin/bash -c 'PostgreSQL Server' -u ${usernum} postgres" | ||
150 | GROUPADD_PARAM_${PN} = "-g ${groupnum} -o -r postgres" | ||
151 | |||
152 | INITSCRIPT_PACKAGES = "${PN}" | ||
153 | INITSCRIPT_NAME = "${BPN}-server" | ||
154 | INITSCRIPT_PARAMS = "start 64 . stop 36 0 1 2 3 4 5 6 ." | ||
155 | |||
156 | do_install_append() { | ||
157 | # install contrib | ||
158 | oe_runmake DESTDIR=${D} -C contrib install | ||
159 | # install tutorial | ||
160 | install -d -m 0755 ${D}${libdir}/${BPN}/tutorial | ||
161 | install ${S}/src/tutorial/* ${D}${libdir}/${BPN}/tutorial | ||
162 | |||
163 | # install COPYRIGHT README HISTORY | ||
164 | install -d -m 0755 ${D}${docdir}/${BPN} | ||
165 | for i in ${S}/{COPYRIGHT,README,HISTORY} ${S}/doc/{KNOWN_BUGS,MISSING_FEATURES,README*,bug.template}; do | ||
166 | [ -f $i ] && install $i ${D}${docdir}/${BPN} | ||
167 | done | ||
168 | |||
169 | # install dirs and server init | ||
170 | install -d ${D}${sysconfdir}/init.d | ||
171 | install -m 0755 ${WORKDIR}/${BPN}.init ${D}${sysconfdir}/init.d/${BPN}-server | ||
172 | sed -i -e "s/^PGVERSION=.*$/PGVERSION=${PV}/g" ${D}${sysconfdir}/init.d/${BPN}-server | ||
173 | install -d -m 700 ${D}${localstatedir}/lib/${BPN}/data | ||
174 | install -d -m 700 ${D}${localstatedir}/lib/${BPN}/backups | ||
175 | install -m 644 ${WORKDIR}/${BPN}-bashprofile ${D}${localstatedir}/lib/${BPN}/.bash_profile | ||
176 | chown -R postgres:postgres ${D}${localstatedir}/lib/${BPN} | ||
177 | # multiple server config directory | ||
178 | install -d -m 700 ${D}${sysconfdir}/default/${BPN} | ||
179 | |||
180 | if [ "${@d.getVar('enable_pam', True)}" = "pam" ]; then | ||
181 | install -d ${D}${sysconfdir}/pam.d | ||
182 | install -m 644 ${WORKDIR}/postgresql.pam ${D}${sysconfdir}/pam.d/postgresql | ||
183 | fi | ||
184 | } | ||
185 | |||
186 | SSTATE_SCAN_FILES += "Makefile.global" | ||
187 | |||
188 | PACKAGES =+ "${PN}-client ${PN}-server-dev ${PN}-timezone \ | ||
189 | libecpg-compat-dbg libecpg-compat libecpg-compat-dev \ | ||
190 | libecpg-dbg libecpg libecpg-dev libecpg-staticdev libecpg-doc \ | ||
191 | libpq-dbg libpq libpq-dev libpq-staticdev \ | ||
192 | libpgtypes-dbg libpgtypes libpgtypes-staticdev libpgtypes-dev \ | ||
193 | ${PN}-contrib ${PN}-contrib-dbg \ | ||
194 | " | ||
195 | |||
196 | FILES_${PN} += "${sysconfdir}/init.d/${BPN}-server \ | ||
197 | ${localstatedir}/lib/${BPN}/data ${localstatedir}/lib/${BPN}/backups \ | ||
198 | ${localstatedir}/lib/${BPN}/.bash_profile ${sysconfdir}/default/${BPN} \ | ||
199 | ${libdir}/${BPN}/dict_snowball.so ${libdir}/${BPN}/plpgsql.so \ | ||
200 | ${libdir}/${BPN}/euc2004_sjis2004.so \ | ||
201 | ${libdir}/${BPN}/libpqwalreceiver.so \ | ||
202 | ${libdir}/${BPN}/*_and_*.so \ | ||
203 | ${@'${sysconfdir}/pam.d/postgresql' \ | ||
204 | if 'pam' == d.getVar('enable_pam', True) \ | ||
205 | else ''} \ | ||
206 | " | ||
207 | |||
208 | FILES_${PN}-dbg += " ${libdir}/${BPN}/.debug/dict_snowball.so \ | ||
209 | ${libdir}/${BPN}/.debug/plpgsql.so \ | ||
210 | ${libdir}/${BPN}/.debug/euc2004_sjis2004.so \ | ||
211 | ${libdir}/${BPN}/.debug/libpqwalreceiver.so \ | ||
212 | ${libdir}/${BPN}/.debug/*_and_*.so \ | ||
213 | " | ||
214 | |||
215 | FILES_${PN}-client = "${bindir}/clusterdb \ | ||
216 | ${bindir}/createdb \ | ||
217 | ${bindir}/createlang \ | ||
218 | ${bindir}/createuser \ | ||
219 | ${bindir}/dropdb \ | ||
220 | ${bindir}/droplang \ | ||
221 | ${bindir}/dropuser \ | ||
222 | ${bindir}/pg_dump \ | ||
223 | ${bindir}/pg_dumpall \ | ||
224 | ${bindir}/pg_restore \ | ||
225 | ${bindir}/psql \ | ||
226 | ${bindir}/reindexdb \ | ||
227 | ${bindir}/vacuumdb \ | ||
228 | ${bindir}/vacuumlo \ | ||
229 | ${datadir}/${BPN}/psqlrc.sample" | ||
230 | |||
231 | FILES_${PN}-client-doc = "${mandir}/man1/clusterdb.* \ | ||
232 | ${mandir}/man1/createdb.* ${mandir}/man1/createlang.* \ | ||
233 | ${mandir}/man1/createuser.* ${mandir}/man1/dropdb.* \ | ||
234 | ${mandir}/man1/droplang.* ${mandir}/man1/dropuser.* \ | ||
235 | ${mandir}/man1/pg_dump.* ${mandir}/man1/pg_dumpall.* \ | ||
236 | ${mandir}/man1/pg_restore.* ${mandir}/man1/psql.* \ | ||
237 | ${mandir}/man1/reindexdb.* ${mandir}/man1/vacuumdb.* \ | ||
238 | ${mandir}/man7/* \ | ||
239 | " | ||
240 | |||
241 | FILES_${PN}-doc += "${docdir}/${BPN}/html ${libdir}/${BPN}/tutorial/ \ | ||
242 | ${mandir}/man1/initdb.* ${mandir}/man1/pg_controldata.* \ | ||
243 | ${mandir}/man1/pg_ctl.* ${mandir}/man1/pg_resetxlog.* \ | ||
244 | ${mandir}/man1/postgres.* ${mandir}/man1/postmaster.* \ | ||
245 | " | ||
246 | |||
247 | FILES_${PN}-timezone = "${datadir}/${BPN}/timezone \ | ||
248 | ${datadir}/${BPN}/timezonesets \ | ||
249 | " | ||
250 | RDEPENDS_${PN} += "${PN}-timezone" | ||
251 | FILES_${PN}-server-dev = "${includedir}/${BPN}/server" | ||
252 | |||
253 | FILES_libecpg = "${libdir}/libecpg*${SOLIBS}" | ||
254 | FILES_libecpg-dbg = "${libdir}/.debug/libecpg*" | ||
255 | FILES_libecpg-dev = "${libdir}/libecpg*${SOLIBSDEV} \ | ||
256 | ${libdir}/libpgtypes*${SOLIBSDEV} \ | ||
257 | ${includedir}/ecpg*.h ${includedir}/${BPN}/ecpg*.h \ | ||
258 | ${includedir}/pgtypes*.h ${includedir}/${BPN}/informix \ | ||
259 | ${includedir}/sql3types.h ${includedir}/sqlca.h" | ||
260 | FILES_libecpg-doc = "${mandir}/man1/ecpg.*" | ||
261 | FILES_libecpg-staticdev = "${libdir}/libecpg*.a" | ||
262 | SECTION_libecpg-staticdev = "devel" | ||
263 | RDEPENDS_libecpg-staticdev = "libecpg-dev (= ${EXTENDPKGV})" | ||
264 | |||
265 | FILES_libpq = "${libdir}/libpq*${SOLIBS}" | ||
266 | FILES_libpq-dbg = "${libdir}/.debug/libpq* ${libdir}/${BPN}/pgxs/src/test/regress/.debug/*" | ||
267 | FILES_libpq-dev = "${libdir}/libpq*${SOLIBSDEV} \ | ||
268 | ${includedir}" | ||
269 | FILES_libpq-staticdev = "${libdir}/libpq*.a ${libdir}/libpgport.a" | ||
270 | SECTION_libpq-staticdev = "devel" | ||
271 | RDEPENDS_libpq-staticdev = "libpq-dev (= ${EXTENDPKGV})" | ||
272 | |||
273 | FILES_libecpg-compat = "${libdir}/libecpg_compat*${SOLIBS}" | ||
274 | FILES_libecpg-compat-dbg = "${libdir}/.debug/libecpg_compat*" | ||
275 | FILES_libecpg-compat-dev = "${libdir}/libecpg_compat*${SOLIBS}" | ||
276 | FILES_libpgtypes = "${libdir}/libpgtypes*${SOLIBS}" | ||
277 | FILES_libpgtypes-dbg = "${libdir}/.debug/libpgtypes*" | ||
278 | FILES_libpgtypes-staticdev = "${libdir}/libpgtypes*.a" | ||
279 | FILES_libpgtypes-dev = "${libdir}/libpgtypes*${SOLIBS} ${includedir}/pgtypes*.h" | ||
280 | |||
281 | FILES_${PN}-contrib = " ${bindir}/oid2name ${bindir}/pg_standby \ | ||
282 | ${bindir}/pgbench ${bindir}/vacuumlo \ | ||
283 | ${S}/contrib/spi/*.example \ | ||
284 | ${libdir}/${BPN}/_int.so ${libdir}/${BPN}/adminpack.so \ | ||
285 | ${libdir}/${BPN}/autoinc.so ${libdir}/${BPN}/auto_explain.so \ | ||
286 | ${libdir}/${BPN}/auth_delay.so ${libdir}/${BPN}/btree_gin.so \ | ||
287 | ${libdir}/${BPN}/btree_gist.so ${libdir}/${BPN}/.so \ | ||
288 | ${libdir}/${BPN}/chkpass.so ${libdir}/${BPN}/citext.so \ | ||
289 | ${libdir}/${BPN}/cube.so ${libdir}/${BPN}/dblink.so \ | ||
290 | ${libdir}/${BPN}/dict_int.so ${libdir}/${BPN}/dict_xsyn.so \ | ||
291 | ${libdir}/${BPN}/dummy_seclabel.so ${libdir}/${BPN}/earthdistance.so \ | ||
292 | ${libdir}/${BPN}/file_fdw.so ${libdir}/${BPN}/fuzzystrmatch.so \ | ||
293 | ${libdir}/${BPN}/hstore.so ${libdir}/${BPN}/insert_username.so \ | ||
294 | ${libdir}/${BPN}/isn.so ${libdir}/${BPN}/lo.so \ | ||
295 | ${libdir}/${BPN}/ltree.so ${libdir}/${BPN}/moddatetime.so \ | ||
296 | ${libdir}/${BPN}/pageinspect.so ${libdir}/${BPN}/pg_buffercache.so \ | ||
297 | ${libdir}/${BPN}/pg_freespacemap.so ${libdir}/${BPN}/pg_trgm.so \ | ||
298 | ${libdir}/${BPN}/pgcrypto.so ${libdir}/${BPN}/pgrowlocks.so \ | ||
299 | ${libdir}/${BPN}/pgstattuple.so ${libdir}/${BPN}/pg_stat_statements.so \ | ||
300 | ${libdir}/${BPN}/refint.so ${libdir}/${BPN}/seg.so \ | ||
301 | ${libdir}/${BPN}/sslinfo.so \ | ||
302 | ${libdir}/${BPN}/tablefunc.so \ | ||
303 | ${libdir}/${BPN}/test_parser.so ${libdir}/${BPN}/timetravel.so \ | ||
304 | ${libdir}/${BPN}/tsearch2.so ${libdir}/${BPN}/uuid-ossp.so \ | ||
305 | ${libdir}/${BPN}/pgxml.so ${libdir}/${BPN}/passwordcheck.so \ | ||
306 | ${libdir}/${BPN}/pg_upgrade_support.so ${libdir}/${BPN}/.so \ | ||
307 | ${libdir}/${BPN}/unaccent.so \ | ||
308 | " | ||
309 | FILES_${PN}-contrib-dbg = " \ | ||
310 | ${libdir}/${BPN}/.debug/_int.so ${libdir}/${BPN}/.debug/adminpack.so \ | ||
311 | ${libdir}/${BPN}/.debug/autoinc.so ${libdir}/${BPN}/.debug/auto_explain.so \ | ||
312 | ${libdir}/${BPN}/.debug/auth_delay.so ${libdir}/${BPN}/.debug/btree_gin.so \ | ||
313 | ${libdir}/${BPN}/.debug/btree_gist.so ${libdir}/${BPN}/.debug/.so \ | ||
314 | ${libdir}/${BPN}/.debug/chkpass.so ${libdir}/${BPN}/.debug/citext.so \ | ||
315 | ${libdir}/${BPN}/.debug/cube.so ${libdir}/${BPN}/.debug/dblink.so \ | ||
316 | ${libdir}/${BPN}/.debug/dict_int.so ${libdir}/${BPN}/.debug/dict_xsyn.so \ | ||
317 | ${libdir}/${BPN}/.debug/dummy_seclabel.so \ | ||
318 | ${libdir}/${BPN}/.debug/earthdistance.so \ | ||
319 | ${libdir}/${BPN}/.debug/file_fdw.so ${libdir}/${BPN}/.debug/fuzzystrmatch.so \ | ||
320 | ${libdir}/${BPN}/.debug/hstore.so ${libdir}/${BPN}/.debug/insert_username.so \ | ||
321 | ${libdir}/${BPN}/.debug/isn.so ${libdir}/${BPN}/.debug/lo.so \ | ||
322 | ${libdir}/${BPN}/.debug/ltree.so ${libdir}/${BPN}/.debug/moddatetime.so \ | ||
323 | ${libdir}/${BPN}/.debug/pageinspect.so \ | ||
324 | ${libdir}/${BPN}/.debug/pg_buffercache.so \ | ||
325 | ${libdir}/${BPN}/.debug/pg_freespacemap.so \ | ||
326 | ${libdir}/${BPN}/.debug/pg_trgm.so \ | ||
327 | ${libdir}/${BPN}/.debug/pgcrypto.so ${libdir}/${BPN}/.debug/pgrowlocks.so \ | ||
328 | ${libdir}/${BPN}/.debug/pgstattuple.so \ | ||
329 | ${libdir}/${BPN}/.debug/pg_stat_statements.so \ | ||
330 | ${libdir}/${BPN}/.debug/refint.so ${libdir}/${BPN}/.debug/seg.so \ | ||
331 | ${libdir}/${BPN}/.debug/sslinfo.so \ | ||
332 | ${libdir}/${BPN}/.debug/tablefunc.so \ | ||
333 | ${libdir}/${BPN}/.debug/test_parser.so ${libdir}/${BPN}/.debug/timetravel.so \ | ||
334 | ${libdir}/${BPN}/.debug/tsearch2.so ${libdir}/${BPN}/.debug/uuid-ossp.so \ | ||
335 | ${libdir}/${BPN}/.debug/pgxml.so ${libdir}/${BPN}/.debug/passwordcheck.so \ | ||
336 | ${libdir}/${BPN}/.debug/pg_upgrade_support.so \ | ||
337 | ${libdir}/${BPN}/.debug/unaccent.so \ | ||
338 | " | ||
339 | DESCRIPTION_${PN}-contrib = "The postgresql-contrib package contains \ | ||
340 | contributed packages that are included in the PostgreSQL distribution." | ||
341 | |||
342 | FILES_${PN}-pltcl = "${libdir}/${BPN}/pltcl.so ${bindir}/pltcl_delmod \ | ||
343 | ${binddir}/pltcl_listmod ${bindir}/pltcl_loadmod \ | ||
344 | ${datadir}/${BPN}/unknown.pltcl" | ||
345 | FILES_${PN}-pltcl-dbg = "${libdir}/${BPN}/.debug/pltcl.so" | ||
346 | SUMMARY_${PN}-pltcl = "The Tcl procedural language for PostgreSQL" | ||
347 | DESCRIPTION_${PN}-pltcl = "PostgreSQL is an advanced Object-Relational \ | ||
348 | database management system. The postgresql-pltcl package contains the PL/Tcl \ | ||
349 | procedural language for the backend." | ||
350 | |||
351 | FILES_${PN}-plperl = "${libdir}/${BPN}/plperl.so" | ||
352 | FILES_${PN}-plperl-dbg = "${libdir}/${BPN}/.debug/plperl.so" | ||
353 | SUMMARY_${PN}-plperl = "The Perl procedural language for PostgreSQL" | ||
354 | DESCRIPTION_${PN}-plperl = "PostgreSQL is an advanced Object-Relational \ | ||
355 | database management system. The postgresql-plperl package contains the \ | ||
356 | PL/Perl procedural language for the backend." | ||
357 | |||
358 | # In version 8, it will be plpython.so | ||
359 | # In version 9, it might be plpython{2,3}.so depending on python2 or 3 | ||
360 | FILES_${PN}-plpython = "${libdir}/${BPN}/plpython*.so" | ||
361 | FILES_${PN}-plpython-dbg = "${libdir}/${BPN}/.debug/plpython*.so" | ||
362 | SUMMARY_${PN}-plpython = "The Python procedural language for PostgreSQL" | ||
363 | DESCRIPTION_${PN}-plpython = "PostgreSQL is an advanced Object-Relational \ | ||
364 | database management system. The postgresql-plpython package contains \ | ||
365 | the PL/Python procedural language for the backend." | ||
diff --git a/meta-oe/recipes-support/postgresql/postgresql_9.2.4.bb b/meta-oe/recipes-support/postgresql/postgresql_9.2.4.bb new file mode 100644 index 0000000000..49ca53fae3 --- /dev/null +++ b/meta-oe/recipes-support/postgresql/postgresql_9.2.4.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | require postgresql.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=ab55a5887d3f8ba77d0fd7db787e4bab" | ||
4 | |||
5 | PR = "${INC_PR}.0" | ||
6 | |||
7 | SRC_URI += "\ | ||
8 | file://remove.autoconf.version.check.patch \ | ||
9 | file://ecpg-parallel-make-fix.patch \ | ||
10 | " | ||
11 | |||
12 | SRC_URI[md5sum] = "6ee5bb53b97da7c6ad9cb0825d3300dd" | ||
13 | SRC_URI[sha256sum] = "d97dd918a88a4449225998f46aafa85216a3f89163a3411830d6890507ffae93" | ||