Last active
December 17, 2015 10:29
-
-
Save jonjensen/5595295 to your computer and use it in GitHub Desktop.
Patch to adapt PGDG PostgreSQL 9.2.4 SRPM to build against End Point's local-perl for PL/Perl in https://packages.endpoint.com/ and without integer datetime so that it's compatible with pg_upgrade back to 8.3.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Patch against specfile of: | |
http://yum.pgrpms.org/srpms/9.2/redhat/rhel-5-x86_64/postgresql92-9.2.4-1PGDG.rhel5.src.rpm | |
--- postgresql-9.2.spec.orig 2013-04-01 23:10:41.000000000 +0000 | |
+++ postgresql-9.2.spec 2013-05-16 21:22:23.000000000 +0000 | |
@@ -57,7 +57,7 @@ | |
%{!?pltcl:%define pltcl 1} | |
%{!?plperl:%define plperl 1} | |
%{!?ssl:%define ssl 1} | |
-%{!?intdatetimes:%define intdatetimes 1} | |
+%{!?intdatetimes:%define intdatetimes 0} | |
%{!?kerberos:%define kerberos 1} | |
%{!?nls:%define nls 1} | |
%{!?xml:%define xml 1} | |
@@ -67,10 +67,13 @@ | |
%{!?uuid:%define uuid 1} | |
%{!?ldap:%define ldap 1} | |
+# Work around local-perl redefinitions | |
+%define _sbindir /usr/sbin | |
+ | |
Summary: PostgreSQL client programs and libraries | |
Name: %{oname}%{packageversion} | |
Version: 9.2.4 | |
-Release: 1PGDG%{?dist} | |
+Release: 1PGDG.didt%{?dist} | |
License: PostgreSQL | |
Group: Applications/Databases | |
Url: http://www.postgresql.org/ | |
@@ -91,7 +94,7 @@ | |
Patch6: postgresql-perl-rpath.patch | |
Patch8: postgresql-prefer-ncurses.patch | |
-Buildrequires: perl glibc-devel bison flex | |
+Buildrequires: local-perl = 4:5.10.0, glibc-devel, bison, flex | |
Requires: /sbin/ldconfig initscripts | |
%if %plpython | |
@@ -139,7 +142,6 @@ | |
Requires(postun): %{_sbindir}/update-alternatives | |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | |
-Provides: postgresql | |
%description | |
PostgreSQL is an advanced Object-Relational database management system | |
@@ -161,8 +163,6 @@ | |
%package libs | |
Summary: The shared libraries required for any PostgreSQL clients | |
Group: Applications/Databases | |
-Provides: libpq.so | |
-Provides: postgresql-libs | |
%description libs | |
The postgresql92-libs package provides the essential shared libraries for any | |
@@ -175,7 +175,6 @@ | |
Group: Applications/Databases | |
Requires: /usr/sbin/useradd /sbin/chkconfig | |
Requires: %{name} = %{version}-%{release} | |
-Provides: postgresql-server | |
%description server | |
The postgresql92-server package includes the programs needed to create | |
@@ -188,10 +187,12 @@ | |
PostgreSQL databases and/or your own PostgreSQL server. You also need | |
to install the postgresql package. | |
+This version is built with --disable-integer-datetimes to enable use of | |
+pg_upgrade. | |
+ | |
%package docs | |
Summary: Extra documentation for PostgreSQL | |
Group: Applications/Databases | |
-Provides: postgresql-docs | |
%description docs | |
The postgresql92-docs package includes the SGML source for the documentation | |
@@ -204,7 +205,6 @@ | |
Summary: Contributed source and binaries distributed with PostgreSQL | |
Group: Applications/Databases | |
Requires: %{name} = %{version} | |
-Provides: postgresql-contrib | |
%description contrib | |
The postgresql92-contrib package contains contributed packages that are | |
@@ -214,7 +214,6 @@ | |
Summary: PostgreSQL development header files and libraries | |
Group: Development/Libraries | |
Requires: %{name} = %{version}-%{release} | |
-Provides: postgresql-devel | |
%description devel | |
The postgresql92-devel package contains the header files and libraries | |
@@ -227,12 +226,10 @@ | |
%package plperl | |
Summary: The Perl procedural language for PostgreSQL | |
Group: Applications/Databases | |
-Requires: %{name}-server = %{version}-%{release} | |
+Requires: %{name}-server = %{version}-%{release}, local-perl = 4:5.10.0 | |
%ifarch ppc ppc64 | |
-BuildRequires: perl-devel | |
+BuildRequires: local-perl-devel | |
%endif | |
-Obsoletes: postgresql-pl | |
-Provides: postgresql-plperl | |
%description plperl | |
PostgreSQL is an advanced Object-Relational database management | |
@@ -246,8 +243,6 @@ | |
Group: Applications/Databases | |
Requires: %{name} = %{version} | |
Requires: %{name}-server = %{version} | |
-Obsoletes: postgresql-pl | |
-Provides: postgresql-plpython | |
%description plpython | |
PostgreSQL is an advanced Object-Relational database management | |
@@ -261,8 +256,6 @@ | |
Group: Applications/Databases | |
Requires: %{name} = %{version} | |
Requires: %{name}-server = %{version} | |
-Obsoletes: postgresql-pl | |
-Provides: postgresql-pltcl | |
%description pltcl | |
PostgreSQL is an advanced Object-Relational database management | |
@@ -275,7 +268,6 @@ | |
Summary: The test suite distributed with PostgreSQL | |
Group: Applications/Databases | |
Requires: %{name}-server = %{version}-%{release} | |
-Provides: postgresql-test | |
%description test | |
PostgreSQL is an advanced Object-Relational database management | |
@@ -321,13 +313,14 @@ | |
%endif | |
%if %plperl | |
--with-perl \ | |
+ --with-libraries=/usr/local/lib64/perl5/5.10.0/x86_64-linux/CORE/libperl.so \ | |
%endif | |
%if %plpython | |
--with-python \ | |
%endif | |
%if %pltcl | |
--with-tcl \ | |
- --with-tclconfig=%{_libdir} \ | |
+ --with-tclconfig=/usr/lib64 \ | |
%endif | |
%if %ssl | |
--with-openssl \ | |
@@ -520,7 +513,7 @@ | |
-c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || : | |
touch /var/log/pgsql | |
chown postgres:postgres /var/log/pgsql | |
-chmod 0700 /var/log/pgsql | |
+chmod 0600 /var/log/pgsql | |
%post server | |
chkconfig --add postgresql-9.2 | |
@@ -907,6 +900,13 @@ | |
%endif | |
%changelog | |
+* Thu May 16 2013 Jon Jensen <[email protected]> - 9.2.4-1PGDG.ep | |
+- Rebuild for End Point local-perl. | |
+- Disable integer datetimes to preserve upgradability using pg_upgrade. | |
+- Disentangle from old RPM provides such as "postgresql" that are independent of this package. | |
+- Don't make /var/log/pgsql executable. | |
+- Cope with our munged %_libdir for PL/Tcl and %_sbindir for update-alternatives. | |
+ | |
* Tue Apr 02 2013 Jeff Frost <[email protected]> - 9.2.4-1PGDG | |
- Update to 9.2.4, per changes described at: | |
http://www.postgresql.org/docs/9.2/static/release-9-2-4.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- postgresql-9.2.spec.orig 2013-04-01 19:10:45.000000000 -0400 | |
+++ postgresql-9.2.spec 2013-05-16 18:20:19.897404218 -0400 | |
@@ -57,7 +57,7 @@ | |
%{!?pltcl:%define pltcl 1} | |
%{!?plperl:%define plperl 1} | |
%{!?ssl:%define ssl 1} | |
-%{!?intdatetimes:%define intdatetimes 1} | |
+%{!?intdatetimes:%define intdatetimes 0} | |
%{!?kerberos:%define kerberos 1} | |
%{!?nls:%define nls 1} | |
%{!?xml:%define xml 1} | |
@@ -67,10 +67,13 @@ | |
%{!?uuid:%define uuid 1} | |
%{!?ldap:%define ldap 1} | |
+# Work around local-perl redefinitions | |
+%define _sbindir /usr/sbin | |
+ | |
Summary: PostgreSQL client programs and libraries | |
Name: %{oname}%{packageversion} | |
Version: 9.2.4 | |
-Release: 1PGDG%{?dist} | |
+Release: 1PGDG.didt%{?dist} | |
License: PostgreSQL | |
Group: Applications/Databases | |
Url: http://www.postgresql.org/ | |
@@ -91,7 +94,7 @@ | |
Patch6: postgresql-perl-rpath.patch | |
Patch8: postgresql-prefer-ncurses.patch | |
-Buildrequires: perl glibc-devel bison flex | |
+Buildrequires: local-perl = 4:5.14.1, glibc-devel, bison, flex | |
Requires: /sbin/ldconfig initscripts | |
%if %plperl | |
@@ -144,7 +147,6 @@ | |
Requires(postun): %{_sbindir}/update-alternatives | |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | |
-Provides: postgresql | |
%description | |
PostgreSQL is an advanced Object-Relational database management system | |
@@ -166,8 +168,6 @@ | |
%package libs | |
Summary: The shared libraries required for any PostgreSQL clients | |
Group: Applications/Databases | |
-Provides: libpq.so | |
-Provides: postgresql-libs | |
%description libs | |
The postgresql92-libs package provides the essential shared libraries for any | |
@@ -180,7 +180,6 @@ | |
Group: Applications/Databases | |
Requires: /usr/sbin/useradd /sbin/chkconfig | |
Requires: %{name} = %{version}-%{release} | |
-Provides: postgresql-server | |
%description server | |
The postgresql92-server package includes the programs needed to create | |
@@ -193,10 +192,12 @@ | |
PostgreSQL databases and/or your own PostgreSQL server. You also need | |
to install the postgresql package. | |
+This version is built with --disable-integer-datetimes to enable use of | |
+pg_upgrade. | |
+ | |
%package docs | |
Summary: Extra documentation for PostgreSQL | |
Group: Applications/Databases | |
-Provides: postgresql-docs | |
%description docs | |
The postgresql92-docs package includes the SGML source for the documentation | |
@@ -209,7 +210,6 @@ | |
Summary: Contributed source and binaries distributed with PostgreSQL | |
Group: Applications/Databases | |
Requires: %{name} = %{version} | |
-Provides: postgresql-contrib | |
%description contrib | |
The postgresql92-contrib package contains contributed packages that are | |
@@ -219,7 +219,6 @@ | |
Summary: PostgreSQL development header files and libraries | |
Group: Development/Libraries | |
Requires: %{name} = %{version}-%{release} | |
-Provides: postgresql-devel | |
%description devel | |
The postgresql92-devel package contains the header files and libraries | |
@@ -232,12 +231,10 @@ | |
%package plperl | |
Summary: The Perl procedural language for PostgreSQL | |
Group: Applications/Databases | |
-Requires: %{name}-server = %{version}-%{release} | |
+Requires: %{name}-server = %{version}-%{release}, local-perl = 4:5.14.1 | |
%ifarch ppc ppc64 | |
-BuildRequires: perl-devel | |
+BuildRequires: local-perl-devel | |
%endif | |
-Obsoletes: postgresql-pl | |
-Provides: postgresql-plperl | |
%description plperl | |
PostgreSQL is an advanced Object-Relational database management | |
@@ -251,8 +248,6 @@ | |
Group: Applications/Databases | |
Requires: %{name} = %{version} | |
Requires: %{name}-server = %{version} | |
-Obsoletes: postgresql-pl | |
-Provides: postgresql-plpython | |
%description plpython | |
PostgreSQL is an advanced Object-Relational database management | |
@@ -266,8 +261,6 @@ | |
Group: Applications/Databases | |
Requires: %{name} = %{version} | |
Requires: %{name}-server = %{version} | |
-Obsoletes: postgresql-pl | |
-Provides: postgresql-pltcl | |
%description pltcl | |
PostgreSQL is an advanced Object-Relational database management | |
@@ -280,7 +273,6 @@ | |
Summary: The test suite distributed with PostgreSQL | |
Group: Applications/Databases | |
Requires: %{name}-server = %{version}-%{release} | |
-Provides: postgresql-test | |
%description test | |
PostgreSQL is an advanced Object-Relational database management | |
@@ -326,13 +318,14 @@ | |
%endif | |
%if %plperl | |
--with-perl \ | |
+ --with-libraries=/usr/local/lib64/perl5/5.14.1/x86_64-linux/CORE/libperl.so \ | |
%endif | |
%if %plpython | |
--with-python \ | |
%endif | |
%if %pltcl | |
--with-tcl \ | |
- --with-tclconfig=%{_libdir} \ | |
+ --with-tclconfig=/usr/lib64 \ | |
%endif | |
%if %ssl | |
--with-openssl \ | |
@@ -525,7 +518,7 @@ | |
-c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || : | |
touch /var/log/pgsql | |
chown postgres:postgres /var/log/pgsql | |
-chmod 0700 /var/log/pgsql | |
+chmod 0600 /var/log/pgsql | |
%post server | |
chkconfig --add postgresql-9.2 | |
@@ -912,6 +905,13 @@ | |
%endif | |
%changelog | |
+* Thu May 16 2013 Jon Jensen <[email protected]> - 9.2.4-1PGDG.ep | |
+- Rebuild for End Point local-perl. | |
+- Disable integer datetimes to preserve upgradability using pg_upgrade. | |
+- Disentangle from old RPM provides such as "postgresql" that are independent of this package. | |
+- Don't make /var/log/pgsql executable. | |
+- Cope with our munged %_libdir for PL/Tcl and %_sbindir for update-alternatives. | |
+ | |
* Tue Apr 02 2013 Jeff Frost <[email protected]> - 9.2.4-1PGDG | |
- Update to 9.2.4, per changes described at: | |
http://www.postgresql.org/docs/9.2/static/release-9-2-4.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment