summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/postgresql/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/postgresql/files')
-rw-r--r--meta-oe/recipes-support/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch43
-rw-r--r--meta-oe/recipes-support/postgresql/files/not-check-libperl.patch31
-rw-r--r--meta-oe/recipes-support/postgresql/files/postgresql-bashprofile4
-rw-r--r--meta-oe/recipes-support/postgresql/files/postgresql-setup73
-rw-r--r--meta-oe/recipes-support/postgresql/files/postgresql.init193
-rw-r--r--meta-oe/recipes-support/postgresql/files/postgresql.pam4
-rw-r--r--meta-oe/recipes-support/postgresql/files/postgresql.service27
-rw-r--r--meta-oe/recipes-support/postgresql/files/remove.autoconf.version.check.patch16
8 files changed, 0 insertions, 391 deletions
diff --git a/meta-oe/recipes-support/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch b/meta-oe/recipes-support/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch
deleted file mode 100644
index d08ec6af1d..0000000000
--- a/meta-oe/recipes-support/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From d52e330be895bb8c5f0fb3e2884766acbd942a85 Mon Sep 17 00:00:00 2001
2From: Philip Balister <philip@balister.org>
3Date: Tue, 1 Jul 2014 09:40:44 -0400
4Subject: [PATCH] Use pkg-config for libxml2 detection.
5
6Upstream-Status: Inappropriate [configuration]
7
8xml2-config does not work. Use pkgconfig to set CPPFLAGS and LIBS.
9
10Signed-off-by: Philip Balister <philip@balister.org>
11---
12 configure.in | 15 ++-------------
13 1 file changed, 2 insertions(+), 13 deletions(-)
14
15diff --git a/configure.in b/configure.in
16index f8bf466..1f4fabf 100644
17--- a/configure.in
18+++ b/configure.in
19@@ -734,19 +734,8 @@ PGAC_ARG_BOOL(with, libxml, no, [build with XML support],
20 [AC_DEFINE([USE_LIBXML], 1, [Define to 1 to build with XML support. (--with-libxml)])])
21
22 if test "$with_libxml" = yes ; then
23- AC_CHECK_PROGS(XML2_CONFIG, xml2-config)
24- if test -n "$XML2_CONFIG"; then
25- for pgac_option in `$XML2_CONFIG --cflags`; do
26- case $pgac_option in
27- -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
28- esac
29- done
30- for pgac_option in `$XML2_CONFIG --libs`; do
31- case $pgac_option in
32- -L*) LDFLAGS="$LDFLAGS $pgac_option";;
33- esac
34- done
35- fi
36+ CPPFLAGS="$CPPFLAGS `pkg-config --short-errors --print-errors --cflags "libxml-2.0" 2>&1`"
37+ LIBS="`pkg-config --short-errors --print-errors --libs "libxml-2.0" 2>&1` $LIBS"
38 fi
39
40 AC_SUBST(with_libxml)
41--
421.8.3.1
43
diff --git a/meta-oe/recipes-support/postgresql/files/not-check-libperl.patch b/meta-oe/recipes-support/postgresql/files/not-check-libperl.patch
deleted file mode 100644
index e199f39143..0000000000
--- a/meta-oe/recipes-support/postgresql/files/not-check-libperl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1[PATCH] not check libperl under cross compiling
2
3Upstream-Status: Inappropriate [configuration]
4
5libperl ldflags returned by PGAC_CHECK_PERL_EMBED_LDFLAGS are native,
6can not be used to check target library.
7
8postpresql has the dependency on perl, so not need to check libperl
9again, like in postgresql-9.2.4
10
11Signed-off-by: Roy Li <rongqing.li@windriver.com>
12---
13 configure.in | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/configure.in b/configure.in
17index ae1a5a0..9a0970d 100644
18--- a/configure.in
19+++ b/configure.in
20@@ -1877,7 +1877,7 @@ if test "$with_tcl" = yes; then
21 fi
22
23 # check for <perl.h>
24-if test "$with_perl" = yes; then
25+if test "$with_perl" = yes && test "$cross_compiling" = no; then
26 ac_save_CPPFLAGS=$CPPFLAGS
27 CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
28 AC_CHECK_HEADER(perl.h, [], [AC_MSG_ERROR([header file <perl.h> is required for Perl])],
29--
301.9.1
31
diff --git a/meta-oe/recipes-support/postgresql/files/postgresql-bashprofile b/meta-oe/recipes-support/postgresql/files/postgresql-bashprofile
deleted file mode 100644
index 1c931f37fd..0000000000
--- a/meta-oe/recipes-support/postgresql/files/postgresql-bashprofile
+++ /dev/null
@@ -1,4 +0,0 @@
1[ -f /etc/profile ] && source /etc/profile
2
3PGDATA=/var/lib/postgresql/data
4export PGDATA
diff --git a/meta-oe/recipes-support/postgresql/files/postgresql-setup b/meta-oe/recipes-support/postgresql/files/postgresql-setup
deleted file mode 100644
index 75bb01e05f..0000000000
--- a/meta-oe/recipes-support/postgresql/files/postgresql-setup
+++ /dev/null
@@ -1,73 +0,0 @@
1#!/bin/sh
2#
3# postgresql-setup Initialization operation for PostgreSQL
4
5# For SELinux we need to use 'runuser' not 'su'
6if [ -x /sbin/runuser ]
7then
8 SU=runuser
9else
10 SU=su
11fi
12
13PGENGINE=/usr/bin
14PGDATA=/var/lib/postgresql/data
15PGLOG=/var/lib/postgresql/pgstartup.log
16script_result=0
17
18initdb(){
19 if [ -f "$PGDATA/PG_VERSION" ]
20 then
21 echo -n "Data directory is not empty!"
22 echo -n " [FAILED] "
23 echo
24 script_result=1
25 else
26 echo -n "Initializing database: "
27 if [ ! -e "$PGDATA" -a ! -h "$PGDATA" ]
28 then
29 mkdir -p "$PGDATA" || exit 1
30 chown postgres:postgres "$PGDATA"
31 chmod go-rwx "$PGDATA"
32 fi
33 # Clean up SELinux tagging for PGDATA
34 [ -x /sbin/restorecon ] && /sbin/restorecon "$PGDATA"
35
36 # Make sure the startup-time log file is OK, too
37 if [ ! -e "$PGLOG" -a ! -h "$PGLOG" ]
38 then
39 touch "$PGLOG" || exit 1
40 chown postgres:postgres "$PGLOG"
41 chmod go-rwx "$PGLOG"
42 [ -x /sbin/restorecon ] && /sbin/restorecon "$PGLOG"
43 fi
44
45 # Initialize the database
46 $SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident'" >> "$PGLOG" 2>&1 < /dev/null
47
48 # Create directory for postmaster log
49 mkdir "$PGDATA/pg_log"
50 chown postgres:postgres "$PGDATA/pg_log"
51 chmod go-rwx "$PGDATA/pg_log"
52
53 if [ -f "$PGDATA/PG_VERSION" ]
54 then
55 echo -n " [ OK ] "
56 else
57 echo -n " [FAILED] "
58 script_result=1
59 fi
60 echo
61 fi
62}
63
64case "$1" in
65 initdb)
66 initdb
67 ;;
68 *)
69 echo "Usage: $0 initdb"
70 exit 2
71esac
72
73exit $script_result
diff --git a/meta-oe/recipes-support/postgresql/files/postgresql.init b/meta-oe/recipes-support/postgresql/files/postgresql.init
deleted file mode 100644
index 4a4f0cd168..0000000000
--- a/meta-oe/recipes-support/postgresql/files/postgresql.init
+++ /dev/null
@@ -1,193 +0,0 @@
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
16PGVERSION=9.2.4
17# PGMAJORVERSION is major version, e.g., 8.4 (this should match PG_VERSION)
18PGMAJORVERSION=`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
24NAME=`basename $0`
25if [ ${NAME:0:1} = "S" -o ${NAME:0:1} = "K" ]
26then
27 NAME=${NAME:3}
28fi
29
30# For SELinux we need to use 'runuser' not 'su'
31if [ -x /sbin/runuser ]
32then
33 SU=runuser
34else
35 SU=su
36fi
37
38
39# Set defaults for configuration variables
40PGENGINE=/usr/bin
41PGPORT=5432
42PGDATA=/var/lib/postgresql/data
43PGLOG=/var/lib/postgresql/pgstartup.log
44# Value to set as postmaster process's oom_adj
45PG_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
50export PGDATA
51export PGPORT
52
53lockfile="/var/lock/subsys/${NAME}"
54pidfile="/var/run/postmaster.${PGPORT}.pid"
55
56script_result=0
57
58start(){
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 \"postgresql-setup 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
128stop(){
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
150restart(){
151 stop
152 start
153}
154
155condrestart(){
156 [ -e "$lockfile" ] && restart || :
157}
158
159reload(){
160 $SU -l postgres -c "$PGENGINE/pg_ctl reload -D '$PGDATA' -s" > /dev/null 2>&1 < /dev/null
161}
162
163
164# See how we were called.
165case "$1" in
166 start)
167 start
168 ;;
169 stop)
170 stop
171 ;;
172 status)
173 status postmaster
174 script_result=$?
175 ;;
176 restart)
177 restart
178 ;;
179 condrestart|try-restart)
180 condrestart
181 ;;
182 reload)
183 reload
184 ;;
185 force-reload)
186 restart
187 ;;
188 *)
189 echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
190 exit 2
191esac
192
193exit $script_result
diff --git a/meta-oe/recipes-support/postgresql/files/postgresql.pam b/meta-oe/recipes-support/postgresql/files/postgresql.pam
deleted file mode 100644
index 0b6fdc5f26..0000000000
--- a/meta-oe/recipes-support/postgresql/files/postgresql.pam
+++ /dev/null
@@ -1,4 +0,0 @@
1#%PAM-1.0
2auth include common-auth
3account include common-account
4password include common-password
diff --git a/meta-oe/recipes-support/postgresql/files/postgresql.service b/meta-oe/recipes-support/postgresql/files/postgresql.service
deleted file mode 100644
index 4ec959e842..0000000000
--- a/meta-oe/recipes-support/postgresql/files/postgresql.service
+++ /dev/null
@@ -1,27 +0,0 @@
1[Unit]
2Description=PostgreSQL database server
3After=network.target
4
5[Service]
6Type=forking
7User=postgres
8Group=postgres
9
10# Port number for server to listen on
11Environment=PGPORT=5432
12
13# Location of database directory
14Environment=PGDATA=/var/lib/postgresql/data
15
16# Disable OOM kill on the postmaster
17OOMScoreAdjust=-17
18
19ExecStart=@BINDIR@/pg_ctl start -D ${PGDATA} -s -o "-p ${PGPORT}" -w -t 300
20ExecStop=@BINDIR@/pg_ctl stop -D ${PGDATA} -s -m fast
21ExecReload=@BINDIR@/pg_ctl reload -D ${PGDATA} -s
22
23# Give a reasonable amount of time for the server to start up/shut down
24TimeoutSec=300
25
26[Install]
27WantedBy=multi-user.target
diff --git a/meta-oe/recipes-support/postgresql/files/remove.autoconf.version.check.patch b/meta-oe/recipes-support/postgresql/files/remove.autoconf.version.check.patch
deleted file mode 100644
index be23fd419d..0000000000
--- a/meta-oe/recipes-support/postgresql/files/remove.autoconf.version.check.patch
+++ /dev/null
@@ -1,16 +0,0 @@
1Index: 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.4.2], [pgsql-bugs@postgresql.org])
8
9-m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 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-2014, PostgreSQL Global Development Group])
14 AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
15 AC_CONFIG_AUX_DIR(config)
16