From ac4cf6cd0665b45cb473272b6d51969d31c9a89b2890df835f19234124ec38a9 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Mon, 15 May 2023 14:20:54 +0000 Subject: [PATCH 1/7] - 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/postgresql15?expand=0&rev=28 --- postgresql-README.SUSE | 80 ------------------------------------------ postgresql15.changes | 6 ++++ postgresql15.spec | 2 -- 3 files changed, 6 insertions(+), 82 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/postgresql15.changes b/postgresql15.changes index 3dd7837..ab46363 100644 --- a/postgresql15.changes +++ b/postgresql15.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon May 15 14:20:25 UTC 2023 - Reinhard Max + +- Overhaul postgresql-README.SUSE and move it from the binary + package to the noarch wrapper package. + ------------------------------------------------------------------- Tue May 9 11:07:48 UTC 2023 - Reinhard Max diff --git a/postgresql15.spec b/postgresql15.spec index c1068ef..56d4ffb 100644 --- a/postgresql15.spec +++ b/postgresql15.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 6de6cb9f5740f4bde81ceaf9d97ca97f68861bc5347b04bd03a2a4926a8a2310 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Mon, 15 May 2023 14:51:11 +0000 Subject: [PATCH 2/7] - 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/postgresql15?expand=0&rev=29 --- postgresql-var-run-socket.patch | 4 ++-- postgresql15.changes | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/postgresql-var-run-socket.patch b/postgresql-var-run-socket.patch index 0fd5387..7fe4cd7 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/postgresql15.changes b/postgresql15.changes index ab46363..8fb1a1c 100644 --- a/postgresql15.changes +++ b/postgresql15.changes @@ -3,6 +3,7 @@ Mon May 15 14:20:25 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. ------------------------------------------------------------------- Tue May 9 11:07:48 UTC 2023 - Reinhard Max From 0a56f59dbc42eb28b9c5d57ac41498c44da86d2ed2fbd2318629d30382515821 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Fri, 26 May 2023 12:02:43 +0000 Subject: [PATCH 3/7] - 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/postgresql15?expand=0&rev=30 --- postgresql15.changes | 7 +++++++ postgresql15.spec | 21 ++++++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/postgresql15.changes b/postgresql15.changes index 8fb1a1c..cf318a8 100644 --- a/postgresql15.changes +++ b/postgresql15.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:20:25 UTC 2023 - Reinhard Max diff --git a/postgresql15.spec b/postgresql15.spec index 56d4ffb..dab2a10 100644 --- a/postgresql15.spec +++ b/postgresql15.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 a580208726f2c3c1b9b0f684d80a80b4daf20da43dd72082b55a0f890b0b4124 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Mon, 7 Aug 2023 13:50:16 +0000 Subject: [PATCH 4/7] Stop building mini OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql15?expand=0&rev=31 --- _multibuild | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 _multibuild diff --git a/_multibuild b/_multibuild deleted file mode 100644 index 9317e4b..0000000 --- a/_multibuild +++ /dev/null @@ -1,3 +0,0 @@ - - mini - From 4e1ae4aa625d8fe3a8bf234d1fc781b2363d303e358a04477a47159a46b95462 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Mon, 7 Aug 2023 13:51:46 +0000 Subject: [PATCH 5/7] Stop building libs OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql15?expand=0&rev=32 --- postgresql15.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgresql15.spec b/postgresql15.spec index dab2a10..34354bc 100644 --- a/postgresql15.spec +++ b/postgresql15.spec @@ -18,7 +18,7 @@ %define pgversion 15.3 %define pgmajor 15 -%define buildlibs 1 +%define buildlibs 0 %define tarversion %{pgversion} %define latest_supported_llvm_ver 15 From 4a60a0530a12b0034ae70ca13c3f9efea99489b32b7aa75bce9b15cf8f75bae1 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Thu, 10 Aug 2023 13:25:30 +0000 Subject: [PATCH 6/7] - Update to 15.4: * 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. * bsc#1214061, CVE-2023-39418: Fix MERGE to enforce row security policies properly. * https://www.postgresql.org/docs/15/release-15-4.html OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql15?expand=0&rev=33 --- postgresql-15.3.tar.bz2 | 3 --- postgresql-15.3.tar.bz2.sha256 | 1 - postgresql-15.4.tar.bz2 | 3 +++ postgresql-15.4.tar.bz2.sha256 | 1 + postgresql15.changes | 11 +++++++++++ postgresql15.spec | 4 ++-- 6 files changed, 17 insertions(+), 6 deletions(-) delete mode 100644 postgresql-15.3.tar.bz2 delete mode 100644 postgresql-15.3.tar.bz2.sha256 create mode 100644 postgresql-15.4.tar.bz2 create mode 100644 postgresql-15.4.tar.bz2.sha256 diff --git a/postgresql-15.3.tar.bz2 b/postgresql-15.3.tar.bz2 deleted file mode 100644 index f7bf8b2..0000000 --- a/postgresql-15.3.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ffc7d4891f00ffbf5c3f4eab7fbbced8460b8c0ee63c5a5167133b9e6599d932 -size 22819107 diff --git a/postgresql-15.3.tar.bz2.sha256 b/postgresql-15.3.tar.bz2.sha256 deleted file mode 100644 index c764168..0000000 --- a/postgresql-15.3.tar.bz2.sha256 +++ /dev/null @@ -1 +0,0 @@ -ffc7d4891f00ffbf5c3f4eab7fbbced8460b8c0ee63c5a5167133b9e6599d932 postgresql-15.3.tar.bz2 diff --git a/postgresql-15.4.tar.bz2 b/postgresql-15.4.tar.bz2 new file mode 100644 index 0000000..8409bfb --- /dev/null +++ b/postgresql-15.4.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:baec5a4bdc4437336653b6cb5d9ed89be5bd5c0c58b94e0becee0a999e63c8f9 +size 22850355 diff --git a/postgresql-15.4.tar.bz2.sha256 b/postgresql-15.4.tar.bz2.sha256 new file mode 100644 index 0000000..0038621 --- /dev/null +++ b/postgresql-15.4.tar.bz2.sha256 @@ -0,0 +1 @@ +baec5a4bdc4437336653b6cb5d9ed89be5bd5c0c58b94e0becee0a999e63c8f9 postgresql-15.4.tar.bz2 diff --git a/postgresql15.changes b/postgresql15.changes index cf318a8..36ed14c 100644 --- a/postgresql15.changes +++ b/postgresql15.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Aug 9 09:14:59 UTC 2023 - Reinhard Max + +- Update to 15.4: + * 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. + * bsc#1214061, CVE-2023-39418: Fix MERGE to enforce row security + policies properly. + * https://www.postgresql.org/docs/15/release-15-4.html + ------------------------------------------------------------------- Fri May 26 11:48:38 UTC 2023 - Reinhard Max diff --git a/postgresql15.spec b/postgresql15.spec index 34354bc..e760223 100644 --- a/postgresql15.spec +++ b/postgresql15.spec @@ -16,9 +16,9 @@ # -%define pgversion 15.3 +%define pgversion 15.4 %define pgmajor 15 -%define buildlibs 0 +%define buildlibs 1 %define tarversion %{pgversion} %define latest_supported_llvm_ver 15 From 25f2a2b92158ffd4af4bad31009e2b2754ed6e80ec057884e8f80ab776ed8e74 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Mon, 14 Aug 2023 09:24:27 +0000 Subject: [PATCH 7/7] OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql15?expand=0&rev=34 --- _multibuild | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..9317e4b --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + mini +