* [PR PATCH] postgresql: turn into meta package as 9.6 is EOL
@ 2022-02-11 23:16 Chocimier
2022-03-16 18:30 ` [PR PATCH] [Updated] " Chocimier
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: Chocimier @ 2022-02-11 23:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 505 bytes --]
There is a new pull request by Chocimier against master on the void-packages repository
https://github.com/Chocimier/void-packages-org postgres-meta
https://github.com/void-linux/void-packages/pull/35546
postgresql: turn into meta package as 9.6 is EOL
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **not yet**
A patch file from https://github.com/void-linux/void-packages/pull/35546.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-postgres-meta-35546.patch --]
[-- Type: text/x-diff, Size: 31536 bytes --]
From bb6f9d93348089e9cf37e4c85623a03c966ccaba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
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 <pgsql-bugs@postgresql.org>.
- 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 <chocimier@tlen.pl>"
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 f1dae69d3be3df5f77bbf1ea78e6556c7a3dfeca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
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..0a0686359572 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:initdb:/usr/lib/psql${_major}/bin/initdb
+ postgresql:pg_archivecleanup:/usr/lib/psql${_major}/bin/pg_archivecleanup
+ postgresql:pg_basebackup:/usr/lib/psql${_major}/bin/pg_basebackup
+ postgresql:pg_checksums:/usr/lib/psql${_major}/bin/pg_checksums
+ postgresql:pg_controldata:/usr/lib/psql${_major}/bin/pg_controldata
+ postgresql:pg_ctl:/usr/lib/psql${_major}/bin/pg_ctl
+ postgresql:pg_receivewal:/usr/lib/psql${_major}/bin/pg_receivewal
+ postgresql:pg_recvlogical:/usr/lib/psql${_major}/bin/pg_recvlogical
+ postgresql:pg_resetwal:/usr/lib/psql${_major}/bin/pg_resetwal
+ postgresql:pg_rewind:/usr/lib/psql${_major}/bin/pg_rewind
+ postgresql:pg_test_fsync:/usr/lib/psql${_major}/bin/pg_test_fsync
+ postgresql:pg_test_timing:/usr/lib/psql${_major}/bin/pg_test_timing
+ postgresql:pg_upgrade:/usr/lib/psql${_major}/bin/pg_upgrade
+ postgresql:pg_verifybackup:/usr/lib/psql${_major}/bin/pg_verifybackup
+ postgresql:pg_waldump:/usr/lib/psql${_major}/bin/pg_waldump
+ postgresql:pgbench:/usr/lib/psql${_major}/bin/pgbench
+ postgresql:postgres:/usr/lib/psql${_major}/bin/postgres
+ postgresql: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:clusterdb:/usr/lib/psql${_major}/bin/clusterdb
+ postgresql-client:createdb:/usr/lib/psql${_major}/bin/createdb
+ postgresql-client:createuser:/usr/lib/psql${_major}/bin/createuser
+ postgresql-client:dropdb:/usr/lib/psql${_major}/bin/dropdb
+ postgresql-client:dropuser:/usr/lib/psql${_major}/bin/dropuser
+ postgresql-client:pg_dump:/usr/lib/psql${_major}/bin/pg_dump
+ postgresql-client:pg_dumpall:/usr/lib/psql${_major}/bin/pg_dumpall
+ postgresql-client:pg_isready:/usr/lib/psql${_major}/bin/pg_isready
+ postgresql-client:pg_restore:/usr/lib/psql${_major}/bin/pg_restore
+ postgresql-client:psql:/usr/lib/psql${_major}/bin/psql
+ postgresql-client:reindexdb:/usr/lib/psql${_major}/bin/reindexdb
+ postgresql-client: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:oid2name:/usr/lib/psql${_major}/bin/oid2name
+ postgresql-contrib:pg_standby:/usr/lib/psql${_major}/bin/pg_standby
+ postgresql-contrib:vacuumlo:/usr/lib/psql${_major}/bin/vacuumlo
+ "
pkg_install() {
make -C contrib install DESTDIR=${PKGDESTDIR}
}
From 3d0758e0145bbd33e2b1974030971668475597e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
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..db8b4d523786 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:initdb:/usr/lib/psql${_major}/bin/initdb
+ postgresql:pg_amcheck:/usr/lib/psql${_major}/bin/pg_amcheck
+ postgresql:pg_archivecleanup:/usr/lib/psql${_major}/bin/pg_archivecleanup
+ postgresql:pg_basebackup:/usr/lib/psql${_major}/bin/pg_basebackup
+ postgresql:pg_checksums:/usr/lib/psql${_major}/bin/pg_checksums
+ postgresql:pg_controldata:/usr/lib/psql${_major}/bin/pg_controldata
+ postgresql:pg_ctl:/usr/lib/psql${_major}/bin/pg_ctl
+ postgresql:pg_receivewal:/usr/lib/psql${_major}/bin/pg_receivewal
+ postgresql:pg_recvlogical:/usr/lib/psql${_major}/bin/pg_recvlogical
+ postgresql:pg_resetwal:/usr/lib/psql${_major}/bin/pg_resetwal
+ postgresql:pg_rewind:/usr/lib/psql${_major}/bin/pg_rewind
+ postgresql:pg_test_fsync:/usr/lib/psql${_major}/bin/pg_test_fsync
+ postgresql:pg_test_timing:/usr/lib/psql${_major}/bin/pg_test_timing
+ postgresql:pg_upgrade:/usr/lib/psql${_major}/bin/pg_upgrade
+ postgresql:pg_verifybackup:/usr/lib/psql${_major}/bin/pg_verifybackup
+ postgresql:pg_waldump:/usr/lib/psql${_major}/bin/pg_waldump
+ postgresql:pgbench:/usr/lib/psql${_major}/bin/pgbench
+ postgresql:postgres:/usr/lib/psql${_major}/bin/postgres
+ postgresql: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:clusterdb:/usr/lib/psql${_major}/bin/clusterdb
+ postgresql-client:createdb:/usr/lib/psql${_major}/bin/createdb
+ postgresql-client:createuser:/usr/lib/psql${_major}/bin/createuser
+ postgresql-client:dropdb:/usr/lib/psql${_major}/bin/dropdb
+ postgresql-client:dropuser:/usr/lib/psql${_major}/bin/dropuser
+ postgresql-client:pg_dump:/usr/lib/psql${_major}/bin/pg_dump
+ postgresql-client:pg_dumpall:/usr/lib/psql${_major}/bin/pg_dumpall
+ postgresql-client:pg_isready:/usr/lib/psql${_major}/bin/pg_isready
+ postgresql-client:pg_restore:/usr/lib/psql${_major}/bin/pg_restore
+ postgresql-client:psql:/usr/lib/psql${_major}/bin/psql
+ postgresql-client:reindexdb:/usr/lib/psql${_major}/bin/reindexdb
+ postgresql-client: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:oid2name:/usr/lib/psql${_major}/bin/oid2name
+ postgresql-contrib:vacuumlo:/usr/lib/psql${_major}/bin/vacuumlo
+ "
pkg_install() {
make -C contrib install DESTDIR=${PKGDESTDIR}
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PR PATCH] [Updated] postgresql: turn into meta package as 9.6 is EOL
2022-02-11 23:16 [PR PATCH] postgresql: turn into meta package as 9.6 is EOL Chocimier
@ 2022-03-16 18:30 ` Chocimier
2022-06-23 2:15 ` github-actions
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Chocimier @ 2022-03-16 18:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 510 bytes --]
There is an updated pull request by Chocimier against master on the void-packages repository
https://github.com/Chocimier/void-packages-org postgres-meta
https://github.com/void-linux/void-packages/pull/35546
postgresql: turn into meta package as 9.6 is EOL
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **not yet**
A patch file from https://github.com/void-linux/void-packages/pull/35546.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-postgres-meta-35546.patch --]
[-- Type: text/x-diff, Size: 32130 bytes --]
From fe65d4ee841d5c68fa0bd212bb5a6e1e8404de30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
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 <pgsql-bugs@postgresql.org>.
- 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 <chocimier@tlen.pl>"
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?= <chocimier@tlen.pl>
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?= <chocimier@tlen.pl>
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}
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: postgresql: turn into meta package as 9.6 is EOL
2022-02-11 23:16 [PR PATCH] postgresql: turn into meta package as 9.6 is EOL Chocimier
2022-03-16 18:30 ` [PR PATCH] [Updated] " Chocimier
@ 2022-06-23 2:15 ` github-actions
2022-06-29 19:01 ` [PR PATCH] [Updated] " Chocimier
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: github-actions @ 2022-06-23 2:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/35546#issuecomment-1163847442
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PR PATCH] [Updated] postgresql: turn into meta package as 9.6 is EOL
2022-02-11 23:16 [PR PATCH] postgresql: turn into meta package as 9.6 is EOL Chocimier
2022-03-16 18:30 ` [PR PATCH] [Updated] " Chocimier
2022-06-23 2:15 ` github-actions
@ 2022-06-29 19:01 ` Chocimier
2022-06-29 19:03 ` Chocimier
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Chocimier @ 2022-06-29 19:01 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 510 bytes --]
There is an updated pull request by Chocimier against master on the void-packages repository
https://github.com/Chocimier/void-packages-org postgres-meta
https://github.com/void-linux/void-packages/pull/35546
postgresql: turn into meta package as 9.6 is EOL
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **not yet**
A patch file from https://github.com/void-linux/void-packages/pull/35546.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-postgres-meta-35546.patch --]
[-- Type: text/x-diff, Size: 21253 bytes --]
From 6455d6e0550e48be3d5c9cd61160d0f87861e8a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 12 Feb 2022 00:14:20 +0100
Subject: [PATCH 1/3] postgresql13: update to 13.7.
---
srcpkgs/postgresql13/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/postgresql13/template b/srcpkgs/postgresql13/template
index 0f7b79fd6710..752be23e6a16 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.7
+revision=1
wrksrc="postgresql-${version}"
build_style=gnu-configure
make_build_target=world
@@ -21,7 +21,7 @@ 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=1b905bf4f3d83614a393b3c51fd345910fd261e4f5124a68d9a1fdd3a2a46399
conf_files="
/${_prefix}/etc/default/postgresql
From bfc5aff6db743fabfd3041f9b5e17d8862c3f8d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 12 Feb 2022 00:14:20 +0100
Subject: [PATCH 2/3] postgresql14: update to 14.4.
---
srcpkgs/postgresql14/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/postgresql14/template b/srcpkgs/postgresql14/template
index 94ba16bffbc6..7ca8d04a93d6 100644
--- a/srcpkgs/postgresql14/template
+++ b/srcpkgs/postgresql14/template
@@ -1,6 +1,6 @@
# Template file for 'postgresql14'
pkgname=postgresql14
-version=14.1
+version=14.4
revision=1
wrksrc="postgresql-${version}"
build_style=gnu-configure
@@ -22,7 +22,7 @@ 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=c23b6237c5231c791511bdc79098617d6852e9e3bdf360efd8b5d15a1a3d8f6a
conf_files="
/${_sysconfdir}/default/postgresql
From ceb5695cdfc389bb4640e5090dc79cd2ee9dd6ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 12 Feb 2022 00:14:20 +0100
Subject: [PATCH 3/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 | 189 +++---------------
9 files changed, 30 insertions(+), 403 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 <pgsql-bugs@postgresql.org>.
- 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..4f539b0df9ff 100644
--- a/srcpkgs/postgresql/template
+++ b/srcpkgs/postgresql/template
@@ -1,191 +1,60 @@
# Template file for 'postgresql'
pkgname=postgresql
-version=9.6.24
+version=14
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 <chocimier@tlen.pl>"
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"
+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
- }
}
postgresql-contrib_package() {
+ depends="postgresql${version}-contrib"
short_desc="PostgreSQL contributed programs and extensions"
- pkg_install() {
- make -C contrib install DESTDIR=${PKGDESTDIR}
- }
+}
+
+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
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: postgresql: turn into meta package as 9.6 is EOL
2022-02-11 23:16 [PR PATCH] postgresql: turn into meta package as 9.6 is EOL Chocimier
` (2 preceding siblings ...)
2022-06-29 19:01 ` [PR PATCH] [Updated] " Chocimier
@ 2022-06-29 19:03 ` Chocimier
2022-06-29 19:56 ` [PR PATCH] [Updated] " Chocimier
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Chocimier @ 2022-06-29 19:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 180 bytes --]
New comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/35546#issuecomment-1170380515
Comment:
Profile scripts has to stay for now.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PR PATCH] [Updated] postgresql: turn into meta package as 9.6 is EOL
2022-02-11 23:16 [PR PATCH] postgresql: turn into meta package as 9.6 is EOL Chocimier
` (3 preceding siblings ...)
2022-06-29 19:03 ` Chocimier
@ 2022-06-29 19:56 ` Chocimier
2022-07-04 18:48 ` Chocimier
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Chocimier @ 2022-06-29 19:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 510 bytes --]
There is an updated pull request by Chocimier against master on the void-packages repository
https://github.com/Chocimier/void-packages-org postgres-meta
https://github.com/void-linux/void-packages/pull/35546
postgresql: turn into meta package as 9.6 is EOL
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **not yet**
A patch file from https://github.com/void-linux/void-packages/pull/35546.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-postgres-meta-35546.patch --]
[-- Type: text/x-diff, Size: 21373 bytes --]
From f077e673705aa227a15f3ec2814b4a8a97149cc0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 12 Feb 2022 00:14:20 +0100
Subject: [PATCH 1/3] postgresql13: update to 13.7.
---
srcpkgs/postgresql13/template | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/postgresql13/template b/srcpkgs/postgresql13/template
index 0f7b79fd6710..a27723c48a9e 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.7
+revision=1
wrksrc="postgresql-${version}"
build_style=gnu-configure
make_build_target=world
@@ -21,7 +21,8 @@ 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=1b905bf4f3d83614a393b3c51fd345910fd261e4f5124a68d9a1fdd3a2a46399
+make_check=ci-skip # Postgres server can't be run as root
conf_files="
/${_prefix}/etc/default/postgresql
From 4cb33818e97a122ee2f4cc2db63cbed38ca70c52 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 12 Feb 2022 00:14:20 +0100
Subject: [PATCH 2/3] postgresql14: update to 14.4.
---
srcpkgs/postgresql14/template | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/postgresql14/template b/srcpkgs/postgresql14/template
index 94ba16bffbc6..0b620e585e5a 100644
--- a/srcpkgs/postgresql14/template
+++ b/srcpkgs/postgresql14/template
@@ -1,6 +1,6 @@
# Template file for 'postgresql14'
pkgname=postgresql14
-version=14.1
+version=14.4
revision=1
wrksrc="postgresql-${version}"
build_style=gnu-configure
@@ -22,7 +22,8 @@ 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=c23b6237c5231c791511bdc79098617d6852e9e3bdf360efd8b5d15a1a3d8f6a
+make_check=ci-skip # Postgres server can't be run as root
conf_files="
/${_sysconfdir}/default/postgresql
From cebed4be2c85df17e58b62306be0cefb924512e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 12 Feb 2022 00:14:20 +0100
Subject: [PATCH 3/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 | 189 +++---------------
9 files changed, 30 insertions(+), 403 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 <pgsql-bugs@postgresql.org>.
- 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..4f539b0df9ff 100644
--- a/srcpkgs/postgresql/template
+++ b/srcpkgs/postgresql/template
@@ -1,191 +1,60 @@
# Template file for 'postgresql'
pkgname=postgresql
-version=9.6.24
+version=14
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 <chocimier@tlen.pl>"
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"
+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
- }
}
postgresql-contrib_package() {
+ depends="postgresql${version}-contrib"
short_desc="PostgreSQL contributed programs and extensions"
- pkg_install() {
- make -C contrib install DESTDIR=${PKGDESTDIR}
- }
+}
+
+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
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PR PATCH] [Updated] postgresql: turn into meta package as 9.6 is EOL
2022-02-11 23:16 [PR PATCH] postgresql: turn into meta package as 9.6 is EOL Chocimier
` (4 preceding siblings ...)
2022-06-29 19:56 ` [PR PATCH] [Updated] " Chocimier
@ 2022-07-04 18:48 ` Chocimier
2022-07-04 18:51 ` Chocimier
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Chocimier @ 2022-07-04 18:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 510 bytes --]
There is an updated pull request by Chocimier against master on the void-packages repository
https://github.com/Chocimier/void-packages-org postgres-meta
https://github.com/void-linux/void-packages/pull/35546
postgresql: turn into meta package as 9.6 is EOL
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **not yet**
A patch file from https://github.com/void-linux/void-packages/pull/35546.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-postgres-meta-35546.patch --]
[-- Type: text/x-diff, Size: 21867 bytes --]
From 4af80f2fd4c6ca438b4d1e3213e46d7121e6a384 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 12 Feb 2022 00:14:20 +0100
Subject: [PATCH 1/3] postgresql13: update to 13.7.
---
srcpkgs/postgresql13/template | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/postgresql13/template b/srcpkgs/postgresql13/template
index 0f7b79fd6710..08e67ba226bd 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.7
+revision=1
wrksrc="postgresql-${version}"
build_style=gnu-configure
make_build_target=world
@@ -21,7 +21,8 @@ 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=1b905bf4f3d83614a393b3c51fd345910fd261e4f5124a68d9a1fdd3a2a46399
+make_check=ci-skip # Postgres server can't be run as root
conf_files="
/${_prefix}/etc/default/postgresql
@@ -223,5 +224,6 @@ postgresql13-contrib_package() {
short_desc="PostgreSQL contributed programs and extensions"
pkg_install() {
make -C contrib install DESTDIR=${PKGDESTDIR}
+ mv ${PKGDESTDIR}/usr/include ${PKGDESTDIR}/${_prefix}
}
}
From 19fe24ce4bcca6e3beda736e26c515c2074e8902 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 12 Feb 2022 00:14:20 +0100
Subject: [PATCH 2/3] postgresql14: update to 14.4.
---
srcpkgs/postgresql14/template | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/postgresql14/template b/srcpkgs/postgresql14/template
index 94ba16bffbc6..2aa65e684a1d 100644
--- a/srcpkgs/postgresql14/template
+++ b/srcpkgs/postgresql14/template
@@ -1,6 +1,6 @@
# Template file for 'postgresql14'
pkgname=postgresql14
-version=14.1
+version=14.4
revision=1
wrksrc="postgresql-${version}"
build_style=gnu-configure
@@ -22,7 +22,8 @@ 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=c23b6237c5231c791511bdc79098617d6852e9e3bdf360efd8b5d15a1a3d8f6a
+make_check=ci-skip # Postgres server can't be run as root
conf_files="
/${_sysconfdir}/default/postgresql
@@ -224,5 +225,6 @@ postgresql14-contrib_package() {
short_desc="PostgreSQL contributed programs and extensions"
pkg_install() {
make -C contrib install DESTDIR=${PKGDESTDIR}
+ mv ${PKGDESTDIR}/usr/include ${PKGDESTDIR}/${_prefix}
}
}
From 69dfc478de22b923ecd734ace8c1de899fb57f6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 12 Feb 2022 00:14:20 +0100
Subject: [PATCH 3/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 | 189 +++---------------
9 files changed, 30 insertions(+), 403 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 <pgsql-bugs@postgresql.org>.
- 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..4f539b0df9ff 100644
--- a/srcpkgs/postgresql/template
+++ b/srcpkgs/postgresql/template
@@ -1,191 +1,60 @@
# Template file for 'postgresql'
pkgname=postgresql
-version=9.6.24
+version=14
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 <chocimier@tlen.pl>"
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"
+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
- }
}
postgresql-contrib_package() {
+ depends="postgresql${version}-contrib"
short_desc="PostgreSQL contributed programs and extensions"
- pkg_install() {
- make -C contrib install DESTDIR=${PKGDESTDIR}
- }
+}
+
+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
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PR PATCH] [Updated] postgresql: turn into meta package as 9.6 is EOL
2022-02-11 23:16 [PR PATCH] postgresql: turn into meta package as 9.6 is EOL Chocimier
` (5 preceding siblings ...)
2022-07-04 18:48 ` Chocimier
@ 2022-07-04 18:51 ` Chocimier
2022-07-04 19:12 ` [PR PATCH] [Merged]: " Chocimier
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Chocimier @ 2022-07-04 18:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 510 bytes --]
There is an updated pull request by Chocimier against master on the void-packages repository
https://github.com/Chocimier/void-packages-org postgres-meta
https://github.com/void-linux/void-packages/pull/35546
postgresql: turn into meta package as 9.6 is EOL
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **not yet**
A patch file from https://github.com/void-linux/void-packages/pull/35546.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-postgres-meta-35546.patch --]
[-- Type: text/x-diff, Size: 21867 bytes --]
From 98d4237849a19331645be65fd9ea153e372aa5e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 12 Feb 2022 00:14:20 +0100
Subject: [PATCH 1/3] postgresql13: update to 13.7.
---
srcpkgs/postgresql13/template | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/postgresql13/template b/srcpkgs/postgresql13/template
index 0f7b79fd6710..08e67ba226bd 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.7
+revision=1
wrksrc="postgresql-${version}"
build_style=gnu-configure
make_build_target=world
@@ -21,7 +21,8 @@ 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=1b905bf4f3d83614a393b3c51fd345910fd261e4f5124a68d9a1fdd3a2a46399
+make_check=ci-skip # Postgres server can't be run as root
conf_files="
/${_prefix}/etc/default/postgresql
@@ -223,5 +224,6 @@ postgresql13-contrib_package() {
short_desc="PostgreSQL contributed programs and extensions"
pkg_install() {
make -C contrib install DESTDIR=${PKGDESTDIR}
+ mv ${PKGDESTDIR}/usr/include ${PKGDESTDIR}/${_prefix}
}
}
From 4189e75ad3b592434ac91d917a04ff39a165516f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 12 Feb 2022 00:14:20 +0100
Subject: [PATCH 2/3] postgresql14: update to 14.4.
---
srcpkgs/postgresql14/template | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/postgresql14/template b/srcpkgs/postgresql14/template
index 94ba16bffbc6..2aa65e684a1d 100644
--- a/srcpkgs/postgresql14/template
+++ b/srcpkgs/postgresql14/template
@@ -1,6 +1,6 @@
# Template file for 'postgresql14'
pkgname=postgresql14
-version=14.1
+version=14.4
revision=1
wrksrc="postgresql-${version}"
build_style=gnu-configure
@@ -22,7 +22,8 @@ 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=c23b6237c5231c791511bdc79098617d6852e9e3bdf360efd8b5d15a1a3d8f6a
+make_check=ci-skip # Postgres server can't be run as root
conf_files="
/${_sysconfdir}/default/postgresql
@@ -224,5 +225,6 @@ postgresql14-contrib_package() {
short_desc="PostgreSQL contributed programs and extensions"
pkg_install() {
make -C contrib install DESTDIR=${PKGDESTDIR}
+ mv ${PKGDESTDIR}/usr/include ${PKGDESTDIR}/${_prefix}
}
}
From 00c1ff8f6e919756c8a44a509457d217a0ad5efb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 12 Feb 2022 00:14:20 +0100
Subject: [PATCH 3/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 | 189 +++---------------
9 files changed, 30 insertions(+), 403 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 <pgsql-bugs@postgresql.org>.
- 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..4f539b0df9ff 100644
--- a/srcpkgs/postgresql/template
+++ b/srcpkgs/postgresql/template
@@ -1,191 +1,60 @@
# Template file for 'postgresql'
pkgname=postgresql
-version=9.6.24
+version=14
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 <chocimier@tlen.pl>"
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"
+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
- }
}
postgresql-contrib_package() {
+ depends="postgresql${version}-contrib"
short_desc="PostgreSQL contributed programs and extensions"
- pkg_install() {
- make -C contrib install DESTDIR=${PKGDESTDIR}
- }
+}
+
+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
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PR PATCH] [Merged]: postgresql: turn into meta package as 9.6 is EOL
2022-02-11 23:16 [PR PATCH] postgresql: turn into meta package as 9.6 is EOL Chocimier
` (6 preceding siblings ...)
2022-07-04 18:51 ` Chocimier
@ 2022-07-04 19:12 ` Chocimier
2022-07-07 3:10 ` hsnfirdaus
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Chocimier @ 2022-07-04 19:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 340 bytes --]
There's a merged pull request on the void-packages repository
postgresql: turn into meta package as 9.6 is EOL
https://github.com/void-linux/void-packages/pull/35546
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **not yet**
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: postgresql: turn into meta package as 9.6 is EOL
2022-02-11 23:16 [PR PATCH] postgresql: turn into meta package as 9.6 is EOL Chocimier
` (7 preceding siblings ...)
2022-07-04 19:12 ` [PR PATCH] [Merged]: " Chocimier
@ 2022-07-07 3:10 ` hsnfirdaus
2022-07-07 15:21 ` Chocimier
2022-07-07 17:58 ` hsnfirdaus
10 siblings, 0 replies; 12+ messages in thread
From: hsnfirdaus @ 2022-07-07 3:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 405 bytes --]
New comment by hsnfirdaus on void-packages repository
https://github.com/void-linux/void-packages/pull/35546#issuecomment-1177000215
Comment:
Well, this postgresql update make my postgresql broken. I checked, i notice that service name was changed from postgresql to postgresql14. I'm try to symlink postgresql14, but sadly my previous postgresql user is gone (i don't know if my database also gone(...
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: postgresql: turn into meta package as 9.6 is EOL
2022-02-11 23:16 [PR PATCH] postgresql: turn into meta package as 9.6 is EOL Chocimier
` (8 preceding siblings ...)
2022-07-07 3:10 ` hsnfirdaus
@ 2022-07-07 15:21 ` Chocimier
2022-07-07 17:58 ` hsnfirdaus
10 siblings, 0 replies; 12+ messages in thread
From: Chocimier @ 2022-07-07 15:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 866 bytes --]
New comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/35546#issuecomment-1177782765
Comment:
Hi @hsnfirdaus,
> Well, this postgresql update make my postgresql broken.
Upgrading major version requires some manual steps described at <https://www.postgresql.org/docs/current/upgrading.html>. That's why versions 12-14 were provided in numbered packages for last two years.
If you choose method that requires presence of old binaries, you can get them from cache (<https://docs.voidlinux.org/xbps/advanced-usage.html#downgrading>) or build with xbps-src.
> my previous postgresql user is gone
Running `xbps-reconfigure -f postgresql14` will enable the user. Maybe it should be still defined in `postgresql` package.
> i don't know if my database also gone
it is there, please refer to upgrade docs.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: postgresql: turn into meta package as 9.6 is EOL
2022-02-11 23:16 [PR PATCH] postgresql: turn into meta package as 9.6 is EOL Chocimier
` (9 preceding siblings ...)
2022-07-07 15:21 ` Chocimier
@ 2022-07-07 17:58 ` hsnfirdaus
10 siblings, 0 replies; 12+ messages in thread
From: hsnfirdaus @ 2022-07-07 17:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1001 bytes --]
New comment by hsnfirdaus on void-packages repository
https://github.com/void-linux/void-packages/pull/35546#issuecomment-1178008400
Comment:
> Hi @hsnfirdaus,
>
> > Well, this postgresql update make my postgresql broken.
>
> Upgrading major version requires some manual steps described at https://www.postgresql.org/docs/current/upgrading.html. That's why versions 12-14 were provided in numbered packages for last two years. If you choose method that requires presence of old binaries, you can get them from cache (https://docs.voidlinux.org/xbps/advanced-usage.html#downgrading) or build with xbps-src.
>
> > my previous postgresql user is gone
>
> Running `xbps-reconfigure -f postgresql14` will enable the user. Maybe it should be still defined in `postgresql` package.
>
> > i don't know if my database also gone
>
> it is there, please refer to upgrade docs.
Well, thank you very much for your solution... I'm decide to downgrade postgresql by building package myself...
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-07-07 17:58 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-11 23:16 [PR PATCH] postgresql: turn into meta package as 9.6 is EOL Chocimier
2022-03-16 18:30 ` [PR PATCH] [Updated] " Chocimier
2022-06-23 2:15 ` github-actions
2022-06-29 19:01 ` [PR PATCH] [Updated] " Chocimier
2022-06-29 19:03 ` Chocimier
2022-06-29 19:56 ` [PR PATCH] [Updated] " Chocimier
2022-07-04 18:48 ` Chocimier
2022-07-04 18:51 ` Chocimier
2022-07-04 19:12 ` [PR PATCH] [Merged]: " Chocimier
2022-07-07 3:10 ` hsnfirdaus
2022-07-07 15:21 ` Chocimier
2022-07-07 17:58 ` hsnfirdaus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).