From bdfcc791c69576d27ddc30238c45dfcfc35b13fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Sun, 5 Aug 2007 02:52:20 +0000 Subject: [PATCH 01/46] Patch for sample conf file --- pgpool.conf.sample.patch | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 pgpool.conf.sample.patch diff --git a/pgpool.conf.sample.patch b/pgpool.conf.sample.patch new file mode 100644 index 0000000..b8bd78a --- /dev/null +++ b/pgpool.conf.sample.patch @@ -0,0 +1,40 @@ +--- pgpool.conf.sample.old 2007-08-05 05:27:53.000000000 +0300 ++++ pgpool.conf.sample 2007-08-05 05:29:01.000000000 +0300 +@@ -1,6 +1,5 @@ + # + # pgpool-II configuration file sample +-# $Header: /home/fedora/jkeating/pkgs/rpms/postgresql-pgpool-II/EL-6/pgpool.conf.sample.patch,v 1.1 2007/08/05 02:52:20 devrim Exp $ + + # Host name or IP address to listen on: '*' for all, '' for no TCP/IP + # connections +@@ -12,16 +11,14 @@ + # Port number for pgpool communication manager + pcp_port = 9898 + +-# Unix domain socket path. (The Debian package defaults to +-# /var/run/postgresql.) +-socket_dir = '/tmp' ++# Unix domain socket path. ++socket_dir = '/var/run' + + # Unix domain socket path for pgpool communication manager. +-# (Debian package defaults to /var/run/postgresql) +-pcp_socket_dir = '/tmp' ++pcp_socket_dir = '/var/run' + +-# Unix domain socket path for the backend. Debian package defaults to /var/run/postgresql! +-backend_socket_dir = '/tmp' ++# Unix domain socket path for the backend. ++backend_socket_dir = '/var/run' + + # pgpool communication manager timeout. 0 means no timeout, but strongly not recommended! + pcp_timeout = 10 +@@ -44,7 +41,7 @@ + child_max_connections = 0 + + # Logging directory +-logdir = '/tmp' ++logdir = '/var/run' + + # Replication mode + replication_mode = false From fb8b81c30b56ded3e42a2fd19db18d8445b275eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Sun, 5 Aug 2007 02:58:47 +0000 Subject: [PATCH 02/46] - Added a patch for sample conf file to use Fedora defaults --- postgresql-pgpool-II.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 81a10a4..5f657bd 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -10,6 +10,7 @@ URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en Source0: http://pgfoundry.org/frs/download.php/1419/%{short_name}-%{version}.tar.gz Source1: pgpool.init Source2: pgpool.sysconfig +Patch1: pgpool.conf.sample.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: postgresql-devel pam-devel @@ -43,6 +44,7 @@ Development headers and libraries for pgpool-II. %prep %setup -q -n %{short_name}-%{version} +%patch1 -p0 %build %configure --with-pgsql-includedir=%{_includedir}/pgsql --with-pgsql-lib=%{_libdir}/pgsql --disable-static --with-pam --disable-rpath @@ -98,6 +100,7 @@ rm -rf %{buildroot} * Sun Aug 5 2007 Devrim Gunduz 1.2-2 - Added an init script for pgpool - Added /etc/sysconfig/pgpool +- Added a patch for sample conf file to use Fedora defaults * Wed Aug 1 2007 Devrim Gunduz 1.2-1 - Update to 1.2 From ffb53ceb247d154f43acb3c4b0e64b14180f07e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Sun, 5 Aug 2007 03:03:11 +0000 Subject: [PATCH 03/46] Bump up version --- postgresql-pgpool-II.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 5f657bd..c440570 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -3,7 +3,7 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} Version: 1.2 -Release: 2%{?dist} +Release: 3%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en @@ -97,10 +97,12 @@ rm -rf %{buildroot} %{_libdir}/libpcp.so %changelog +* Sun Aug 5 2007 Devrim Gunduz 1.2-3 +- Added a patch for sample conf file to use Fedora defaults + * Sun Aug 5 2007 Devrim Gunduz 1.2-2 - Added an init script for pgpool - Added /etc/sysconfig/pgpool -- Added a patch for sample conf file to use Fedora defaults * Wed Aug 1 2007 Devrim Gunduz 1.2-1 - Update to 1.2 From 50e61d78d2ebd5bf72945225b646abd08a43b060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Thu, 16 Aug 2007 08:41:21 +0000 Subject: [PATCH 04/46] - Fixed the directory name where sample conf files and sql files are installed. --- postgresql-pgpool-II.spec | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index c440570..bdd5221 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -3,7 +3,7 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} Version: 1.2 -Release: 3%{?dist} +Release: 4%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en @@ -54,7 +54,7 @@ make %{?_smp_flags} %install rm -rf %{buildroot} make %{?_smp_flags} DESTDIR=%{buildroot} install -mv %{buildroot}/%{_sysconfdir}/*.conf.sample %{buildroot}%{_datadir}/%{short_name} +mv %{buildroot}/%{_sysconfdir}/*.conf.sample %{buildroot}%{_datadir}/%{name} install -d %{buildroot}%{_initrddir} install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/pgpool install -d %{buildroot}%{_sysconfdir}/sysconfig @@ -83,10 +83,10 @@ rm -rf %{buildroot} %{_bindir}/pcp_systemdb_info %{_bindir}/pg_md5 %{_mandir}/man8/pgpool* -%{_datadir}/%{short_name}/system_db.sql +%{_datadir}/%{name}/system_db.sql %{_libdir}/libpcp.so.* -%attr(764,root,apache) %{_datadir}/%{short_name}/*.conf.sample -%{_datadir}/%{short_name}/pgpool.pam +%attr(764,root,apache) %{_datadir}/%{name}/*.conf.sample +%{_datadir}/%{name}/pgpool.pam %{_initrddir}/pgpool %config(noreplace) %{_sysconfdir}/sysconfig/pgpool @@ -97,6 +97,10 @@ rm -rf %{buildroot} %{_libdir}/libpcp.so %changelog +* Thu Aug 16 2007 Devrim Gunduz 1.2-4 +- Fixed the directory name where sample conf files and sql files + are installed. + * Sun Aug 5 2007 Devrim Gunduz 1.2-3 - Added a patch for sample conf file to use Fedora defaults From f0f7c9d02dac6cf2997c6c1bede6df68b21ac491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Thu, 16 Aug 2007 09:44:57 +0000 Subject: [PATCH 05/46] Update spec file per latest changes. --- postgresql-pgpool-II.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index bdd5221..f0bb1ec 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -54,7 +54,10 @@ make %{?_smp_flags} %install rm -rf %{buildroot} make %{?_smp_flags} DESTDIR=%{buildroot} install +install -d %{buildroot}%{_datadir}/%{name} mv %{buildroot}/%{_sysconfdir}/*.conf.sample %{buildroot}%{_datadir}/%{name} +mv %{buildroot}%{_datadir}/%{short_name}/system_db.sql %{buildroot}%{_datadir}/%{name} +mv %{buildroot}%{_datadir}/%{short_name}/pgpool.pam %{buildroot}%{_datadir}/%{name} install -d %{buildroot}%{_initrddir} install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/pgpool install -d %{buildroot}%{_sysconfdir}/sysconfig From 6a6669f68d6557b6eb3e573722ab7a3b9c823411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Sat, 6 Oct 2007 00:25:06 +0000 Subject: [PATCH 06/46] Update pgpool-II to 1.2.1 --- .cvsignore | 2 +- pgpool.conf.sample.patch | 19 ++++++------------- postgresql-pgpool-II.spec | 20 +++++++++++++++----- sources | 2 +- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/.cvsignore b/.cvsignore index 9dda70d..dd5bf08 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pgpool-II-1.2.tar.gz +pgpool-II-1.2.1.tar.gz diff --git a/pgpool.conf.sample.patch b/pgpool.conf.sample.patch index b8bd78a..275dda3 100644 --- a/pgpool.conf.sample.patch +++ b/pgpool.conf.sample.patch @@ -1,20 +1,13 @@ ---- pgpool.conf.sample.old 2007-08-05 05:27:53.000000000 +0300 -+++ pgpool.conf.sample 2007-08-05 05:29:01.000000000 +0300 -@@ -1,6 +1,5 @@ - # - # pgpool-II configuration file sample --# $Header: /home/fedora/jkeating/pkgs/rpms/postgresql-pgpool-II/EL-6/pgpool.conf.sample.patch,v 1.1 2007/08/05 02:52:20 devrim Exp $ - - # Host name or IP address to listen on: '*' for all, '' for no TCP/IP - # connections -@@ -12,16 +11,14 @@ +--- pgpool.conf.sample.old 2007-10-05 17:16:23.000000000 -0700 ++++ pgpool.conf.sample 2007-10-05 17:18:11.000000000 -0700 +@@ -12,16 +12,14 @@ # Port number for pgpool communication manager pcp_port = 9898 -# Unix domain socket path. (The Debian package defaults to -# /var/run/postgresql.) -socket_dir = '/tmp' -+# Unix domain socket path. ++# Unix domain socket path. +socket_dir = '/var/run' # Unix domain socket path for pgpool communication manager. @@ -24,12 +17,12 @@ -# Unix domain socket path for the backend. Debian package defaults to /var/run/postgresql! -backend_socket_dir = '/tmp' -+# Unix domain socket path for the backend. ++# Unix domain socket path for the backend. +backend_socket_dir = '/var/run' # pgpool communication manager timeout. 0 means no timeout, but strongly not recommended! pcp_timeout = 10 -@@ -44,7 +41,7 @@ +@@ -44,7 +42,7 @@ child_max_connections = 0 # Logging directory diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index f0bb1ec..2784526 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -2,12 +2,12 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} -Version: 1.2 -Release: 4%{?dist} +Version: 1.2.1 +Release: 1%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en -Source0: http://pgfoundry.org/frs/download.php/1419/%{short_name}-%{version}.tar.gz +Source0: http://pgfoundry.org/frs/download.php/1472/%{short_name}-%{version}.tar.gz Source1: pgpool.init Source2: pgpool.sysconfig Patch1: pgpool.conf.sample.patch @@ -61,7 +61,7 @@ mv %{buildroot}%{_datadir}/%{short_name}/pgpool.pam %{buildroot}%{_datadir}/%{na install -d %{buildroot}%{_initrddir} install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/pgpool install -d %{buildroot}%{_sysconfdir}/sysconfig -install -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/pgpool +install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/pgpool # nuke libtool archive and static lib rm -f %{buildroot}%{_libdir}/libpcp.{a,la} @@ -69,7 +69,10 @@ rm -f %{buildroot}%{_libdir}/libpcp.{a,la} %clean rm -rf %{buildroot} -%post -p /sbin/ldconfig +%post +/sbin/ldconfig +chkconfig --add pgpool + %postun -p /sbin/ldconfig %files @@ -100,6 +103,13 @@ rm -rf %{buildroot} %{_libdir}/libpcp.so %changelog +* Fri Oct 5 2007 Devrim Gunduz 1.2.1-1 +- Update to 1.2.1 + +* Wed Aug 29 2007 Devrim Gunduz 1.2-5 +- Chmod sysconfig/pgpool to 644, not 755. Per BZ review. +- Run chkconfig --add pgpool during %%post. + * Thu Aug 16 2007 Devrim Gunduz 1.2-4 - Fixed the directory name where sample conf files and sql files are installed. diff --git a/sources b/sources index f0d00ef..73d2d85 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8fed94ed12769dacbbf8758b2154e5a7 pgpool-II-1.2.tar.gz +af2d2024ef1b8776d3145fb9f363d9ba pgpool-II-1.2.1.tar.gz From 9dc6039f204fdbb60d7cfd07c967440618ccb8ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Tue, 23 Oct 2007 06:47:13 +0000 Subject: [PATCH 07/46] Update pgpool-II to 1.3 --- .cvsignore | 2 +- postgresql-pgpool-II.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index dd5bf08..fe50d07 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pgpool-II-1.2.1.tar.gz +pgpool-II-1.3.tar.gz diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 2784526..f5f9c61 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -2,12 +2,12 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} -Version: 1.2.1 +Version: 1.3 Release: 1%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en -Source0: http://pgfoundry.org/frs/download.php/1472/%{short_name}-%{version}.tar.gz +Source0: http://pgfoundry.org/frs/download.php/1488/%{short_name}-%{version}.tar.gz Source1: pgpool.init Source2: pgpool.sysconfig Patch1: pgpool.conf.sample.patch @@ -103,6 +103,9 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog +* Tue Oct 23 2007 Devrim Gunduz 1.3-1 +- Update to 1.3 + * Fri Oct 5 2007 Devrim Gunduz 1.2.1-1 - Update to 1.2.1 diff --git a/sources b/sources index 73d2d85..b2c5487 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -af2d2024ef1b8776d3145fb9f363d9ba pgpool-II-1.2.1.tar.gz +1276c4b98a9de6f85f3179380a370144 pgpool-II-1.3.tar.gz From 78525128b5fcaaf10c76246867f02b826a58d69a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Sat, 5 Jan 2008 20:59:45 +0000 Subject: [PATCH 08/46] Update to 2.0.1 release --- .cvsignore | 2 +- postgresql-pgpool-II.spec | 8 ++++++-- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index fe50d07..797f93b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pgpool-II-1.3.tar.gz +pgpool-II-2.0.1.tar.gz diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index f5f9c61..c2ea3e9 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -2,12 +2,12 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} -Version: 1.3 +Version: 2.0.1 Release: 1%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en -Source0: http://pgfoundry.org/frs/download.php/1488/%{short_name}-%{version}.tar.gz +Source0: http://pgfoundry.org/frs/download.php/1521/%{short_name}-%{version}.tar.gz Source1: pgpool.init Source2: pgpool.sysconfig Patch1: pgpool.conf.sample.patch @@ -85,6 +85,7 @@ chkconfig --add pgpool %{_bindir}/pcp_node_info %{_bindir}/pcp_proc_count %{_bindir}/pcp_proc_info +%{_bindir}/pcp_recovery_node %{_bindir}/pcp_stop_pgpool %{_bindir}/pcp_systemdb_info %{_bindir}/pg_md5 @@ -103,6 +104,9 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog +* Sat Jan 5 2008 Devrim Gunduz 2.0.1-1 +- Update to 2.0.1 + * Tue Oct 23 2007 Devrim Gunduz 1.3-1 - Update to 1.3 diff --git a/sources b/sources index b2c5487..84948dd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1276c4b98a9de6f85f3179380a370144 pgpool-II-1.3.tar.gz +fdfd023b1400ae85455e8274bf0cb502 pgpool-II-2.0.1.tar.gz From b003140a3c0f706e2636a553257288c1ae2ca671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Mon, 14 Jan 2008 08:24:24 +0000 Subject: [PATCH 09/46] Update to 2.0.1 Add a temp patch that will disappear in 2.0.2 --- pool_process_query-2.0.1.patch | 27 +++++++++++++++++++++++++++ postgresql-pgpool-II.spec | 21 +++++++++++---------- 2 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 pool_process_query-2.0.1.patch diff --git a/pool_process_query-2.0.1.patch b/pool_process_query-2.0.1.patch new file mode 100644 index 0000000..2cfa994 --- /dev/null +++ b/pool_process_query-2.0.1.patch @@ -0,0 +1,27 @@ +*** pool_process_query.c 2007/11/21 09:37:39 1.79 +--- pool_process_query.c.old 2007/12/01 13:26:36 1.80 +*************** +*** 1,6 **** + /* -*-pgsql-c-*- */ + /* +! * $Header: /home/fedora/jkeating/pkgs/rpms/postgresql-pgpool-II/EL-6/Attic/pool_process_query-2.0.1.patch,v 1.1 2008/01/14 08:24:24 devrim Exp $ + * + * pgpool: a language independent connection pool server for PostgreSQL + * written by Tatsuo Ishii +--- 1,6 ---- + /* -*-pgsql-c-*- */ + /* +! * $Header: /home/fedora/jkeating/pkgs/rpms/postgresql-pgpool-II/EL-6/Attic/pool_process_query-2.0.1.patch,v 1.1 2008/01/14 08:24:24 devrim Exp $ + * + * pgpool: a language independent connection pool server for PostgreSQL + * written by Tatsuo Ishii +*************** POOL_STATUS SimpleForwardToBackend(char +*** 3895,3901 **** + + if (kind == 'S') /* Sync message? */ + { +- pool_log("YYYYY"); + receive_sync = 1; + } + +--- 3895,3900 ---- diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index c2ea3e9..09af754 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -11,6 +11,7 @@ Source0: http://pgfoundry.org/frs/download.php/1521/%{short_name}-%{version}.tar Source1: pgpool.init Source2: pgpool.sysconfig Patch1: pgpool.conf.sample.patch +Patch4: pool_process_query-%{version}.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: postgresql-devel pam-devel @@ -37,7 +38,7 @@ DB nodes to be connected, which was not possible in pgpool-I. %package devel Summary: The development files for pgpool-II Group: Development/Libraries -Requires: %{name} = %{version} +Requires: %{short_name} = %{version} %description devel Development headers and libraries for pgpool-II. @@ -45,6 +46,7 @@ Development headers and libraries for pgpool-II. %prep %setup -q -n %{short_name}-%{version} %patch1 -p0 +%patch4 -p0 %build %configure --with-pgsql-includedir=%{_includedir}/pgsql --with-pgsql-lib=%{_libdir}/pgsql --disable-static --with-pam --disable-rpath @@ -54,10 +56,8 @@ make %{?_smp_flags} %install rm -rf %{buildroot} make %{?_smp_flags} DESTDIR=%{buildroot} install -install -d %{buildroot}%{_datadir}/%{name} -mv %{buildroot}/%{_sysconfdir}/*.conf.sample %{buildroot}%{_datadir}/%{name} -mv %{buildroot}%{_datadir}/%{short_name}/system_db.sql %{buildroot}%{_datadir}/%{name} -mv %{buildroot}%{_datadir}/%{short_name}/pgpool.pam %{buildroot}%{_datadir}/%{name} +install -d %{buildroot}%{_datadir}/%{short_name} +mv %{buildroot}/%{_sysconfdir}/*.conf.sample %{buildroot}%{_datadir}/%{short_name} install -d %{buildroot}%{_initrddir} install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/pgpool install -d %{buildroot}%{_sysconfdir}/sysconfig @@ -85,15 +85,15 @@ chkconfig --add pgpool %{_bindir}/pcp_node_info %{_bindir}/pcp_proc_count %{_bindir}/pcp_proc_info -%{_bindir}/pcp_recovery_node %{_bindir}/pcp_stop_pgpool +%{_bindir}/pcp_recovery_node %{_bindir}/pcp_systemdb_info %{_bindir}/pg_md5 %{_mandir}/man8/pgpool* -%{_datadir}/%{name}/system_db.sql +%{_datadir}/%{short_name}/system_db.sql %{_libdir}/libpcp.so.* -%attr(764,root,apache) %{_datadir}/%{name}/*.conf.sample -%{_datadir}/%{name}/pgpool.pam +%attr(764,root,apache) %{_datadir}/%{short_name}/*.conf.sample +%{_datadir}/%{short_name}/pgpool.pam %{_initrddir}/pgpool %config(noreplace) %{_sysconfdir}/sysconfig/pgpool @@ -104,8 +104,9 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog -* Sat Jan 5 2008 Devrim Gunduz 2.0.1-1 +* Sun Jan 13 2008 Devrim Gunduz 2.0.1-1 - Update to 2.0.1 +- Add a temp patch that will disappear in 2.0.2 * Tue Oct 23 2007 Devrim Gunduz 1.3-1 - Update to 1.3 From 81283249c83cb67c804ec9a4972ec334cd6bbc9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Sun, 20 Jan 2008 00:56:54 +0000 Subject: [PATCH 10/46] Fix Requires of -devel package, per bz#429436 --- postgresql-pgpool-II.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 09af754..2b10f83 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -3,7 +3,7 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} Version: 2.0.1 -Release: 1%{?dist} +Release: 2%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en @@ -38,7 +38,7 @@ DB nodes to be connected, which was not possible in pgpool-I. %package devel Summary: The development files for pgpool-II Group: Development/Libraries -Requires: %{short_name} = %{version} +Requires: %{name} = %{version} %description devel Development headers and libraries for pgpool-II. @@ -104,6 +104,9 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog +* Sat Jan 19 2008 Devrim Gunduz 2.0.1-2 +- Fix Requires of -devel package, per bz#429436 + * Sun Jan 13 2008 Devrim Gunduz 2.0.1-1 - Update to 2.0.1 - Add a temp patch that will disappear in 2.0.2 From 0d7b97eab561a373189db7e064571dce59c3b10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Tue, 22 Jan 2008 03:59:48 +0000 Subject: [PATCH 11/46] - Rebuilt against PostgreSQL 8.3 --- postgresql-pgpool-II.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 2b10f83..14588fc 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -3,7 +3,7 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} Version: 2.0.1 -Release: 2%{?dist} +Release: 2%{?dist}.1 License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en @@ -104,6 +104,9 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog +* Mon Jan 21 2008 Devrim GUNDUZ 2.0.1-2.1 +- Rebuilt against PostgreSQL 8.3 + * Sat Jan 19 2008 Devrim Gunduz 2.0.1-2 - Fix Requires of -devel package, per bz#429436 From 12a91aabff7d3ec80968f94d9789001d699a934d Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 19 Feb 2008 01:27:41 +0000 Subject: [PATCH 12/46] - Autorebuild for GCC 4.3 --- postgresql-pgpool-II.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 14588fc..a599e93 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -3,7 +3,7 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} Version: 2.0.1 -Release: 2%{?dist}.1 +Release: 3%{?dist}.1 License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en @@ -104,6 +104,9 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog +* Mon Feb 18 2008 Fedora Release Engineering - 2.0.1-3.1 +- Autorebuild for GCC 4.3 + * Mon Jan 21 2008 Devrim GUNDUZ 2.0.1-2.1 - Rebuilt against PostgreSQL 8.3 From 5274b97c81ffe72b36487160bba00d2c87bbf512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Sun, 6 Apr 2008 16:37:31 +0000 Subject: [PATCH 13/46] Update to 2.1 beta2 Remove unneeded patch. --- pool_process_query-2.0.1.patch | 27 --------------------------- postgresql-pgpool-II.spec | 19 +++++++++++-------- 2 files changed, 11 insertions(+), 35 deletions(-) delete mode 100644 pool_process_query-2.0.1.patch diff --git a/pool_process_query-2.0.1.patch b/pool_process_query-2.0.1.patch deleted file mode 100644 index 2cfa994..0000000 --- a/pool_process_query-2.0.1.patch +++ /dev/null @@ -1,27 +0,0 @@ -*** pool_process_query.c 2007/11/21 09:37:39 1.79 ---- pool_process_query.c.old 2007/12/01 13:26:36 1.80 -*************** -*** 1,6 **** - /* -*-pgsql-c-*- */ - /* -! * $Header: /home/fedora/jkeating/pkgs/rpms/postgresql-pgpool-II/EL-6/Attic/pool_process_query-2.0.1.patch,v 1.1 2008/01/14 08:24:24 devrim Exp $ - * - * pgpool: a language independent connection pool server for PostgreSQL - * written by Tatsuo Ishii ---- 1,6 ---- - /* -*-pgsql-c-*- */ - /* -! * $Header: /home/fedora/jkeating/pkgs/rpms/postgresql-pgpool-II/EL-6/Attic/pool_process_query-2.0.1.patch,v 1.1 2008/01/14 08:24:24 devrim Exp $ - * - * pgpool: a language independent connection pool server for PostgreSQL - * written by Tatsuo Ishii -*************** POOL_STATUS SimpleForwardToBackend(char -*** 3895,3901 **** - - if (kind == 'S') /* Sync message? */ - { -- pool_log("YYYYY"); - receive_sync = 1; - } - ---- 3895,3900 ---- diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index a599e93..a831769 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -2,16 +2,15 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} -Version: 2.0.1 -Release: 3%{?dist}.1 +Version: 2.1 +Release: beta2%{?dist}.1 License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en -Source0: http://pgfoundry.org/frs/download.php/1521/%{short_name}-%{version}.tar.gz +Source0: http://pgfoundry.org/frs/download.php/1726/%{short_name}-%{version}.tar.gz Source1: pgpool.init Source2: pgpool.sysconfig Patch1: pgpool.conf.sample.patch -Patch4: pool_process_query-%{version}.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: postgresql-devel pam-devel @@ -38,15 +37,14 @@ DB nodes to be connected, which was not possible in pgpool-I. %package devel Summary: The development files for pgpool-II Group: Development/Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{version}-beta2 %description devel Development headers and libraries for pgpool-II. %prep -%setup -q -n %{short_name}-%{version} +%setup -q -n %{short_name}-%{version}-beta2 %patch1 -p0 -%patch4 -p0 %build %configure --with-pgsql-includedir=%{_includedir}/pgsql --with-pgsql-lib=%{_libdir}/pgsql --disable-static --with-pam --disable-rpath @@ -58,6 +56,8 @@ rm -rf %{buildroot} make %{?_smp_flags} DESTDIR=%{buildroot} install install -d %{buildroot}%{_datadir}/%{short_name} mv %{buildroot}/%{_sysconfdir}/*.conf.sample %{buildroot}%{_datadir}/%{short_name} +mv %{buildroot}%{_datadir}/%{short_name}/system_db.sql %{buildroot}%{_datadir}/%{name} +mv %{buildroot}%{_datadir}/%{short_name}/pgpool.pam %{buildroot}%{_datadir}/%{name} install -d %{buildroot}%{_initrddir} install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/pgpool install -d %{buildroot}%{_sysconfdir}/sysconfig @@ -85,8 +85,8 @@ chkconfig --add pgpool %{_bindir}/pcp_node_info %{_bindir}/pcp_proc_count %{_bindir}/pcp_proc_info -%{_bindir}/pcp_stop_pgpool %{_bindir}/pcp_recovery_node +%{_bindir}/pcp_stop_pgpool %{_bindir}/pcp_systemdb_info %{_bindir}/pg_md5 %{_mandir}/man8/pgpool* @@ -104,6 +104,9 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog +* Sun Apr 6 2008 Devrim Gunduz 2.1-beta2 +- Update to 2.1 beta2 + * Mon Feb 18 2008 Fedora Release Engineering - 2.0.1-3.1 - Autorebuild for GCC 4.3 From bc5c64798219ef842115c6e9c1566cf7e894dfcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Sun, 6 Apr 2008 16:53:04 +0000 Subject: [PATCH 14/46] Update sources --- .cvsignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.cvsignore b/.cvsignore index 797f93b..4ca0bb8 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pgpool-II-2.0.1.tar.gz +pgpool-II-2.1-beta2.tar.gz diff --git a/sources b/sources index 84948dd..61b5efb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fdfd023b1400ae85455e8274bf0cb502 pgpool-II-2.0.1.tar.gz +cb0cc6cc44695224c74d5835cef345b0 pgpool-II-2.1-beta2.tar.gz From 0703e24b9a170306d7a3cf2f2ef7b09fb5f896a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Sun, 6 Apr 2008 16:54:53 +0000 Subject: [PATCH 15/46] Fix spec --- postgresql-pgpool-II.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index a831769..717906e 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -7,7 +7,7 @@ Release: beta2%{?dist}.1 License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en -Source0: http://pgfoundry.org/frs/download.php/1726/%{short_name}-%{version}.tar.gz +Source0: http://pgfoundry.org/frs/download.php/1726/%{short_name}-%{version}-beta2.tar.gz Source1: pgpool.init Source2: pgpool.sysconfig Patch1: pgpool.conf.sample.patch From 8a20dbc2bba6c29aba86b86300c60fb99911f980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Sun, 6 Apr 2008 17:11:29 +0000 Subject: [PATCH 16/46] Copy-paste is evil. --- postgresql-pgpool-II.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 717906e..8f5ae43 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -56,8 +56,6 @@ rm -rf %{buildroot} make %{?_smp_flags} DESTDIR=%{buildroot} install install -d %{buildroot}%{_datadir}/%{short_name} mv %{buildroot}/%{_sysconfdir}/*.conf.sample %{buildroot}%{_datadir}/%{short_name} -mv %{buildroot}%{_datadir}/%{short_name}/system_db.sql %{buildroot}%{_datadir}/%{name} -mv %{buildroot}%{_datadir}/%{short_name}/pgpool.pam %{buildroot}%{_datadir}/%{name} install -d %{buildroot}%{_initrddir} install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/pgpool install -d %{buildroot}%{_sysconfdir}/sysconfig From a0f996761ccf84cc3a1522743143682f94caac0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Wed, 9 Apr 2008 06:36:47 +0000 Subject: [PATCH 17/46] - Honor /etc/sysconfig/pgpool settings. Previously we could never customize PGPOOLPID=/var/run/pgpool.pid et al. - Remaining hardcoded paths replaced by customizable variables such as $PGPOOLCONF . --- pgpool.init | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/pgpool.init b/pgpool.init index 8c96220..89aa399 100755 --- a/pgpool.init +++ b/pgpool.init @@ -8,11 +8,12 @@ # # v1.0.0 Devrim GUNDUZ # - Initial version of Red Hat / Fedora init script - -if [ -r /etc/sysconfig/pgpool ]; then - . /etc/sysconfig/pgpool -fi - +# v1.0.1 Devrim GUNDUZ +# - - Honor /etc/sysconfig/pgpool settings. Previously we could never +# customize PGPOOLPID=/var/run/pgpool.pid et al. +# - Remaining hardcoded paths replaced by customizable variables +# such as $PGPOOLCONF . + # Source function library. INITD=/etc/rc.d/init.d . $INITD/functions @@ -37,16 +38,21 @@ PGPOOLCONF=/etc/pgpool.conf PGPOOLPID=/var/run/pgpool.pid PGPOOLLOG=/var/log/pgpool.log +# read in the site custom setup +if [ -r /etc/sysconfig/pgpool ]; then + . /etc/sysconfig/pgpool +fi + test -x $PGPOOLDAEMON || exit 5 -# Create the log file if it does not exist +# Create the pgpool.log log file if it does not exist if [ ! -r $PGPOOLLOG ] then touch $PGPOOLLOG fi -# Check whether the config file exists or not -if [ ! -r /etc/pgpool.conf ] +# Check whether the pgpool.conf config file exists or not +if [ ! -r "$PGPOOLCONF" ] then echo "$PGPOOLCONF not found" RETVAL=1 @@ -82,7 +88,7 @@ stop(){ RETVAL=1 failure else - killproc /usr/bin/pgpool + killproc $PGPOOLDAEMON RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/${NAME} fi; From 9f16de338af827c84e5b6856f7b639984bd3dac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Fri, 11 Apr 2008 18:25:54 +0000 Subject: [PATCH 18/46] - Fix Requires: issue, per #442021 (Alex Lancaster) --- postgresql-pgpool-II.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 8f5ae43..f59ec96 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -3,7 +3,7 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} Version: 2.1 -Release: beta2%{?dist}.1 +Release: 0.2.beta2%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en @@ -37,7 +37,7 @@ DB nodes to be connected, which was not possible in pgpool-I. %package devel Summary: The development files for pgpool-II Group: Development/Libraries -Requires: %{name} = %{version}-beta2 +Requires: %{name} = %{version}-%{release} %description devel Development headers and libraries for pgpool-II. @@ -102,6 +102,9 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog +* Fri Apr 11 2008 Devrim Gunduz 2.1-0.2.beta2 +- Fix Requires: issue, per #442021 (Alex Lancaster) + * Sun Apr 6 2008 Devrim Gunduz 2.1-beta2 - Update to 2.1 beta2 From 5de2a7b051d561acef93c61683dd3dad21850fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Tue, 12 Aug 2008 05:06:59 +0000 Subject: [PATCH 19/46] - Update to 2.1 Gold - Set group of sample config files to root, not apache. Fixes RH #442372. --- .cvsignore | 2 +- postgresql-pgpool-II.spec | 12 ++++++++---- sources | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index 4ca0bb8..4f063bc 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pgpool-II-2.1-beta2.tar.gz +pgpool-II-2.1.tar.gz diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index f59ec96..795cd45 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -3,11 +3,11 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} Version: 2.1 -Release: 0.2.beta2%{?dist} +Release: 1%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en -Source0: http://pgfoundry.org/frs/download.php/1726/%{short_name}-%{version}-beta2.tar.gz +Source0: http://pgfoundry.org/frs/download.php/1843/%{short_name}-%{version}.tar.gz Source1: pgpool.init Source2: pgpool.sysconfig Patch1: pgpool.conf.sample.patch @@ -43,7 +43,7 @@ Requires: %{name} = %{version}-%{release} Development headers and libraries for pgpool-II. %prep -%setup -q -n %{short_name}-%{version}-beta2 +%setup -q -n %{short_name}-%{version} %patch1 -p0 %build @@ -90,7 +90,7 @@ chkconfig --add pgpool %{_mandir}/man8/pgpool* %{_datadir}/%{short_name}/system_db.sql %{_libdir}/libpcp.so.* -%attr(764,root,apache) %{_datadir}/%{short_name}/*.conf.sample +%attr(764,root,root) %{_datadir}/%{short_name}/*.conf.sample %{_datadir}/%{short_name}/pgpool.pam %{_initrddir}/pgpool %config(noreplace) %{_sysconfdir}/sysconfig/pgpool @@ -102,6 +102,10 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog +* Tue Aug 12 2008 Devrim Gunduz 2.1-1 +- Update to 2.1 Gold +- Set group of sample config files to root, not apache. Fixes RH #442372. + * Fri Apr 11 2008 Devrim Gunduz 2.1-0.2.beta2 - Fix Requires: issue, per #442021 (Alex Lancaster) diff --git a/sources b/sources index 61b5efb..64b0bb8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cb0cc6cc44695224c74d5835cef345b0 pgpool-II-2.1-beta2.tar.gz +cf02f9358f46849bd526798868e13162 pgpool-II-2.1.tar.gz From 27e5c99753cca60aed2c0acabe9408087f4d93f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Tue, 12 Aug 2008 05:34:21 +0000 Subject: [PATCH 20/46] - Update patch #1: Fix build failure caused by new default patch fuzz = 0 policy in rawhide --- pgpool.conf.sample.patch | 8 ++++---- postgresql-pgpool-II.spec | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pgpool.conf.sample.patch b/pgpool.conf.sample.patch index 275dda3..adc6dee 100644 --- a/pgpool.conf.sample.patch +++ b/pgpool.conf.sample.patch @@ -1,5 +1,5 @@ ---- pgpool.conf.sample.old 2007-10-05 17:16:23.000000000 -0700 -+++ pgpool.conf.sample 2007-10-05 17:18:11.000000000 -0700 +--- pgpool.conf.sample.old 2008-08-12 08:26:07.000000000 +0300 ++++ pgpool.conf.sample 2008-08-12 08:27:31.000000000 +0300 @@ -12,16 +12,14 @@ # Port number for pgpool communication manager pcp_port = 9898 @@ -22,8 +22,8 @@ # pgpool communication manager timeout. 0 means no timeout, but strongly not recommended! pcp_timeout = 10 -@@ -44,7 +42,7 @@ - child_max_connections = 0 +@@ -54,7 +52,7 @@ + authentication_timeout = 60 # Logging directory -logdir = '/tmp' diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 795cd45..bd849ea 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -105,6 +105,8 @@ chkconfig --add pgpool * Tue Aug 12 2008 Devrim Gunduz 2.1-1 - Update to 2.1 Gold - Set group of sample config files to root, not apache. Fixes RH #442372. +- Update patch #1: Fix build failure caused by new default patch +fuzz = 0 policy in rawhide * Fri Apr 11 2008 Devrim Gunduz 2.1-0.2.beta2 - Fix Requires: issue, per #442021 (Alex Lancaster) From 430347270e550b24e2080d81b590a71ea1357f07 Mon Sep 17 00:00:00 2001 From: Michael Schwendt Date: Thu, 4 Dec 2008 21:01:13 +0000 Subject: [PATCH 21/46] - Include /usr/share/pgpool-II directory. --- postgresql-pgpool-II.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index bd849ea..ce829ad 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -3,7 +3,7 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} Version: 2.1 -Release: 1%{?dist} +Release: 2%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en @@ -88,6 +88,7 @@ chkconfig --add pgpool %{_bindir}/pcp_systemdb_info %{_bindir}/pg_md5 %{_mandir}/man8/pgpool* +%dir %{_datadir}/%{short_name} %{_datadir}/%{short_name}/system_db.sql %{_libdir}/libpcp.so.* %attr(764,root,root) %{_datadir}/%{short_name}/*.conf.sample @@ -102,6 +103,9 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog +* Thu Dec 4 2008 Michael Schwendt 2.1-2 +- Include /usr/share/pgpool-II directory. + * Tue Aug 12 2008 Devrim Gunduz 2.1-1 - Update to 2.1 Gold - Set group of sample config files to root, not apache. Fixes RH #442372. From bda684622b350a045447948a3a8bf4f0bd922a72 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Fri, 27 Feb 2009 01:50:05 +0000 Subject: [PATCH 22/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- postgresql-pgpool-II.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index ce829ad..5f5ebb2 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -3,7 +3,7 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} Version: 2.1 -Release: 2%{?dist} +Release: 3%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en @@ -103,6 +103,9 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog +* Thu Feb 26 2009 Fedora Release Engineering - 2.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Thu Dec 4 2008 Michael Schwendt 2.1-2 - Include /usr/share/pgpool-II directory. From 55ea982ee2a435a0d50b3fd161c91fbe4c6ac758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Sun, 1 Mar 2009 14:57:57 +0000 Subject: [PATCH 23/46] Update to 2.2 --- .cvsignore | 2 +- postgresql-pgpool-II.spec | 12 ++++++++---- sources | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index 4f063bc..5ee1445 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pgpool-II-2.1.tar.gz +pgpool-II-2.2.tar.gz diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 5f5ebb2..d33c4cf 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -2,12 +2,12 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} -Version: 2.1 -Release: 3%{?dist} +Version: 2.2 +Release: 1%{?dist} License: BSD Group: Applications/Databases -URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en -Source0: http://pgfoundry.org/frs/download.php/1843/%{short_name}-%{version}.tar.gz +URL: http://pgpool.projects.PostgreSQL.org +Source0: http://pgfoundry.org/frs/download.php/2108/%{short_name}-%{version}.tar.gz Source1: pgpool.init Source2: pgpool.sysconfig Patch1: pgpool.conf.sample.patch @@ -103,6 +103,10 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog +* Sun Mar 1 2009 Devrim Gunduz 2.2-1 +- Update to 2.2 +- Update URL + * Thu Feb 26 2009 Fedora Release Engineering - 2.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild diff --git a/sources b/sources index 64b0bb8..f978d1a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cf02f9358f46849bd526798868e13162 pgpool-II-2.1.tar.gz +3dc286e2217478acbc05f127e74bd300 pgpool-II-2.2.tar.gz From 51f5c4c3afa1caa51e96b48b4a0cde1373c8e660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Sun, 22 Mar 2009 23:56:40 +0000 Subject: [PATCH 24/46] - Fix pid file path in init script. - Fix spec file -- we don't use short_name macro in pgcore spec file. - Create pgpool pid file directory. - Fix stop/start routines, also improve init script a bit. - Install conf files to a new directory (/etc/pgpool-II), and get rid of sample conf files. --- pgpool.conf.sample.patch | 37 ++++++++++------ pgpool.init | 88 +++++++++++++++++++++++---------------- postgresql-pgpool-II.spec | 12 +++++- 3 files changed, 88 insertions(+), 49 deletions(-) diff --git a/pgpool.conf.sample.patch b/pgpool.conf.sample.patch index adc6dee..81d10ca 100644 --- a/pgpool.conf.sample.patch +++ b/pgpool.conf.sample.patch @@ -1,24 +1,22 @@ ---- pgpool.conf.sample.old 2008-08-12 08:26:07.000000000 +0300 -+++ pgpool.conf.sample 2008-08-12 08:27:31.000000000 +0300 +--- pgpool.conf.sample.old 2009-03-22 22:18:52.000000000 +0200 ++++ pgpool.conf.sample 2009-03-22 22:46:20.000000000 +0200 @@ -12,16 +12,14 @@ # Port number for pgpool communication manager pcp_port = 9898 -# Unix domain socket path. (The Debian package defaults to -# /var/run/postgresql.) --socket_dir = '/tmp' -+# Unix domain socket path. -+socket_dir = '/var/run' ++# Unix domain socket path. + socket_dir = '/tmp' # Unix domain socket path for pgpool communication manager. -# (Debian package defaults to /var/run/postgresql) --pcp_socket_dir = '/tmp' -+pcp_socket_dir = '/var/run' + pcp_socket_dir = '/tmp' -# Unix domain socket path for the backend. Debian package defaults to /var/run/postgresql! -backend_socket_dir = '/tmp' -+# Unix domain socket path for the backend. -+backend_socket_dir = '/var/run' ++# Unix domain socket path for the backend. ++backend_socket_dir = '/var/run/pgpool' # pgpool communication manager timeout. 0 means no timeout, but strongly not recommended! pcp_timeout = 10 @@ -27,7 +25,22 @@ # Logging directory -logdir = '/tmp' -+logdir = '/var/run' ++logdir = '/var/log/pgpool' - # Replication mode - replication_mode = false + # pid file name + pid_file_name = '/var/run/pgpool/pgpool.pid' +@@ -166,10 +164,10 @@ + + # backend_hostname, backend_port, backend_weight + # here are examples +-#backend_hostname0 = 'host1' +-#backend_port0 = 5432 +-#backend_weight0 = 1 +-#backend_data_directory0 = '/data' ++backend_hostname0 = 'localhost' ++backend_port0 = 5432 ++backend_weight0 = 1 ++backend_data_directory0 = '/var/lib/pgsql/data' + #backend_hostname1 = 'host2' + #backend_port1 = 5433 + #backend_weight1 = 1 diff --git a/pgpool.init b/pgpool.init index 89aa399..aaf23de 100755 --- a/pgpool.init +++ b/pgpool.init @@ -8,12 +8,11 @@ # # v1.0.0 Devrim GUNDUZ # - Initial version of Red Hat / Fedora init script -# v1.0.1 Devrim GUNDUZ -# - - Honor /etc/sysconfig/pgpool settings. Previously we could never -# customize PGPOOLPID=/var/run/pgpool.pid et al. -# - Remaining hardcoded paths replaced by customizable variables -# such as $PGPOOLCONF . - + +if [ -r /etc/sysconfig/pgpool ]; then + . /etc/sysconfig/pgpool +fi + # Source function library. INITD=/etc/rc.d/init.d . $INITD/functions @@ -29,30 +28,23 @@ TYPESET=`typeset -f|grep "declare"` [ "${NETWORKING}" = "no" ] && exit 0 # Find the name of the script -NAME=pgpool +NAME=`basename $0` +if [ ${NAME:0:1} = "S" -o ${NAME:0:1} = "K" ] +then + NAME=${NAME:3} +fi # Set defaults for configuration variables PGPOOLENGINE=/usr/bin PGPOOLDAEMON=$PGPOOLENGINE/pgpool -PGPOOLCONF=/etc/pgpool.conf -PGPOOLPID=/var/run/pgpool.pid +PGPOOLCONF=/etc/pgpool-II/pgpool.conf +PGPOOLPIDDIR=/var/run/pgpool PGPOOLLOG=/var/log/pgpool.log -# read in the site custom setup -if [ -r /etc/sysconfig/pgpool ]; then - . /etc/sysconfig/pgpool -fi - test -x $PGPOOLDAEMON || exit 5 -# Create the pgpool.log log file if it does not exist -if [ ! -r $PGPOOLLOG ] -then - touch $PGPOOLLOG -fi - -# Check whether the pgpool.conf config file exists or not -if [ ! -r "$PGPOOLCONF" ] +# Check whether the config file exists or not +if [ ! -r $PGPOOLCONF ] then echo "$PGPOOLCONF not found" RETVAL=1 @@ -60,12 +52,36 @@ then exit fi +# Create the log file if it does not exist +if [ ! -x $PGPOOLLOG ] +then + touch $PGPOOLLOG + chown postgres: $PGPOOLLOG +fi + +if [ ! -d $PGPOOLPIDDIR ] +then + mkdir $PGPOOLPIDDIR + chown postgres: $PGPOOLPIDDIR +fi + script_result=0 start(){ + pid=`pidof -s "$PGPOOLDAEMON"` + if [ $pid ] + then + echo "pgpool is already running with pid $pid" + failure "$PGPOQL_START" + echo + script_result=1 + exit 1 + fi + PGPOOL_START=$"Starting ${NAME} service: " echo -n "$PGPOOL_START" + $PGPOOLDAEMON -f $PGPOOLCONF $OPTS & >> "$PGPOOLLOG" 2>&1 < /dev/null sleep 2 @@ -76,7 +92,7 @@ start(){ touch /var/lock/subsys/${NAME} echo else - failure "$PSQL_START" + failure "$PGPOQL_START" echo script_result=1 fi @@ -88,7 +104,8 @@ stop(){ RETVAL=1 failure else - killproc $PGPOOLDAEMON + killproc /usr/bin/pgpool +# $PGPOOLDAEMON stop & >> "$PGPOOLLOG" 2>&1 < /dev/null RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/${NAME} fi; @@ -98,7 +115,7 @@ stop(){ switch() { echo -n $"Sending switchover request to $NAME " - $PGPOOLDAEMON switch >> "$PGPOOLLOG" 2>&1 < /dev/null + $PGPOOLDAEMON -f $PGPOOLCONF switch >> "$PGPOOLLOG" 2>&1 < /dev/null RETVAL=$? echo if [ $RETVAL -eq 0 ] @@ -116,22 +133,23 @@ restart(){ } reload(){ -echo -n $"Reloading ${NAME}: " - if [ -n "`pidfileofproc $PGPOOLDAEMON`" ] ; then - killproc $PGPOOLDAEMON -HUP - else - failure $"Reloading ${NAME}" - fi - RETVAL=$? - echo + echo -n $"Reloading ${NAME}: " + + if [ -n "`pidfileofproc $PGPOOLDAEMON`" ] ; then + killproc $PGPOOLDAEMON -HUP + else + failure $"Reloading ${NAME}" + fi + RETVAL=$? + echo } condrestart(){ - [ -e /var/lock/subsys/${NAME} ] && restart + [ -e /var/lock/subsys/${NAME} ] && restart } condstop(){ - [ -e /var/lock/subsys/${NAME} ] && stop + [ -e /var/lock/subsys/${NAME} ] && stop } # See how we were called. diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index d33c4cf..574d09f 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -55,7 +55,9 @@ make %{?_smp_flags} rm -rf %{buildroot} make %{?_smp_flags} DESTDIR=%{buildroot} install install -d %{buildroot}%{_datadir}/%{short_name} -mv %{buildroot}/%{_sysconfdir}/*.conf.sample %{buildroot}%{_datadir}/%{short_name} +mv %{buildroot}/%{_sysconfdir}/%{name}/pcp.conf.sample %{buildroot}%{_sysconfdir}/%{short_name}/pcp.conf +mv %{buildroot}/%{_sysconfdir}/%{name}/pgpool.conf.sample %{buildroot}%{_sysconfdir}/%{short_name}/pgpool.conf +mv %{buildroot}/%{_sysconfdir}/%{name}/pool_hba.conf.sample %{buildroot}%{_sysconfdir}/%{short_name}/pool_hba.conf install -d %{buildroot}%{_initrddir} install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/pgpool install -d %{buildroot}%{_sysconfdir}/sysconfig @@ -91,9 +93,9 @@ chkconfig --add pgpool %dir %{_datadir}/%{short_name} %{_datadir}/%{short_name}/system_db.sql %{_libdir}/libpcp.so.* -%attr(764,root,root) %{_datadir}/%{short_name}/*.conf.sample %{_datadir}/%{short_name}/pgpool.pam %{_initrddir}/pgpool +%attr(764,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/*.conf %config(noreplace) %{_sysconfdir}/sysconfig/pgpool %files devel @@ -106,6 +108,12 @@ chkconfig --add pgpool * Sun Mar 1 2009 Devrim Gunduz 2.2-1 - Update to 2.2 - Update URL +- Fix pid file path in init script. +- Fix spec file -- we don't use short_name macro in pgcore spec file. +- Create pgpool pid file directory. +- Fix stop/start routines, also improve init script a bit. +- Install conf files to a new directory (/etc/pgpool-II), and get rid + of sample conf files. * Thu Feb 26 2009 Fedora Release Engineering - 2.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From 50e5cf97a78e317efa00688b9bf7ac8a8293b6b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Mon, 23 Mar 2009 00:05:40 +0000 Subject: [PATCH 25/46] Fix dir name. --- postgresql-pgpool-II.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 574d09f..5eb0783 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -95,7 +95,7 @@ chkconfig --add pgpool %{_libdir}/libpcp.so.* %{_datadir}/%{short_name}/pgpool.pam %{_initrddir}/pgpool -%attr(764,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/*.conf +%attr(764,root,apache) %config(noreplace) %{_sysconfdir}/%{short_name}/*.conf %config(noreplace) %{_sysconfdir}/sysconfig/pgpool %files devel From 6cbfaaa918d5ac15732087b5573b7013f72c1f9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Mon, 23 Mar 2009 00:08:17 +0000 Subject: [PATCH 26/46] Bump up release number, and also fix changelog. --- postgresql-pgpool-II.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 5eb0783..423de22 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -3,7 +3,7 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} Version: 2.2 -Release: 1%{?dist} +Release: 1%{?dist}.1 License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org @@ -105,9 +105,7 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog -* Sun Mar 1 2009 Devrim Gunduz 2.2-1 -- Update to 2.2 -- Update URL +* Mon Mar 23 2009 Devrim Gunduz 2.2-1.1 - Fix pid file path in init script. - Fix spec file -- we don't use short_name macro in pgcore spec file. - Create pgpool pid file directory. @@ -115,6 +113,10 @@ chkconfig --add pgpool - Install conf files to a new directory (/etc/pgpool-II), and get rid of sample conf files. +* Sun Mar 1 2009 Devrim Gunduz 2.2-1 +- Update to 2.2 +- Update URL + * Thu Feb 26 2009 Fedora Release Engineering - 2.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From 44c5231ce668cb18e302f6ebb5eb2f9af61c2b6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Mon, 23 Mar 2009 00:20:18 +0000 Subject: [PATCH 27/46] Fix configure line. --- postgresql-pgpool-II.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 423de22..8dbf735 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -47,7 +47,7 @@ Development headers and libraries for pgpool-II. %patch1 -p0 %build -%configure --with-pgsql-includedir=%{_includedir}/pgsql --with-pgsql-lib=%{_libdir}/pgsql --disable-static --with-pam --disable-rpath +%configure --with-pgsql-includedir=%{_includedir}/pgsql --with-pgsql-lib=%{_libdir}/pgsql --disable-static --with-pam --disable-rpath --sysconfdir=%{_sysconfdir}/%{name}/ make %{?_smp_flags} From 5a86628ceaf6bd66d9883e85ffd92a01fed7b991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Mon, 23 Mar 2009 00:26:27 +0000 Subject: [PATCH 28/46] Use correct macro. --- postgresql-pgpool-II.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 8dbf735..d1455d6 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -47,7 +47,7 @@ Development headers and libraries for pgpool-II. %patch1 -p0 %build -%configure --with-pgsql-includedir=%{_includedir}/pgsql --with-pgsql-lib=%{_libdir}/pgsql --disable-static --with-pam --disable-rpath --sysconfdir=%{_sysconfdir}/%{name}/ +%configure --with-pgsql-includedir=%{_includedir}/pgsql --with-pgsql-lib=%{_libdir}/pgsql --disable-static --with-pam --disable-rpath --sysconfdir=%{_sysconfdir}/%{short_name}/ make %{?_smp_flags} From 10ef3ec549d4f465ce4da0a5ece944d7708b20d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Mon, 23 Mar 2009 00:50:17 +0000 Subject: [PATCH 29/46] bump up init script version --- pgpool.init | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pgpool.init b/pgpool.init index aaf23de..ee791c7 100755 --- a/pgpool.init +++ b/pgpool.init @@ -8,6 +8,9 @@ # # v1.0.0 Devrim GUNDUZ # - Initial version of Red Hat / Fedora init script +# +# v2.2 Devrim GUNDUZ +# - New and improved version which has some fixes. if [ -r /etc/sysconfig/pgpool ]; then . /etc/sysconfig/pgpool From 446256753d89374079549c5e77ee645816cab43d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Mon, 23 Mar 2009 00:58:03 +0000 Subject: [PATCH 30/46] Install new conf directory. --- postgresql-pgpool-II.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index d1455d6..b5dcc44 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -55,9 +55,10 @@ make %{?_smp_flags} rm -rf %{buildroot} make %{?_smp_flags} DESTDIR=%{buildroot} install install -d %{buildroot}%{_datadir}/%{short_name} -mv %{buildroot}/%{_sysconfdir}/%{name}/pcp.conf.sample %{buildroot}%{_sysconfdir}/%{short_name}/pcp.conf -mv %{buildroot}/%{_sysconfdir}/%{name}/pgpool.conf.sample %{buildroot}%{_sysconfdir}/%{short_name}/pgpool.conf -mv %{buildroot}/%{_sysconfdir}/%{name}/pool_hba.conf.sample %{buildroot}%{_sysconfdir}/%{short_name}/pool_hba.conf +install -d %{buildroot}%{_sysconfdir}/%{short_name} +mv %{buildroot}/%{_sysconfdir}/%{short_name}/pcp.conf.sample %{buildroot}%{_sysconfdir}/%{short_name}/pcp.conf +mv %{buildroot}/%{_sysconfdir}/%{short_name}/pgpool.conf.sample %{buildroot}%{_sysconfdir}/%{short_name}/pgpool.conf +mv %{buildroot}/%{_sysconfdir}/%{short_name}/pool_hba.conf.sample %{buildroot}%{_sysconfdir}/%{short_name}/pool_hba.conf install -d %{buildroot}%{_initrddir} install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/pgpool install -d %{buildroot}%{_sysconfdir}/sysconfig From 8d1a67e6df3193ad378454c2fdfa4892bde71c43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Thu, 7 May 2009 10:42:03 +0000 Subject: [PATCH 31/46] Update to 2.2.2 --- .cvsignore | 1 + postgresql-pgpool-II.spec | 9 ++++++--- sources | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 5ee1445..9ccf1e0 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ pgpool-II-2.2.tar.gz +pgpool-II-2.2.2.tar.gz diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index b5dcc44..eea564d 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -2,12 +2,12 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} -Version: 2.2 -Release: 1%{?dist}.1 +Version: 2.2.2 +Release: 1%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org -Source0: http://pgfoundry.org/frs/download.php/2108/%{short_name}-%{version}.tar.gz +Source0: http://pgfoundry.org/frs/download.php/2191/%{short_name}-%{version}.tar.gz Source1: pgpool.init Source2: pgpool.sysconfig Patch1: pgpool.conf.sample.patch @@ -106,6 +106,9 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog +* Thu May 7 2009 Devrim Gunduz 2.2.2-1 +- Update to 2.2.2 + * Mon Mar 23 2009 Devrim Gunduz 2.2-1.1 - Fix pid file path in init script. - Fix spec file -- we don't use short_name macro in pgcore spec file. diff --git a/sources b/sources index f978d1a..4c543f0 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 3dc286e2217478acbc05f127e74bd300 pgpool-II-2.2.tar.gz +6f14514ed4ed5368ad3ab7e2d4c5136b pgpool-II-2.2.2.tar.gz From 06bab1d01deadbf21013a1140a8e599dc6c41574 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sun, 26 Jul 2009 19:16:22 +0000 Subject: [PATCH 32/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- postgresql-pgpool-II.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index eea564d..ef70119 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -3,7 +3,7 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} Version: 2.2.2 -Release: 1%{?dist} +Release: 2%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org @@ -106,6 +106,9 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog +* Sun Jul 26 2009 Fedora Release Engineering - 2.2.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Thu May 7 2009 Devrim Gunduz 2.2.2-1 - Update to 2.2.2 From ae5192bfeb97559df1a36255fc9d5f3f522006ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Fri, 2 Oct 2009 23:23:25 +0000 Subject: [PATCH 33/46] - Update to 2.2.4 - Re-apply a fix for #442372 --- .cvsignore | 3 +-- postgresql-pgpool-II.spec | 12 ++++++++---- sources | 3 +-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.cvsignore b/.cvsignore index 9ccf1e0..c246731 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1 @@ -pgpool-II-2.2.tar.gz -pgpool-II-2.2.2.tar.gz +pgpool-II-2.2.4.tar.gz diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index ef70119..196c60e 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -2,12 +2,12 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} -Version: 2.2.2 -Release: 2%{?dist} +Version: 2.2.4 +Release: 1%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org -Source0: http://pgfoundry.org/frs/download.php/2191/%{short_name}-%{version}.tar.gz +Source0: http://pgfoundry.org/frs/download.php/2362/%{short_name}-%{version}.tar.gz Source1: pgpool.init Source2: pgpool.sysconfig Patch1: pgpool.conf.sample.patch @@ -96,7 +96,7 @@ chkconfig --add pgpool %{_libdir}/libpcp.so.* %{_datadir}/%{short_name}/pgpool.pam %{_initrddir}/pgpool -%attr(764,root,apache) %config(noreplace) %{_sysconfdir}/%{short_name}/*.conf +%attr(764,root,root) %config(noreplace) %{_sysconfdir}/%{short_name}/*.conf %config(noreplace) %{_sysconfdir}/sysconfig/pgpool %files devel @@ -106,6 +106,10 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog +* Sat Oct 3 2009 Devrim Gunduz 2.2.4-1 +- Update to 2.2.4 +- Re-apply a fix for #442372 + * Sun Jul 26 2009 Fedora Release Engineering - 2.2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/sources b/sources index 4c543f0..c2d5885 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -3dc286e2217478acbc05f127e74bd300 pgpool-II-2.2.tar.gz -6f14514ed4ed5368ad3ab7e2d4c5136b pgpool-II-2.2.2.tar.gz +2c9edd0512c5dc1dabab474b563a7a6c pgpool-II-2.2.4.tar.gz From 15fd8bdf944cf1373c1b5a741ac362a55b7c9a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Sun, 4 Oct 2009 10:39:40 +0000 Subject: [PATCH 34/46] - Update to 2.2.5, for various fixes described at http://lists.pgfoundry.org/pipermail/pgpool-general/2009-October/002188 .html --- .cvsignore | 2 +- postgresql-pgpool-II.spec | 8 ++++++-- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index c246731..020f125 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pgpool-II-2.2.4.tar.gz +pgpool-II-2.2.5.tar.gz diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 196c60e..ffe3760 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -2,12 +2,12 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} -Version: 2.2.4 +Version: 2.2.5 Release: 1%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org -Source0: http://pgfoundry.org/frs/download.php/2362/%{short_name}-%{version}.tar.gz +Source0: http://pgfoundry.org/frs/download.php/2423/%{short_name}-%{version}.tar.gz Source1: pgpool.init Source2: pgpool.sysconfig Patch1: pgpool.conf.sample.patch @@ -106,6 +106,10 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog +* Sun Oct 4 2009 Devrim Gunduz 2.2.5-1 +- Update to 2.2.5, for various fixes described at + http://lists.pgfoundry.org/pipermail/pgpool-general/2009-October/002188.html + * Sat Oct 3 2009 Devrim Gunduz 2.2.4-1 - Update to 2.2.4 - Re-apply a fix for #442372 diff --git a/sources b/sources index c2d5885..a04ffe8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2c9edd0512c5dc1dabab474b563a7a6c pgpool-II-2.2.4.tar.gz +410fc3e226842eda25e5cd18e9c3e703 pgpool-II-2.2.5.tar.gz From 607a37b5187226dd8e4d7d1e2e03e40ba9f0cb3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Thu, 22 Oct 2009 11:59:35 +0000 Subject: [PATCH 35/46] Fix logging, per report from Toshihiro Kitagawa. --- pgpool.init | 13 ++++++++++++- pgpool.sysconfig | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pgpool.init b/pgpool.init index ee791c7..f09b982 100755 --- a/pgpool.init +++ b/pgpool.init @@ -11,6 +11,9 @@ # # v2.2 Devrim GUNDUZ # - New and improved version which has some fixes. +# +# v2.2.5 Devrim GUNDUZ +# - Fix logging. if [ -r /etc/sysconfig/pgpool ]; then . /etc/sysconfig/pgpool @@ -37,6 +40,14 @@ then NAME=${NAME:3} fi +# For SELinux we need to use 'runuser' not 'su' +if [ -x /sbin/runuser ] +then + SU=runuser +else + SU=su +fi + # Set defaults for configuration variables PGPOOLENGINE=/usr/bin PGPOOLDAEMON=$PGPOOLENGINE/pgpool @@ -85,7 +96,7 @@ start(){ echo -n "$PGPOOL_START" - $PGPOOLDAEMON -f $PGPOOLCONF $OPTS & >> "$PGPOOLLOG" 2>&1 < /dev/null + $SU -l postgres -c "$PGPOOLDAEMON -f $PGPOOLCONF $OPTS & " >> "$PGPOOLLOG" 2>&1 < /dev/null sleep 2 pid=`pidof -s "$PGPOOLDAEMON"` diff --git a/pgpool.sysconfig b/pgpool.sysconfig index ef8e2e1..221869e 100644 --- a/pgpool.sysconfig +++ b/pgpool.sysconfig @@ -4,3 +4,4 @@ # -d: debug mode. lots of debug information will be printed #OPTS=" -d -n" +OPTS=" -n" From 379be257b647cbd94e176f26c5cffd18b4463398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Sun, 1 Nov 2009 21:44:46 +0000 Subject: [PATCH 36/46] Remove init script from all runlevels before uninstall. Per RH Bugzilla #532177 --- postgresql-pgpool-II.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index ffe3760..ba5b99b 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -3,7 +3,7 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} Version: 2.2.5 -Release: 1%{?dist} +Release: 2%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org @@ -74,6 +74,12 @@ rm -rf %{buildroot} /sbin/ldconfig chkconfig --add pgpool +%preun +if [ $1 = 0 ] ; then + /sbin/service pgpool condstop >/dev/null 2>&1 + chkconfig --del pgpool +fi + %postun -p /sbin/ldconfig %files @@ -106,6 +112,10 @@ chkconfig --add pgpool %{_libdir}/libpcp.so %changelog +* Sun Nov 01 2009 Devrim GUNDUZ - 2.2.5-2 +- Remove init script from all runlevels before uninstall. Per RH Bugzilla + #532177 + * Sun Oct 4 2009 Devrim Gunduz 2.2.5-1 - Update to 2.2.5, for various fixes described at http://lists.pgfoundry.org/pipermail/pgpool-general/2009-October/002188.html From f8f2f5c664096ac23d1df345b877b3451a36495f Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:43:48 +0000 Subject: [PATCH 37/46] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8d78723..02b9831 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ NAME := postgresql-pgpool-II SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 187624cdd2e7a6cdea975031931278f538d0cfb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Tue, 1 Dec 2009 21:46:24 +0000 Subject: [PATCH 38/46] - Update to 2.2.6 --- .cvsignore | 2 +- postgresql-pgpool-II.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 020f125..718c248 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pgpool-II-2.2.5.tar.gz +pgpool-II-2.2.6.tar.gz diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index ba5b99b..2abbf33 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -2,12 +2,12 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} -Version: 2.2.5 -Release: 2%{?dist} +Version: 2.2.6 +Release: 1%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org -Source0: http://pgfoundry.org/frs/download.php/2423/%{short_name}-%{version}.tar.gz +Source0: http://pgfoundry.org/frs/download.php/2478/%{short_name}-%{version}.tar.gz Source1: pgpool.init Source2: pgpool.sysconfig Patch1: pgpool.conf.sample.patch @@ -112,6 +112,9 @@ fi %{_libdir}/libpcp.so %changelog +* Tue Dec 1 2009 Devrim GUNDUZ - 2.2.6-1 +- Update to 2.2.6 + * Sun Nov 01 2009 Devrim GUNDUZ - 2.2.5-2 - Remove init script from all runlevels before uninstall. Per RH Bugzilla #532177 diff --git a/sources b/sources index a04ffe8..f5b16c8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -410fc3e226842eda25e5cd18e9c3e703 pgpool-II-2.2.5.tar.gz +711115ba7a00a9b557c7780a7ec41c3c pgpool-II-2.2.6.tar.gz From 577a3e26f0da7528379031c5899aa265e9ed96ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Wed, 9 Dec 2009 22:17:07 +0000 Subject: [PATCH 39/46] Adjust order of startup and kill, per RH bugzilla #545739. --- pgpool.init | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pgpool.init b/pgpool.init index f09b982..e0a4119 100755 --- a/pgpool.init +++ b/pgpool.init @@ -1,7 +1,7 @@ #!/bin/sh # pgpool This is the init script for starting up pgpool-II # -# chkconfig: - 64 36 +# chkconfig: - 235 74 33 # description: Starts and stops the pgpool daemon # processname: pgpool # pidfile: /var/run/pgpool.pid @@ -14,6 +14,9 @@ # # v2.2.5 Devrim GUNDUZ # - Fix logging. +# +# v2.3 Devrim GUNDUZ +# - Adjust order of startup and kill, per RH bugzilla #545739. if [ -r /etc/sysconfig/pgpool ]; then . /etc/sysconfig/pgpool From 346e056171b3b13b697d6139d83d6a0515062704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=9CND=C3=9CZ?= Date: Fri, 25 Dec 2009 16:06:22 +0000 Subject: [PATCH 40/46] - Update to 2.3.1 - Adjust order of startup and kill, per RH bugzilla #545739. --- .cvsignore | 2 +- postgresql-pgpool-II.spec | 13 +++++++++++-- sources | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index 718c248..9ae6c1e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pgpool-II-2.2.6.tar.gz +pgpool-II-2.3.1.tar.gz diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 2abbf33..ff30969 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -2,12 +2,12 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} -Version: 2.2.6 +Version: 2.3.1 Release: 1%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.projects.PostgreSQL.org -Source0: http://pgfoundry.org/frs/download.php/2478/%{short_name}-%{version}.tar.gz +Source0: http://pgfoundry.org/frs/download.php/2506/%{short_name}-%{version}.tar.gz Source1: pgpool.init Source2: pgpool.sysconfig Patch1: pgpool.conf.sample.patch @@ -59,6 +59,9 @@ install -d %{buildroot}%{_sysconfdir}/%{short_name} mv %{buildroot}/%{_sysconfdir}/%{short_name}/pcp.conf.sample %{buildroot}%{_sysconfdir}/%{short_name}/pcp.conf mv %{buildroot}/%{_sysconfdir}/%{short_name}/pgpool.conf.sample %{buildroot}%{_sysconfdir}/%{short_name}/pgpool.conf mv %{buildroot}/%{_sysconfdir}/%{short_name}/pool_hba.conf.sample %{buildroot}%{_sysconfdir}/%{short_name}/pool_hba.conf +mv %{buildroot}/%{_sysconfdir}/%{short_name}/pgpool.conf.sample-master-slave %{buildroot}%{_datadir}/%{short_name}/ +mv %{buildroot}/%{_sysconfdir}/%{short_name}/pgpool.conf.sample-replication %{buildroot}%{_datadir}/%{short_name}/ + install -d %{buildroot}%{_initrddir} install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/pgpool install -d %{buildroot}%{_sysconfdir}/sysconfig @@ -99,6 +102,8 @@ fi %{_mandir}/man8/pgpool* %dir %{_datadir}/%{short_name} %{_datadir}/%{short_name}/system_db.sql +%{_datadir}/%{short_name}/pgpool.conf.sample-master-slave +%{_datadir}/%{short_name}/pgpool.conf.sample-replication %{_libdir}/libpcp.so.* %{_datadir}/%{short_name}/pgpool.pam %{_initrddir}/pgpool @@ -112,6 +117,10 @@ fi %{_libdir}/libpcp.so %changelog +* Fri Dec 25 2009 Devrim GUNDUZ - 2.3.1-1 +- Update to 2.3.1 +- Adjust order of startup and kill, per RH bugzilla #545739. + * Tue Dec 1 2009 Devrim GUNDUZ - 2.2.6-1 - Update to 2.2.6 diff --git a/sources b/sources index f5b16c8..59dbedc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -711115ba7a00a9b557c7780a7ec41c3c pgpool-II-2.2.6.tar.gz +032fc94eaa71ed99276234b7a110cdf5 pgpool-II-2.3.1.tar.gz From 6c79608b6b09a2db07c831316435ec184703ecae Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 8 May 2010 02:16:36 +0000 Subject: [PATCH 41/46] Initialize branch EL-6 for postgresql-pgpool-II --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..46381b9 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +EL-6 From d1722e552d16f26b7196498df564a3e3c22ac9e9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 09:40:04 +0000 Subject: [PATCH 42/46] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 02b9831..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: postgresql-pgpool-II -# $Id$ -NAME := postgresql-pgpool-II -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 46381b9..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -EL-6 From a93b390c3fd492f860d06fa1a2069d830d177c2f Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 19 Sep 2012 17:00:42 -0400 Subject: [PATCH 43/46] 3.2.0 --- pgpool-3.1-conf.sample.patch | 40 +++++++++ pgpool.init | 5 +- pgpool.service | 10 +++ postgresql-pgpool-II.spec | 168 ++++++++++++++++++++++++++++------- sources | 2 +- 5 files changed, 187 insertions(+), 38 deletions(-) create mode 100644 pgpool-3.1-conf.sample.patch create mode 100644 pgpool.service diff --git a/pgpool-3.1-conf.sample.patch b/pgpool-3.1-conf.sample.patch new file mode 100644 index 0000000..990614a --- /dev/null +++ b/pgpool-3.1-conf.sample.patch @@ -0,0 +1,40 @@ +diff -up pgpool-II-3.1/pgpool.conf.sample.orig pgpool-II-3.1/pgpool.conf.sample +--- pgpool-II-3.1/pgpool.conf.sample.orig 2011-08-25 17:04:43.000000000 -0400 ++++ pgpool-II-3.1/pgpool.conf.sample 2011-09-12 10:51:53.136935503 -0400 +@@ -33,8 +33,6 @@ port = 9999 + # (change requires restart) + socket_dir = '/tmp' + # Unix domain socket path +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + +@@ -45,12 +43,16 @@ pcp_port = 9898 + # (change requires restart) + pcp_socket_dir = '/tmp' + # Unix domain socket path for pcp +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + # - Backend Connection Settings - + ++backend_hostname0 = 'localhost' ++backend_port0 = 5432 ++backend_weight0 = 1 ++backend_data_directory0 = '/var/lib/pgsql/data' ++backend_flag0 = 'ALLOW_TO_FAILOVER' ++ + #backend_hostname0 = 'host1' + # Host name or IP address to connect to for backend 0 + #backend_port0 = 5432 +@@ -179,7 +181,7 @@ debug_level = 0 + pid_file_name = '/var/run/pgpool/pgpool.pid' + # PID file name + # (change requires restart) +-logdir = '/tmp' ++logdir = '/var/log/pgpool' + # Directory of pgPool status file + # (change requires restart) + diff --git a/pgpool.init b/pgpool.init index e0a4119..f09b982 100755 --- a/pgpool.init +++ b/pgpool.init @@ -1,7 +1,7 @@ #!/bin/sh # pgpool This is the init script for starting up pgpool-II # -# chkconfig: - 235 74 33 +# chkconfig: - 64 36 # description: Starts and stops the pgpool daemon # processname: pgpool # pidfile: /var/run/pgpool.pid @@ -14,9 +14,6 @@ # # v2.2.5 Devrim GUNDUZ # - Fix logging. -# -# v2.3 Devrim GUNDUZ -# - Adjust order of startup and kill, per RH bugzilla #545739. if [ -r /etc/sysconfig/pgpool ]; then . /etc/sysconfig/pgpool diff --git a/pgpool.service b/pgpool.service new file mode 100644 index 0000000..01bb6c4 --- /dev/null +++ b/pgpool.service @@ -0,0 +1,10 @@ +[Unit] +Description=PGPool-II Middleware Between PostgreSQL Servers And PostgreSQL Database Clients +After=syslog.target network.target + +[Service] +EnvironmentFile=-/etc/sysconfig/pgpool +ExecStart=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf $OPTS + +[Install] +WantedBy=multi-user.target diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index ff30969..fd4f10e 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -1,20 +1,37 @@ %define short_name pgpool-II +%if 0%{?rhel} && 0%{?rhel} <= 6 +%define systemd_enabled 0 +%else +%define systemd_enabled 1 +%endif -Summary: Pgpool is a connection pooling/replication server for PostgreSQL -Name: postgresql-%{short_name} -Version: 2.3.1 -Release: 1%{?dist} -License: BSD -Group: Applications/Databases -URL: http://pgpool.projects.PostgreSQL.org -Source0: http://pgfoundry.org/frs/download.php/2506/%{short_name}-%{version}.tar.gz -Source1: pgpool.init -Source2: pgpool.sysconfig -Patch1: pgpool.conf.sample.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: postgresql-devel pam-devel - -Obsoletes: postgresql-pgpool +Summary: Pgpool is a connection pooling/replication server for PostgreSQL +Name: postgresql-%{short_name} +Version: 3.2.0 +Release: 1%{?dist} +License: BSD +Group: Applications/Databases +URL: http://pgpool.net +Source0: http://www.pgpool.net/download.php?f=%{short_name}-%{version}.tar.gz +Source1: pgpool.service +Source2: pgpool.sysconfig +Source3: pgpool.init +Patch1: pgpool-3.1-conf.sample.patch +BuildRequires: postgresql-devel pam-devel +%if %{systemd_enabled} +BuildRequires: systemd +Requires(post): systemd-sysv +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +%else +Requires(post): chkconfig +Requires(preun): chkconfig +# This is for /sbin/service +Requires(preun): initscripts +Requires(postun): initscripts +%endif +Obsoletes: postgresql-pgpool %description pgpool-II is a inherited project of pgpool (to classify from @@ -35,25 +52,34 @@ pgpool-II that is executed in pgpool-I mode enables multiple DB nodes to be connected, which was not possible in pgpool-I. %package devel -Summary: The development files for pgpool-II +Summary: The development files for pgpool-II Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel Development headers and libraries for pgpool-II. +%package recovery +Summary: PGPool recovery add-on for PostgreSQL +Group: Applications/Databases +Requires: %{name} = %{version}-%{release} + +%description recovery +PGPool recovery add-on for PostgreSQL. + %prep %setup -q -n %{short_name}-%{version} -%patch1 -p0 +%patch1 -p1 -b .samplefix %build -%configure --with-pgsql-includedir=%{_includedir}/pgsql --with-pgsql-lib=%{_libdir}/pgsql --disable-static --with-pam --disable-rpath --sysconfdir=%{_sysconfdir}/%{short_name}/ +%configure --with-pgsql-includedir=%{_includedir}/pgsql --with-pgsql=%{_libdir}/pgsql --disable-static --with-pam --disable-rpath --sysconfdir=%{_sysconfdir}/%{short_name}/ make %{?_smp_flags} +( cd sql/pgpool-recovery && make %{?_smp_flags} ) %install -rm -rf %{buildroot} make %{?_smp_flags} DESTDIR=%{buildroot} install +( cd sql/pgpool-recovery && make %{?_smp_flags} DESTDIR=%{buildroot} install ) install -d %{buildroot}%{_datadir}/%{short_name} install -d %{buildroot}%{_sysconfdir}/%{short_name} mv %{buildroot}/%{_sysconfdir}/%{short_name}/pcp.conf.sample %{buildroot}%{_sysconfdir}/%{short_name}/pcp.conf @@ -61,62 +87,138 @@ mv %{buildroot}/%{_sysconfdir}/%{short_name}/pgpool.conf.sample %{buildroot}%{_s mv %{buildroot}/%{_sysconfdir}/%{short_name}/pool_hba.conf.sample %{buildroot}%{_sysconfdir}/%{short_name}/pool_hba.conf mv %{buildroot}/%{_sysconfdir}/%{short_name}/pgpool.conf.sample-master-slave %{buildroot}%{_datadir}/%{short_name}/ mv %{buildroot}/%{_sysconfdir}/%{short_name}/pgpool.conf.sample-replication %{buildroot}%{_datadir}/%{short_name}/ +mv %{buildroot}/%{_sysconfdir}/%{short_name}/pgpool.conf.sample-stream %{buildroot}%{_datadir}/%{short_name}/ + +%if %{systemd_enabled} +install -d %{buildroot}%{_unitdir} +install -m 755 %{SOURCE1} %{buildroot}%{_unitdir}/pgpool.service +%else +install -d %{buildroot}%{_sysconfdir}/init.d +install -m 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/pgpool +%endif -install -d %{buildroot}%{_initrddir} -install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/pgpool install -d %{buildroot}%{_sysconfdir}/sysconfig install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/pgpool # nuke libtool archive and static lib rm -f %{buildroot}%{_libdir}/libpcp.{a,la} -%clean -rm -rf %{buildroot} - %post /sbin/ldconfig -chkconfig --add pgpool +%if %{systemd_enabled} +%systemd_post pgpool.service +%else +# This adds the proper /etc/rc*.d links for the script +/sbin/chkconfig --add pgpool +%endif %preun -if [ $1 = 0 ] ; then - /sbin/service pgpool condstop >/dev/null 2>&1 - chkconfig --del pgpool +%if %{systemd_enabled} +%systemd_preun pgpool.service +%else +if [ $1 -eq 0 ] ; then + /sbin/service pgpool stop >/dev/null 2>&1 + /sbin/chkconfig --del pgpool fi +%endif -%postun -p /sbin/ldconfig +%postun +/sbin/ldconfig +%if %{systemd_enabled} +%systemd_postun_with_restart pgpool.service +%else +if [ $1 -ge 1 ] ; then + /sbin/service pgpool condrestart >/dev/null 2>&1 || : +fi +%endif + +%if %{systemd_enabled} +%triggerun -- pgpool < 3.1-1 +# Save the current service runlevel info +# User must manually run systemd-sysv-convert --apply pgpool +# to migrate them to systemd targets +/usr/bin/systemd-sysv-convert --save pgpool >/dev/null 2>&1 ||: + +# Run these because the SysV package being removed won't do them +/sbin/chkconfig --del pgpool >/dev/null 2>&1 || : +/bin/systemctl try-restart pgpool.service >/dev/null 2>&1 || : +%endif %files -%defattr(-,root,root,-) %doc README README.euc_jp TODO COPYING INSTALL AUTHORS ChangeLog NEWS doc/pgpool-en.html doc/pgpool-ja.html doc/pgpool.css doc/tutorial-en.html doc/tutorial-ja.html %{_bindir}/pgpool %{_bindir}/pcp_attach_node %{_bindir}/pcp_detach_node %{_bindir}/pcp_node_count %{_bindir}/pcp_node_info +%{_bindir}/pcp_pool_status %{_bindir}/pcp_proc_count %{_bindir}/pcp_proc_info +%{_bindir}/pcp_promote_node %{_bindir}/pcp_recovery_node %{_bindir}/pcp_stop_pgpool %{_bindir}/pcp_systemdb_info %{_bindir}/pg_md5 %{_mandir}/man8/pgpool* %dir %{_datadir}/%{short_name} +%{_datadir}/%{short_name}/insert_lock.sql %{_datadir}/%{short_name}/system_db.sql %{_datadir}/%{short_name}/pgpool.conf.sample-master-slave %{_datadir}/%{short_name}/pgpool.conf.sample-replication +%{_datadir}/%{short_name}/pgpool.conf.sample-stream %{_libdir}/libpcp.so.* %{_datadir}/%{short_name}/pgpool.pam -%{_initrddir}/pgpool +%if %{systemd_enabled} +%{_unitdir}/pgpool.service +%else +%{_sysconfdir}/init.d/pgpool +%endif %attr(764,root,root) %config(noreplace) %{_sysconfdir}/%{short_name}/*.conf %config(noreplace) %{_sysconfdir}/sysconfig/pgpool %files devel -%defattr(-,root,root,-) +%{_includedir}/libpcp_ext.h %{_includedir}/pcp.h +%{_includedir}/pool_process_reporting.h %{_includedir}/pool_type.h %{_libdir}/libpcp.so +%files recovery +%{_libdir}/pgsql/pgpool-recovery.so +%{_datadir}/pgsql/contrib/pgpool-recovery.sql +%{_datadir}/pgsql/contrib/uninstall_pgpool-recovery.sql +%doc sample/pgpool_recovery* + %changelog +* Wed Sep 19 2012 Tom Callaway - 3.2.0-1 +- update to 3.2.0 +- add recovery subpackage (thanks to Dmitry S. Makovey) +- add rhel conditionalization (thanks to Dmitry S. Makovey) +- update systemd scriptlets + +* Sat Jul 21 2012 Fedora Release Engineering - 3.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Apr 24 2012 Devrim GUNDUZ - 3.1.3-1 +- Update to 3.1.3, per changes described at: + http://www.pgpool.net/docs/pgpool-II-3.1.3/doc/NEWS.txt + +* Tue Mar 27 2012 Devrim Gunduz - 3.1.2-1 +- update to 3.1.2 + +* Tue Mar 27 2012 Devrim Gunduz - 3.1.2-1 +- update to 3.1.2 + +* Sat Jan 14 2012 Fedora Release Engineering - 3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Sep 12 2011 Tom Callaway - 3.1-1 +- update to 3.1 +- convert to systemd + +* Wed Feb 09 2011 Fedora Release Engineering - 2.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Fri Dec 25 2009 Devrim GUNDUZ - 2.3.1-1 - Update to 2.3.1 - Adjust order of startup and kill, per RH bugzilla #545739. @@ -129,7 +231,7 @@ fi #532177 * Sun Oct 4 2009 Devrim Gunduz 2.2.5-1 -- Update to 2.2.5, for various fixes described at +- Update to 2.2.5, for various fixes described at http://lists.pgfoundry.org/pipermail/pgpool-general/2009-October/002188.html * Sat Oct 3 2009 Devrim Gunduz 2.2.4-1 diff --git a/sources b/sources index 59dbedc..aa256c1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -032fc94eaa71ed99276234b7a110cdf5 pgpool-II-2.3.1.tar.gz +b3194d7ff15c2c74a803a323c4afd22b pgpool-II-3.2.0.tar.gz From 02e6effda6c883d2c4ad5cf0cf5516e2dfabbdf0 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 19 Sep 2012 17:20:53 -0400 Subject: [PATCH 44/46] fix url for old epel --- postgresql-pgpool-II.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index fd4f10e..9f98853 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -12,7 +12,9 @@ Release: 1%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.net -Source0: http://www.pgpool.net/download.php?f=%{short_name}-%{version}.tar.gz +# Old EPEL doesn't like this URL +# Source0: http://www.pgpool.net/download.php?f=%{short_name}-%{version}.tar.gz +Source0: %{short_name}-%{version}.tar.gz Source1: pgpool.service Source2: pgpool.sysconfig Source3: pgpool.init From c7ab7e4cbf6b1621f1e0a7e9d570e567f2d371c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=BCnd=C3=BCz?= Date: Tue, 3 May 2016 09:53:56 +0300 Subject: [PATCH 45/46] Update to 3.2.15 --- .gitignore | 2 +- postgresql-pgpool-II.spec | 39 +++++++++++++++++++++------------------ sources | 2 +- 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 9ae6c1e..43507ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -pgpool-II-2.3.1.tar.gz +/pgpool-II-3.2.15.tar.gz diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 9f98853..ad27d1c 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -7,7 +7,7 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} -Version: 3.2.0 +Version: 3.2.15 Release: 1%{?dist} License: BSD Group: Applications/Databases @@ -36,22 +36,22 @@ Requires(postun): initscripts Obsoletes: postgresql-pgpool %description -pgpool-II is a inherited project of pgpool (to classify from -pgpool-II, it is sometimes called as pgpool-I). For those of -you not familiar with pgpool-I, it is a multi-functional -middle ware for PostgreSQL that features connection pooling, -replication and load balancing functions. pgpool-I allows a -user to connect at most two PostgreSQL servers for higher -availability or for higher search performance compared to a +pgpool-II is a inherited project of pgpool (to classify from +pgpool-II, it is sometimes called as pgpool-I). For those of +you not familiar with pgpool-I, it is a multi-functional +middle ware for PostgreSQL that features connection pooling, +replication and load balancing functions. pgpool-I allows a +user to connect at most two PostgreSQL servers for higher +availability or for higher search performance compared to a single PostgreSQL server. -pgpool-II, on the other hand, allows multiple PostgreSQL -servers (DB nodes) to be connected, which enables queries -to be executed simultaneously on all servers. In other words, -it enables "parallel query" processing. Also, pgpool-II can -be started as pgpool-I by changing configuration parameters. -pgpool-II that is executed in pgpool-I mode enables multiple -DB nodes to be connected, which was not possible in pgpool-I. +pgpool-II, on the other hand, allows multiple PostgreSQL +servers (DB nodes) to be connected, which enables queries +to be executed simultaneously on all servers. In other words, +it enables "parallel query" processing. Also, pgpool-II can +be started as pgpool-I by changing configuration parameters. +pgpool-II that is executed in pgpool-I mode enables multiple +DB nodes to be connected, which was not possible in pgpool-I. %package devel Summary: The development files for pgpool-II @@ -105,7 +105,7 @@ install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/pgpool # nuke libtool archive and static lib rm -f %{buildroot}%{_libdir}/libpcp.{a,la} -%post +%post /sbin/ldconfig %if %{systemd_enabled} %systemd_post pgpool.service @@ -124,7 +124,7 @@ if [ $1 -eq 0 ] ; then fi %endif -%postun +%postun /sbin/ldconfig %if %{systemd_enabled} %systemd_postun_with_restart pgpool.service @@ -165,7 +165,7 @@ fi %dir %{_datadir}/%{short_name} %{_datadir}/%{short_name}/insert_lock.sql %{_datadir}/%{short_name}/system_db.sql -%{_datadir}/%{short_name}/pgpool.conf.sample-master-slave +%{_datadir}/%{short_name}/pgpool.conf.sample-master-slave %{_datadir}/%{short_name}/pgpool.conf.sample-replication %{_datadir}/%{short_name}/pgpool.conf.sample-stream %{_libdir}/libpcp.so.* @@ -192,6 +192,9 @@ fi %doc sample/pgpool_recovery* %changelog +* Tue May 03 2016 Devrim Gündüz - 3.2.15-1 +- Update to 3.2.15 + * Wed Sep 19 2012 Tom Callaway - 3.2.0-1 - update to 3.2.0 - add recovery subpackage (thanks to Dmitry S. Makovey) diff --git a/sources b/sources index aa256c1..d1f13da 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b3194d7ff15c2c74a803a323c4afd22b pgpool-II-3.2.0.tar.gz +3e1af37e63d62f8497fdb80f5a03764e pgpool-II-3.2.15.tar.gz From 777743dbae74f0916b92212ed588a63fd79f8874 Mon Sep 17 00:00:00 2001 From: Jozef Mlich Date: Fri, 22 Jul 2016 18:43:51 +0200 Subject: [PATCH 46/46] Update to 3.2.16 see http://www.pgpool.net/docs/pgpool-II-3.2.16/doc/NEWS.txt --- .gitignore | 1 + postgresql-pgpool-II.spec | 14 +++++++++----- sources | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 43507ad..33ea204 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /pgpool-II-3.2.15.tar.gz +/pgpool-II-3.2.16.tar.gz diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index ad27d1c..c35d590 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -7,7 +7,7 @@ Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} -Version: 3.2.15 +Version: 3.2.16 Release: 1%{?dist} License: BSD Group: Applications/Databases @@ -192,6 +192,10 @@ fi %doc sample/pgpool_recovery* %changelog +* Fri Jul 22 2016 Jozef Mlich - 3.2.16-1 +- Update to 3.2.16 + see http://www.pgpool.net/docs/pgpool-II-3.2.16/doc/NEWS.txt + * Tue May 03 2016 Devrim Gündüz - 3.2.15-1 - Update to 3.2.15 @@ -324,12 +328,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 @@ -353,10 +357,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/sources b/sources index d1f13da..eb5315c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3e1af37e63d62f8497fdb80f5a03764e pgpool-II-3.2.15.tar.gz +8a71d42a5e384ec707bf340402174cd4 pgpool-II-3.2.16.tar.gz