Compare commits

...
Sign in to create a new pull request.

5 commits

Author SHA1 Message Date
Devrim GUNDUZ
29750296f7 re-upload tarball 2012-04-24 01:29:08 +03:00
Devrim GUNDUZ
9fbcd5f2bc - Update to 3.1.3, per changes described at:
http://www.pgpool.net/docs/pgpool-II-3.1.3/doc/NEWS.txt
2012-04-24 00:53:59 +03:00
Devrim GUNDUZ
dc95f897e5 Update project URL 2012-03-27 02:22:17 +03:00
Devrim GUNDUZ
133307e799 Update to 3.1.2 2012-03-27 01:53:31 +03:00
Tom "spot" Callaway
037317062f convert to systemd 2011-09-14 12:25:57 -04:00
5 changed files with 120 additions and 34 deletions

2
.gitignore vendored
View file

@ -1 +1 @@
pgpool-II-2.3.1.tar.gz
/pgpool-II-3.1.3.tar.gz

View file

@ -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)

10
pgpool.service Normal file
View file

@ -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

View file

@ -1,20 +1,23 @@
%define short_name pgpool-II
Summary: Pgpool is a connection pooling/replication server for PostgreSQL
Name: postgresql-%{short_name}
Version: 2.3.1
Release: 2%{?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.1.3
Release: 1%{?dist}
License: BSD
Group: Applications/Databases
URL: http://pgpool.net
Source0: http://www.pgpool.net/download.php?f=pgpool-II-3.1.2.tar.gz
Source1: pgpool.service
Source2: pgpool.sysconfig
Patch1: pgpool-3.1-conf.sample.patch
BuildRequires: postgresql-devel pam-devel
BuildRequires: systemd-units
Requires(post): systemd-sysv
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
Obsoletes: postgresql-pgpool
%description
pgpool-II is a inherited project of pgpool (to classify from
@ -44,7 +47,7 @@ Development headers and libraries for pgpool-II.
%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}/
@ -52,7 +55,6 @@ Development headers and libraries for pgpool-II.
make %{?_smp_flags}
%install
rm -rf %{buildroot}
make %{?_smp_flags} DESTDIR=%{buildroot} install
install -d %{buildroot}%{_datadir}/%{short_name}
install -d %{buildroot}%{_sysconfdir}/%{short_name}
@ -61,62 +63,96 @@ 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}/
install -d %{buildroot}%{_initrddir}
install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/pgpool
install -d %{buildroot}%{_unitdir}
install -m 755 %{SOURCE1} %{buildroot}%{_unitdir}/pgpool.service
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
%preun
if [ $1 = 0 ] ; then
/sbin/service pgpool condstop >/dev/null 2>&1
chkconfig --del pgpool
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%postun -p /sbin/ldconfig
%preun
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable pgpool.service > /dev/null 2>&1 || :
/bin/systemctl stop pgpool.service > /dev/null 2>&1 || :
fi
%postun
/sbin/ldconfig
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart pgpool.service >/dev/null 2>&1 || :
fi
%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 || :
%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
%{_unitdir}/pgpool.service
%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
%changelog
* Tue Apr 24 2012 Devrim GUNDUZ <devrim@gunduz.org> - 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 <devrim@gunduz.org> - 3.1.2-1
- update to 3.1.2
* Mon Sep 12 2011 Tom Callaway <spot@fedoraproject.org> - 3.1-1
- update to 3.1
- convert to systemd
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

View file

@ -1 +1 @@
032fc94eaa71ed99276234b7a110cdf5 pgpool-II-2.3.1.tar.gz
3094f4a8cc24a7ff5e40e37b1db243e7 pgpool-II-3.1.3.tar.gz