diff --git a/.gitignore b/.gitignore index 3b14940..23a7c93 100755 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,14 @@ /postgresql-setup-8.9.tar.gz /postgresql-18beta1.tar.bz2.sha256 /postgresql-18beta1.tar.bz2 +/postgresql-18.0.tar.bz2 +/postgresql-17.6.tar.bz2 +/postgresql-18.0.tar.bz2.sha256 +/postgresql-17.6.tar.bz2.sha256 +/postgresql-setup-8.10.tar.gz +/postgresql-18.1.tar.bz2 +/postgresql-17.7.tar.bz2 +/postgresql-18.1.tar.bz2.sha256 +/postgresql-17.7.tar.bz2.sha256 +/postgresql-16.11.tar.bz2 +/postgresql-16.11.tar.bz2.sha256 diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..a901bca --- /dev/null +++ b/README.packit @@ -0,0 +1,3 @@ +This repository is maintained by packit. +https://packit.dev/ +The file was generated using packit 1.12.0.post1.dev18+gc39b0e7d4. diff --git a/postgresql18.spec b/postgresql18.spec index ad04540..362a947 100644 --- a/postgresql18.spec +++ b/postgresql18.spec @@ -47,24 +47,27 @@ Summary: PostgreSQL client programs Name: %{majorname}%{majorversion} -Version: %{majorversion}beta1 -Release: 4%{?dist} +Version: 18.1 +Release: 2%{?dist} # The PostgreSQL license is very similar to other MIT licenses, but the OSI # recognizes it as an independent license, so we do as well. License: PostgreSQL Url: http://www.postgresql.org/ -# This SRPM includes a copy of the previous major release, which is needed for +# This SRPM includes copies of the previous major releases, which are needed for # in-place upgrade of an old database. In most cases it will not be critical # that this be kept up with the latest minor release of the previous series; # but update when bugs affecting pg_dump output are fixed. %global prevmajorversion 17 -%global prevversion %{prevmajorversion}.2 +%global prevversion %{prevmajorversion}.7 %global prev_prefix %{_libdir}/pgsql/postgresql-%{prevmajorversion} +%global prevmajorversion16 16 +%global prevversion16 %{prevmajorversion16}.11 +%global prev_prefix16 %{_libdir}/pgsql/postgresql-%{prevmajorversion16} %global precise_version %{?epoch:%epoch:}%version-%release -%global setup_version 8.9 +%global setup_version 8.10 %global service_name postgresql.service @@ -84,6 +87,8 @@ Source12: https://github.com/devexp-db/postgresql-setup/releases/download/v%{set # differ with publicly released ones. Source16: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2.sha256 Source17: https://ftp.postgresql.org/pub/source/v%{prevversion}/postgresql-%{prevversion}.tar.bz2.sha256 +Source18: https://ftp.postgresql.org/pub/source/v%{prevversion16}/postgresql-%{prevversion16}.tar.bz2 +Source19: https://ftp.postgresql.org/pub/source/v%{prevversion16}/postgresql-%{prevversion16}.tar.bz2.sha256 # Comments for these patches are in the patch files. Patch1: rpm-pgsql.patch @@ -378,9 +383,10 @@ counterparts. %if %upgrade %package -n %{pkgname}-upgrade -Summary: Support for upgrading from the previous major release of PostgreSQL +Summary: Support for upgrading from the previous major releases of PostgreSQL Requires: %{pkgname}-server%{?_isa} = %precise_version Provides: bundled(postgresql-server) = %prevversion +Provides: bundled(postgresql-server) = %prevversion16 Provides: %{pkgname}-upgrade = %precise_version Provides: %{pkgname}-upgrade%{?_isa} = %precise_version @@ -389,7 +395,7 @@ Provides: %{pkgname}-upgrade%{?_isa} = %precise_version %description -n %{pkgname}-upgrade The postgresql-upgrade package contains the pg_upgrade utility and supporting files needed for upgrading a PostgreSQL database from the previous major -version of PostgreSQL. +versions of PostgreSQL (versions %{prevmajorversion} and %{prevmajorversion16}). %package -n %{pkgname}-upgrade-devel @@ -507,6 +513,7 @@ goal of accelerating analytics queries. sha256sum -c %{SOURCE16} %if %upgrade sha256sum -c %{SOURCE17} + sha256sum -c %{SOURCE19} %endif ) %setup -q -a 12 -n postgresql-%{version} @@ -529,14 +536,16 @@ find . -type f -name Makefile -exec sed -i -e "s/SO_MAJOR_VERSION=\s\?\([0-9]\+\ %if %upgrade tar xfj %{SOURCE3} +tar xfj %{SOURCE18} # libpq from this upgrade-only build is dropped and the libpq from the main # version is used. Use the same major hack therefore. %if ! %external_libpq -find . -type f -name Makefile -exec sed -i -e "s/SO_MAJOR_VERSION=\s\?\([0-9]\+\)/SO_MAJOR_VERSION= %{private_soname}-\1/" {} \; +find postgresql-%{prevversion} -type f -name Makefile -exec sed -i -e "s/SO_MAJOR_VERSION=\s\?\([0-9]\+\)/SO_MAJOR_VERSION= %{private_soname}-\1/" {} \; +find postgresql-%{prevversion16} -type f -name Makefile -exec sed -i -e "s/SO_MAJOR_VERSION=\s\?\([0-9]\+\)/SO_MAJOR_VERSION= %{private_soname}-\1/" {} \; %endif -# apply once SOURCE3 is extracted +# apply once SOURCE3 and SOURCE18 are extracted %endif # remove .gitignore files to ensure none get into the RPMs (bug #642210) @@ -749,6 +758,9 @@ upgrade_configure () --enable-dtrace \ %endif %if %selinux +%if %ssl + --with-openssl \ +%endif --with-selinux \ %endif %if %plpython3 @@ -764,6 +776,83 @@ upgrade_configure () make %{?_smp_mflags} all make -C contrib %{?_smp_mflags} all popd + + # Build PostgreSQL 16 for upgrade support + pushd postgresql-%{prevversion16} + + # The upgrade build can be pretty stripped-down, but make sure that + # any options that affect on-disk file layout match the previous + # major release! + + # The set of built server modules here should ideally create superset + # of modules we used to ship in %%prevversion16 (in the installation + # the user will upgrade from), including *-contrib or *-pl* + # subpackages. This increases chances that the upgrade from + # %%prevversion16 will work smoothly. + +upgrade_configure16 () +{ + # Note we intentionally do not use %%configure here, because we *don't* want + # its ideas about installation paths. + + # The -fno-aggressive-loop-optimizations is hack for #993532 + CFLAGS="$CFLAGS -fno-aggressive-loop-optimizations -DOPENSSL_NO_ENGINE" ./configure \ + --build=%{_build} \ + --host=%{_host} \ + --prefix=%prev_prefix16 \ + --disable-rpath \ + --with-lz4 \ + --with-zstd \ +%if %icu + --with-icu \ +%endif +%if %plperl + --with-perl \ +%endif +%if %pltcl + --with-tcl \ +%endif +%if %ldap + --with-ldap \ +%endif +%if %pam + --with-pam \ +%endif +%if %kerberos + --with-gssapi \ +%endif +%if %uuid + --with-ossp-uuid \ +%endif +%if %xml + --with-libxml \ + --with-libxslt \ +%endif +%if %nls + --enable-nls \ +%endif +%if %sdt + --enable-dtrace \ +%endif +%if %selinux +%if %ssl + --with-openssl \ +%endif + --with-selinux \ +%endif +%if %plpython3 + --with-python \ +%endif + --with-tclconfig=/usr/%_lib \ + --with-system-tzdata=/usr/share/zoneinfo \ + "$@" +} + + upgrade_configure16 \ + + make %{?_smp_mflags} all + make -C contrib %{?_smp_mflags} all + popd # endif upgrade %endif @@ -787,6 +876,16 @@ description "Upgrade data from system PostgreSQL version (PostgreSQL %{prevm redhat_sockets_hack no EOF +cat > $RPM_BUILD_ROOT%{_sysconfdir}/postgresql-setup/upgrade/postgresql16.conf < $RPM_BUILD_ROOT%macrosdir/macros.postgresql-upgrade %%postgresql_upgrade_prefix %prev_prefix +%%postgresql_upgrade_prefix16 %prev_prefix16 EOF %endif @@ -1307,6 +1448,12 @@ make -C postgresql-setup-%{setup_version} check %exclude %{_libdir}/pgsql/postgresql-%{prevmajorversion}/lib/pgxs %exclude %{_libdir}/pgsql/postgresql-%{prevmajorversion}/lib/pkgconfig %{_libdir}/pgsql/postgresql-%{prevmajorversion}/share +%{_libdir}/pgsql/postgresql-%{prevmajorversion16}/bin +%exclude %{_libdir}/pgsql/postgresql-%{prevmajorversion16}/bin/pg_config +%{_libdir}/pgsql/postgresql-%{prevmajorversion16}/lib +%exclude %{_libdir}/pgsql/postgresql-%{prevmajorversion16}/lib/pgxs +%exclude %{_libdir}/pgsql/postgresql-%{prevmajorversion16}/lib/pkgconfig +%{_libdir}/pgsql/postgresql-%{prevmajorversion16}/share %files -n %{pkgname}-upgrade-devel @@ -1314,6 +1461,10 @@ make -C postgresql-setup-%{setup_version} check %{_libdir}/pgsql/postgresql-%{prevmajorversion}/include %{_libdir}/pgsql/postgresql-%{prevmajorversion}/lib/pkgconfig %{_libdir}/pgsql/postgresql-%{prevmajorversion}/lib/pgxs +%{_libdir}/pgsql/postgresql-%{prevmajorversion16}/bin/pg_config +%{_libdir}/pgsql/postgresql-%{prevmajorversion16}/include +%{_libdir}/pgsql/postgresql-%{prevmajorversion16}/lib/pkgconfig +%{_libdir}/pgsql/postgresql-%{prevmajorversion16}/lib/pgxs %{macrosdir}/macros.postgresql-upgrade %endif @@ -1355,6 +1506,25 @@ make -C postgresql-setup-%{setup_version} check %changelog +* Wed Jan 7 2025 Filip Janus - 18.1-2 +- Add postgresql16 upgrade server + +* Thu Nov 13 2025 Packit - 18.1-1 +- Update to version 18.1 +- Resolves: rhbz#2414834 + +* Thu Oct 30 2025 Ales Nezbeda - 18.0-2 +- Update postgresql-setup script + +* Thu Sep 25 2025 Packit - 18.0-1 +- Update to version 18.0 +- Resolves: rhbz#2398163 + +* Tue Sep 09 2025 Filip Janus - 18beta1-5 +- Add OpenSSL support to upgrade_configure function +- This ensures upgrade server is compiled with OpenSSL support +- Required for SSL/TLS connections during database upgrades + * Wed Aug 06 2025 FrantiĊĦek Zatloukal - 18beta1-4 - Rebuilt for icu 77.1 diff --git a/sources b/sources index 2423d2e..1c16597 100644 --- a/sources +++ b/sources @@ -1,5 +1,7 @@ -SHA512 (postgresql-17.2.tar.bz2) = 8e15e47c22d21e1cadc31249cf31af5abe34b8ab72930e58e5fe6124795ad237ca7b4fd3bf36b5f18589c4fc439dc2bab3045d9b4ba23d1846b4b2be6fd1cb69 -SHA512 (postgresql-17.2.tar.bz2.sha256) = 07a0ffcbd9917196176b0d45a83fe4a51355b5b257a46cfcf58c03c78026fdbb4e00630af5bc0531380b3e8aa4a80da23453d4ab67663a4eef6193bf8ad8b065 -SHA512 (postgresql-setup-8.9.tar.gz) = 118e9ebf858722a38b0e90324bc1b49fc7058cda601ca0a7e78c94e7b95e89d6dbbc46f377626364b068614ced3cde3cb4733973ad2d71bf17892ad773657ef7 -SHA512 (postgresql-18beta1.tar.bz2.sha256) = fc8fb34666d899dde9bb3c5886dec3ea87241913d47a464f960d1d1b4b105c8b007a36dac6f62ae2c45b9d254fe3c1b1a32fa42693af43d8561a192fee4340d9 -SHA512 (postgresql-18beta1.tar.bz2) = 881a3442552d282fbe03ea22fab4bdd818cb901f8410485f19867ff64dc577d50cd9f7bb898828aec9783ff7e482798ffae63ff1cbfd19c4e1c64fed9e0a2daf +SHA512 (postgresql-18.1.tar.bz2) = bac8a9bfb12c0c70b5870d92c6f322edbfd559e9ac939e841f16d8271b5c2bc4fb2628e053b407aed71b4032e9f4cba55f1e0a8dc6a3bd4933c2b701fe69ec08 +SHA512 (postgresql-18.1.tar.bz2.sha256) = 2be4c9be8ee2e029b6fff6d06505167d43e89e850231d47c6062a4c22a5297f9f328fd74fe5e0df91dd2f872ed5f0af0c610c1caa51ac2258c4f896ceed344eb +SHA512 (postgresql-17.7.tar.bz2) = 99042ce4a5932ded4bc01d30ab59de9b8626de3e3805822cacbdd6b6c5337f1576b30a2a1041cd5a4d366d8cc404268bbf362f6e5b033f0779ca50d10bc7c272 +SHA512 (postgresql-17.7.tar.bz2.sha256) = fcb2468a7ce67aaf31fec1001a45af5a7b7514aa3607047c8bda8b936240ce4663c43afac0a3aa3e1b19e8cfe3e7c5704ffaf6a3a227790e24765ad0a79f44dc +SHA512 (postgresql-setup-8.10.tar.gz) = 4842c5f8e74154fc8a57f21972c1e2f0919f9962e7004834a6246cbd4813207f63968727d31e68340c7cac4ad1a0c1d0b58572cd7efd30a2d3061ad15ab434a1 +SHA512 (postgresql-16.11.tar.bz2) = f11f8f3e5855cfce27108a1bd2122c5a7a1ff37c6d9366d7a96a041aab67a4e4a31e54f0757b6b97c72d841acdcaa97d3eaa765213d4899b2cf7047c549012b8 +SHA512 (postgresql-16.11.tar.bz2.sha256) = 3c07dc85608f8cee5071bd7d404feff1c767afb468a8f41225b73d5df05334dca9a3465e16307a3b5b21c1a44684deab0c496fbd03b9d061e4a9559684876671