diff options
Diffstat (limited to 'system/postgresql')
-rw-r--r-- | system/postgresql/README.SBo | 33 | ||||
-rw-r--r-- | system/postgresql/postgresql.SlackBuild | 32 | ||||
-rw-r--r-- | system/postgresql/postgresql.info | 6 | ||||
-rw-r--r-- | system/postgresql/rc.postgresql.new | 4 |
4 files changed, 38 insertions, 37 deletions
diff --git a/system/postgresql/README.SBo b/system/postgresql/README.SBo index d4b48e11d7..89e1424750 100644 --- a/system/postgresql/README.SBo +++ b/system/postgresql/README.SBo @@ -1,14 +1,14 @@ Before you can run postgresql you'll need to create the database files in /var/lib/pgsql. The following should do the trick. - # su postgres -c "initdb -D /var/lib/pgsql/10.2/data --locale=en_US.UTF-8 -A md5 -W" + # su postgres -c "initdb -D /var/lib/pgsql/14/data --locale=en_US.UTF-8 -A md5 -W" Additionally, a logrotation script and init script are included. For production level log file handling please read -http://www.postgresql.org/docs/10.2/interactive/logfile-maintenance.html +https://www.postgresql.org/docs/14/logfile-maintenance.html -In order to start postgresql at boot and stop it properly at shutdown, -make sure rc.postgresql is executable and add the following lines to +In order to start postgresql at boot and stop it properly at shutdown, +make sure rc.postgresql is executable and add the following lines to the following files: /etc/rc.d/rc.local @@ -28,20 +28,18 @@ the following files: Additionally, rc.postgresql script has additional modes for stop/restart: force-stop|force-restart (i.e. pg_ctl 'fast' mode) unclean-stop|unclean-restart (i.e. pg_ctl 'immediate' mode) -See http://www.postgresql.org/docs/10.2/static/app-pg-ctl.html +See https://www.postgresql.org/docs/14/app-pg-ctl.html From PostgreSQL 9.3 we support in place database upgrades using pg_upgrade: - http://www.postgresql.org/docs/10.2/static/pgupgrade.html + https://www.postgresql.org/docs/14/pgupgrade.html -A few hints for PostgreSQL 9.6 -> 10.2 upgrade: - - Don't remove old PostgreSQL 9.6.x package - - Install PostgreSQL 10.2.x, note that binaries are in - '/usr/lib64/postgresql/10.2/bin' +A few hints for PostgreSQL 10.x -> 14.x upgrade: + - Don't remove old PostgreSQL 10.x package + - Install PostgreSQL 14.x, note that binaries are in + '/usr/lib64/postgresql/14/bin' - Follow regular pg_upgrade docs - Remove old package when transition is over, or read comments in rc.postgresql if you want to run multiple PostgreSQL versions in parallel - - Check the /usr/bin for stale symlinks for old binaries_ - e.g. in v10.0 pg_xlogdump got renamed to pg_waldump. This script builds postgresql with some useful extension modules from the contrib directory, see PG_EXTENSIONS in SlackBuild file. @@ -51,14 +49,3 @@ To build PostgreSQL with all extensions, use the following command: Please note that in order to actually use extension, you must execute 'CREATE EXTENSION [ IF NOT EXISTS ] extension_name' for each extension. - -OpenLDAP Notes - -With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend -process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and -also uses LDAP will crash on exit. - -The LDAP wont be enabled (regardless of '--with-ldap' flag in slackbuild) -for affected OpenLDAP versions, so we've removed that build flag alltogether. - -(OpenLDAP 2.4.31 is the version included in Slackware 14.1) diff --git a/system/postgresql/postgresql.SlackBuild b/system/postgresql/postgresql.SlackBuild index 0c043fa2bc..f405f0e0ce 100644 --- a/system/postgresql/postgresql.SlackBuild +++ b/system/postgresql/postgresql.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for PostgreSQL # @@ -24,12 +24,18 @@ # Modified by the SlackBuilds.org Project +# 20220301 bkw: Modified by SlackBuilds.org, BUILD=2: +# - strip pg_config binary (install-strip misses that one). + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=postgresql -VERSION=${VERSION:-10.10} +VERSION=${VERSION:-14.9} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} -PG_VERSION=${PG_VERSION:-10.10} +PG_VERSION=${PG_VERSION:-14} PG_PORT=${PG_PORT:-5432} PG_UID=${PG_UID:-209} PG_GID=${PG_GID:-209} @@ -42,7 +48,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -51,11 +61,11 @@ OUTPUT=${OUTPUT:-/tmp} # For slackbuilds.org, assigned postgres uid/gid are 209/209 # See http://slackbuilds.org/uid_gid.txt # Other popular choice is 26/26 -if ! grep ^postgres: /etc/group 2>&1 > /dev/null; then +if ! grep ^postgres: /etc/group > /dev/null 2>&1 ; then echo " You must have a postgres group to run this script." echo " # groupadd -g $PG_GID postgres" exit 1 -elif ! grep ^postgres: /etc/passwd 2>&1 > /dev/null; then +elif ! grep ^postgres: /etc/passwd > /dev/null 2>&1 ; then echo " You must have a postgres user to run this script." echo " # useradd -u $PG_UID -g $PG_GID -d /var/lib/pgsql postgres" exit 1 @@ -97,6 +107,7 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; CFLAGS="$SLKCFLAGS" \ +PYTHON="/usr/bin/python3" \ ./configure \ --prefix=/usr/lib${LIBDIRSUFFIX}/$PRGNAM/$PG_VERSION \ --sysconfdir=/etc/$PRGNAM/$PG_VERSION \ @@ -120,6 +131,9 @@ make make install-strip DESTDIR=$PKG make install-docs DESTDIR=$PKG +# 20220414 bkw: this one binary wasn't getting stripped... +strip $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/$PG_VERSION/bin/pg_config + # create symlinks to shared library for other programs to link against ( cd $PKG/usr/lib${LIBDIRSUFFIX} for i in $(ls $PRGNAM/$PG_VERSION/lib/lib*.so*) ; do ln -sf $i ; done @@ -132,7 +146,7 @@ make install-docs DESTDIR=$PKG ) # Some interesting additional modules: -# http://www.postgresql.org/docs/10.2/static/contrib.html +# https://www.postgresql.org/docs/14/contrib.html # # adminpack - helper extension for pgAdmin # pgcrypto - extension for some business applications @@ -142,7 +156,7 @@ make install-docs DESTDIR=$PKG PG_EXTENSIONS=${PG_EXTENSIONS:-"adminpack pgcrypto ltree xml2 postgres_fdw file_fdw hstore citext"} -if [ "x$PG_EXTENSIONS" = "xALL" ];then +if [ "$PG_EXTENSIONS" = "ALL" ];then cd $TMP/$PRGNAM-$VERSION/contrib make all make install-strip DESTDIR=$PKG @@ -202,4 +216,4 @@ sed -e "s%@PG_VERSION@%$PG_VERSION%" \ $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/postgresql/postgresql.info b/system/postgresql/postgresql.info index cb379a5c22..1eacb7229a 100644 --- a/system/postgresql/postgresql.info +++ b/system/postgresql/postgresql.info @@ -1,8 +1,8 @@ PRGNAM="postgresql" -VERSION="10.10" +VERSION="14.9" HOMEPAGE="https://www.postgresql.org" -DOWNLOAD="https://ftp.postgresql.org/pub/source/v10.10/postgresql-10.10.tar.gz" -MD5SUM="e4cc4587fb830065f9386e16a949019e" +DOWNLOAD="https://ftp.postgresql.org/pub/source/v14.9/postgresql-14.9.tar.gz" +MD5SUM="08c55c0025f598151b4107844c55b14d" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/system/postgresql/rc.postgresql.new b/system/postgresql/rc.postgresql.new index 243ba527bb..28a3205306 100644 --- a/system/postgresql/rc.postgresql.new +++ b/system/postgresql/rc.postgresql.new @@ -30,7 +30,7 @@ # Since version 9.3 this startup script can run multiple PostgreSQL # versions on different ports and with different data dirs. # -# e.g. PG_VERSION=10.2 PG_PORT=6432 /etc/rc.d/rc.@PRGNAM@ start +# e.g. PG_VERSION=14 PG_PORT=6432 /etc/rc.d/rc.@PRGNAM@ start PG_VERSION=${PG_VERSION:-@PG_VERSION@} PG_PORT=${PG_PORT:-@PG_PORT@} @@ -43,7 +43,7 @@ PIDFILE=$DATADIR/postmaster.pid # oom-killer score # -# http://www.postgresql.org/docs/10.2/static/kernel-resources.html#LINUX-MEMORY-OVERCOMMIT +# https://www.postgresql.org/docs/14/kernel-resources.html#LINUX-MEMORY-OVERCOMMIT PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj PG_MASTER_OOM_SCORE_ADJ=-1000 PG_CHILD_OOM_SCORE_ADJ=0 |