Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package postgresql for openSUSE:Factory checked in at 2026-05-05 15:14:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/postgresql (Old) and /work/SRC/openSUSE:Factory/.postgresql.new.30200 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "postgresql" Tue May 5 15:14:46 2026 rev:74 rq:1350845 version:18 Changes: -------- --- /work/SRC/openSUSE:Factory/postgresql/postgresql.changes 2025-09-26 22:25:06.827505455 +0200 +++ /work/SRC/openSUSE:Factory/.postgresql.new.30200/postgresql.changes 2026-05-05 15:15:55.736569040 +0200 @@ -1,0 +2,6 @@ +Fri Apr 10 13:55:24 UTC 2026 - Reinhard Max <[email protected]> + +- Get rid of update-alternatives and support immutable mode. + See README.SUSE for details. (bsc#1245862, jsc#PED-14820) + +------------------------------------------------------------------- New: ---- pg_alts ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ postgresql.spec ++++++ --- /var/tmp/diff_new_pack.Sxv5lj/_old 2026-05-05 15:15:56.496600598 +0200 +++ /var/tmp/diff_new_pack.Sxv5lj/_new 2026-05-05 15:15:56.496600598 +0200 @@ -17,7 +17,54 @@ %define pgmajor 18 + +# SLE-12 +%if 0%{?sle_version} >= 120200 && 0%{?sle_version} < 150000 +%define defaultpackage postgresql14 +%endif + +# SLE-15-SP2 +%if 0%{?sle_version} == 150200 +%define defaultpackage postgresql12 +%endif + +# SLE-15-SP3 +%if 0%{?sle_version} == 150300 +%define defaultpackage postgresql13 +%endif + +# SLE-15-SP4 +%if 0%{?sle_version} == 150400 +%define defaultpackage postgresql14 +%endif + +# SLE-15-SP5 +%if 0%{?sle_version} == 150500 +%define defaultpackage postgresql15 +%endif + +# SLE-15-SP6 +%if 0%{?sle_version} == 150600 +%define defaultpackage postgresql16 +%endif + +# SLE-15-SP7 +%if 0%{?sle_version} == 150700 +%define defaultpackage postgresql17 +%endif + +# SLE-16.0 +%if 0%{?suse_version} == 1600 +%define defaultpackage postgresql15 +%endif + +# SLE-16.1 and newer +%if 0%{?suse_version} >= 1610 %define defaultpackage postgresql18 +%define packaging_level 42 +%else +%define packaging_level %pgmajor +%endif %if ! %{defined _rpmmacrodir} %define _rpmmacrodir %{_rpmconfigdir}/macros.d @@ -57,9 +104,27 @@ Release: 0 URL: https://www.postgresql.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build -Provides: postgresql-noarch = %version-%release +Provides: postgresql-noarch = %packaging_level Requires: postgresql-implementation +%if %packaging_level >= 42 +%bcond_without alts +Provides: pg_alts = %{version} +Conflicts: postgresql-contrib-implementation < %packaging_level +Conflicts: postgresql-devel-implementation < %packaging_level +Conflicts: postgresql-docs-implementation < %packaging_level +Conflicts: postgresql-implementation < %packaging_level +Conflicts: postgresql-llvmjit-devel-implementation < %packaging_level +Conflicts: postgresql-llvmjit-implementation < %packaging_level +Conflicts: postgresql-plperl-implementation < %packaging_level +Conflicts: postgresql-plpython-implementation < %packaging_level +Conflicts: postgresql-pltcl-implementation < %packaging_level +Conflicts: postgresql-server-devel-implementation < %packaging_level +Conflicts: postgresql-server-implementation < %packaging_level +Conflicts: postgresql-test-implementation < %packaging_level +%else +%bcond_with alts Requires: update-alternatives +%endif Recommends: %defaultpackage # In June 2020 we changed the package layout for PostgreSQL and # conflict with older releases to get a clean cut-over. @@ -87,6 +152,7 @@ Source9: postgresql.sysusers Source10: postgresql-README.SUSE Source11: postgresql-README +Source12: pg_alts %if 0%{?suse_version} > 1100 %define fwdir /etc/sysconfig/SuSEfirewall2.d/services @@ -111,7 +177,8 @@ %package server Summary: The Programs Needed to Create and Run a PostgreSQL Server Group: Productivity/Databases/Servers -Provides: postgresql-server-noarch = %version-%release +Provides: postgresql-server-noarch = %packaging_level +Requires: postgresql-noarch = %packaging_level Requires: postgresql = %version-%release Requires: postgresql-server-implementation Recommends: %defaultpackage-server @@ -147,7 +214,8 @@ %package server-devel Summary: PostgreSQL server development header files and utilities Group: Development/Libraries/C and C++ -Provides: postgresql-server-devel-noarch = %version-%release +Provides: postgresql-server-devel-noarch = %packaging_level +Requires: postgresql-noarch = %packaging_level Requires: postgresql = %version-%release Requires: postgresql-server-devel-implementation Recommends: %defaultpackage-server-devel @@ -165,7 +233,8 @@ %package llvmjit Summary: Just-in-time compilation support for PostgreSQL Group: Productivity/Databases/Servers -Provides: postgresql-llvmjit-noarch = %version-%release +Provides: postgresql-llvmjit-noarch = %packaging_level +Requires: postgresql-noarch = %packaging_level Requires: postgresql = %version-%release Requires: postgresql-llvmjit-implementation Recommends: %defaultpackage-llvmjit @@ -184,7 +253,8 @@ %package llvmjit-devel Summary: Helper package to pull all dependencies to build with llvm support Group: Productivity/Databases/Servers -Provides: postgresql-llvmjit-devel-noarch = %version-%release +Provides: postgresql-llvmjit-devel-noarch = %packaging_level +Requires: postgresql-noarch = %packaging_level Requires: postgresql = %version-%release Requires: postgresql-llvmjit-devel-implementation Requires: postgresql-server-devel-noarch @@ -203,10 +273,11 @@ %package test Summary: The test suite for PostgreSQL Group: Productivity/Databases/Servers -Provides: postgresql-test-noarch = %version-%release +Provides: postgresql-test-noarch = %packaging_level +Requires: postgresql-noarch = %packaging_level Requires: postgresql = %version-%release Requires: postgresql-test-implementation -Recommends: %defaultpackage-implementation +Recommends: %defaultpackage-test %description test This package contains the sources and pre-built binaries of various @@ -216,7 +287,7 @@ %package docs Summary: HTML Documentation for PostgreSQL Group: Productivity/Databases/Tools -Provides: postgresql-docs-noarch = %version-%release +Provides: postgresql-docs-noarch = %packaging_level Requires: postgresql-docs-implementation Recommends: %defaultpackage-docs @@ -234,7 +305,8 @@ %package contrib Summary: Contributed Extensions and Additions to PostgreSQL Group: Productivity/Databases/Tools -Provides: postgresql-contrib-noarch = %version-%release +Provides: postgresql-contrib-noarch = %packaging_level +Requires: postgresql-noarch = %packaging_level Requires: postgresql = %version-%release Requires: postgresql-contrib-implementation Recommends: %defaultpackage-contrib @@ -255,7 +327,8 @@ %package devel Summary: PostgreSQL development header files and libraries Group: Development/Libraries/C and C++ -Provides: postgresql-devel-noarch = %version-%release +Provides: postgresql-devel-noarch = %packaging_level +Requires: postgresql-noarch = %packaging_level Provides: pkgconfig(libecpg) = %{version}-%{release} Provides: pkgconfig(libecpg_compat) = %{version}-%{release} Provides: pkgconfig(libpgtypes) = %{version}-%{release} @@ -279,7 +352,8 @@ %package plperl Summary: The PL/Tcl, PL/Perl, and PL/Python procedural languages for PostgreSQL Group: Productivity/Databases/Servers -Provides: postgresql-plperl-noarch = %version-%release +Provides: postgresql-plperl-noarch = %packaging_level +Requires: postgresql-noarch = %packaging_level Requires: postgresql = %version-%release Requires: postgresql-plperl-implementation Recommends: %defaultpackage-plperl @@ -297,7 +371,8 @@ %package plpython Summary: The PL/Python Procedural Languages for PostgreSQL Group: Productivity/Databases/Servers -Provides: postgresql-plpython-noarch = %version-%release +Provides: postgresql-plpython-noarch = %packaging_level +Requires: postgresql-noarch = %packaging_level Requires: postgresql = %version-%release Requires: postgresql-plpython-implementation Recommends: %defaultpackage-plpython @@ -315,7 +390,8 @@ %package pltcl Summary: PL/Tcl Procedural Language for PostgreSQL Group: Productivity/Databases/Tools -Provides: postgresql-pltcl-noarch = %version-%release +Provides: postgresql-pltcl-noarch = %packaging_level +Requires: postgresql-noarch = %packaging_level Requires: postgresql = %version-%release Requires: postgresql-pltcl-implementation Recommends: %defaultpackage-pltcl @@ -332,6 +408,12 @@ %prep +: '*******************************' +: '** %%suse_version = %{?suse_version} **' +%{?sle_version:: '** %%sle_version = %{sle_version} **'} +: '** %%packaging_level = %packaging_level **' +: '*******************************' + %build %if %{with sysusers} @@ -355,6 +437,10 @@ install -m755 -d %buildroot/usr/sbin install -m755 -d %buildroot/usr/share/postgresql +%if %{with alts} +sed -i '2a# This script is disabled\nexit 0\n' %{S:7} +install -m755 %{S:12} %buildroot/usr/share/postgresql/pg_alts +%endif install -m755 %{S:7} %buildroot/usr/share/postgresql/install-alternatives %if %{with systemd} @@ -384,6 +470,11 @@ %define eflag /run/postgresql-was-enabled %define aflag /run/postgresql-was-running +%pre +%if %{with alts} +rm -f /var/lib/alternatives/postgresql +%endif + %if %{with sysusers} %pre server -f %{name}-server.pre %else @@ -475,6 +566,9 @@ %doc README.SUSE %dir /usr/share/postgresql /usr/share/postgresql/install-alternatives +%if %{with alts} +/usr/share/postgresql/pg_alts +%endif %files server %defattr(-,root,root,-) ++++++ pg_alts ++++++ #!/bin/bash # # If the default version is not defined in the environment, # source the config file. If it is also not defined in the # config file, find the highest installed version # test -n "$PG_ALTS_DEBUG" && set -x BASEDIR=/usr/lib/postgresql if test -z "$POSTGRES_DEFAULTVERSION"; then . /etc/sysconfig/postgresql fi if test -n "$POSTGRES_DEFAULTVERSION"; then PGBINDIR=$BASEDIR$POSTGRES_DEFAULTVERSION/bin else for DIR in $(ls -d $BASEDIR[1-8]?/bin); do test -x $DIR/psql && PGBINDIR=$DIR done fi BIN=$PGBINDIR/"${0##*/}" test -x $BIN && exec $BIN ${1+"$@"} echo "Cannot find a suitable executable for ${0##*/}." exit 1 ++++++ postgresql-README.SUSE ++++++ --- /var/tmp/diff_new_pack.Sxv5lj/_old 2026-05-05 15:15:56.572603754 +0200 +++ /var/tmp/diff_new_pack.Sxv5lj/_new 2026-05-05 15:15:56.580604086 +0200 @@ -15,11 +15,20 @@ Inside the packages the files are moved from their standard locations to a versioned location such as /usr/lib/postgresql14/bin or -/usr/lib/postgresql15/bin to avoid file conflicts. The +/usr/lib/postgresql15/bin to avoid file conflicts. + +For SUSE Linux Enterprise Server up to version 16.0 the update-alternatives mechanism is used to create and maintain symbolic links that cause one version (by default the highest installed version) to re-appear in the standard locations. +Starting from SLES 16.1 a different mechanism called pg_alts is being +used that is more flexible and supports transactional updates. By +default it still picks the highest installed version, but that can be +overridden system-wide by setting the variable POSTGRES_DEFAULTVERSION +in /etc/sysconfig/postgresql or per user by setting an environment +variable of the same name. + There is also a set of unversioned packages (postgresql, postgresql-server, etc.) that contains some common stuff that is needed for all versions, like dependencies, scripts, or this ++++++ postgresql-script ++++++ --- /var/tmp/diff_new_pack.Sxv5lj/_old 2026-05-05 15:15:56.656607242 +0200 +++ /var/tmp/diff_new_pack.Sxv5lj/_new 2026-05-05 15:15:56.660607408 +0200 @@ -8,30 +8,25 @@ INITDB_OPTS=${POSTGRES_INITDB_OPTS} PIDFILE=$DATADIR/postmaster.pid -# if test -r $DATADIR/PG_VERSION ; then DATA_VERSION=$(cat $DATADIR/PG_VERSION) POSTGRES=/usr/lib/postgresql$(echo -n $DATA_VERSION | tr -d .)/bin/postgres fi -if test -x /usr/bin/postgres; then - ACTIVE=$(readlink -q -f /usr/bin/postgres) - test -z "$POSTGRES" && POSTGRES="$ACTIVE" -fi if test -n "$DATA_VERSION"; then - if test -z "$ACTIVE" -o "$ACTIVE" != "$POSTGRES"; then - echo " Your database files were created by PostgreSQL version $DATA_VERSION." - if test -x "$POSTGRES"; then - echo " Using the executables in $(dirname $POSTGRES)." - else - echo " Could not find executables for this version." - echo " Please install the PostgreSQL server package for version $DATA_VERSION." - fi + echo " Your database files were created by PostgreSQL version $DATA_VERSION." + if test -x "$POSTGRES"; then + echo " Using the executables in $(dirname $POSTGRES)." + else + echo " Could not find executables for this version." + echo " Please install the postgresql$DATA_VERSION-server package." + exit 1 fi -elif test -z "$ACTIVE"; then - echo " Cannot find an active PostgreSQL server binary. Please install one of the PostgreSQL" - echo " server packages or activate an already installed version using update-alternatives." +else + POSTGRES=/usr/bin/postgres fi if test ! -x "$POSTGRES"; then + echo " Cannot find an active PostgreSQL server binary. Please install one of the PostgreSQL" + echo " server packages or activate an already installed version using ###-FIXME-###." exit 1 fi BINDIR=$(dirname $POSTGRES) ++++++ postgresql-sysconfig ++++++ --- /var/tmp/diff_new_pack.Sxv5lj/_old 2026-05-05 15:15:56.684608404 +0200 +++ /var/tmp/diff_new_pack.Sxv5lj/_new 2026-05-05 15:15:56.688608570 +0200 @@ -22,7 +22,6 @@ # POSTGRES_OPTIONS="" - ## Path: Applications/PostgreSQL ## Description: The PostgreSQL Database System ## Type: string() @@ -66,3 +65,17 @@ # POSTGRES_INITDB_OPTS="--auth=ident" +## Path: Applications/PostgreSQL +## Description: The PostgreSQL Database System +## Type: string() +## Default: "" +## ServiceRestart: "" +# +# When PostgreSQL gets started while no database cluster exists under +# the directory stored in the POSTGRES_DATADIR variable, the initdb +# tool gets called with that directory to initialize a new +# cluster. This variable specifies the PostgreSQL version under which +# the new database cluster will be initialized. If it is empty the +# highest installed major version will be used. +POSTGRES_DEFAULTVERSION="" +
