summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGoliathLabs2020-06-28 13:12:08 +0200
committerGoliathLabs2020-06-28 13:12:08 +0200
commit20c60ba040d54f897ba1e1a7ed3e62b03003a39f (patch)
tree7ba81d57a235671fffea4f0f37afaa00193925d0
parent39a0cc1e8d246b584711772e2852edd355dab5a6 (diff)
downloadaur-20c60ba040d54f897ba1e1a7ed3e62b03003a39f.tar.gz
Updated: 13beta2
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD67
-rwxr-xr-xpostgresql-check-db-dir4
-rw-r--r--postgresql-perl-rpath.patch13
-rw-r--r--postgresql-run-socket.patch12
-rw-r--r--postgresql.install25
-rw-r--r--postgresql.service8
-rw-r--r--postgresql.sysusers1
-rw-r--r--postgresql.tmpfiles2
9 files changed, 98 insertions, 61 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d58b5a1d059..26eccb978da 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = postgresql-beta
pkgdesc = Sophisticated object-relational DBMS
- pkgver = 12beta3
+ pkgver = 13beta2
pkgrel = 1
url = https://www.postgresql.org/
arch = aarch64
@@ -10,6 +10,7 @@ pkgbase = postgresql-beta
makedepends = krb5
makedepends = libxml2
makedepends = python
+ makedepends = python2
makedepends = perl
makedepends = tcl>=8.6.0
makedepends = openssl>=1.0.0
@@ -18,18 +19,26 @@ pkgbase = postgresql-beta
makedepends = icu
makedepends = systemd
makedepends = libldap
- source = https://ftp.postgresql.org/pub/source/v12beta3/postgresql-12beta3.tar.bz2
+ makedepends = llvm
+ makedepends = clang
+ source = https://ftp.postgresql.org/pub/source/v13beta2/postgresql-13beta2.tar.bz2
source = postgresql-run-socket.patch
+ source = postgresql-perl-rpath.patch
source = postgresql.pam
source = postgresql.logrotate
source = postgresql.service
source = postgresql-check-db-dir
- sha256sums = e4a4079c75bf049349c70a02f705beecbb8263684ff2d4e13a582a3ff50332aa
- sha256sums = 8538619cb8bea51078b605ad64fe22abd6050373c7ae3ad6595178da52f6a7d9
+ source = postgresql.sysusers
+ source = postgresql.tmpfiles
+ sha256sums = 51b8c64f4c354728555144a7bfbdced96afb86e5cfa80a26b5e96a1d9081ee9f
+ sha256sums = 719d24c09c5ea17701cbd49b77f40c58bde52b603c3c8b85a708d277175d27b8
+ sha256sums = 5bcc0bcedfa0271afaa05c35e7f651416a2a818c28069c51c2d0de0aa7d0dfdb
sha256sums = 57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5
sha256sums = 6abb842764bbed74ea4a269d24f1e73d1c0b1d8ecd6e2e6fb5fb10590298605e
- sha256sums = ad025a5fb623b1a1e9dff0cc62cc63f66244bb27d81370a6251aa29e8574be94
- sha256sums = 2bbd8c4e51b70223d274fef3a167af096f44af3d3c41ae505ad11c606674e7c5
+ sha256sums = 25fb140b90345828dc01a4f286345757e700a47178bab03d217a7a5a79105b57
+ sha256sums = 7db9626c322928b2465aa126b48ba7f0eebd366bf2aa19c9c0a92b488cb469c5
+ sha256sums = 7fa8f0ef3f9d40abd4749cc327c2f52478cb6dfb6e2405bd0279c95e9ff99f12
+ sha256sums = 4a4c0bb9ceb156cc47e9446d8393d1f72b4fe9ea1d39ba17213359df9211da57
pkgname = postgresql-beta-libs
pkgdesc = Libraries for use with PostgreSQL
@@ -47,16 +56,16 @@ pkgname = postgresql-beta-docs
pkgname = postgresql-beta
pkgdesc = Sophisticated object-relational DBMS
- install = postgresql.install
- depends = postgresql-beta-libs>=12beta3
+ depends = postgresql-beta-libs>=13beta2
depends = krb5
depends = libxml2
depends = readline>=6.0
depends = openssl>=1.0.0
depends = pam
depends = icu
- depends = libsystemd
+ depends = systemd-libs
depends = libldap
+ depends = llvm-libs
optdepends = python2: for PL/Python 2 support
optdepends = python: for PL/Python 3 support
optdepends = perl: for PL/Perl support
diff --git a/PKGBUILD b/PKGBUILD
index c4dfd73f7af..fbf9f7db773 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,41 @@
+# Maintainer: Felix Golatofski <contact@xdfr.de>
# Contributor: Artjom Simon <artjom.simon@gmail.com>
# Contributor: Wèi Cōngruì <crvv.pku@gmail.com>
+_pkgname=postgresql
pkgbase=postgresql-beta
pkgname=('postgresql-beta-libs' 'postgresql-beta-docs' 'postgresql-beta')
-pkgver=12beta3
+pkgver=13beta2
pkgrel=1
pkgdesc='Sophisticated object-relational DBMS'
url='https://www.postgresql.org/'
arch=('aarch64' 'i686' 'x86_64')
license=('custom:PostgreSQL')
-makedepends=('krb5' 'libxml2' 'python' 'perl' 'tcl>=8.6.0' 'openssl>=1.0.0' 'pam' 'zlib' 'icu' 'systemd' 'libldap')
+makedepends=('krb5' 'libxml2' 'python' 'python2' 'perl' 'tcl>=8.6.0' 'openssl>=1.0.0'
+ 'pam' 'zlib' 'icu' 'systemd' 'libldap' 'llvm' 'clang')
source=(https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2
postgresql-run-socket.patch
+ postgresql-perl-rpath.patch
postgresql.pam
postgresql.logrotate
postgresql.service
- postgresql-check-db-dir)
-sha256sums=('e4a4079c75bf049349c70a02f705beecbb8263684ff2d4e13a582a3ff50332aa'
- '8538619cb8bea51078b605ad64fe22abd6050373c7ae3ad6595178da52f6a7d9'
+ postgresql-check-db-dir
+ postgresql.sysusers
+ postgresql.tmpfiles)
+sha256sums=('51b8c64f4c354728555144a7bfbdced96afb86e5cfa80a26b5e96a1d9081ee9f'
+ '719d24c09c5ea17701cbd49b77f40c58bde52b603c3c8b85a708d277175d27b8'
+ '5bcc0bcedfa0271afaa05c35e7f651416a2a818c28069c51c2d0de0aa7d0dfdb'
'57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5'
'6abb842764bbed74ea4a269d24f1e73d1c0b1d8ecd6e2e6fb5fb10590298605e'
- 'ad025a5fb623b1a1e9dff0cc62cc63f66244bb27d81370a6251aa29e8574be94'
- '2bbd8c4e51b70223d274fef3a167af096f44af3d3c41ae505ad11c606674e7c5')
+ '25fb140b90345828dc01a4f286345757e700a47178bab03d217a7a5a79105b57'
+ '7db9626c322928b2465aa126b48ba7f0eebd366bf2aa19c9c0a92b488cb469c5'
+ '7fa8f0ef3f9d40abd4749cc327c2f52478cb6dfb6e2405bd0279c95e9ff99f12'
+ '4a4c0bb9ceb156cc47e9446d8393d1f72b4fe9ea1d39ba17213359df9211da57')
prepare() {
cd postgresql-${pkgver}
patch -p1 < ../postgresql-run-socket.patch
+ patch -p1 < ../postgresql-perl-rpath.patch
}
build() {
@@ -47,8 +57,10 @@ build() {
--with-icu
--with-systemd
--with-ldap
+ --with-llvm
--enable-nls
--enable-thread-safety
+ --disable-rpath
)
# only build plpython3 for now
@@ -71,6 +83,20 @@ build() {
make world
}
+#_postgres_check() {
+# make "${1}" || (find . -name regression.diffs | \
+# while read -r line; do
+# error "make ${1} failure: ${line}"
+# cat "${line}"
+# done; exit 1)
+#}
+
+#check() {
+# cd postgresql-${pkgver}
+# _postgres_check check
+# _postgres_check check-world
+#}
+
package_postgresql-beta-libs() {
pkgdesc="Libraries for use with PostgreSQL"
depends=('krb5' 'openssl>=1.0.0' 'readline>=6.0' 'zlib' 'libldap')
@@ -80,7 +106,7 @@ package_postgresql-beta-libs() {
cd postgresql-${pkgver}
# install license
- install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${_pkgname}"
# install libs and non-server binaries
for dir in src/interfaces src/bin/pg_config src/bin/pg_dump src/bin/psql src/bin/scripts; do
@@ -117,7 +143,7 @@ package_postgresql-beta-docs() {
cd postgresql-${pkgver}
- install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${_pkgname}"
make -C doc/src/sgml DESTDIR="${pkgdir}" install-html
chown -R root:root "${pkgdir}/usr/share/doc/postgresql/html"
@@ -130,14 +156,13 @@ package_postgresql-beta-docs() {
package_postgresql-beta() {
pkgdesc='Sophisticated object-relational DBMS'
backup=('etc/pam.d/postgresql' 'etc/logrotate.d/postgresql')
- depends=("postgresql-beta-libs>=${pkgver}" 'krb5' 'libxml2' 'readline>=6.0' 'openssl>=1.0.0' 'pam' 'icu' 'libsystemd' 'libldap')
+ depends=("postgresql-beta-libs>=${pkgver}" 'krb5' 'libxml2' 'readline>=6.0' 'openssl>=1.0.0' 'pam' 'icu' 'systemd-libs' 'libldap' 'llvm-libs')
optdepends=('python2: for PL/Python 2 support'
'python: for PL/Python 3 support'
'perl: for PL/Perl support'
'tcl: for PL/Tcl support'
'postgresql-old-upgrade: upgrade from previous major version using pg_upgrade')
options=('staticlibs')
- install=postgresql.install
cd postgresql-${pkgver}
@@ -163,19 +188,23 @@ package_postgresql-beta() {
rm "${pkgdir}"/usr/share/man/man1/${util}.1
done
+ install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${_pkgname}"
+
+ cd "${srcdir}"
+ install -Dm 755 postgresql-check-db-dir -t "${pkgdir}/usr/bin"
+
+ install -Dm 644 ${_pkgname}.pam "${pkgdir}/etc/pam.d/${_pkgname}"
+ install -Dm 644 ${_pkgname}.logrotate "${pkgdir}/etc/logrotate.d/${_pkgname}"
+
+ install -Dm 644 ${_pkgname}.service -t "${pkgdir}/usr/lib/systemd/system"
+ install -Dm 644 ${_pkgname}.sysusers "${pkgdir}/usr/lib/sysusers.d/${_pkgname}.conf"
+ install -Dm 644 ${_pkgname}.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/${_pkgname}.conf"
+
# clean up unneeded installed items
rm -rf "${pkgdir}/usr/include/postgresql/internal"
rm -rf "${pkgdir}/usr/include/libpq"
find "${pkgdir}/usr/include" -maxdepth 1 -type f -execdir rm {} +
rmdir "${pkgdir}/usr/share/doc/postgresql/html"
-
- install -Dm 644 "${srcdir}/postgresql.service" -t "${pkgdir}/usr/lib/systemd/system"
- install -Dm 755 "${srcdir}/postgresql-check-db-dir" -t "${pkgdir}/usr/bin"
-
- install -Dm 644 "${srcdir}/postgresql.pam" "${pkgdir}/etc/pam.d/postgresql"
- install -Dm 644 "${srcdir}/postgresql.logrotate" "${pkgdir}/etc/logrotate.d/postgresql"
-
- install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
# vim: ts=2 sw=2 et:
diff --git a/postgresql-check-db-dir b/postgresql-check-db-dir
index fabca97e2c4..6c4fcd7e231 100755
--- a/postgresql-check-db-dir
+++ b/postgresql-check-db-dir
@@ -16,9 +16,9 @@ then
fi
# PGMAJORVERSION is major version
-PGMAJORVERSION=11
+PGMAJORVERSION=13
# PREVMAJORVERSION is the previous major version
-PREVMAJORVERSION=10
+PREVMAJORVERSION=12
# Check for the PGDATA structure
if [ -f "$PGDATA/PG_VERSION" ] && [ -d "$PGDATA/base" ]
diff --git a/postgresql-perl-rpath.patch b/postgresql-perl-rpath.patch
new file mode 100644
index 00000000000..1865b012afd
--- /dev/null
+++ b/postgresql-perl-rpath.patch
@@ -0,0 +1,13 @@
+diff -Naur postgresql-9.1.5.orig/src/pl/plperl/GNUmakefile postgresql-9.1.5/src/pl/plperl/GNUmakefile
+--- postgresql-9.1.5.orig/src/pl/plperl/GNUmakefile 2012-08-14 18:41:04.000000000 -0400
++++ postgresql-9.1.5/src/pl/plperl/GNUmakefile 2012-08-17 11:15:09.457116708 -0400
+@@ -55,6 +55,9 @@
+
+ SHLIB_LINK = $(perl_embed_ldflags)
+
++# Force rpath to be used even though we disable it everywhere else
++SHLIB_LINK += $(rpath)
++
+ REGRESS_OPTS = --dbname=$(PL_TESTDB)
+ REGRESS = plperl_setup plperl plperl_lc plperl_trigger plperl_shared \
+ plperl_elog plperl_util plperl_init plperlu plperl_array \
diff --git a/postgresql-run-socket.patch b/postgresql-run-socket.patch
index b558c7b7496..de5045b330f 100644
--- a/postgresql-run-socket.patch
+++ b/postgresql-run-socket.patch
@@ -1,12 +1,12 @@
diff -Naur postgresql-9.2.0.sockets/src/include/pg_config_manual.h postgresql-9.2.0/src/include/pg_config_manual.h
--- postgresql-9.2.0.sockets/src/include/pg_config_manual.h 2012-09-06 17:26:17.000000000 -0400
+++ postgresql-9.2.0/src/include/pg_config_manual.h 2012-09-06 18:13:18.183092471 -0400
-@@ -144,7 +144,7 @@
- * here's where to twiddle it. You can also override this at runtime
- * with the postmaster's -k switch.
+@@ -201,7 +201,7 @@
+ * support them yet.
*/
+ #ifndef WIN32
-#define DEFAULT_PGSOCKET_DIR "/tmp"
+#define DEFAULT_PGSOCKET_DIR "/run/postgresql"
-
- /*
- * The random() function is expected to yield values between 0 and
+ #else
+ #define DEFAULT_PGSOCKET_DIR ""
+ #endif
diff --git a/postgresql.install b/postgresql.install
deleted file mode 100644
index 0d23d474a0c..00000000000
--- a/postgresql.install
+++ /dev/null
@@ -1,25 +0,0 @@
-post_install() {
- if [ ! -d '/var/lib/postgres' ]; then
- mkdir -p '/var/lib/postgres'
- fi
- if ! getent group postgres >/dev/null; then
- groupadd -g 88 postgres
- fi
- if ! getent passwd postgres >/dev/null; then
- useradd -c 'PostgreSQL user' -u 88 -g postgres -d '/var/lib/postgres' -s /bin/bash postgres
- passwd -l postgres >/dev/null
- fi
- if [ ! -d '/var/lib/postgres/data' ]; then
- mkdir -p '/var/lib/postgres/data'
- chown postgres:postgres '/var/lib/postgres/data'
- fi
-}
-
-post_upgrade() {
- post_install $1
- # FS#23858, fix postgres user shell issue
- postgres_shell=$(getent passwd postgres | cut -d: -f7)
- if [ "$postgres_shell" = "/sbin/nologin" ]; then
- chsh -s /bin/bash postgres
- fi
-}
diff --git a/postgresql.service b/postgresql.service
index 3981058622d..dcef95a9c10 100644
--- a/postgresql.service
+++ b/postgresql.service
@@ -30,6 +30,14 @@ PrivateTmp=true
ProtectHome=true
ProtectSystem=full
NoNewPrivileges=true
+ProtectControlGroups=true
+ProtectKernelModules=true
+ProtectKernelTunables=true
+PrivateDevices=true
+RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
+RestrictNamespaces=true
+RestrictRealtime=true
+SystemCallArchitectures=native
[Install]
WantedBy=multi-user.target
diff --git a/postgresql.sysusers b/postgresql.sysusers
new file mode 100644
index 00000000000..a1711b1cc3d
--- /dev/null
+++ b/postgresql.sysusers
@@ -0,0 +1 @@
+u postgres - "PostgreSQL user" /var/lib/postgres /bin/bash
diff --git a/postgresql.tmpfiles b/postgresql.tmpfiles
new file mode 100644
index 00000000000..e618918018a
--- /dev/null
+++ b/postgresql.tmpfiles
@@ -0,0 +1,2 @@
+d /var/lib/postgres/data 700 postgres postgres
+h /var/lib/postgres/data - - - - +C