diff --git a/.gitignore b/.gitignore index cac2c1c..18a7948 100755 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,25 @@ /postgresql-16.1.tar.bz2 /postgresql-16.1.tar.bz2.sha256 /postgresql-setup-8.9.tar.gz +/postgresql-15.7.tar.bz2 +/postgresql-16.3.tar.bz2 +/postgresql-15.7.tar.bz2.sha256 +/postgresql-16.3.tar.bz2.sha256 +/postgresql-16.6.tar.bz2 +/postgresql-16.6.tar.bz2.sha256 +/postgresql-16.8.tar.bz2 +/postgresql-15.12.tar.bz2 +/postgresql-16.8.tar.bz2.sha256 +/postgresql-15.12.tar.bz2.sha256 +/postgresql-16.9.tar.bz2 +/postgresql-15.13.tar.bz2 +/postgresql-16.9.tar.bz2.sha256 +/postgresql-15.13.tar.bz2.sha256 +/postgresql-16.10.tar.bz2 +/postgresql-15.14.tar.bz2 +/postgresql-16.10.tar.bz2.sha256 +/postgresql-15.14.tar.bz2.sha256 +/postgresql-16.11.tar.bz2 +/postgresql-15.15.tar.bz2 +/postgresql-16.11.tar.bz2.sha256 +/postgresql-15.15.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/packit-update-sources.sh b/packit-update-sources.sh new file mode 100755 index 0000000..370ade6 --- /dev/null +++ b/packit-update-sources.sh @@ -0,0 +1,8 @@ + git clone --depth 1 --branch master https://github.com/postgres/postgres.git + pushd postgres + git fetch --tags + NEW_MINOR=$(git tag -l "REL_15_*" | sed -E "s/REL_15_([0-9]+)/\1/" | sort -n | tail -n 1) + popd + pushd $PACKIT_DOWNSTREAM_REPO + sed -i "s/\(%global prevversion %{prevmajorversion}\)\.[0-9]\+/\1.$NEW_MINOR/" $PACKIT_DOWNSTREAM_PACKAGE_NAME.spec + popd diff --git a/packit.yaml b/packit.yaml new file mode 100644 index 0000000..96a8367 --- /dev/null +++ b/packit.yaml @@ -0,0 +1,19 @@ +# See the documentation for more information: +# https://packit.dev/docs/configuration/ +actions: + pre-sync: + - bash -c "$PACKIT_DOWNSTREAM_REPO/packit-update-sources.sh" + +jobs: + - job: pull_from_upstream + trigger: release + dist_git_branches: + - fedora-all + - job: koji_build + trigger: commit + dist_git_branches: + - fedora-all + - job: bodhi_update + trigger: commit + dist_git_branches: + fedora-all diff --git a/postgresql-libxml2.patch b/postgresql-libxml2.patch deleted file mode 100644 index 98a53f4..0000000 --- a/postgresql-libxml2.patch +++ /dev/null @@ -1,37 +0,0 @@ -Fixes for GCC 14 and libxml2 2.12.0 "error: Make more xmlError structs constant" - -xml.c: In function ‘pg_xml_init’: -xml.c:1177:52: error: passing argument 2 of ‘xmlSetStructuredErrorFunc’ from incompatible pointer type [-Wincompatible-pointer-types] - 1177 | xmlSetStructuredErrorFunc((void *) errcxt, xml_errorHandler); - | ^~~~~~~~~~~~~~~~ - | | - | void (*)(void *, xmlError *) {aka void (*)(void *, struct _xmlError *)} -In file included from /usr/include/libxml2/libxml/valid.h:15, - from /usr/include/libxml2/libxml/parser.h:19, - from xml.c:50: -/usr/include/libxml2/libxml/xmlerror.h:898:57: note: expected ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void *, const struct _xmlError *)’} but argument is of type ‘void (*)(void *, xmlError *)’ {aka ‘void (*)(void *, struct _xmlError *)’} - 898 | xmlStructuredErrorFunc handler); - | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ - -diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c -index d3db75eb87..619f908c6d 100644 ---- a/src/backend/utils/adt/xml.c -+++ b/src/backend/utils/adt/xml.c -@@ -124,7 +124,7 @@ static xmlParserInputPtr xmlPgEntityLoader(const char *URL, const char *ID, - xmlParserCtxtPtr ctxt); - static void xml_errsave(Node *escontext, PgXmlErrorContext *errcxt, - int sqlcode, const char *msg); --static void xml_errorHandler(void *data, xmlErrorPtr error); -+static void xml_errorHandler(void *data, const xmlError *error); - static int errdetail_for_xml_code(int code); - static void chopStringInfoNewlines(StringInfo str); - static void appendStringInfoLineSeparator(StringInfo str); -@@ -2044,7 +2044,7 @@ xml_errsave(Node *escontext, PgXmlErrorContext *errcxt, - * Error handler for libxml errors and warnings - */ - static void --xml_errorHandler(void *data, xmlErrorPtr error) -+xml_errorHandler(void *data, const xmlError *error) - { - PgXmlErrorContext *xmlerrcxt = (PgXmlErrorContext *) data; - xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) error->ctxt; diff --git a/postgresql15-libxml2.patch b/postgresql15-libxml2.patch deleted file mode 100644 index ffc87ef..0000000 --- a/postgresql15-libxml2.patch +++ /dev/null @@ -1,37 +0,0 @@ -Fixes for GCC 14 and libxml2 2.12.0 "error: Make more xmlError structs constant" - -xml.c: In function ‘pg_xml_init’: -xml.c:1177:52: error: passing argument 2 of ‘xmlSetStructuredErrorFunc’ from incompatible pointer type [-Wincompatible-pointer-types] - 1177 | xmlSetStructuredErrorFunc((void *) errcxt, xml_errorHandler); - | ^~~~~~~~~~~~~~~~ - | | - | void (*)(void *, xmlError *) {aka void (*)(void *, struct _xmlError *)} -In file included from /usr/include/libxml2/libxml/valid.h:15, - from /usr/include/libxml2/libxml/parser.h:19, - from xml.c:50: -/usr/include/libxml2/libxml/xmlerror.h:898:57: note: expected ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void *, const struct _xmlError *)’} but argument is of type ‘void (*)(void *, xmlError *)’ {aka ‘void (*)(void *, struct _xmlError *)’} - 898 | xmlStructuredErrorFunc handler); - | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ - -diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c -index 6411f56b99..0eb39fcfc2 100644 ---- a/src/backend/utils/adt/xml.c -+++ b/src/backend/utils/adt/xml.c -@@ -119,7 +119,7 @@ struct PgXmlErrorContext - - static xmlParserInputPtr xmlPgEntityLoader(const char *URL, const char *ID, - xmlParserCtxtPtr ctxt); --static void xml_errorHandler(void *data, xmlErrorPtr error); -+static void xml_errorHandler(void *data, const xmlError *error); - static void xml_ereport_by_code(int level, int sqlcode, - const char *msg, int errcode); - static void chopStringInfoNewlines(StringInfo str); -@@ -1749,7 +1749,7 @@ xml_ereport(PgXmlErrorContext *errcxt, int level, int sqlcode, const char *msg) - * Error handler for libxml errors and warnings - */ - static void --xml_errorHandler(void *data, xmlErrorPtr error) -+xml_errorHandler(void *data, const xmlError *error) - { - PgXmlErrorContext *xmlerrcxt = (PgXmlErrorContext *) data; - xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) error->ctxt; diff --git a/postgresql16.spec b/postgresql16.spec index 766478c..2aaf0a1 100644 --- a/postgresql16.spec +++ b/postgresql16.spec @@ -29,7 +29,7 @@ %{!?sdt:%global sdt 1} %{!?selinux:%global selinux 1} %{!?runselftest:%global runselftest 1} -%{!?postgresql_default:%global postgresql_default 1} +%{!?postgresql_default:%global postgresql_default 0} %global majorname postgresql %global majorversion 16 @@ -47,8 +47,8 @@ Summary: PostgreSQL client programs Name: %{majorname}%{majorversion} -Version: %{majorversion}.1 -Release: 5%{?dist} +Version: %{majorversion}.11 +Release: 1%{?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. @@ -60,7 +60,7 @@ Url: http://www.postgresql.org/ # 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 15 -%global prevversion %{prevmajorversion}.5 +%global prevversion %{prevmajorversion}.15 %global prev_prefix %{_libdir}/pgsql/postgresql-%{prevmajorversion} %global precise_version %{?epoch:%epoch:}%version-%release @@ -95,8 +95,6 @@ Patch9: postgresql-server-pg_config.patch # rhbz#1940964 Patch10: postgresql-datalayout-mismatch-on-s390.patch Patch12: postgresql-no-libecpg.patch -Patch13: postgresql-libxml2.patch -Patch14: postgresql15-libxml2.patch # This macro is used for package names in the files section %if %?postgresql_default @@ -109,6 +107,7 @@ Summary: PostgreSQL client programs BuildRequires: make BuildRequires: lz4-devel +BuildRequires: libzstd-devel BuildRequires: gcc BuildRequires: perl(ExtUtils::MakeMaker) glibc-devel bison flex gawk BuildRequires: perl(ExtUtils::Embed), perl-devel @@ -165,6 +164,7 @@ BuildRequires: pam-devel %if %sdt BuildRequires: systemtap-sdt-devel +BuildRequires: systemtap-sdt-dtrace %endif %if %selinux @@ -179,6 +179,7 @@ BuildRequires: libicu-devel %define postgresqlXX_if_default() %{expand:\ Provides: postgresql%{majorversion}%{?1:-%{1}} = %precise_version\ Provides: postgresql%{majorversion}%{?1:-%{1}}%{?_isa} = %precise_version\ +Obsoletes: postgresql%{majorversion}%{?1:-%{1}}\ } %else %define postgresqlXX_if_default() %{nil} @@ -264,7 +265,6 @@ will interact with a PostgreSQL server. %package -n %{pkgname}-server Summary: The programs needed to create and run a PostgreSQL server Requires: %{pkgname}%{?_isa} = %precise_version -Requires(pre): /usr/sbin/useradd # We require this to be present for %%{_prefix}/lib/tmpfiles.d Requires: systemd # Make sure it's there when scriptlets run, too @@ -434,7 +434,7 @@ Requires: %{pkgname}-server%{?_isa} = %precise_version Provides: %{pkgname}-plpython3 = %precise_version Provides: %{pkgname}-plpython3%{?_isa} = %precise_version -%virtual_conflicts_and_provides python3 +%virtual_conflicts_and_provides plpython3 %description -n %{pkgname}-plpython3 The postgresql-plpython3 package contains the PL/Python3 procedural language, @@ -450,7 +450,7 @@ Requires: %{pkgname}-server%{?_isa} = %precise_version Provides: %{pkgname}-pltcl = %precise_version Provides: %{pkgname}-pltcl%{?_isa} = %precise_version -%virtual_conflicts_and_provides plctl +%virtual_conflicts_and_provides pltcl %description -n %{pkgname}-pltcl The postgresql-pltcl package contains the PL/Tcl procedural language, @@ -519,7 +519,6 @@ goal of accelerating analytics queries. %endif %patch 9 -p1 %patch 10 -p1 -%patch 13 -p1 %if ! %external_libpq @@ -536,14 +535,20 @@ tar xfj %{SOURCE3} find . -type f -name Makefile -exec sed -i -e "s/SO_MAJOR_VERSION=\s\?\([0-9]\+\)/SO_MAJOR_VERSION= %{private_soname}-\1/" {} \; %endif -%patch 14 -p1 -d postgresql-%{prevversion} - # apply once SOURCE3 is extracted %endif # remove .gitignore files to ensure none get into the RPMs (bug #642210) find . -type f -name .gitignore | xargs rm +# Create a sysusers.d config file +cat >postgresql16.sysusers.conf < postgresql16.tmpfiles.conf </dev/null 2>&1 || : -/usr/sbin/useradd -M -N -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \ - -c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || : +install -m0644 -D postgresql16.sysusers.conf %{buildroot}%{_sysusersdir}/postgresql16.conf +install -m0644 -D postgresql16.tmpfiles.conf %{buildroot}%{_tmpfilesdir}/postgresql16.conf + %post -n %{pkgname}-server %systemd_post %service_name @@ -1197,6 +1203,7 @@ make -C postgresql-setup-%{setup_version} check %{_datadir}/pgsql/system_constraints.sql %{_datadir}/pgsql/system_functions.sql %{_datadir}/pgsql/system_views.sql +%{_datadir}/pgsql/fix-CVE-2024-4317.sql %{_datadir}/pgsql/timezonesets/ %{_datadir}/pgsql/tsearch_data/ %dir %{_datadir}/postgresql-setup @@ -1209,8 +1216,8 @@ make -C postgresql-setup-%{setup_version} check %{_libdir}/pgsql/pg_prewarm.so %{_libdir}/pgsql/pgoutput.so %{_libdir}/pgsql/plpgsql.so -%dir %{_libexecdir}/initscripts/legacy-actions/postgresql -%{_libexecdir}/initscripts/legacy-actions/postgresql/* +%dir %{_usr}/libexec/initscripts/legacy-actions/postgresql +%{_usr}/libexec/initscripts/legacy-actions/postgresql/* %{_libexecdir}/postgresql-check-db-dir %dir %{_sysconfdir}/postgresql-setup %dir %{_sysconfdir}/postgresql-setup/upgrade @@ -1235,10 +1242,12 @@ make -C postgresql-setup-%{setup_version} check %attr(644,postgres,postgres) %config(noreplace) %{?_localstatedir}/lib/pgsql/.bash_profile %attr(700,postgres,postgres) %dir %{?_localstatedir}/lib/pgsql/backups %attr(700,postgres,postgres) %dir %{?_localstatedir}/lib/pgsql/data -%attr(755,postgres,postgres) %dir %{?_localstatedir}/run/postgresql +%ghost %attr(755,postgres,postgres) %dir %{_rundir}/postgresql %if %pam %config(noreplace) /etc/pam.d/postgresql %endif +%{_sysusersdir}/postgresql16.conf +%{_tmpfilesdir}/postgresql16.conf %files -n %{pkgname}-server-devel -f devel.lst @@ -1336,6 +1345,99 @@ make -C postgresql-setup-%{setup_version} check %changelog +* Thu Nov 13 2025 Packit - 16.11-1 +- Update to version 16.11 +- Resolves: rhbz#2414832 + +* Tue Sep 09 2025 Filip Janus - 16.10-2 +- Add OpenSSL support to upgrade_configure function +- This ensures upgrade server is compiled with OpenSSL support +- Required for SSL/TLS connections during database upgrades + +* Thu Aug 14 2025 Packit - 16.10-1 +- Update to version 16.10 +- Resolves: rhbz#2388580 + +* Wed Aug 06 2025 František Zatloukal - 16.9-8 +- Rebuilt for icu 77.1 + +* Fri Jul 25 2025 Fedora Release Engineering - 16.9-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Tue Jul 22 2025 Nikola Davidova - 16.9-6 +- Make Postgresql16 non default + +* Mon Jul 07 2025 Jitka Plesnikova - 16.9-5 +- Perl 5.42 rebuild + +* Wed Jun 25 2025 Filip Janus - 16.9-4 +- Enable zstd + +* Mon Jun 16 2025 Filip Janus - 16.9-3 +- Add tmpfiles.d configuration file definition + +* Mon Jun 02 2025 Python Maint - 16.9-2 +- Rebuilt for Python 3.14 + +* Wed May 21 2025 Packit - 16.9-1 +- Update to version 16.9 +- Resolves: rhbz#2365100 + +* Wed Feb 26 2025 Zbigniew Jędrzejewski-Szmek - 16.8-2 +- Add sysusers.d config file to allow rpm to create users/groups automatically + +* Wed Feb 26 2025 Packit - 16.8-1 +- Update to version 16.8 +- Resolves: rhbz#2282749 + +* Wed Feb 26 2025 Packit - 16.8-1 +- Update to version 16.8 +- Resolves: rhbz#2282749 + +* Wed Jan 29 2025 Filip Janus - 16.6-1 +- Update to 16.6 +- stick with std=C18 + +* Sat Jan 18 2025 Fedora Release Engineering - 16.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Sun Dec 08 2024 Pete Walter - 16.3-7 +- Rebuild for ICU 76 + +* Mon Sep 16 2024 Filip Janus - 16.3-6 +- Fix typos in provides + +* Mon Aug 05 2024 Filip Janus - 16.3-5 +- Add Obsoletes of versioned alternative stream from F39 +- It makes the upgrade path clear + +* Mon Jul 29 2024 Lumír Balhar - 16.3-4 +- Add new systemtap-sdt-dtrace to build deps + +* Fri Jul 19 2024 Fedora Release Engineering - 16.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jul 3 2024 Filip Janus - 16.3-2 +- Disable openssl ENGINE_API +- Fedora change: https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine +- BZ: 2295339 + +* Mon Jun 17 2024 Ales Nezbeda - 16.3-1 +- Update to 16.3 +- Remove unneeded libXML and OpenSSL patches + +* Wed Jun 12 2024 Jitka Plesnikova - 16.1-9 +- Perl 5.40 rebuild + +* Fri Jun 07 2024 Python Maint - 16.1-8 +- Rebuilt for Python 3.13 + +* Mon Feb 26 2024 Filip Janus - 16.1-7 +- Remove /var/run/postgresql + +* Tue Feb 20 2024 Yaakov Selkowitz - 16.1-6 +- Backport OpenSSL 3.2 fix from upstream master + * Mon Feb 5 2024 Filip Janus - 16.1-5 - Add versioned provide to the default version - Obsolete versioned is no more needed since only default stream provides diff --git a/sources b/sources old mode 100755 new mode 100644 index 42e0a5c..4064aa7 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ -SHA512 (postgresql-15.5.tar.bz2) = 9ed9d160b3cef99954ccd47a970c107b7e3b0196a7d848f740bf3c52a1c626f6f457814c97f37b9f0467bb07734e19806a15bd9cf3c39445e1d89e75b37064cc -SHA512 (postgresql-15.5.tar.bz2.sha256) = 896ad3a1952f54bc5186d49eb4faec40843813d3e1c200f7b27f0e099b426ef9b59e0c15cb5453ac166e8a566b24178b95836776207de0bf19f5e021fdccfbca -SHA512 (postgresql-16.1.tar.bz2) = 69f4635e5841452599f13b47df41ce2425ab34b4e4582fd2c635bc78d561fa36c5b03eccb4ae6569872dc74775be1b5a62dee20c9a4f12a43339250128352918 -SHA512 (postgresql-16.1.tar.bz2.sha256) = 3f573d81a7af02dea2a3eee180d4e465546fc4d283dde5b6627d25af0be4a546ffd3ae914dd3490e45264d1a43cf143e829e14e5cd9c6bd8f179b6eae4fd6ff1 +SHA512 (postgresql-16.11.tar.bz2) = f11f8f3e5855cfce27108a1bd2122c5a7a1ff37c6d9366d7a96a041aab67a4e4a31e54f0757b6b97c72d841acdcaa97d3eaa765213d4899b2cf7047c549012b8 +SHA512 (postgresql-15.15.tar.bz2) = efd5dcdb6e45bc13cd4b1b73f4de19fc3ae2bac96e85086cacd649bfbf50969429c40193e86717380759c6995204c18e14ac5352565d5ae85df61c0a127a1562 SHA512 (postgresql-setup-8.9.tar.gz) = 118e9ebf858722a38b0e90324bc1b49fc7058cda601ca0a7e78c94e7b95e89d6dbbc46f377626364b068614ced3cde3cb4733973ad2d71bf17892ad773657ef7 +SHA512 (postgresql-16.11.tar.bz2.sha256) = 3c07dc85608f8cee5071bd7d404feff1c767afb468a8f41225b73d5df05334dca9a3465e16307a3b5b21c1a44684deab0c496fbd03b9d061e4a9559684876671 +SHA512 (postgresql-15.15.tar.bz2.sha256) = dcabc9fceaa557dac1d6d5b014d21ec6edfb7409103651820126351b5534c1605255f36bb18d654cd537f5128e705d2847f2bd52e38c6dd442a21c0722f39b76