From 08eb70537031837fa9ac2e25cf116548506a324e Mon Sep 17 00:00:00 2001 From: Jozef Mlich Date: Thu, 26 Mar 2015 09:43:26 +0100 Subject: [PATCH] Update of postgresql-setup to 3.3 --- .gitignore | 2 +- postgresql.spec | 49 ++++++++++++++++++++++++++++++++++++------------- sources | 2 +- 3 files changed, 38 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 3783e65..3be6bf4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -/postgresql-setup-2.0.tar.gz +/postgresql-setup-3.3.tar.gz /postgresql-9.4.1.tar.bz2 /postgresql-9.4.1.tar.bz2.sha256 /postgresql-9.4.1-US.pdf diff --git a/postgresql.spec b/postgresql.spec index c86d25a..759838d 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -67,7 +67,7 @@ Summary: PostgreSQL client programs Name: postgresql %global majorversion 9.4 Version: 9.4.1 -Release: 2%{?dist} +Release: 3%{?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. @@ -85,7 +85,7 @@ Url: http://www.postgresql.org/ %global prevversion 9.3.6 %global prevmajorversion 9.3 -%global setup_version 2.0 +%global setup_version 3.3 Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2 # The PDF file is generated by generate-pdf.sh, which see for comments @@ -123,6 +123,9 @@ BuildRequires: perl(ExtUtils::Embed), perl-devel BuildRequires: readline-devel zlib-devel BuildRequires: systemd-units +# postgresql-setup build requires +BuildRequires: m4 elinks docbook-utils help2man + %if %plpython BuildRequires: python-devel %endif @@ -394,18 +397,14 @@ find . -type f -name .gitignore | xargs rm cd postgresql-setup-%{setup_version} -export POSTGRES_BIN=%{_bindir}/postgres \ - PG_CTL_BIN=%{_bindir}/pg_ctl \ - PGVERSION=%{version} \ - PGMAJORVERSION=%{majorversion} \ - PGENGINE=%{_bindir} \ - PREVMAJORVERSION=%{prevmajorversion} \ - PREVPGENGINE=%{_libdir}/pgsql/postgresql-%{prevmajorversion}/bin \ - README_DIST=%{_pkgdocdir}/README.rpm-dist \ - PKGCONFIG_DIR=%{_sysconfdir}/postgresql %configure \ - --docdir=%{_pkgdocdir} - + pgdocdir=%{_pkgdocdir} \ + systemdunitsdir=%{_prefix}/lib/systemd/system \ + systemduserunitsdir=%{_sysconfdir}/systemd/system \ + systemdlegacyscriptsdir=%{_libexecdir}/initscripts/legacy-actions \ + PGVERSION=%{version} \ + PGMAJORVERSION=%{majorversion} \ + NAME_DEFAULT_PREV_SERVICE=postgresql make %{?_smp_mflags} cd .. @@ -644,6 +643,23 @@ cd postgresql-setup-%{setup_version} make install DESTDIR=$RPM_BUILD_ROOT cd .. +# For some reson, specifying %doc %{_pkgdocdir}/README.rpm-dist in %files does +# not work (at least on RHEL6) and rpmbuild fails with (it may be known issue +# but I was unable to debug properly yet): +# error: create archive failed on file +# /builddir/.../...-9.4.1/README.rpm-dist: cpio: Bad magic +cp $RPM_BUILD_ROOT/%{_pkgdocdir}/README.rpm-dist ./ + +cat > $RPM_BUILD_ROOT%{_sysconfdir}/postgresql-setup/upgrade/postgresql.conf < - 9.4.1-3 +- update to postgresql-setup 3.3 + * Thu Mar 19 2015 Jozef Mlich - 9.4.1-2 - Adding tcl-pgtcl into Requires of -tcl subpackage diff --git a/sources b/sources index 9839844..fdd7173 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -8323008e726a84d76c3153ed68357576 postgresql-setup-2.0.tar.gz +4333e467db490f5721452640d2bf9cd2 postgresql-setup-3.3.tar.gz 2cf30f50099ff1109d0aa517408f8eff postgresql-9.4.1.tar.bz2 5da9a8b75e0a18841f561049b1e670bd postgresql-9.4.1.tar.bz2.sha256 940a0ef3c49e19678e59a9a6b6ee143e postgresql-9.4.1-US.pdf