From 26442ff27b878c3e5c1b5a8fc66b470a645b05b73711fd44a303ef6bc179c917 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Mon, 15 May 2023 14:21:23 +0000 Subject: [PATCH 1/6] - Overhaul postgresql-README.SUSE and move it from the binary package to the noarch wrapper package. OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql14?expand=0&rev=51 --- postgresql14.changes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/postgresql14.changes b/postgresql14.changes index ccae953..e2286d6 100644 --- a/postgresql14.changes +++ b/postgresql14.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon May 15 14:21:03 UTC 2023 - Reinhard Max + +- Overhaul postgresql-README.SUSE and move it from the binary + package to the noarch wrapper package. + ------------------------------------------------------------------- Wed May 10 12:58:22 UTC 2023 - Reinhard Max From ab032128d60e3692d683ad53734daf81ad444a3e1c83362602cecd7706fb4855 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Mon, 15 May 2023 14:53:16 +0000 Subject: [PATCH 2/6] - Change the unix domain socket location from /var/run to /run. OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql14?expand=0&rev=52 --- postgresql-README.SUSE | 80 --------------------------------- postgresql-var-run-socket.patch | 4 +- postgresql14.changes | 1 + postgresql14.spec | 2 - 4 files changed, 3 insertions(+), 84 deletions(-) delete mode 100644 postgresql-README.SUSE diff --git a/postgresql-README.SUSE b/postgresql-README.SUSE deleted file mode 100644 index 2fbea8e..0000000 --- a/postgresql-README.SUSE +++ /dev/null @@ -1,80 +0,0 @@ -Unix-Domain Socket Directory -============================ - - - -Upgrading PostgreSQL on openSUSE and SUSE Linux Enterprise Server -================================================================= - -Current versions of PostgreSQL come with the pg_upgrade tool that -simplifies and speeds up the migration of a PostgreSQL installation to -a new version. Before version 9.1 dump and restore was needed which -was much slower. - -pg_upgrade needs to have the server binaries of both versions -available. To allow this, we had to change the way PostgreSQL is -packaged as well as the naming of the packages, so that two or more -versions of PostgreSQL can be installed in parallel. The package -names for PostgreSQL contain numbers indicating the major version. - -In PostgreSQL terms for versions up to 9.6 the major version consisted -of the first two components of the three-component version number, -i.e. 8.3, 8.4, 9.0, or 9.1. So, the packages for Postgresql 9.1 are -named postgresql91, postgresql91-server, etc. Inside the packages the -files were moved from their standard locations to a versioned location -such as /usr/lib/postgresql83/bin or /usr/lib/postgresql91/bin to -avoid file conflicts if packages are installed in parallel. - -Starting with version 10 the PostgreSQL project changed their -versioning scheme from from three components to two, which means one -component for the major version and one for the minor. So, the -sequence of major version across the versioning scheme change will be: -9.4, 9.5, 9.6, 10, 11, 12. For versions that use the new versioning -scheme SUSE only puts the single component major version into the -package name, so the postgresql96 package (containg version 9.6 -according to the old versioning scheme) will be followed by -postgresql10, then postgresql11, and so on. - -The update-alternatives mechanism creates and maintains symbolic links -that cause one version (by default the highest installed version) to -re-appear in the standard locations. By default, database data are -stored under /var/lib/pgsql/data on SUSE Linux. - -The following preconditions have to be fulfilled before data migration -can be started: - - 1. If not already done, the packages of the old PostgreSQL version - must be upgraded to the new packaging scheme through a maintenance - update. - - 2. The packages of the new PostgreSQL major version need to be - installed. As pg_upgrade is contained in postgresql91-contrib, that - one has to be installed as well, at least until the migration is - done. - - 3. Unless pg_upgrade is used in link mode, the server must have - enough free disk space to temporarily hold a copy of the database - files. If the database instance was installed in the default - location, the needed space in megabytes can be determined by running - the follwing command as root: "du -hs /var/lib/pgsql/data". If space - is tight, it might help to run the "VACUUM FULL" SQL command on each - database in the instance to be migrated, but be aware that it might - take very long. - -The latest upstream documentation for pg_upgrade including step by -step instructions for performing a database migration can be found -online under https://www.postgresql.org/docs/current/pgupgrade.html , -or locally under -file:///usr/share/doc/packages/postgresqlXX/html/pgupgrade.html , if -the postgresqlXX-docs package is installed. XX is a place holder for -the respective major version here. - -NOTE: The online documentation starts with explaining how you can -install PostgreSQL from the upstream sources (which is not necessary -when you install the SUSE RPMs) and also uses other directory names -(/usr/local instead of the update-alternatives based path as described -above). - -For background information about the inner workings of pg_upgrade and -a performance comparison with the old dump and restore method, see -http://momjian.us/main/writings/pgsql/pg_upgrade.pdf . diff --git a/postgresql-var-run-socket.patch b/postgresql-var-run-socket.patch index 0b95562..aeffa51 100644 --- a/postgresql-var-run-socket.patch +++ b/postgresql-var-run-socket.patch @@ -1,4 +1,4 @@ -Change the built-in default socket directory to be /var/run/postgresql. +Change the built-in default socket directory to be /run/postgresql. For backwards compatibility with (probably non-libpq-based) clients that might still expect to find the socket in /tmp, also create a socket in /tmp. This is to resolve communication problems with clients operating @@ -48,7 +48,7 @@ Index: src/include/pg_config_manual.h */ #ifndef WIN32 -#define DEFAULT_PGSOCKET_DIR "/tmp" -+#define DEFAULT_PGSOCKET_DIR "/var/run/postgresql" ++#define DEFAULT_PGSOCKET_DIR "/run/postgresql" #else #define DEFAULT_PGSOCKET_DIR "" #endif diff --git a/postgresql14.changes b/postgresql14.changes index e2286d6..641c82e 100644 --- a/postgresql14.changes +++ b/postgresql14.changes @@ -3,6 +3,7 @@ Mon May 15 14:21:03 UTC 2023 - Reinhard Max - Overhaul postgresql-README.SUSE and move it from the binary package to the noarch wrapper package. +- Change the unix domain socket location from /var/run to /run. ------------------------------------------------------------------- Wed May 10 12:58:22 UTC 2023 - Reinhard Max diff --git a/postgresql14.spec b/postgresql14.spec index 843cf3a..3359467 100644 --- a/postgresql14.spec +++ b/postgresql14.spec @@ -156,7 +156,6 @@ Release: 0 Source0: https://ftp.postgresql.org/pub/source/v%{tarversion}/postgresql-%{tarversion}.tar.bz2 Source1: https://ftp.postgresql.org/pub/source/v%{tarversion}/postgresql-%{tarversion}.tar.bz2.sha256 Source2: baselibs.conf -Source3: postgresql-README.SUSE Source17: postgresql-rpmlintrc Patch1: postgresql-conf.patch # PL/Perl needs to be linked with rpath (bsc#578053) @@ -630,7 +629,6 @@ install -d -m 750 %buildroot/var/lib/pgsql install -d -m755 %buildroot%pgdocdir cp doc/KNOWN_BUGS doc/MISSING_FEATURES COPYRIGHT \ README HISTORY %buildroot%pgdocdir -cp -a %SOURCE3 %buildroot%pgdocdir/README.SUSE # Use versioned names for the man pages: for f in %buildroot%pgmandir/man*/*; do mv $f ${f}pg%pgmajor From 8ca724be4b6097d203edf36cfb307cee7aa2bdb66427aaa2c404c98076f453ed Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Fri, 26 May 2023 12:03:04 +0000 Subject: [PATCH 3/6] - Restore the independence of mini builds from the main build after the -mini name change from April 4, 2023. - Adjust icu handling to prepare for PostgreSQL 16. OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql14?expand=0&rev=53 --- postgresql14.changes | 7 +++++++ postgresql14.spec | 21 ++++++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/postgresql14.changes b/postgresql14.changes index 641c82e..6db42c4 100644 --- a/postgresql14.changes +++ b/postgresql14.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri May 26 11:48:38 UTC 2023 - Reinhard Max + +- Restore the independence of mini builds from the main build after + the -mini name change from April 4, 2023. +- Adjust icu handling to prepare for PostgreSQL 16. + ------------------------------------------------------------------- Mon May 15 14:21:03 UTC 2023 - Reinhard Max diff --git a/postgresql14.spec b/postgresql14.spec index 3359467..b5d52f2 100644 --- a/postgresql14.spec +++ b/postgresql14.spec @@ -69,7 +69,11 @@ Name: %pgname %if %mini %bcond_with selinux +%if %pgmajor >= 16 +%bcond_without icu +%else %bcond_with icu +%endif %else BuildRequires: %{python}-devel BuildRequires: docbook_4 @@ -143,11 +147,18 @@ BuildRequires: pkg-config BuildRequires: pkgconfig(krb5) BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(systemd) -#!BuildIgnore: postgresql-implementation -#!BuildIgnore: postgresql-server-implementation -#!BuildIgnore: postgresql-devel-noarch -#!BuildIgnore: postgresql-llvmjit-devel-noarch -#!BuildIgnore: postgresql-server-devel-noarch +#!BuildIgnore: %pgname +#!BuildIgnore: %pgname-server +#!BuildIgnore: %pgname-devel +#!BuildIgnore: %pgname-server-devel +#!BuildIgnore: %pgname-llvmjit +#!BuildIgnore: %pgname-llvmjit-devel +#!BuildIgnore: %pgname-contrib +#!BuildIgnore: %pgname-docs +#!BuildIgnore: %pgname-test +#!BuildIgnore: %pgname-pltcl +#!BuildIgnore: %pgname-plperl +#!BuildIgnore: %pgname-plpython Summary: Basic Clients and Utilities for PostgreSQL License: PostgreSQL Group: Productivity/Databases/Tools From b5e33915b45669f9e6538a52b44e21a7dbb613454eed0a0cc028265dd22c9546 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Thu, 10 Aug 2023 13:28:03 +0000 Subject: [PATCH 4/6] - Update to 14.9: * bsc#1214059, CVE-2023-39417: Disallow substituting a schema or owner name into an extension script if the name contains a quote, backslash, or dollar sign. * https://www.postgresql.org/docs/14/release-14-9.html OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql14?expand=0&rev=54 --- postgresql-14.8.tar.bz2 | 3 --- postgresql-14.8.tar.bz2.sha256 | 1 - postgresql-14.9.tar.bz2 | 3 +++ postgresql-14.9.tar.bz2.sha256 | 1 + postgresql14.changes | 9 +++++++++ postgresql14.spec | 6 +++--- 6 files changed, 16 insertions(+), 7 deletions(-) delete mode 100644 postgresql-14.8.tar.bz2 delete mode 100644 postgresql-14.8.tar.bz2.sha256 create mode 100644 postgresql-14.9.tar.bz2 create mode 100644 postgresql-14.9.tar.bz2.sha256 diff --git a/postgresql-14.8.tar.bz2 b/postgresql-14.8.tar.bz2 deleted file mode 100644 index 34ac266..0000000 --- a/postgresql-14.8.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:39d38f0030737ed03835debeefee3b37d335462ce4995e2497bc38d621ebe45a -size 22204905 diff --git a/postgresql-14.8.tar.bz2.sha256 b/postgresql-14.8.tar.bz2.sha256 deleted file mode 100644 index a7bbad3..0000000 --- a/postgresql-14.8.tar.bz2.sha256 +++ /dev/null @@ -1 +0,0 @@ -39d38f0030737ed03835debeefee3b37d335462ce4995e2497bc38d621ebe45a postgresql-14.8.tar.bz2 diff --git a/postgresql-14.9.tar.bz2 b/postgresql-14.9.tar.bz2 new file mode 100644 index 0000000..566bb44 --- /dev/null +++ b/postgresql-14.9.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1fe3ba9b1a7f3a9637dd1656dfdad2889016073fd4d35f13b50143cbbb6a8ef +size 22207374 diff --git a/postgresql-14.9.tar.bz2.sha256 b/postgresql-14.9.tar.bz2.sha256 new file mode 100644 index 0000000..9f4b0cb --- /dev/null +++ b/postgresql-14.9.tar.bz2.sha256 @@ -0,0 +1 @@ +b1fe3ba9b1a7f3a9637dd1656dfdad2889016073fd4d35f13b50143cbbb6a8ef postgresql-14.9.tar.bz2 diff --git a/postgresql14.changes b/postgresql14.changes index 6db42c4..cf6b325 100644 --- a/postgresql14.changes +++ b/postgresql14.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Aug 9 09:42:33 UTC 2023 - Reinhard Max + +- Update to 14.9: + * bsc#1214059, CVE-2023-39417: Disallow substituting a schema or + owner name into an extension script if the name contains a + quote, backslash, or dollar sign. + * https://www.postgresql.org/docs/14/release-14-9.html + ------------------------------------------------------------------- Fri May 26 11:48:38 UTC 2023 - Reinhard Max diff --git a/postgresql14.spec b/postgresql14.spec index b5d52f2..0233711 100644 --- a/postgresql14.spec +++ b/postgresql14.spec @@ -16,8 +16,8 @@ # -%define pgversion 14.8 -%define pgmajor 14 +%define pgversion 14.9 +%define pgmajor 15 %define buildlibs 0 %define tarversion %{pgversion} %define latest_supported_llvm_ver 15 @@ -70,7 +70,7 @@ Name: %pgname %if %mini %bcond_with selinux %if %pgmajor >= 16 -%bcond_without icu +%bcond_without icu %else %bcond_with icu %endif From 84b35c27608b1c76ef1703fe9f6c349cb4ca5167bef46cfd51bef3ea63eb54e8 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Thu, 10 Aug 2023 16:07:19 +0000 Subject: [PATCH 5/6] OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql14?expand=0&rev=55 --- postgresql14.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgresql14.spec b/postgresql14.spec index 0233711..ccd05fb 100644 --- a/postgresql14.spec +++ b/postgresql14.spec @@ -17,7 +17,7 @@ %define pgversion 14.9 -%define pgmajor 15 +%define pgmajor 14 %define buildlibs 0 %define tarversion %{pgversion} %define latest_supported_llvm_ver 15 From 274611f1065942e6b0b8aca97b0f9d1d6dd1a7ddd075a9693895c9eca7c01ea6 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Tue, 10 Oct 2023 13:12:37 +0000 Subject: [PATCH 6/6] - boo#1216022: Call install-alternatives from the devel subpackage as well, otherwise the symlink for ecpg might be missing. - Also buildignore the postgresql*-implementation symbols: this is needed in order to bootstrap when no postgresql version currently has valid symbols provided. Once the packages are built, OBS could translate this to the pgname-* packages and accept the ignores; during bootstrap though, there is nothing providing the symbol and the existing buildignores do not suffice. OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql14?expand=0&rev=56 --- postgresql-testsuite-keep-results-file.patch | 8 +++----- postgresql14.changes | 16 ++++++++++++++++ postgresql14.spec | 20 +++++++++++++------- 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/postgresql-testsuite-keep-results-file.patch b/postgresql-testsuite-keep-results-file.patch index e79104f..99a43fb 100644 --- a/postgresql-testsuite-keep-results-file.patch +++ b/postgresql-testsuite-keep-results-file.patch @@ -4,11 +4,9 @@ Date: Mon Mar 11 18:42:39 2013 +0100 don't unlink the result file -Index: postgresql-14rc1/src/test/regress/pg_regress.c -=================================================================== ---- postgresql-14rc1.orig/src/test/regress/pg_regress.c -+++ postgresql-14rc1/src/test/regress/pg_regress.c -@@ -2681,7 +2681,6 @@ regression_main(int argc, char *argv[], +--- src/test/regress/pg_regress.c.orig ++++ src/test/regress/pg_regress.c +@@ -2702,7 +2702,6 @@ regression_main(int argc, char *argv[], else { unlink(difffilename); diff --git a/postgresql14.changes b/postgresql14.changes index cf6b325..4c595a6 100644 --- a/postgresql14.changes +++ b/postgresql14.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Tue Oct 10 12:49:02 UTC 2023 - Reinhard Max + +- boo#1216022: Call install-alternatives from the devel subpackage + as well, otherwise the symlink for ecpg might be missing. + +------------------------------------------------------------------- +Mon Sep 18 15:24:14 UTC 2023 - Dominique Leuenberger + +- Also buildignore the postgresql*-implementation symbols: this is + needed in order to bootstrap when no postgresql version currently + has valid symbols provided. Once the packages are built, OBS + could translate this to the pgname-* packages and accept the + ignores; during bootstrap though, there is nothing providing the + symbol and the existing buildignores do not suffice. + ------------------------------------------------------------------- Wed Aug 9 09:42:33 UTC 2023 - Reinhard Max diff --git a/postgresql14.spec b/postgresql14.spec index ccd05fb..2ebd577 100644 --- a/postgresql14.spec +++ b/postgresql14.spec @@ -159,6 +159,10 @@ BuildRequires: pkgconfig(systemd) #!BuildIgnore: %pgname-pltcl #!BuildIgnore: %pgname-plperl #!BuildIgnore: %pgname-plpython +#!BuildIgnore: postgresql-implementation +#!BuildIgnore: postgresql-server-implementation +#!BuildIgnore: postgresql-server-devel-implementation +#!BuildIgnore: postgresql-llvmjit-devel-implementation Summary: Basic Clients and Utilities for PostgreSQL License: PostgreSQL Group: Productivity/Databases/Tools @@ -505,7 +509,7 @@ included in the postgresql-server package. touch -r configure tmp %patch1 %patch4 -%patch8 -p1 +%patch8 %patch9 %if %{with llvm} %patch10 @@ -791,18 +795,20 @@ awk -v P=%buildroot '/^(%lang|[^%])/{print P $NF}' libpq.files libecpg.files | x %post -n %pgname-%devel /sbin/ldconfig -%if %{with server_devel} -%post server-devel -%endif /usr/share/postgresql/install-alternatives %pgmajor %postun -n %pgname-%devel /sbin/ldconfig -%if %{with server_devel} -%postun server-devel -%endif /usr/share/postgresql/install-alternatives %pgmajor +%if %{with server_devel} +%post server-devel +/usr/share/postgresql/install-alternatives %pgmajor + +%postun server-devel +/usr/share/postgresql/install-alternatives %pgmajor +%endif + %if !%mini %postun