diff --git a/.gitignore b/.gitignore index 1a93450..8fed010 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ SOURCES/postgresql-9.4.14-US.pdf SOURCES/postgresql-9.4.14.tar.bz2 -SOURCES/postgresql-setup-3.3.tar.gz +SOURCES/postgresql-setup-6.0.tar.gz diff --git a/.rh-postgresql94-postgresql.metadata b/.rh-postgresql94-postgresql.metadata index 274c28d..d2c0417 100644 --- a/.rh-postgresql94-postgresql.metadata +++ b/.rh-postgresql94-postgresql.metadata @@ -1,3 +1,3 @@ b3d5a1459042cd3b4d1aeec927f9fb9b977f49a5 SOURCES/postgresql-9.4.14-US.pdf 6b0b4eff681d1b93be903b96c2c16a6ca9e0d848 SOURCES/postgresql-9.4.14.tar.bz2 -2317e63eb18c38e2fd0ffd85585334a38a9dc1f9 SOURCES/postgresql-setup-3.3.tar.gz +8c2d7c97ba79dbb5dc804461a6acddbd1b7959e6 SOURCES/postgresql-setup-6.0.tar.gz diff --git a/SPECS/postgresql.spec b/SPECS/postgresql.spec index 42d52c1..632fc4d 100644 --- a/SPECS/postgresql.spec +++ b/SPECS/postgresql.spec @@ -61,11 +61,14 @@ %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} +# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_of_Additional_RPM_Macros +%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{!?scl:%_sysconfdir}%{?scl:%_root_sysconfdir}/rpm; echo $d) + Summary: PostgreSQL client programs Name: %{?scl_prefix}postgresql %global majorversion 9.4 Version: 9.4.14 -Release: 1%{?dist} +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. @@ -73,7 +76,7 @@ License: PostgreSQL Group: Applications/Databases Url: http://www.postgresql.org/ -%global setup_version 3.3 +%global setup_version 6.0 %global service_name %{?scl_prefix}postgresql.service @@ -401,15 +404,14 @@ CFLAGS="$CFLAGS -DLINUX_OOM_SCORE_ADJ=0" cd postgresql-setup-%{setup_version} %configure \ pgdocdir=%{_pkgdocdir} \ - systemdunitsdir=%{_root_prefix}/lib/systemd/system \ - systemduserunitsdir=%{_root_sysconfdir}/systemd/system \ - systemdlegacyscriptsdir=%{_root_libexecdir}/initscripts/legacy-actions \ PGVERSION=%{version} \ PGMAJORVERSION=%{majorversion} \ - NAME_DEFAULT_PREV_SERVICE=postgresql \ +%if 0%{?scl:1} SCLS=%{?scl} \ NAME_SRV_PFX=%{?scl}- \ - NAME_PKG_PFX=%{?scl}- + NAME_PKG_PFX=%{?scl}- \ +%endif + NAME_DEFAULT_PREV_SERVICE=postgresql make %{?_smp_mflags} cd .. @@ -610,7 +612,6 @@ test "$test_failure" -eq 0 %endif %install - cd postgresql-setup-%{setup_version} make install DESTDIR=$RPM_BUILD_ROOT cd .. @@ -693,6 +694,9 @@ install -m 0644 %{SOURCE13} $RPM_BUILD_ROOT%{_tmpfilesdir}/%{?scl_prefix}postgre # PGDATA needs removal of group and world permissions due to pg_pwd hole. install -d -m 700 $RPM_BUILD_ROOT%{?_localstatedir}/lib/pgsql/data +%if 0%{?scl:1} +rm -r $RPM_BUILD_ROOT/%{macrosdir}/macros.postgresql +%endif # backups of data go here... install -d -m 700 $RPM_BUILD_ROOT%{?_localstatedir}/lib/pgsql/backups @@ -1044,6 +1048,7 @@ cd - %{_mandir}/man1/pg_receivexlog.* %{_mandir}/man1/pg_resetxlog.* %{_mandir}/man1/postgres.* +%{_mandir}/man1/postgresql-new-systemd-unit.* %{_mandir}/man1/postgresql-setup.* %{_mandir}/man1/postmaster.* %{_datadir}/pgsql/postgres.bki @@ -1055,6 +1060,7 @@ cd - %{_datadir}/pgsql/tsearch_data/ %dir %{_datadir}/postgresql-setup %{_datadir}/postgresql-setup/library.sh +%{_datadir}/postgresql-setup/postgresql_pkg_tests.sh %{_libdir}/pgsql/dict_snowball.so %{_libdir}/pgsql/pg_prewarm.so %{_libdir}/pgsql/plpgsql.so @@ -1077,6 +1083,7 @@ cd - %{_datadir}/pgsql/sql_features.txt %{_libexecdir}/postgresql-check-db-dir %{_libexecdir}/postgresql-ctl +%{_sbindir}/postgresql-new-systemd-unit %dir %{_sysconfdir}/postgresql-setup %dir %{_sysconfdir}/postgresql-setup/upgrade %config %{_sysconfdir}/postgresql-setup/upgrade/*.conf @@ -1148,6 +1155,9 @@ cd - %endif %changelog +* Mon Nov 06 2017 Pavel Raiskup - 9.4.14-2 +- fix CVE-2017-15097 by rebasing postgresql-setup to the latest version + * Tue Aug 29 2017 Petr Kubat - 9.4.14-1 - update to 9.4.14 per release notes http://www.postgresql.org/docs/9.4/static/release-9-4-14.html