summaryrefslogtreecommitdiff
path: root/postgresql
diff options
context:
space:
mode:
authorTim Biermann <tbier@posteo.de>2021-08-13 01:58:15 +0200
committerTim Biermann <tbier@posteo.de>2021-08-13 01:58:15 +0200
commit0da28261b8c67fd75cf49d6e0671179a260ae45c (patch)
tree81e489080943b38d5dc06df4bcdcd841fca23ddb /postgresql
parentd42f3ebd54ac36b9b509f0a203deada7d8910c4c (diff)
downloadcontrib-0da28261b8c67fd75cf49d6e0671179a260ae45c.tar.gz
contrib-0da28261b8c67fd75cf49d6e0671179a260ae45c.tar.xz
postgresql: 13.3 -> 13.4
Diffstat (limited to 'postgresql')
-rw-r--r--postgresql/.footprint32
-rw-r--r--postgresql/.signature12
-rw-r--r--postgresql/Pkgfile34
-rw-r--r--postgresql/README4
-rwxr-xr-xpostgresql/post-install10
-rw-r--r--postgresql/postgresql16
-rw-r--r--postgresql/postgresql-run-socket.patch12
-rw-r--r--postgresql/postgresql.pam6
-rw-r--r--postgresql/postgresql.rc17
9 files changed, 110 insertions, 33 deletions
diff --git a/postgresql/.footprint b/postgresql/.footprint
index 896d59102..0f793531f 100644
--- a/postgresql/.footprint
+++ b/postgresql/.footprint
@@ -1,4 +1,6 @@
drwxr-xr-x root/root etc/
+drwxr-xr-x root/root etc/pam/
+-rwxr-xr-x root/root etc/pam/postgresql
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/postgresql
drwxr-xr-x root/root usr/
@@ -569,7 +571,22 @@ drwxr-xr-x root/root usr/include/postgresql/server/partitioning/
-rw-r--r-- root/root usr/include/postgresql/server/pgstat.h
-rw-r--r-- root/root usr/include/postgresql/server/pgtar.h
-rw-r--r-- root/root usr/include/postgresql/server/pgtime.h
+-rw-r--r-- root/root usr/include/postgresql/server/plperl.h
+-rw-r--r-- root/root usr/include/postgresql/server/plperl_helpers.h
-rw-r--r-- root/root usr/include/postgresql/server/plpgsql.h
+-rw-r--r-- root/root usr/include/postgresql/server/plpy_cursorobject.h
+-rw-r--r-- root/root usr/include/postgresql/server/plpy_elog.h
+-rw-r--r-- root/root usr/include/postgresql/server/plpy_exec.h
+-rw-r--r-- root/root usr/include/postgresql/server/plpy_main.h
+-rw-r--r-- root/root usr/include/postgresql/server/plpy_planobject.h
+-rw-r--r-- root/root usr/include/postgresql/server/plpy_plpymodule.h
+-rw-r--r-- root/root usr/include/postgresql/server/plpy_procedure.h
+-rw-r--r-- root/root usr/include/postgresql/server/plpy_resultobject.h
+-rw-r--r-- root/root usr/include/postgresql/server/plpy_spi.h
+-rw-r--r-- root/root usr/include/postgresql/server/plpy_subxactobject.h
+-rw-r--r-- root/root usr/include/postgresql/server/plpy_typeio.h
+-rw-r--r-- root/root usr/include/postgresql/server/plpy_util.h
+-rw-r--r-- root/root usr/include/postgresql/server/plpython.h
-rw-r--r-- root/root usr/include/postgresql/server/port.h
drwxr-xr-x root/root usr/include/postgresql/server/port/
-rw-r--r-- root/root usr/include/postgresql/server/port/aix.h
@@ -637,6 +654,7 @@ drwxr-xr-x root/root usr/include/postgresql/server/postmaster/
-rw-r--r-- root/root usr/include/postgresql/server/postmaster/startup.h
-rw-r--r-- root/root usr/include/postgresql/server/postmaster/syslogger.h
-rw-r--r-- root/root usr/include/postgresql/server/postmaster/walwriter.h
+-rw-r--r-- root/root usr/include/postgresql/server/ppport.h
drwxr-xr-x root/root usr/include/postgresql/server/regex/
-rw-r--r-- root/root usr/include/postgresql/server/regex/regcustom.h
-rw-r--r-- root/root usr/include/postgresql/server/regex/regerrs.h
@@ -940,10 +958,15 @@ drwxr-xr-x root/root usr/lib/postgresql/pgxs/src/
drwxr-xr-x root/root usr/lib/postgresql/pgxs/src/makefiles/
-rw-r--r-- root/root usr/lib/postgresql/pgxs/src/makefiles/pgxs.mk
-rw-r--r-- root/root usr/lib/postgresql/pgxs/src/nls-global.mk
+drwxr-xr-x root/root usr/lib/postgresql/pgxs/src/pl/
+drwxr-xr-x root/root usr/lib/postgresql/pgxs/src/pl/plpython/
+-rw-r--r-- root/root usr/lib/postgresql/pgxs/src/pl/plpython/regress-python3-mangle.mk
drwxr-xr-x root/root usr/lib/postgresql/pgxs/src/test/
drwxr-xr-x root/root usr/lib/postgresql/pgxs/src/test/regress/
-rwxr-xr-x root/root usr/lib/postgresql/pgxs/src/test/regress/pg_regress
+-rwxr-xr-x root/root usr/lib/postgresql/plperl.so
-rwxr-xr-x root/root usr/lib/postgresql/plpgsql.so
+-rwxr-xr-x root/root usr/lib/postgresql/plpython3.so
-rwxr-xr-x root/root usr/lib/postgresql/utf8_and_big5.so
-rwxr-xr-x root/root usr/lib/postgresql/utf8_and_cyrillic.so
-rwxr-xr-x root/root usr/lib/postgresql/utf8_and_euc2004.so
@@ -1258,8 +1281,14 @@ drwxr-xr-x root/root usr/share/man/man7/
drwxr-xr-x root/root usr/share/postgresql/
-rw-r--r-- root/root usr/share/postgresql/errcodes.txt
drwxr-xr-x root/root usr/share/postgresql/extension/
+-rw-r--r-- root/root usr/share/postgresql/extension/plperl--1.0.sql
+-rw-r--r-- root/root usr/share/postgresql/extension/plperl.control
+-rw-r--r-- root/root usr/share/postgresql/extension/plperlu--1.0.sql
+-rw-r--r-- root/root usr/share/postgresql/extension/plperlu.control
-rw-r--r-- root/root usr/share/postgresql/extension/plpgsql--1.0.sql
-rw-r--r-- root/root usr/share/postgresql/extension/plpgsql.control
+-rw-r--r-- root/root usr/share/postgresql/extension/plpython3u--1.0.sql
+-rw-r--r-- root/root usr/share/postgresql/extension/plpython3u.control
-rw-r--r-- root/root usr/share/postgresql/information_schema.sql
-rw-r--r-- root/root usr/share/postgresql/pg_hba.conf.sample
-rw-r--r-- root/root usr/share/postgresql/pg_ident.conf.sample
@@ -1924,3 +1953,6 @@ drwxr-xr-x root/root usr/share/postgresql/tsearch_data/
-rw-r--r-- root/root usr/share/postgresql/tsearch_data/synonym_sample.syn
-rw-r--r-- root/root usr/share/postgresql/tsearch_data/thesaurus_sample.ths
-rw-r--r-- root/root usr/share/postgresql/tsearch_data/turkish.stop
+drwxr-xr-x root/root var/
+drwxr-xr-x root/root var/log/
+-rw-rw---- postgres/postgres var/log/postgresql (EMPTY)
diff --git a/postgresql/.signature b/postgresql/.signature
index 27c83ddf7..177098de2 100644
--- a/postgresql/.signature
+++ b/postgresql/.signature
@@ -1,6 +1,8 @@
untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF32g90r5TxFTKo4WTMti9jHLRajB7LFTmUBJySkoa1DabbgEqBD4OW9TYKnNR20tc1JuFMwp5R31G2frLbxi53Qs=
-SHA256 (Pkgfile) = 0cd941f14ceed2a68229253af5530dbe27aee143ba8022d71017c3b9527fe3fb
-SHA256 (.footprint) = 437962b9dcebf289743717841914230aaa2aa61e71d07f678184f0a054f1326a
-SHA256 (postgresql-13.3.tar.bz2) = 3cd9454fa8c7a6255b6743b767700925ead1b9ab0d7a0f9dcb1151010f8eb4a1
-SHA256 (postgresql) = 2c5ed04d159081774b2518c67b4bd95671154828a5bca23b68c7c7a05ec40078
+RWSagIOpLGJF3xUHVuSrPhSkH+WmhC6OeFjrCL6FKjATiaWg1NCA1q8JcZHPiQwh9D+mlS8uVoEX6IxAV9XFLkQUiPkCRH+CWw0=
+SHA256 (Pkgfile) = 631691a46c8f39aae222c8cfee0af38c8846674c59fe086ffd907446e1cef612
+SHA256 (.footprint) = fa3fd0484cb523c505cfe747b2b369242e68e6f61168b86b2b6ba1850bdc44e0
+SHA256 (postgresql-13.4.tar.bz2) = ea93e10390245f1ce461a54eb5f99a48d8cabd3a08ce4d652ec2169a357bc0cd
+SHA256 (postgresql-run-socket.patch) = 02ffb53b0a5049233f665c873b96264db77daab30e5a2194d038202d815a8e6a
+SHA256 (postgresql.rc) = 95ada4267034cf5d33340b8411a18f8cbd0428b5714afac16990b5c3a144f347
+SHA256 (postgresql.pam) = 978a2542078a1216b0c23756f49e79ac5a99c905e5ec1e57867d0941a505668a
diff --git a/postgresql/Pkgfile b/postgresql/Pkgfile
index d56696d3d..aea4e8661 100644
--- a/postgresql/Pkgfile
+++ b/postgresql/Pkgfile
@@ -2,16 +2,38 @@
# URL: https://www.postgresql.org
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: openssl
+# Optional: clang icu krb5 libxml2 libxslt openldap tcl
name=postgresql
-version=13.3
+version=13.4
release=1
-source=(https://ftp.postgresql.org/pub/source/v$version/postgresql-$version.tar.bz2 postgresql)
+source=(https://ftp.postgresql.org/pub/source/v$version/postgresql-$version.tar.bz2
+ postgresql-run-socket.patch
+ postgresql.rc postgresql.pam)
build() {
cd $name-$version
- ./configure --prefix=/usr --with-openssl
+ patch -Np1 -i $SRC/postgresql-run-socket.patch
+
+ # optionals {{{
+ prt-get isinst clang && PKGMK_PGSQL+=' --with-llvm'
+ prt-get isinst icu && PKGMK_PGSQL+=' --with-icu'
+ prt-get isinst krb5 && PKGMK_PGSQL+=' --with-gssapi'
+ prt-get isinst libxml2 && PKGMK_PGSQL+=' --with-libxml'
+ prt-get isinst libxslt && PKGMK_PGSQL+=' --with-libxslt'
+ prt-get isinst tcl && PKGMK_PGSQL+=' --with-tcl'
+ # }}}
+
+ ./configure --prefix=/usr $PKGMK_PGSQL \
+ --with-openssl \
+ --with-pam \
+ --with-perl \
+ --with-python \
+ --with-uuid=e2fs \
+ --disable-nls \
+ --disable-rpath \
+ PYTHON=/usr/bin/python3
make
make DESTDIR=$PKG install
@@ -19,5 +41,9 @@ build() {
make DESTDIR=$PKG install-man
rm -rf $PKG/usr/share/doc
- install -D -m 755 $SRC/postgresql $PKG/etc/rc.d/postgresql
+ install -Dm 755 $SRC/postgresql.rc $PKG/etc/rc.d/postgresql
+ install -Dm 755 $SRC/postgresql.pam $PKG/etc/pam/postgresql
+
+ install -Dm 660 -o 42 -g 42 /dev/null $PKG/var/log/postgresql
}
+# vim: foldmethod=marker foldlevelstart=0
diff --git a/postgresql/README b/postgresql/README
index cf162e249..cafd17d4a 100644
--- a/postgresql/README
+++ b/postgresql/README
@@ -35,8 +35,6 @@ some additional steps or use the included post-install script.
# passwd -l postgres
# mkdir -p /var/pgsql/data
-# touch /var/log/postgresql
-# chown postgres /var/pgsql/data /var/log/postgresql
# sudo -u postgres initdb -D /var/pgsql/data
@@ -49,4 +47,4 @@ a line "/usr/sbin/rotatelog postgresql"
The complete installation instructions are located here:
-http://www.postgresql.org/docs/current/interactive/installation.html
+https://www.postgresql.org/docs/current/interactive/installation.html
diff --git a/postgresql/post-install b/postgresql/post-install
index 8d2481b95..9433305b1 100755
--- a/postgresql/post-install
+++ b/postgresql/post-install
@@ -5,11 +5,11 @@ HOME=/var/pgsql/data
GROUP=postgres
ID=42
-getent group ${GROUP} >/dev/null || groupadd -r ${GROUP}
-getent passwd ${USER} >/dev/null || useradd -u $ID -d ${HOME} -g ${GROUP} -s /bin/false ${USER}
+getent group $GROUP >/dev/null || groupadd -g $ID -r $GROUP
+getent passwd $USER >/dev/null || useradd -u $ID -d $HOME -g $GROUP -s /bin/false $USER
-test -d ${HOME} && exit 0
+test -d $HOME && exit 0
-install -d -o ${USER} -g ${GROUP} ${HOME}
-su -s /bin/sh -c "pg_ctl -D ${HOME} initdb" ${USER}
+install -d -o $USER -g $GROUP $HOME
+su -s /bin/sh -c "pg_ctl -D $HOME initdb" $USER
diff --git a/postgresql/postgresql b/postgresql/postgresql
deleted file mode 100644
index cdad86a5f..000000000
--- a/postgresql/postgresql
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# /etc/rc.d/postgresql: start, stop or restart PostgreSQL server postmaster
-#
-
-PG_DATA=/var/pgsql/data
-
-case "$1" in
- start|stop|status|restart|reload)
- sudo -u postgres pg_ctl -D "$PG_DATA" -l /var/log/postgresql "$1"
- ;;
- *)
- echo "usage: $0 start|stop|restart|reload|status"
- ;;
-esac
-
-# End of file
diff --git a/postgresql/postgresql-run-socket.patch b/postgresql/postgresql-run-socket.patch
new file mode 100644
index 000000000..be7b46711
--- /dev/null
+++ b/postgresql/postgresql-run-socket.patch
@@ -0,0 +1,12 @@
+diff -upr postgresql-13.1.orig/src/include/pg_config_manual.h postgresql-13.1/src/include/pg_config_manual.h
+--- postgresql-13.1.orig/src/include/pg_config_manual.h 2020-11-10 00:24:30.000000000 +0200
++++ postgresql-13.1/src/include/pg_config_manual.h 2020-12-10 01:55:35.999605194 +0200
+@@ -201,7 +201,7 @@
+ * support them yet.
+ */
+ #ifndef WIN32
+-#define DEFAULT_PGSOCKET_DIR "/tmp"
++#define DEFAULT_PGSOCKET_DIR "/run/postgresql"
+ #else
+ #define DEFAULT_PGSOCKET_DIR ""
+ #endif
diff --git a/postgresql/postgresql.pam b/postgresql/postgresql.pam
new file mode 100644
index 000000000..95200b7f5
--- /dev/null
+++ b/postgresql/postgresql.pam
@@ -0,0 +1,6 @@
+#
+# /etc/pam.d/postgresql
+#
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
diff --git a/postgresql/postgresql.rc b/postgresql/postgresql.rc
new file mode 100644
index 000000000..416b8243b
--- /dev/null
+++ b/postgresql/postgresql.rc
@@ -0,0 +1,17 @@
+#
+# /etc/rc.d/postgresql: start, stop or restart PostgreSQL server postmaster
+#
+
+PG_DATA=/var/pgsql/data
+
+[ -e /run/postgresql ] && install -D -u 42 -g 42 /run/postgresql
+
+case "$1" in
+ start|stop|status|restart|reload)
+ [ ! -e /run/postgresql ] && mkdir /run/postgresql && chown postgres /run/postgresql
+ sudo -u postgres pg_ctl -D "$PG_DATA" -l /var/log/postgresql "$1" ;;
+ *)
+ echo "usage: $0 start|stop|restart|reload|status" ;;
+esac
+
+# End of file

Generated by cgit