diff options
author | a821 | 2023-08-26 22:32:22 +0200 |
---|---|---|
committer | a821 | 2023-08-26 22:32:22 +0200 |
commit | 21124d510adbbcd4cc79a04b84d0e88df30d8de0 (patch) | |
tree | 930db2ecfde45123c3ff44629331e8476d00a09a | |
parent | 20c60ba040d54f897ba1e1a7ed3e62b03003a39f (diff) | |
download | aur-21124d510adbbcd4cc79a04b84d0e88df30d8de0.tar.gz |
Adopt and Update
This PKGBUILD follows the official one from gitlab.
Fixes:
* Remove version restrictions as they should be not needed.
* Remove python2 support.
* Remove non-supported architectures.
* Update patches so they apply cleanly.
* Add stable package names to conflict and provides arrays.
* Add .gitignore
-rw-r--r-- | .SRCINFO | 50 | ||||
-rw-r--r-- | .gitignore | 12 | ||||
-rw-r--r-- | PKGBUILD | 119 | ||||
-rwxr-xr-x | postgresql-check-db-dir | 4 | ||||
-rw-r--r-- | postgresql-perl-rpath.patch | 13 | ||||
-rw-r--r-- | postgresql-run-socket.patch | 9 | ||||
-rw-r--r-- | postgresql.install | 7 |
7 files changed, 119 insertions, 95 deletions
@@ -1,19 +1,16 @@ pkgbase = postgresql-beta pkgdesc = Sophisticated object-relational DBMS - pkgver = 13beta2 + pkgver = 16beta3 pkgrel = 1 url = https://www.postgresql.org/ - arch = aarch64 - arch = i686 arch = x86_64 license = custom:PostgreSQL makedepends = krb5 makedepends = libxml2 makedepends = python - makedepends = python2 makedepends = perl - makedepends = tcl>=8.6.0 - makedepends = openssl>=1.0.0 + makedepends = tcl + makedepends = openssl makedepends = pam makedepends = zlib makedepends = icu @@ -21,7 +18,9 @@ pkgbase = postgresql-beta makedepends = libldap makedepends = llvm makedepends = clang - source = https://ftp.postgresql.org/pub/source/v13beta2/postgresql-13beta2.tar.bz2 + makedepends = libxslt + makedepends = util-linux + source = https://ftp.postgresql.org/pub/source/v16beta3/postgresql-16beta3.tar.bz2 source = postgresql-run-socket.patch source = postgresql-perl-rpath.patch source = postgresql.pam @@ -30,48 +29,59 @@ pkgbase = postgresql-beta source = postgresql-check-db-dir source = postgresql.sysusers source = postgresql.tmpfiles - sha256sums = 51b8c64f4c354728555144a7bfbdced96afb86e5cfa80a26b5e96a1d9081ee9f - sha256sums = 719d24c09c5ea17701cbd49b77f40c58bde52b603c3c8b85a708d277175d27b8 - sha256sums = 5bcc0bcedfa0271afaa05c35e7f651416a2a818c28069c51c2d0de0aa7d0dfdb + sha256sums = ffcf44e272662f6ac451a8d6d6ff951715db651c8d4907ec659cbde46abd52d3 + sha256sums = ce71d9334ce9eb59b967ed4fb8647bebdf49cc4d18b191b4c107241cdf92237d + sha256sums = 631086b437e256aaf6fa16b26f6100af4f5de6ece2580b41d343f2ccaa5038d6 sha256sums = 57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5 sha256sums = 6abb842764bbed74ea4a269d24f1e73d1c0b1d8ecd6e2e6fb5fb10590298605e sha256sums = 25fb140b90345828dc01a4f286345757e700a47178bab03d217a7a5a79105b57 - sha256sums = 7db9626c322928b2465aa126b48ba7f0eebd366bf2aa19c9c0a92b488cb469c5 + sha256sums = a768b6c8093fef56349fa61e56fae093cb962376fb0d8d0d4c98bf5fe53d29ed sha256sums = 7fa8f0ef3f9d40abd4749cc327c2f52478cb6dfb6e2405bd0279c95e9ff99f12 sha256sums = 4a4c0bb9ceb156cc47e9446d8393d1f72b4fe9ea1d39ba17213359df9211da57 pkgname = postgresql-beta-libs pkgdesc = Libraries for use with PostgreSQL depends = krb5 - depends = openssl>=1.0.0 - depends = readline>=6.0 + depends = openssl + depends = readline depends = zlib depends = libldap - provides = postgresql-client - conflicts = postgresql-client + provides = postgresql-libs + provides = libpq.so + provides = libecpg.so + provides = libecpg_compat.so + provides = libpgtypes.so + conflicts = postgresql-libs pkgname = postgresql-beta-docs pkgdesc = HTML documentation for PostgreSQL + provides = postgresql-docs + conflicts = postgresql-docs options = docs pkgname = postgresql-beta pkgdesc = Sophisticated object-relational DBMS - depends = postgresql-beta-libs>=13beta2 + install = postgresql.install + depends = postgresql-beta-libs depends = krb5 depends = libxml2 - depends = readline>=6.0 - depends = openssl>=1.0.0 + depends = readline + depends = openssl depends = pam depends = icu depends = systemd-libs depends = libldap depends = llvm-libs - optdepends = python2: for PL/Python 2 support + depends = libxslt + depends = lz4 + depends = zstd optdepends = python: for PL/Python 3 support optdepends = perl: for PL/Perl support optdepends = tcl: for PL/Tcl support optdepends = postgresql-old-upgrade: upgrade from previous major version using pg_upgrade + optdepends = logrotate: rotates system logs automatically + provides = postgresql + conflicts = postgresql options = staticlibs backup = etc/pam.d/postgresql backup = etc/logrotate.d/postgresql - diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..3499c94a999b --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +* +!*.patch +!PKGBUILD +!.SRCINFO +!postgresql-check-db-dir +!postgresql.install +!postgresql.logrotate +!postgresql.pam +!postgresql.service +!postgresql.sysusers +!postgresql.tmpfiles +!.gitignore @@ -1,18 +1,19 @@ -# Maintainer: Felix Golatofski <contact@xdfr.de> +# Maintainer: a821 +# Contributor: 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=13beta2 +pkgver=16beta3 pkgrel=1 pkgdesc='Sophisticated object-relational DBMS' url='https://www.postgresql.org/' -arch=('aarch64' 'i686' 'x86_64') +arch=('x86_64') license=('custom:PostgreSQL') -makedepends=('krb5' 'libxml2' 'python' 'python2' 'perl' 'tcl>=8.6.0' 'openssl>=1.0.0' - 'pam' 'zlib' 'icu' 'systemd' 'libldap' 'llvm' 'clang') +makedepends=('krb5' 'libxml2' 'python' 'perl' 'tcl' 'openssl' + 'pam' 'zlib' 'icu' 'systemd' 'libldap' 'llvm' 'clang' 'libxslt' + 'util-linux') source=(https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2 postgresql-run-socket.patch postgresql-perl-rpath.patch @@ -22,13 +23,13 @@ source=(https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.ta postgresql-check-db-dir postgresql.sysusers postgresql.tmpfiles) -sha256sums=('51b8c64f4c354728555144a7bfbdced96afb86e5cfa80a26b5e96a1d9081ee9f' - '719d24c09c5ea17701cbd49b77f40c58bde52b603c3c8b85a708d277175d27b8' - '5bcc0bcedfa0271afaa05c35e7f651416a2a818c28069c51c2d0de0aa7d0dfdb' +sha256sums=('ffcf44e272662f6ac451a8d6d6ff951715db651c8d4907ec659cbde46abd52d3' + 'ce71d9334ce9eb59b967ed4fb8647bebdf49cc4d18b191b4c107241cdf92237d' + '631086b437e256aaf6fa16b26f6100af4f5de6ece2580b41d343f2ccaa5038d6' '57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5' '6abb842764bbed74ea4a269d24f1e73d1c0b1d8ecd6e2e6fb5fb10590298605e' '25fb140b90345828dc01a4f286345757e700a47178bab03d217a7a5a79105b57' - '7db9626c322928b2465aa126b48ba7f0eebd366bf2aa19c9c0a92b488cb469c5' + 'a768b6c8093fef56349fa61e56fae093cb962376fb0d8d0d4c98bf5fe53d29ed' '7fa8f0ef3f9d40abd4749cc327c2f52478cb6dfb6e2405bd0279c95e9ff99f12' '4a4c0bb9ceb156cc47e9446d8393d1f72b4fe9ea1d39ba17213359df9211da57') @@ -40,7 +41,7 @@ prepare() { build() { cd postgresql-${pkgver} - local options=( + local configure_options=( --prefix=/usr --mandir=/usr/share/man --datadir=/usr/share/postgresql @@ -52,61 +53,54 @@ build() { --with-python --with-tcl --with-pam + --with-readline --with-system-tzdata=/usr/share/zoneinfo --with-uuid=e2fs --with-icu --with-systemd --with-ldap --with-llvm + --with-libxslt + --with-lz4 + --with-zstd --enable-nls --enable-thread-safety --disable-rpath ) - # only build plpython3 for now - ./configure ${options[@]} \ - PYTHON=/usr/bin/python - make -C src/pl/plpython all - make -C contrib/hstore_plpython all - make -C contrib/ltree_plpython all - - # save plpython3 build and Makefile.global - cp -a src/pl/plpython{,3} - cp -a contrib/hstore_plpython{,3} - cp -a contrib/ltree_plpython{,3} - cp -a src/Makefile.global{,.python3} - make distclean + # Fix static libs + CFLAGS+=" -ffat-lto-objects" # regular build with everything - ./configure ${options[@]} \ - PYTHON=/usr/bin/python2 + ./configure "${configure_options[@]}" 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) -#} +_postgres_check() { + make "${1}" || (find . -name regression.diffs | \ + while read -r line; do + echo "make ${1} failure: ${line}" + cat "${line}" + done; exit 1) +} -#check() { -# cd postgresql-${pkgver} -# _postgres_check check -# _postgres_check check-world -#} +check() { + export LANG=C + 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') - provides=('postgresql-client') - conflicts=('postgresql-client') + depends=('krb5' 'openssl' 'readline' 'zlib' 'libldap') + provides=('postgresql-libs' 'libpq.so' 'libecpg.so' 'libecpg_compat.so' 'libpgtypes.so') + conflicts=('postgresql-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 @@ -139,11 +133,13 @@ package_postgresql-beta-libs() { package_postgresql-beta-docs() { pkgdesc="HTML documentation for PostgreSQL" - options=('docs') + provides=('postgresql-docs') + conflicts=('postgresql-docs') + options+=('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" @@ -156,13 +152,18 @@ 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' 'systemd-libs' 'libldap' 'llvm-libs') - optdepends=('python2: for PL/Python 2 support' - 'python: for PL/Python 3 support' + depends=("postgresql-beta-libs" 'krb5' 'libxml2' 'readline' + 'openssl' 'pam' 'icu' 'systemd-libs' 'libldap' 'llvm-libs' + 'libxslt' 'lz4' 'zstd') + optdepends=('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') + 'postgresql-old-upgrade: upgrade from previous major version using pg_upgrade' + 'logrotate: rotates system logs automatically') + provides=('postgresql') + conflicts=('postgresql') + options+=('staticlibs') + install=postgresql.install cd postgresql-${pkgver} @@ -171,14 +172,6 @@ package_postgresql-beta() { make -C contrib DESTDIR="${pkgdir}" install make -C doc/src/sgml DESTDIR="${pkgdir}" install-man - # install plpython3 - mv src/Makefile.global src/Makefile.global.save - cp src/Makefile.global.python3 src/Makefile.global - touch -r src/Makefile.global.save src/Makefile.global - make -C src/pl/plpython3 DESTDIR="${pkgdir}" install - make -C contrib/hstore_plpython3 DESTDIR="${pkgdir}" install - make -C contrib/ltree_plpython3 DESTDIR="${pkgdir}" install - # we don't want these, they are in the -libs package for dir in src/interfaces src/bin/pg_config src/bin/pg_dump src/bin/psql src/bin/scripts; do make -C ${dir} DESTDIR="${pkgdir}" uninstall @@ -188,17 +181,17 @@ package_postgresql-beta() { rm "${pkgdir}"/usr/share/man/man1/${util}.1 done - install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${_pkgname}" + 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 postgresql.pam "${pkgdir}/etc/pam.d/postgresql" + install -Dm 644 postgresql.logrotate "${pkgdir}/etc/logrotate.d/postgresql" - 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" + install -Dm 644 postgresql.service -t "${pkgdir}/usr/lib/systemd/system" + install -Dm 644 postgresql.sysusers "${pkgdir}/usr/lib/sysusers.d/postgresql.conf" + install -Dm 644 postgresql.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/postgresql.conf" # clean up unneeded installed items rm -rf "${pkgdir}/usr/include/postgresql/internal" diff --git a/postgresql-check-db-dir b/postgresql-check-db-dir index 6c4fcd7e2317..16d6559d74a7 100755 --- a/postgresql-check-db-dir +++ b/postgresql-check-db-dir @@ -16,9 +16,9 @@ then fi # PGMAJORVERSION is major version -PGMAJORVERSION=13 +PGMAJORVERSION=16 # PREVMAJORVERSION is the previous major version -PREVMAJORVERSION=12 +PREVMAJORVERSION=15 # 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 index 1865b012afd8..0bedc238aba7 100644 --- a/postgresql-perl-rpath.patch +++ b/postgresql-perl-rpath.patch @@ -1,9 +1,10 @@ -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) +diff --git a/src/pl/plperl/GNUmakefile b/src/pl/plperl/GNUmakefile +index 51f8890d15..00d05a5e86 100644 +--- a/src/pl/plperl/GNUmakefile ++++ b/src/pl/plperl/GNUmakefile +@@ -60,6 +60,9 @@ ifeq ($(PORTNAME), cygwin) + SHLIB_LINK += -Wl,--export-all-symbols + endif +# Force rpath to be used even though we disable it everywhere else +SHLIB_LINK += $(rpath) diff --git a/postgresql-run-socket.patch b/postgresql-run-socket.patch index de5045b330f7..bc05c849d0c5 100644 --- a/postgresql-run-socket.patch +++ b/postgresql-run-socket.patch @@ -1,7 +1,8 @@ -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 -@@ -201,7 +201,7 @@ +diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h +index 8a6e67a445..d2d86518ee 100644 +--- a/src/include/pg_config_manual.h ++++ b/src/include/pg_config_manual.h +@@ -206,7 +206,7 @@ * support them yet. */ #ifndef WIN32 diff --git a/postgresql.install b/postgresql.install new file mode 100644 index 000000000000..c46a58d5f83d --- /dev/null +++ b/postgresql.install @@ -0,0 +1,7 @@ +post_upgrade() { + # Prints the warning message if the database version on disk + # does not match the PostgreSQL major version. + if [ -d /var/lib/postgres/data ]; then + /usr/bin/postgresql-check-db-dir /var/lib/postgres/data || true + fi +} |