From fe65d4ee841d5c68fa0bd212bb5a6e1e8404de30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Sat, 12 Feb 2022 00:14:20 +0100 Subject: [PATCH 1/3] postgresql: turn into meta package 9.6 is EOL --- srcpkgs/postgresql-full | 1 + srcpkgs/postgresql/files/pg_config.sh.in | 143 ----------- srcpkgs/postgresql/files/postgresql.confd | 17 -- srcpkgs/postgresql/files/postgresql.pam | 3 - srcpkgs/postgresql/files/postgresql/control/t | 2 - srcpkgs/postgresql/files/postgresql/log/run | 2 - srcpkgs/postgresql/files/postgresql/run | 30 --- .../patches/pg_config-cross-value.patch | 46 ---- srcpkgs/postgresql/template | 230 ++++++------------ 9 files changed, 70 insertions(+), 404 deletions(-) create mode 120000 srcpkgs/postgresql-full delete mode 100644 srcpkgs/postgresql/files/pg_config.sh.in delete mode 100644 srcpkgs/postgresql/files/postgresql.confd delete mode 100644 srcpkgs/postgresql/files/postgresql.pam delete mode 100755 srcpkgs/postgresql/files/postgresql/control/t delete mode 100755 srcpkgs/postgresql/files/postgresql/log/run delete mode 100755 srcpkgs/postgresql/files/postgresql/run delete mode 100644 srcpkgs/postgresql/patches/pg_config-cross-value.patch diff --git a/srcpkgs/postgresql-full b/srcpkgs/postgresql-full new file mode 120000 index 000000000000..360e6d1a1f45 --- /dev/null +++ b/srcpkgs/postgresql-full @@ -0,0 +1 @@ +postgresql \ No newline at end of file diff --git a/srcpkgs/postgresql/files/pg_config.sh.in b/srcpkgs/postgresql/files/pg_config.sh.in deleted file mode 100644 index 4598753f6931..000000000000 --- a/srcpkgs/postgresql/files/pg_config.sh.in +++ /dev/null @@ -1,143 +0,0 @@ -#!/bin/sh -# Released to Public Domain by Doan Tran Cong Danh - -print() { - printf '%s\n' "$@" -} - -sysroot="$(cd "${0%/*}" && cd ../.. && pwd)" - -BINDIR="$sysroot/usr/bin" -DOCDIR="$sysroot/usr/share/doc/postgresql" -HTMLDIR="$sysroot/usr/share/doc/postgresql" -INCLUDEDIR="$sysroot/usr/include" -PKGINCLUDEDIR="$sysroot/usr/include/postgresql" -INCLUDEDIR_SERVER="$sysroot/usr/include/postgresql/server" -LIBDIR="$sysroot/usr/lib" -PKGLIBDIR="$sysroot/usr/lib/postgresql" -LOCALEDIR="$sysroot/usr/share/locale" -MANDIR="$sysroot/usr/share/man" -SHAREDIR="$sysroot/usr/share/postgresql" -SYSCONFDIR="$sysroot/etc/postgresql" -PGXS="$sysroot/usr/lib/postgresql/pgxs/src/makefiles/pgxs.mk" - -CONFIGURE="@configure_args@" -CC="@CC@" -CPPFLAGS="@CPPFLAGS@" -CFLAGS="@CFLAGS@" -CFLAGS_SL="@CFLAGS_SL@" -LDFLAGS="@LDFLAGS@" -LDFLAGS_EX="@LDFLAGS_EX@" -LDFLAGS_SL="@LDFLAGS_SL@" -LIBS="@LIBS@" -VERSION="PostgreSQL @VERSION@" - -if [ "$sysroot" != "/" ]; then - CPPFLAGS="$(print "$CPPFLAGS" | sed "s,-I *\\(/usr/include\\),-I$sysroot\\1,g")" - CFLAGS="$(print "$CFLAGS" | sed "s,-I *\\(/usr/include\\),-I$sysroot\\1,g")" - LDFLAGS="$(print "$LDFLAGS" | sed "s,-L *\\(/usr/lib\\),-L$sysroot\\1,g")" -fi - -usage() { - cat <<-EOF - $0 provides information about the installed version of PostgreSQL. - - Usage: - $0 [OPTION]... - - Options: - --bindir show location of user executables - --docdir show location of documentation files - --htmldir show location of HTML documentation files - --includedir show location of C header files of the client interfaces - --pkgincludedir show location of other C header files - --includedir-server show location of C header files for the server - --libdir show location of object code libraries - --pkglibdir show location of dynamically loadable modules - --localedir show location of locale support files - --mandir show location of manual pages - --sharedir show location of architecture-independent support files - --sysconfdir show location of system-wide configuration files - --pgxs show location of extension makefile - --configure show options given to PostgreSQL was built - --cc show CC value used when PostgreSQL was built - --cppflags show CPPFLAGS value used when PostgreSQL was built - --cflags show CFLAGS value used when PostgreSQL was built - --cflags_sl show CFLAGS_SL value used when PostgreSQL was built - --ldflags show LDFLAGS value used when PostgreSQL was built - --ldflags_ex show LDFLAGS_EX value used when PostgreSQL was built - --ldflags_sl show LDFLAGS_SL value used when PostgreSQL was built - --libs show LIBS value used when PostgreSQL was built - --version show the PostgreSQL version - -?, --help show this help, then exit - - With no arguments, all known items are shown. - - Report bugs to . - EOF -} - -if test $# -eq 0; then - cat <<-EOF - BINDIR = $BINDIR - DOCDIR = $DOCDIR - HTMLDIR = $HTMLDIR - INCLUDEDIR = $INCLUDEDIR - PKGINCLUDEDIR = $PKGINCLUDEDIR - INCLUDEDIR-SERVER = $INCLUDEDIR_SERVER - LIBDIR = $LIBDIR - PKGLIBDIR = $PKGLIBDIR - LOCALEDIR = $LOCALEDIR - MANDIR = $MANDIR - SHAREDIR = $SHAREDIR - SYSCONFDIR = $SYSCONFDIR - PGXS = $PGXS - CONFIGURE = $CONFIGURE - CC = $CC - CPPFLAGS = $CPPFLAGS - CFLAGS = $CFLAGS - CFLAGS_SL = $CFLAGS_SL - LDFLAGS = $LDFLAGS - LDFLAGS_EX = $LDFLAGS_EX - LDFLAGS_SL = $LDFLAGS_SL - LIBS = $LIBS - VERSION = $VERSION - EOF -fi - -for arg -do - if test "x$arg" = "x--help" || test "x$arg" = "x-?"; then - usage - exit 0 - fi -done - -for arg -do - case "$arg" in - --bindir) print "$BINDIR" ;; - --docdir) print "$DOCDIR" ;; - --htmldir) print "$HTMLDIR" ;; - --includedir) print "$INCLUDEDIR" ;; - --pkgincludedir) print "$PKGINCLUDEDIR" ;; - --includedir-server) print "$INCLUDEDIR_SERVER" ;; - --libdir) print "$LIBDIR" ;; - --pkglibdir) print "$PKGLIBDIR" ;; - --localedir) print "$LOCALEDIR" ;; - --mandir) print "$MANDIR" ;; - --sharedir) print "$SHAREDIR" ;; - --sysconfdir) print "$SYSCONFDIR" ;; - --pgxs) print "$PGXS" ;; - --configure) print "$CONFIGURE" ;; - --cc) print "$CC" ;; - --cppflags) print "$CPPFLAGS" ;; - --cflags) print "$CFLAGS" ;; - --cflags_sl) print "$CFLAGS_SL" ;; - --ldflags) print "$LDFLAGS" ;; - --ldflags_ex) print "$LDFLAGS_EX" ;; - --ldflags_sl) print "$LDFLAGS_SL" ;; - --libs) print "$LIBS" ;; - --version) print "$VERSION" ;; - esac -done diff --git a/srcpkgs/postgresql/files/postgresql.confd b/srcpkgs/postgresql/files/postgresql.confd deleted file mode 100644 index 2a3cd1469b05..000000000000 --- a/srcpkgs/postgresql/files/postgresql.confd +++ /dev/null @@ -1,17 +0,0 @@ -# Configuration file for the PostgreSQL server. - -# PostgreSQL's database directory -PGROOT="/var/lib/postgresql" - -# PostgreSQL's log file. -PGLOG="/var/log/postgresql.log" - -# Passed to initdb if necessary -INITOPTS="-A peer --auth-host=md5 --auth-local=peer --locale en_US.UTF-8" - -# Extra options to run postmaster with, e.g.: -# -N is the maximal number of client connections -# -B is the number of shared buffers and has to be at least 2x the value for -N -# Please read the man-page to postmaster for more options. Many of these options -# can be set directly in the configuration-file. -#PGOPTS="-N 512 -B 1024" diff --git a/srcpkgs/postgresql/files/postgresql.pam b/srcpkgs/postgresql/files/postgresql.pam deleted file mode 100644 index 53724d1f86a7..000000000000 --- a/srcpkgs/postgresql/files/postgresql.pam +++ /dev/null @@ -1,3 +0,0 @@ -auth required pam_unix.so -account required pam_unix.so -session required pam_unix.so diff --git a/srcpkgs/postgresql/files/postgresql/control/t b/srcpkgs/postgresql/files/postgresql/control/t deleted file mode 100755 index b0026e5661b4..000000000000 --- a/srcpkgs/postgresql/files/postgresql/control/t +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -/usr/bin/kill -INT `/usr/bin/head -1 /run/runit/supervise.postgresql/pid` diff --git a/srcpkgs/postgresql/files/postgresql/log/run b/srcpkgs/postgresql/files/postgresql/log/run deleted file mode 100755 index e564447b60db..000000000000 --- a/srcpkgs/postgresql/files/postgresql/log/run +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec logger -p daemon.info -t postgres diff --git a/srcpkgs/postgresql/files/postgresql/run b/srcpkgs/postgresql/files/postgresql/run deleted file mode 100755 index 3982873cde69..000000000000 --- a/srcpkgs/postgresql/files/postgresql/run +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -. /etc/default/postgresql -: ${PGDATA:="$PGROOT/data"} - -if [ "$PGROOT" != "/var/lib/postgresql" ]; then - echo "Creating symlink /var/lib/postgresql -> $PGROOT" - - # Remove /var/lib/postgres if empty dir, but not if symlink - if [ ! -L /var/lib/postgres ] && [ -d /var/lib/postgres ]; then - rmdir /var/lib/postgres - fi - - ln -sf "$PGROOT" /var/lib/postgresql -fi - - -if [ ! -d "$PGDATA" ]; then - echo "Initializing database in $PGDATA" - - mkdir -p "$PGDATA" - chown -R postgres:postgres "$PGDATA" - chmod 0700 "$PGDATA" - su - postgres -m -c "/usr/bin/initdb $INITOPTS -D '$PGDATA'" >/dev/null - - if [ -f /etc/postgresql/postgresql.conf ]; then - ln -sf /etc/postgresql/postgresql.conf "$PGDATA/postgresql.conf" - fi -fi - -exec chpst -u postgres:postgres postgres -D "$PGDATA" $PGOPTS 2>&1 diff --git a/srcpkgs/postgresql/patches/pg_config-cross-value.patch b/srcpkgs/postgresql/patches/pg_config-cross-value.patch deleted file mode 100644 index 214344520d7f..000000000000 --- a/srcpkgs/postgresql/patches/pg_config-cross-value.patch +++ /dev/null @@ -1,46 +0,0 @@ -Sources: Doan Tran Cong Danh -Upstream: No - - First part needs to be rework in configure script to be usable - upstream - - Second part would un-usable for Windows -diff --git src/common/Makefile src/common/Makefile -index ec04710..2af845f 100644 ---- a/src/common/Makefile -+++ b/src/common/Makefile -@@ -22,11 +22,14 @@ include $(top_builddir)/src/Makefile.global - - # don't include subdirectory-path-dependent -I and -L switches - STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS)) -+STD_CPPFLAGS := $(subst @XBPS_SYSROOT@,,$(STD_CPPFLAGS)) -+STD_CFLAGS := $(subst @XBPS_SYSROOT@,,$(CFLAGS)) - STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS)) -+STD_LDFLAGS := $(subst @XBPS_SYSROOT@,,$(STD_LDFLAGS)) - override CPPFLAGS += -DVAL_CONFIGURE="\"$(configure_args)\"" - override CPPFLAGS += -DVAL_CC="\"$(CC)\"" - override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\"" --override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\"" -+override CPPFLAGS += -DVAL_CFLAGS="\"$(STD_CFLAGS)\"" - override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\"" - override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\"" - override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\"" -@@ -44,7 +47,19 @@ OBJS_FRONTEND = $(OBJS_COMMON) fe_memutils.o restricted_token.o - - OBJS_SRV = $(OBJS_COMMON:%.o=%_srv.o) - --all: libpgcommon.a libpgcommon_srv.a -+all: libpgcommon.a libpgcommon_srv.a pg_config.sh -+ -+pg_config.sh: pg_config.sh.in -+ sed -e "s/@configure_args@/$(subst /,\\/,$(configure_args))/" \ -+ -e "s/@CC@/$(subst /,\\/,$(CC))/" \ -+ -e "s/@CPPFLAGS@/$(subst /,\\/,$(STD_CPPFLAGS))/" \ -+ -e "s/@CFLAGS@/$(subst /,\\/,$(STD_CFLAGS))/" \ -+ -e "s/@CFLAGS_SL@/$(subst /,\\/,$(CFLAGS_SL))/" \ -+ -e "s/@LDFLAGS@/$(subst /,\\/,$(STD_LDFLAGS))/" \ -+ -e "s/@LDFLAGS_EX@/$(subst /,\\/,$(LDFLAGS_EX))/" \ -+ -e "s/@LDFLAGS_SL@/$(subst /,\\/,$(LDFLAGS_SL))/" \ -+ -e "s/@LIBS@/$(subst /,\\/,$(LIBS))/" \ -+ $< >$@ - - # libpgcommon is needed by some contrib - install: all installdirs diff --git a/srcpkgs/postgresql/template b/srcpkgs/postgresql/template index d9fcad13bbf8..3bb70571c0ed 100644 --- a/srcpkgs/postgresql/template +++ b/srcpkgs/postgresql/template @@ -1,191 +1,99 @@ # Template file for 'postgresql' pkgname=postgresql -version=9.6.24 +version=13 revision=1 -build_style=gnu-configure -make_build_target=world -configure_args="--with-openssl --with-python - --with-pam --datadir=/usr/share/postgresql --enable-thread-safety - --with-perl --with-tcl --without-ldap --without-gssapi --without-krb5 - --without-bonjour --with-libxml --with-libxslt --disable-rpath - --with-system-tzdata=/usr/share/zoneinfo --enable-nls --with-uuid=e2fs" -hostmakedepends="docbook2x flex gettext openjade" -makedepends="libfl-devel openssl-devel libuuid-devel libxslt-devel pam-devel perl - python-devel readline-devel tcl-devel" -short_desc="Sophisticated open-source Object-Relational DBMS" +build_style=meta +depends="postgresql${version}" +short_desc="PostgreSQL server meta package" maintainer="Piotr Wójcik " license="PostgreSQL" homepage="https://www.postgresql.org" -changelog="https://www.postgresql.org/docs/current/release-${version//./-}.html" -distfiles="https://ftp.postgresql.org/pub/source/v${version}/${pkgname}-${version}.tar.bz2" -checksum=aeb7a196be3ebed1a7476ef565f39722187c108dd47da7489be9c4fcae982ace -# initdb fails on github actions, works locally with xbps-uunshare -make_check=ci-skip - -conf_files=" - /etc/default/${pkgname} - /etc/pam.d/${pkgname} - /etc/${pkgname}/${pkgname}.conf" - -# Create 'postgres' user for the server. -system_accounts="postgres" -postgres_homedir="/var/lib/${pkgname}" -postgres_shell="/bin/sh" -postgres_descr="PostgreSQL database server user" -make_dirs="/var/lib/postgresql 0750 postgres postgres" - -if [ "$CROSS_BUILD" ]; then - configure_args+=" --without-perl --without-python --without-tcl" +alternatives=" + postgresql:initdb:/usr/lib/psql${version}/bin/initdb + postgresql:pg_archivecleanup:/usr/lib/psql${version}/bin/pg_archivecleanup + postgresql:pg_basebackup:/usr/lib/psql${version}/bin/pg_basebackup + postgresql:pg_checksums:/usr/lib/psql${version}/bin/pg_checksums + postgresql:pg_controldata:/usr/lib/psql${version}/bin/pg_controldata + postgresql:pg_ctl:/usr/lib/psql${version}/bin/pg_ctl + postgresql:pg_receivewal:/usr/lib/psql${version}/bin/pg_receivewal + postgresql:pg_recvlogical:/usr/lib/psql${version}/bin/pg_recvlogical + postgresql:pg_resetwal:/usr/lib/psql${version}/bin/pg_resetwal + postgresql:pg_rewind:/usr/lib/psql${version}/bin/pg_rewind + postgresql:pg_test_fsync:/usr/lib/psql${version}/bin/pg_test_fsync + postgresql:pg_test_timing:/usr/lib/psql${version}/bin/pg_test_timing + postgresql:pg_upgrade:/usr/lib/psql${version}/bin/pg_upgrade + postgresql:pg_verifybackup:/usr/lib/psql${version}/bin/pg_verifybackup + postgresql:pg_waldump:/usr/lib/psql${version}/bin/pg_waldump + postgresql:pgbench:/usr/lib/psql${version}/bin/pgbench + postgresql:postgres:/usr/lib/psql${version}/bin/postgres + postgresql:postmaster:/usr/lib/psql${version}/bin/postmaster +" + +build_options="languages" +desc_option_languages="Include procedural languages as dependency" +if [ -z "$CROSS_BUILD" ]; then + build_options_default="languages" fi -post_patch() { - sed -e "s/@VERSION@/$version/" \ - "$FILESDIR"/pg_config.sh.in >src/common/pg_config.sh.in - vsed -i -e "s,@XBPS_SYSROOT@,${XBPS_CROSS_BASE%/}," src/common/Makefile -} - -pre_build() { - # http://www.postgresql.org/docs/9.3/static/docguide-toolsets.html - export SGML_CATALOG_FILES="/usr/share/sgml/openjade/catalog:/usr/share/sgml/iso8879/catalog:/usr/share/sgml/docbook/dsssl/modular/catalog:/usr/share/sgml/docbook/4.2/catalog" -} - -post_build() { - make -C contrib ${makejobs} -} - -post_install() { - make -C contrib install - - vmkdir usr/share/man - cp -r doc/src/sgml/man? ${DESTDIR}/usr/share/man - vmkdir usr/share/doc/postgresql - cp -r doc/src/sgml/html ${DESTDIR}/usr/share/doc/postgresql - vsv postgresql - vlicense COPYRIGHT - - vinstall ${FILESDIR}/${pkgname}.confd 644 etc/default ${pkgname} - vinstall ${FILESDIR}/${pkgname}.pam 644 etc/pam.d ${pkgname} - vinstall ${DESTDIR}/usr/share/${pkgname}/${pkgname}.conf.sample \ - 644 etc/${pkgname} ${pkgname}.conf - vbin src/common/pg_config.sh - - sed -i 's/install_bin = .*/install_bin = install/g' \ - ${DESTDIR}/usr/lib/postgresql/pgxs/src/Makefile.global -} - postgresql-doc_package() { - short_desc="PostgreSQL documentation" - pkg_install() { - vmove usr/share/doc - } -} - -postgresql9.6-libs_package() { - short_desc="PostgreSQL shared libraries" - pkg_install() { - vmove "usr/lib/*.so*" - for d in $(find ${DESTDIR}/usr/share/locale \ - -type f -name libpq5\*); do - mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - done - } -} - -postgresql9.6-libs-devel_package() { - depends="postgresql-libs>=$version" - short_desc="PostgreSQL shared libraries (development files)" - pkg_install() { - for f in pg_config ecpg; do - vmove usr/bin/${f} - vmove "usr/share/man/man1/$(basename ${f})*" - done - vmove usr/bin/pg_config.sh - vmove usr/include - vmove "usr/lib/*.a" - vmove "usr/lib/pkgconfig/*" - vmove usr/share/man/man3 - vmove usr/lib/postgresql/pgxs - for d in $(find ${DESTDIR}/usr/share/locale \ - -type f -name pg_config\* -o -name ecpg\*); do - mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - done - } + depends="postgresql${version}-doc" + short_desc="PostgreSQL documentation meta package" } # XXX disabled for now in cross builds. -if [ -z "$CROSS_BUILD" ]; then +if [ "$build_option_languages" ]; then postgresql-plperl_package() { - depends="postgresql>=$version" - short_desc="PL/Perl procedural language for PostgreSQL" - pkg_install() { - vmove "usr/lib/postgresql/plperl*" - for d in $(find ${DESTDIR}/usr/share/locale \ - -type f -name plperl\*); do - mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - done - } + depends="postgresql${version}-plperl" + short_desc="PL/Perl language meta package" } postgresql-plpython_package() { - depends="postgresql>=$version" - short_desc="PL/Python procedural language for PostgreSQL" - pkg_install() { - vmove "usr/lib/postgresql/plpython*" - for d in $(find ${DESTDIR}/usr/share/locale \ - -type f -name plpython\*); do - mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - done - } + depends="postgresql${version}-plpython" + short_desc="PL/Python language meta package" } postgresql-pltcl_package() { - depends="postgresql>=$version" - short_desc="PL/Tcl procedural language for PostgreSQL" - pkg_install() { - vmove "usr/bin/pltcl*" - vmove "usr/lib/postgresql/pltcl*" - for d in $(find ${DESTDIR}/usr/share/locale \ - -type f -name pltcl\*); do - mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - done - vmove "usr/share/postgresql/*.pltcl" - } + depends="postgresql${version}-pltcl" + short_desc="PL/Tcl language meta package" } -fi # !CROSS_BUILD +fi # build_option_languages postgresql-client_package() { + depends="postgresql${version}-client" short_desc="Client frontends programs for PostgreSQL" - pkg_install() { - for f in clusterdb createdb createlang createuser dropdb droplang \ - dropuser pg_dump pg_dumpall pg_isready pg_restore psql reindexdb \ - vacuumdb; do - vmove usr/bin/${f} - vmove usr/share/man/man1/$(basename ${f}).1 - done - vmove usr/share/man/man7 - for d in $(find ${DESTDIR}/usr/share/locale \ - -type f -name pgscripts\* -o \ - -name psql\* -o \ - -name pg_dump\*); do - mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - done - vmkdir usr/share/postgresql - mv ${DESTDIR}/usr/share/postgresql/psqlrc.* \ - ${PKGDESTDIR}/usr/share/postgresql - } + alternatives=" + postgresql-client:clusterdb:/usr/lib/psql${version}/bin/clusterdb + postgresql-client:createdb:/usr/lib/psql${version}/bin/createdb + postgresql-client:createuser:/usr/lib/psql${version}/bin/createuser + postgresql-client:dropdb:/usr/lib/psql${version}/bin/dropdb + postgresql-client:dropuser:/usr/lib/psql${version}/bin/dropuser + postgresql-client:pg_dump:/usr/lib/psql${version}/bin/pg_dump + postgresql-client:pg_dumpall:/usr/lib/psql${version}/bin/pg_dumpall + postgresql-client:pg_isready:/usr/lib/psql${version}/bin/pg_isready + postgresql-client:pg_restore:/usr/lib/psql${version}/bin/pg_restore + postgresql-client:psql:/usr/lib/psql${version}/bin/psql + postgresql-client:reindexdb:/usr/lib/psql${version}/bin/reindexdb + postgresql-client:vacuumdb:/usr/lib/psql${version}/bin/vacuumdb + " } postgresql-contrib_package() { + depends="postgresql${version}-contrib" short_desc="PostgreSQL contributed programs and extensions" - pkg_install() { - make -C contrib install DESTDIR=${PKGDESTDIR} - } + alternatives=" + postgresql-contrib:oid2name:/usr/lib/psql${version}/bin/oid2name + postgresql-contrib:pg_standby:/usr/lib/psql${version}/bin/pg_standby + postgresql-contrib:vacuumlo:/usr/lib/psql${version}/bin/vacuumlo + " +} + +postgresql-full() { + depends="postgresql postgresql-client postgresql-doc postgresql-contrib postgresql-libs" + short_desc="PostgreSQL all packages meta package" + + if [ "$build_option_languages" ]; then + depends+=" postgresql-plpython postgresql-plperl postgresql-pltcl" + fi } From 2e9ca9fa581c43aa719a2840f10d81beea4076a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Sat, 12 Feb 2022 00:14:20 +0100 Subject: [PATCH 2/3] postgresql13: update to 13.6. --- srcpkgs/postgresql13/files/profile.sh | 14 -------- srcpkgs/postgresql13/template | 49 +++++++++++++++++++++++---- 2 files changed, 42 insertions(+), 21 deletions(-) delete mode 100644 srcpkgs/postgresql13/files/profile.sh diff --git a/srcpkgs/postgresql13/files/profile.sh b/srcpkgs/postgresql13/files/profile.sh deleted file mode 100644 index 54be2ca50a4f..000000000000 --- a/srcpkgs/postgresql13/files/profile.sh +++ /dev/null @@ -1,14 +0,0 @@ -appendpath () { - case ":$PATH:" in - *:"$1":*) - ;; - *) - PATH="${PATH:+$PATH:}$1" - esac -} - -appendpath '/@PREFIX@/bin' - -unset appendpath - -export PATH diff --git a/srcpkgs/postgresql13/template b/srcpkgs/postgresql13/template index 0f7b79fd6710..751a150f0007 100644 --- a/srcpkgs/postgresql13/template +++ b/srcpkgs/postgresql13/template @@ -1,7 +1,7 @@ # Template file for 'postgresql13' pkgname=postgresql13 -version=13.5 -revision=2 +version=13.6 +revision=1 wrksrc="postgresql-${version}" build_style=gnu-configure make_build_target=world @@ -21,7 +21,27 @@ license="PostgreSQL" homepage="https://www.postgresql.org" changelog="https://www.postgresql.org/docs/current/release-${version//./-}.html" distfiles="https://ftp.postgresql.org/pub/source/v${version}/postgresql-${version}.tar.bz2" -checksum=9b81067a55edbaabc418aacef457dd8477642827499560b00615a6ea6c13f6b3 +checksum=bafc7fa3d9d4da8fe71b84c63ba8bdfe8092935c30c0aa85c24b2c08508f67fc +alternatives=" + postgresql:/usr/bin/initdb:/usr/lib/psql${_major}/bin/initdb + postgresql:/usr/bin/pg_archivecleanup:/usr/lib/psql${_major}/bin/pg_archivecleanup + postgresql:/usr/bin/pg_basebackup:/usr/lib/psql${_major}/bin/pg_basebackup + postgresql:/usr/bin/pg_checksums:/usr/lib/psql${_major}/bin/pg_checksums + postgresql:/usr/bin/pg_controldata:/usr/lib/psql${_major}/bin/pg_controldata + postgresql:/usr/bin/pg_ctl:/usr/lib/psql${_major}/bin/pg_ctl + postgresql:/usr/bin/pg_receivewal:/usr/lib/psql${_major}/bin/pg_receivewal + postgresql:/usr/bin/pg_recvlogical:/usr/lib/psql${_major}/bin/pg_recvlogical + postgresql:/usr/bin/pg_resetwal:/usr/lib/psql${_major}/bin/pg_resetwal + postgresql:/usr/bin/pg_rewind:/usr/lib/psql${_major}/bin/pg_rewind + postgresql:/usr/bin/pg_test_fsync:/usr/lib/psql${_major}/bin/pg_test_fsync + postgresql:/usr/bin/pg_test_timing:/usr/lib/psql${_major}/bin/pg_test_timing + postgresql:/usr/bin/pg_upgrade:/usr/lib/psql${_major}/bin/pg_upgrade + postgresql:/usr/bin/pg_verifybackup:/usr/lib/psql${_major}/bin/pg_verifybackup + postgresql:/usr/bin/pg_waldump:/usr/lib/psql${_major}/bin/pg_waldump + postgresql:/usr/bin/pgbench:/usr/lib/psql${_major}/bin/pgbench + postgresql:/usr/bin/postgres:/usr/lib/psql${_major}/bin/postgres + postgresql:/usr/bin/postmaster:/usr/lib/psql${_major}/bin/postmaster +" conf_files=" /${_prefix}/etc/default/postgresql @@ -83,8 +103,6 @@ post_install() { find "${DESTDIR}/etc/sv" -type f -exec sed -i -e s:@VERSION@:${_major}: -e s:@PREFIX@:${_prefix}: '{}' ';' vlicense COPYRIGHT - vinstall ${FILESDIR}/profile.sh 644 etc/profile.d ${pkgname}.sh - _substitute ${DESTDIR}/etc/profile.d/${pkgname}.sh vinstall ${FILESDIR}/postgresql.confd 644 ${_prefix}/etc/default postgresql _substitute ${DESTDIR}/${_prefix}/etc/default/postgresql vinstall ${FILESDIR}/postgresql.pam 644 ${_prefix}/etc/pam.d postgresql @@ -197,6 +215,20 @@ fi # !CROSS_BUILD postgresql13-client_package() { short_desc="Client frontends programs for PostgreSQL" + alternatives=" + postgresql-client:/usr/bin/clusterdb:/usr/lib/psql${_major}/bin/clusterdb + postgresql-client:/usr/bin/createdb:/usr/lib/psql${_major}/bin/createdb + postgresql-client:/usr/bin/createuser:/usr/lib/psql${_major}/bin/createuser + postgresql-client:/usr/bin/dropdb:/usr/lib/psql${_major}/bin/dropdb + postgresql-client:/usr/bin/dropuser:/usr/lib/psql${_major}/bin/dropuser + postgresql-client:/usr/bin/pg_dump:/usr/lib/psql${_major}/bin/pg_dump + postgresql-client:/usr/bin/pg_dumpall:/usr/lib/psql${_major}/bin/pg_dumpall + postgresql-client:/usr/bin/pg_isready:/usr/lib/psql${_major}/bin/pg_isready + postgresql-client:/usr/bin/pg_restore:/usr/lib/psql${_major}/bin/pg_restore + postgresql-client:/usr/bin/psql:/usr/lib/psql${_major}/bin/psql + postgresql-client:/usr/bin/reindexdb:/usr/lib/psql${_major}/bin/reindexdb + postgresql-client:/usr/bin/vacuumdb:/usr/lib/psql${_major}/bin/vacuumdb + " pkg_install() { for f in clusterdb createdb createuser dropdb \ dropuser pg_dump pg_dumpall pg_isready pg_restore psql reindexdb \ @@ -214,13 +246,16 @@ postgresql13-client_package() { done mv ${DESTDIR}/${_prefix}/share/postgresql/psqlrc.* \ ${PKGDESTDIR}/${_prefix}/share - vinstall ${FILESDIR}/profile.sh 644 etc/profile.d ${pkgname}.sh - _substitute ${PKGDESTDIR}/etc/profile.d/${pkgname}.sh } } postgresql13-contrib_package() { short_desc="PostgreSQL contributed programs and extensions" + alternatives=" + postgresql-contrib:/usr/bin/oid2name:/usr/lib/psql${_major}/bin/oid2name + postgresql-contrib:/usr/bin/pg_standby:/usr/lib/psql${_major}/bin/pg_standby + postgresql-contrib:/usr/bin/vacuumlo:/usr/lib/psql${_major}/bin/vacuumlo + " pkg_install() { make -C contrib install DESTDIR=${PKGDESTDIR} } From 2906322bb5b989cfff9199eb2426ffa24a7d06f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Sat, 12 Feb 2022 00:14:20 +0100 Subject: [PATCH 3/3] postgresql14: update to 14.2. --- srcpkgs/postgresql14/files/profile.sh | 14 -------- srcpkgs/postgresql14/template | 47 +++++++++++++++++++++++---- 2 files changed, 41 insertions(+), 20 deletions(-) delete mode 100644 srcpkgs/postgresql14/files/profile.sh diff --git a/srcpkgs/postgresql14/files/profile.sh b/srcpkgs/postgresql14/files/profile.sh deleted file mode 100644 index 54be2ca50a4f..000000000000 --- a/srcpkgs/postgresql14/files/profile.sh +++ /dev/null @@ -1,14 +0,0 @@ -appendpath () { - case ":$PATH:" in - *:"$1":*) - ;; - *) - PATH="${PATH:+$PATH:}$1" - esac -} - -appendpath '/@PREFIX@/bin' - -unset appendpath - -export PATH diff --git a/srcpkgs/postgresql14/template b/srcpkgs/postgresql14/template index 94ba16bffbc6..3a0c336c1a8a 100644 --- a/srcpkgs/postgresql14/template +++ b/srcpkgs/postgresql14/template @@ -1,6 +1,6 @@ # Template file for 'postgresql14' pkgname=postgresql14 -version=14.1 +version=14.2 revision=1 wrksrc="postgresql-${version}" build_style=gnu-configure @@ -22,7 +22,28 @@ license="PostgreSQL" homepage="https://www.postgresql.org" changelog="https://www.postgresql.org/docs/current/release-${version//./-}.html" distfiles="https://ftp.postgresql.org/pub/source/v${version}/postgresql-${version}.tar.bz2" -checksum=4d3c101ea7ae38982f06bdc73758b53727fb6402ecd9382006fa5ecc7c2ca41f +checksum=2cf78b2e468912f8101d695db5340cf313c2e9f68a612fb71427524e8c9a977a +alternatives=" + postgresql:/usr/bin/initdb:/usr/lib/psql${_major}/bin/initdb + postgresql:/usr/bin/pg_amcheck:/usr/lib/psql${_major}/bin/pg_amcheck + postgresql:/usr/bin/pg_archivecleanup:/usr/lib/psql${_major}/bin/pg_archivecleanup + postgresql:/usr/bin/pg_basebackup:/usr/lib/psql${_major}/bin/pg_basebackup + postgresql:/usr/bin/pg_checksums:/usr/lib/psql${_major}/bin/pg_checksums + postgresql:/usr/bin/pg_controldata:/usr/lib/psql${_major}/bin/pg_controldata + postgresql:/usr/bin/pg_ctl:/usr/lib/psql${_major}/bin/pg_ctl + postgresql:/usr/bin/pg_receivewal:/usr/lib/psql${_major}/bin/pg_receivewal + postgresql:/usr/bin/pg_recvlogical:/usr/lib/psql${_major}/bin/pg_recvlogical + postgresql:/usr/bin/pg_resetwal:/usr/lib/psql${_major}/bin/pg_resetwal + postgresql:/usr/bin/pg_rewind:/usr/lib/psql${_major}/bin/pg_rewind + postgresql:/usr/bin/pg_test_fsync:/usr/lib/psql${_major}/bin/pg_test_fsync + postgresql:/usr/bin/pg_test_timing:/usr/lib/psql${_major}/bin/pg_test_timing + postgresql:/usr/bin/pg_upgrade:/usr/lib/psql${_major}/bin/pg_upgrade + postgresql:/usr/bin/pg_verifybackup:/usr/lib/psql${_major}/bin/pg_verifybackup + postgresql:/usr/bin/pg_waldump:/usr/lib/psql${_major}/bin/pg_waldump + postgresql:/usr/bin/pgbench:/usr/lib/psql${_major}/bin/pgbench + postgresql:/usr/bin/postgres:/usr/lib/psql${_major}/bin/postgres + postgresql:/usr/bin/postmaster:/usr/lib/psql${_major}/bin/postmaster +" conf_files=" /${_sysconfdir}/default/postgresql @@ -84,8 +105,6 @@ post_install() { find "${DESTDIR}/etc/sv" -type f -exec sed -i -e s:@VERSION@:${_major}: -e s:@PREFIX@:${_prefix}: '{}' ';' vlicense COPYRIGHT - vinstall ${FILESDIR}/profile.sh 644 etc/profile.d ${pkgname}.sh - _substitute ${DESTDIR}/etc/profile.d/${pkgname}.sh vinstall ${FILESDIR}/postgresql.confd 644 ${_sysconfdir}/default postgresql _substitute ${DESTDIR}/${_sysconfdir}/default/postgresql vinstall ${FILESDIR}/postgresql.pam 644 ${_sysconfdir}/pam.d postgresql @@ -198,6 +217,20 @@ fi # !CROSS_BUILD postgresql14-client_package() { short_desc="Client frontends programs for PostgreSQL" + alternatives=" + postgresql-client:/usr/bin/clusterdb:/usr/lib/psql${_major}/bin/clusterdb + postgresql-client:/usr/bin/createdb:/usr/lib/psql${_major}/bin/createdb + postgresql-client:/usr/bin/createuser:/usr/lib/psql${_major}/bin/createuser + postgresql-client:/usr/bin/dropdb:/usr/lib/psql${_major}/bin/dropdb + postgresql-client:/usr/bin/dropuser:/usr/lib/psql${_major}/bin/dropuser + postgresql-client:/usr/bin/pg_dump:/usr/lib/psql${_major}/bin/pg_dump + postgresql-client:/usr/bin/pg_dumpall:/usr/lib/psql${_major}/bin/pg_dumpall + postgresql-client:/usr/bin/pg_isready:/usr/lib/psql${_major}/bin/pg_isready + postgresql-client:/usr/bin/pg_restore:/usr/lib/psql${_major}/bin/pg_restore + postgresql-client:/usr/bin/psql:/usr/lib/psql${_major}/bin/psql + postgresql-client:/usr/bin/reindexdb:/usr/lib/psql${_major}/bin/reindexdb + postgresql-client:/usr/bin/vacuumdb:/usr/lib/psql${_major}/bin/vacuumdb + " pkg_install() { for f in clusterdb createdb createuser dropdb \ dropuser pg_dump pg_dumpall pg_isready pg_restore psql reindexdb \ @@ -215,13 +248,15 @@ postgresql14-client_package() { done mv ${DESTDIR}/${_prefix}/share/postgresql/psqlrc.* \ ${PKGDESTDIR}/${_prefix}/share - vinstall ${FILESDIR}/profile.sh 644 etc/profile.d ${pkgname}.sh - _substitute ${PKGDESTDIR}/etc/profile.d/${pkgname}.sh } } postgresql14-contrib_package() { short_desc="PostgreSQL contributed programs and extensions" + alternatives=" + postgresql-contrib:/usr/bin/oid2name:/usr/lib/psql${_major}/bin/oid2name + postgresql-contrib:/usr/bin/vacuumlo:/usr/lib/psql${_major}/bin/vacuumlo + " pkg_install() { make -C contrib install DESTDIR=${PKGDESTDIR} }