From ff656b914b4ff8d73921c2590a1b7f487194ca32 Mon Sep 17 00:00:00 2001 From: Jozef MlĂ­ch Date: Jun 12 2014 13:53:07 +0000 Subject: rebase to most recent upstream version Per release notes: http://www.pgpool.net/docs/pgpool-II-3.3.3/NEWS.txt Resolves: #1094713 Version: 3.3.3-1 --- diff --git a/.gitignore b/.gitignore index 250ede9..4235f26 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/pgpool-II-3.1.3.tar.gz -/pgpool-II-3.2.0.tar.gz +/pgpool-II-3.3.3.tar.gz diff --git a/pgpool-3.2-build-against-postgresql-9.3.patch b/pgpool-3.2-build-against-postgresql-9.3.patch deleted file mode 100644 index f7b1701..0000000 --- a/pgpool-3.2-build-against-postgresql-9.3.patch +++ /dev/null @@ -1,47 +0,0 @@ -commit 2e9a136413473e799cf9ee3cd30a9ae40cf8e7c1 -Author: Tatsuo Ishii -AuthorDate: Wed Apr 3 16:20:15 2013 +0900 -Commit: Tatsuo Ishii -CommitDate: Wed Apr 3 16:20:15 2013 +0900 - - Adopt PostgreSQL 9.3. Patch contributed by Asif Rehman. - Slight editing by Tatsuo Ishii. - -diff --git a/sql/pgpool-recovery/pgpool-recovery.c b/sql/pgpool-recovery/pgpool-recovery.c -index 8408e3f..4f47e2c 100644 ---- a/sql/pgpool-recovery/pgpool-recovery.c -+++ b/sql/pgpool-recovery/pgpool-recovery.c -@@ -4,7 +4,7 @@ - * - * pgpool-recovery: exec online recovery script from SELECT statement. - * -- * Copyright (c) 2003-2010 PgPool Global Development Group -+ * Copyright (c) 2003-2013 PgPool Global Development Group - * - * Permission to use, copy, modify, and distribute this software and - * its documentation for any purpose and without fee is hereby -@@ -29,6 +29,9 @@ - #include "catalog/namespace.h" - #include "utils/syscache.h" - #include "utils/builtins.h" /* PostgreSQL 8.4 needs this for textout */ -+#if defined(PG_VERSION_NUM) && (PG_VERSION_NUM >= 90300) -+#include "access/htup_details.h" /* PostgreSQL 9.3 or later needs this */ -+#endif - - #define REMOTE_START_FILE "pgpool_remote_start" - -@@ -198,7 +201,14 @@ get_function_oid(const char *funcname, const char *argtype, const char *nspname) - oid_v = buildoidvector(NULL, 0); - } - -+#if !defined(PG_VERSION_NUM) || (PG_VERSION_NUM < 90300) - nspid = LookupExplicitNamespace(nspname); -+#else -+ /* LookupExplicitNamespace() of PostgreSQL 9.3 or later, has third -+ * argument "missing_ok" which suppresses ERROR exception, but -+ * returns invlaid_oid. See include/catalog/namespace.h */ -+ nspid = LookupExplicitNamespace(nspname, false); -+#endif - elog(DEBUG1, "get_function_oid: oid of \"%s\": %d", nspname, nspid); - - tup = SearchSysCache(PROCNAMEARGSNSP, diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 2750f5b..08c2a85 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -7,8 +7,8 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} -Version: 3.2.0 -Release: 5%{?dist} +Version: 3.3.3 +Release: 1%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.net @@ -16,13 +16,13 @@ Source0: http://www.pgpool.net/download.php?f=%{short_name}-%{version}.tar.gz Source1: pgpool.service Source2: pgpool.sysconfig Source3: pgpool.init +Source4: postgresql-pgpool-II.tmpfiles.d Patch1: pgpool-3.1-conf.sample.patch -# Apply #ifdef-like patch to allow build against PostgreSQL 9.3 -# ~> upstream (2e9a136413473e799cf) -Patch2: pgpool-3.2-build-against-postgresql-9.3.patch BuildRequires: postgresql-devel pam-devel %if %{systemd_enabled} BuildRequires: systemd +# We require this to be present for %%{_prefix}/lib/tmpfiles.d +Requires: systemd-units Requires(post): systemd-sysv Requires(post): systemd Requires(preun): systemd @@ -73,7 +73,6 @@ PGPool recovery add-on for PostgreSQL. %prep %setup -q -n %{short_name}-%{version} %patch1 -p1 -b .samplefix -%patch2 -p1 -b .build-for-postgresql-9.3 %build %configure --with-pgsql-includedir=%{_includedir}/pgsql --with-pgsql=%{_libdir}/pgsql --disable-static --with-pam --disable-rpath --sysconfdir=%{_sysconfdir}/%{short_name}/ @@ -96,6 +95,11 @@ mv %{buildroot}/%{_sysconfdir}/%{short_name}/pgpool.conf.sample-stream %{buildro %if %{systemd_enabled} install -d %{buildroot}%{_unitdir} install -m 755 %{SOURCE1} %{buildroot}%{_unitdir}/pgpool.service + +# ... and make a tmpfiles script to recreate it at reboot. +mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir} +install -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_tmpfilesdir}/postgresql-pgpool-II.conf + %else install -d %{buildroot}%{_sysconfdir}/init.d install -m 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/pgpool @@ -162,6 +166,7 @@ fi %{_bindir}/pcp_recovery_node %{_bindir}/pcp_stop_pgpool %{_bindir}/pcp_systemdb_info +%{_bindir}/pcp_watchdog_info %{_bindir}/pg_md5 %{_mandir}/man8/pgpool* %dir %{_datadir}/%{short_name} @@ -173,6 +178,8 @@ fi %{_libdir}/libpcp.so.* %{_datadir}/%{short_name}/pgpool.pam %if %{systemd_enabled} + +%{_tmpfilesdir}/postgresql-pgpool-II.conf %{_unitdir}/pgpool.service %else %{_sysconfdir}/init.d/pgpool @@ -189,11 +196,19 @@ fi %files recovery %{_libdir}/pgsql/pgpool-recovery.so -%{_datadir}/pgsql/contrib/pgpool-recovery.sql -%{_datadir}/pgsql/contrib/uninstall_pgpool-recovery.sql +%{_datadir}/pgsql/extension/pgpool-recovery.sql +%{_datadir}/pgsql/extension/pgpool_recovery--1.0.sql +%{_datadir}/pgsql/extension/pgpool_recovery.control + + %doc sample/pgpool_recovery* %changelog +* Thu Jun 12 2014 Jozef Mlich - 3.3.3-1 +- adding tmpfiles.d (allow pid file to be created in /var/run/pgpool - dir + created after reboot) +- Rebase to pgpool-II 3.3.3 (#1094713) + * Sat Jun 07 2014 Fedora Release Engineering - 3.2.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild @@ -335,12 +350,12 @@ fuzz = 0 policy in rawhide - added --disable-rpath configure parameter. - Chowned sample conf files, so that they can work with pgpoolAdmin. -* Thu Apr 22 2007 Devrim Gunduz 1.0.2-4 +* Sun Apr 22 2007 Devrim Gunduz 1.0.2-4 - Added postgresql-devel as BR, per bugzilla review. - Added --disable-static flan, per bugzilla review. - Removed superfluous manual file installs, per bugzilla review. -* Thu Apr 22 2007 Devrim Gunduz 1.0.2-3 +* Sun Apr 22 2007 Devrim Gunduz 1.0.2-3 - Rebuilt for the correct tarball - Fixed man8 file ownership, per bugzilla review #229321 @@ -364,10 +379,10 @@ fuzz = 0 policy in rawhide - Fix .so link problem - Cosmetic changes to spec file -* Thu Sep 27 2006 - Devrim GUNDUZ 1.0.1-3 +* Wed Sep 27 2006 - Devrim GUNDUZ 1.0.1-3 - Fix spec, per Yoshiyuki Asaba -* Thu Sep 26 2006 - Devrim GUNDUZ 1.0.1-2 +* Tue Sep 26 2006 - Devrim GUNDUZ 1.0.1-2 - Fixed rpmlint errors - Fixed download url - Added ldconfig for .so files diff --git a/postgresql-pgpool-II.tmpfiles.d b/postgresql-pgpool-II.tmpfiles.d new file mode 100644 index 0000000..94f2939 --- /dev/null +++ b/postgresql-pgpool-II.tmpfiles.d @@ -0,0 +1 @@ +d /var/run/pgpool 0755 root root - diff --git a/sources b/sources index aa256c1..614c72a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b3194d7ff15c2c74a803a323c4afd22b pgpool-II-3.2.0.tar.gz +ceeb477b978db481c0638f5242c9240d pgpool-II-3.3.3.tar.gz