* update postgresql to 16.2-2

This commit is contained in:
Alexander Baldeck 2024-05-12 00:29:27 +02:00
parent 8f9cfe5150
commit 3d8432200a
3 changed files with 173 additions and 113 deletions

View File

@ -3,52 +3,85 @@
# Maintainer: Dan McGee <dan@archlinux.org>
pkgbase=postgresql
pkgname=('postgresql-libs' 'postgresql-docs' 'postgresql')
pkgname=(
'postgresql'
'postgresql-libs'
'postgresql-docs'
)
pkgver=16.2
_majorver=${pkgver%.*}
pkgrel=1
pkgrel=2
pkgdesc='Sophisticated object-relational DBMS'
url='https://www.postgresql.org/'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
license=('custom:PostgreSQL')
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
0001-Set-DEFAULT_PGSOCKET_DIR-to-run-postgresql.patch
0002-Force-RPATH-to-be-used-for-the-PL-Perl-plugin.patch
postgresql.pam
postgresql.logrotate
postgresql.service
postgresql-check-db-dir.in
postgresql.sysusers
postgresql.tmpfiles)
license=('PostgreSQL')
depends=(
'bash'
'gcc-libs'
'glibc'
'icu'
'krb5'
'libldap'
'libxml2'
'libxslt'
'llvm-libs'
'lz4'
'openssl'
'pam'
'readline'
'systemd-libs'
'util-linux-libs'
'zlib'
'zstd'
)
makedepends=(
'clang'
'llvm'
'perl'
'perl-ipc-run'
'python'
'systemd'
'tcl'
'util-linux'
)
source=(
https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2
0001-Set-DEFAULT_PGSOCKET_DIR-to-run-postgresql.patch
0002-Force-RPATH-to-be-used-for-the-PL-Perl-plugin.patch
postgresql-check-db-dir.in
postgresql.logrotate
postgresql.pam
postgresql.service
postgresql.sysusers
postgresql.tmpfiles
)
md5sums=('3d19d93434666db5d33e692472915ae5'
'6ce1dab3da98a10f9190e6b3037f93aa'
'632e22e96d6ace85b76a380487cfbf8c'
'96f82c38f3f540b53f3e5144900acf17'
'd28e443f9f65a5712c52018b84e27137'
'0418d1b78f15b969c1575657d47ab130'
'10123caec61006cbe316de8ab7a497bc'
'd28e443f9f65a5712c52018b84e27137'
'96f82c38f3f540b53f3e5144900acf17'
'026a3dbde1a0b2909120f0012237a33d'
'da6a0dda84638d0c3463abf4bc01e621'
'02d017978f0bba21f455feceb3f0a45a')
'9138244e0e6b98acc770931a4b150b86')
sha256sums=('446e88294dbc2c9085ab4b7061a646fa604b4bec03521d5ea671c2e5ad9b2952'
'4d5a1020626d6cdd8eabbcb54e71d719a8d4cf0228f20173d16a86b374d32acd'
'e37e54caead0568b3605b14314faa62732b6ef188ee18edf2e73459795125717'
'57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5'
'6abb842764bbed74ea4a269d24f1e73d1c0b1d8ecd6e2e6fb5fb10590298605e'
'25fb140b90345828dc01a4f286345757e700a47178bab03d217a7a5a79105b57'
'94af93b53bf7772e6664c239523ef952ffc905a0de3c2c4b2dfc2fe8f3a2efed'
'6abb842764bbed74ea4a269d24f1e73d1c0b1d8ecd6e2e6fb5fb10590298605e'
'57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5'
'5c23d7741bcd429d9552258decbcb1935febd671c237c1c99b9248dff4838eb8'
'3cfe36dd202af56b3ef8e6d6a746b24e6f46f0d9e0d3fa125dbfb5e598170afb'
'4a4c0bb9ceb156cc47e9446d8393d1f72b4fe9ea1d39ba17213359df9211da57')
'ea771830c15b24c8725ded92e6a9ba9848b13f722357c5f5857dfeb21985d54c')
b2sums=('b863d7b7a1721df237c33a45aed788be9397a432a445f2267619496f1c0210196ff0904c44dbf07ea11f814921c643a6b9182b8a4c992f13578c4fe00868d491'
'283b5a025a3a5ed500317b7a0b8fa9af66816bc7c6a59a90d826e4e8420f9631d41b7219617d63e2c20e58e553bfe715d3b6d31dd3ed3ec07233a7f178dba368'
'920d9601b0573e086045ecf699122afa81f02f1e88490268ccf5ab880ba4e36990b9093628db8520cf23433ae813d2ad81e692b03600f58bbc0b73a3d3e1a70b'
'3eab84d332d96678fe6e435ee243c8f1a82b838f601d61d3604d11e918aed7a62202edca5e476c4b9031ed284570e6fcd6c659cfdbd9624aa0019d3233755f81'
'2209b7550acad7955102ec6922754b4046b2a2ad2a7e1cfb2cc4053c0705abac7aa7d7968eab617f50894797d06345f51c9a669926bd2a77dcf688206a2027e0'
'a4255df47b7ac1418d20aa73aa0f6e70c7952a10d706e5523043c48b2c3b6d8e39838049dfcc826913cd0f2c06502561d1abe8b19cce7071db66139ae93a37bf'
'682bfab1189221d82f6cce9bcb8c40c6d37ecacbcaf0568bbaa2706503b1f102e5476d0d110dcc6240ab62c5e7c2c20a5d9af8edd4038d212327f8866b1cf15a'
'2209b7550acad7955102ec6922754b4046b2a2ad2a7e1cfb2cc4053c0705abac7aa7d7968eab617f50894797d06345f51c9a669926bd2a77dcf688206a2027e0'
'3eab84d332d96678fe6e435ee243c8f1a82b838f601d61d3604d11e918aed7a62202edca5e476c4b9031ed284570e6fcd6c659cfdbd9624aa0019d3233755f81'
'312c5c877809be46d8823b3a16db6410fb061a3fdc3558710e4921b72886fabe619a49e20a583b9a717771c72dfc8c3575c6e103becf8bb8b9e2d3cdaf6aa3c1'
'e025e78797879323bb78752dff8ea4eae984015240d273de8e83e1b7f7f7a8b9a549c33df6b72c40721f05a3df149fe065f9bb8c3fdf4f3b9f759963bb3da288'
'8a8e5ec24ea338b2b51b8d2be5a336ac8d4cc6b25200ed0f0d564df9942997478df0c54da2fac7b27d677774a34398f69047eecd0f97bdc0df8fe50a1b5ed74d')
'd66fcad8c00ed29cb50cf6721c89023787b42973c3bf50535c4f822a8870883557396b3ec5cc79465e75d0786246a523db69368b2a7feff40c3430c736999cca')
# Upstream provides md5 and sha256
@ -62,29 +95,30 @@ build() {
cd postgresql-${pkgver}
local configure_options=(
--prefix=/usr
--sysconfdir=/etc
--mandir=/usr/share/man
--datadir=/usr/share/postgresql
--sysconfdir=/etc
--disable-rpath
--enable-nls
--enable-tap-tests
--enable-thread-safety
--with-gssapi
--with-icu
--with-ldap
--with-libxml
--with-libxslt
--with-llvm
--with-lz4
--with-openssl
--with-pam
--with-perl
--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-tcl
--with-uuid=e2fs
--with-zstd
--enable-nls
--enable-thread-safety
--disable-rpath
)
# Fix static libs
@ -103,79 +137,26 @@ _postgres_check() {
}
check() {
export LANG=C
export LANG=C LC_ALL=C
cd postgresql-${pkgver}
_postgres_check check
_postgres_check check-world
}
package_postgresql-libs() {
pkgdesc="Libraries for use with PostgreSQL"
depends=('krb5' 'openssl' 'readline' 'zlib' 'libldap')
provides=('postgresql-client' 'libpq.so' 'libecpg.so' 'libecpg_compat.so' 'libpgtypes.so')
conflicts=('postgresql-client')
cd postgresql-${pkgver}
# install license
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
make -C ${dir} DESTDIR="${pkgdir}" install
done
for util in pg_config pg_dump pg_dumpall pg_restore psql \
clusterdb createdb createuser dropdb dropuser pg_isready reindexdb vacuumdb; do
install -Dm 644 doc/src/sgml/man1/${util}.1 "${pkgdir}"/usr/share/man/man1/${util}.1
done
cd src/include
install -d "${pkgdir}"/usr/include/{libpq,postgresql/internal/libpq}
# these headers are needed by the public headers of the interfaces
install -m 644 pg_config.h "${pkgdir}/usr/include"
install -m 644 pg_config_os.h "${pkgdir}/usr/include"
install -m 644 pg_config_ext.h "${pkgdir}/usr/include"
install -m 644 postgres_ext.h "${pkgdir}/usr/include"
install -m 644 libpq/libpq-fs.h "${pkgdir}/usr/include/libpq"
install -m 644 pg_config_manual.h "${pkgdir}/usr/include"
# these he aders are needed by the not-so-public headers of the interfaces
install -m 644 c.h "${pkgdir}/usr/include/postgresql/internal"
install -m 644 port.h "${pkgdir}/usr/include/postgresql/internal"
install -m 644 postgres_fe.h "${pkgdir}/usr/include/postgresql/internal"
install -m 644 libpq/pqcomm.h "${pkgdir}/usr/include/postgresql/internal/libpq"
}
package_postgresql-docs() {
pkgdesc="HTML documentation for PostgreSQL"
options+=('docs')
cd postgresql-${pkgver}
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"
# clean up
rmdir "${pkgdir}"/usr/share/man/man{1,3,7}
rmdir "${pkgdir}"/usr/share/man
}
package_postgresql() {
pkgdesc='Sophisticated object-relational DBMS'
backup=('etc/pam.d/postgresql' 'etc/logrotate.d/postgresql')
depends=("postgresql-libs>=${pkgver}" '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'
'logrotate: rotates system logs automatically')
backup=(
'etc/logrotate.d/postgresql'
'etc/pam.d/postgresql'
)
depends+=("postgresql-libs>=${pkgver}")
optdepends=(
'logrotate: rotates system logs automatically'
'perl: for PL/Perl support'
'postgresql-old-upgrade: upgrade from previous major version using pg_upgrade'
'python: for PL/Python 3 support'
'tcl: for PL/Tcl support'
)
options+=('staticlibs')
install=postgresql.install
@ -195,10 +176,15 @@ package_postgresql() {
rm "${pkgdir}"/usr/share/man/man1/${util}.1
done
install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${pkgname}"
# 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"
cd "${srcdir}"
sed -e "s/%PGMAJORVERSION%/$_majorver/g" \
pushd "${srcdir}"
sed -e "s/%PGMAJORVERSION%/${_majorver}/g" \
-e "s/%PREVMAJORVERSION%/$((_majorver - 1))/g" \
postgresql-check-db-dir.in |
install -Dm 755 /dev/stdin "${pkgdir}/usr/bin/postgresql-check-db-dir"
@ -210,11 +196,82 @@ package_postgresql() {
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"
popd
install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
package_postgresql-libs() {
pkgdesc="Libraries for use with PostgreSQL"
depends=(
'glibc'
'krb5'
'libldap'
'lz4'
'openssl'
'readline'
'zlib'
'zstd'
)
provides=(
'libecpg.so'
'libecpg_compat.so'
'libpgtypes.so'
'libpq.so'
'postgresql-client'
)
conflicts=('postgresql-client')
cd postgresql-${pkgver}
# 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
make -C ${dir} DESTDIR="${pkgdir}" install
done
for util in pg_config pg_dump pg_dumpall pg_restore psql \
clusterdb createdb createuser dropdb dropuser pg_isready reindexdb vacuumdb; do
install -Dm 644 doc/src/sgml/man1/${util}.1 "${pkgdir}"/usr/share/man/man1/${util}.1
done
pushd src/include
install -d "${pkgdir}"/usr/include/{libpq,postgresql/internal/libpq}
# these headers are needed by the public headers of the interfaces
install -m 644 pg_config.h "${pkgdir}/usr/include"
install -m 644 pg_config_os.h "${pkgdir}/usr/include"
install -m 644 pg_config_ext.h "${pkgdir}/usr/include"
install -m 644 postgres_ext.h "${pkgdir}/usr/include"
install -m 644 libpq/libpq-fs.h "${pkgdir}/usr/include/libpq"
install -m 644 pg_config_manual.h "${pkgdir}/usr/include"
# these he aders are needed by the not-so-public headers of the interfaces
install -m 644 c.h "${pkgdir}/usr/include/postgresql/internal"
install -m 644 port.h "${pkgdir}/usr/include/postgresql/internal"
install -m 644 postgres_fe.h "${pkgdir}/usr/include/postgresql/internal"
install -m 644 libpq/pqcomm.h "${pkgdir}/usr/include/postgresql/internal/libpq"
popd
install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
package_postgresql-docs() {
pkgdesc="HTML documentation for PostgreSQL"
depends=()
options+=('docs')
cd postgresql-${pkgver}
make -C doc/src/sgml DESTDIR="${pkgdir}" install-html
chown -R root:root "${pkgdir}/usr/share/doc/postgresql/html"
# clean up
rmdir "${pkgdir}"/usr/share/man/man{1,3,7}
rmdir "${pkgdir}"/usr/share/man
install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
# vim:set sw=2 sts=-1 et:

View File

@ -1,6 +1,8 @@
[Unit]
Description=PostgreSQL database server
After=network.target
Documentation=man:postgres(1)
After=network.target network-online.target
Wants=network-online.target
[Service]
Type=notify

View File

@ -1,2 +1,3 @@
d /var/lib/postgres 700 postgres postgres
d /var/lib/postgres/data 700 postgres postgres
h /var/lib/postgres/data - - - - +C