Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29750296f7 | ||
|
|
9fbcd5f2bc | ||
|
|
dc95f897e5 | ||
|
|
133307e799 | ||
|
|
037317062f |
5 changed files with 120 additions and 34 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1 +1 @@
|
||||||
pgpool-II-2.3.1.tar.gz
|
/pgpool-II-3.1.3.tar.gz
|
||||||
|
|
|
||||||
40
pgpool-3.1-conf.sample.patch
Normal file
40
pgpool-3.1-conf.sample.patch
Normal 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
10
pgpool.service
Normal 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
|
||||||
|
|
@ -1,20 +1,23 @@
|
||||||
%define short_name pgpool-II
|
%define short_name pgpool-II
|
||||||
|
|
||||||
Summary: Pgpool is a connection pooling/replication server for PostgreSQL
|
Summary: Pgpool is a connection pooling/replication server for PostgreSQL
|
||||||
Name: postgresql-%{short_name}
|
Name: postgresql-%{short_name}
|
||||||
Version: 2.3.1
|
Version: 3.1.3
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: Applications/Databases
|
Group: Applications/Databases
|
||||||
URL: http://pgpool.projects.PostgreSQL.org
|
URL: http://pgpool.net
|
||||||
Source0: http://pgfoundry.org/frs/download.php/2506/%{short_name}-%{version}.tar.gz
|
Source0: http://www.pgpool.net/download.php?f=pgpool-II-3.1.2.tar.gz
|
||||||
Source1: pgpool.init
|
Source1: pgpool.service
|
||||||
Source2: pgpool.sysconfig
|
Source2: pgpool.sysconfig
|
||||||
Patch1: pgpool.conf.sample.patch
|
Patch1: pgpool-3.1-conf.sample.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRequires: postgresql-devel pam-devel
|
||||||
BuildRequires: postgresql-devel pam-devel
|
BuildRequires: systemd-units
|
||||||
|
Requires(post): systemd-sysv
|
||||||
Obsoletes: postgresql-pgpool
|
Requires(post): systemd-units
|
||||||
|
Requires(preun): systemd-units
|
||||||
|
Requires(postun): systemd-units
|
||||||
|
Obsoletes: postgresql-pgpool
|
||||||
|
|
||||||
%description
|
%description
|
||||||
pgpool-II is a inherited project of pgpool (to classify from
|
pgpool-II is a inherited project of pgpool (to classify from
|
||||||
|
|
@ -44,7 +47,7 @@ Development headers and libraries for pgpool-II.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{short_name}-%{version}
|
%setup -q -n %{short_name}-%{version}
|
||||||
%patch1 -p0
|
%patch1 -p1 -b .samplefix
|
||||||
|
|
||||||
%build
|
%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-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}
|
make %{?_smp_flags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
|
||||||
make %{?_smp_flags} DESTDIR=%{buildroot} install
|
make %{?_smp_flags} DESTDIR=%{buildroot} install
|
||||||
install -d %{buildroot}%{_datadir}/%{short_name}
|
install -d %{buildroot}%{_datadir}/%{short_name}
|
||||||
install -d %{buildroot}%{_sysconfdir}/%{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}/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-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-replication %{buildroot}%{_datadir}/%{short_name}/
|
||||||
|
mv %{buildroot}/%{_sysconfdir}/%{short_name}/pgpool.conf.sample-stream %{buildroot}%{_datadir}/%{short_name}/
|
||||||
|
|
||||||
install -d %{buildroot}%{_initrddir}
|
install -d %{buildroot}%{_unitdir}
|
||||||
install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/pgpool
|
install -m 755 %{SOURCE1} %{buildroot}%{_unitdir}/pgpool.service
|
||||||
install -d %{buildroot}%{_sysconfdir}/sysconfig
|
install -d %{buildroot}%{_sysconfdir}/sysconfig
|
||||||
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/pgpool
|
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/pgpool
|
||||||
|
|
||||||
# nuke libtool archive and static lib
|
# nuke libtool archive and static lib
|
||||||
rm -f %{buildroot}%{_libdir}/libpcp.{a,la}
|
rm -f %{buildroot}%{_libdir}/libpcp.{a,la}
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
chkconfig --add pgpool
|
if [ $1 -eq 1 ] ; then
|
||||||
|
# Initial installation
|
||||||
%preun
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
if [ $1 = 0 ] ; then
|
|
||||||
/sbin/service pgpool condstop >/dev/null 2>&1
|
|
||||||
chkconfig --del pgpool
|
|
||||||
fi
|
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
|
%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
|
%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}/pgpool
|
||||||
%{_bindir}/pcp_attach_node
|
%{_bindir}/pcp_attach_node
|
||||||
%{_bindir}/pcp_detach_node
|
%{_bindir}/pcp_detach_node
|
||||||
%{_bindir}/pcp_node_count
|
%{_bindir}/pcp_node_count
|
||||||
%{_bindir}/pcp_node_info
|
%{_bindir}/pcp_node_info
|
||||||
|
%{_bindir}/pcp_pool_status
|
||||||
%{_bindir}/pcp_proc_count
|
%{_bindir}/pcp_proc_count
|
||||||
%{_bindir}/pcp_proc_info
|
%{_bindir}/pcp_proc_info
|
||||||
|
%{_bindir}/pcp_promote_node
|
||||||
%{_bindir}/pcp_recovery_node
|
%{_bindir}/pcp_recovery_node
|
||||||
%{_bindir}/pcp_stop_pgpool
|
%{_bindir}/pcp_stop_pgpool
|
||||||
%{_bindir}/pcp_systemdb_info
|
%{_bindir}/pcp_systemdb_info
|
||||||
%{_bindir}/pg_md5
|
%{_bindir}/pg_md5
|
||||||
%{_mandir}/man8/pgpool*
|
%{_mandir}/man8/pgpool*
|
||||||
%dir %{_datadir}/%{short_name}
|
%dir %{_datadir}/%{short_name}
|
||||||
|
%{_datadir}/%{short_name}/insert_lock.sql
|
||||||
%{_datadir}/%{short_name}/system_db.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-replication
|
||||||
|
%{_datadir}/%{short_name}/pgpool.conf.sample-stream
|
||||||
%{_libdir}/libpcp.so.*
|
%{_libdir}/libpcp.so.*
|
||||||
%{_datadir}/%{short_name}/pgpool.pam
|
%{_datadir}/%{short_name}/pgpool.pam
|
||||||
%{_initrddir}/pgpool
|
%{_unitdir}/pgpool.service
|
||||||
%attr(764,root,root) %config(noreplace) %{_sysconfdir}/%{short_name}/*.conf
|
%attr(764,root,root) %config(noreplace) %{_sysconfdir}/%{short_name}/*.conf
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/pgpool
|
%config(noreplace) %{_sysconfdir}/sysconfig/pgpool
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%{_includedir}/libpcp_ext.h
|
||||||
%{_includedir}/pcp.h
|
%{_includedir}/pcp.h
|
||||||
|
%{_includedir}/pool_process_reporting.h
|
||||||
%{_includedir}/pool_type.h
|
%{_includedir}/pool_type.h
|
||||||
%{_libdir}/libpcp.so
|
%{_libdir}/libpcp.so
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%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
|
* 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
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
032fc94eaa71ed99276234b7a110cdf5 pgpool-II-2.3.1.tar.gz
|
3094f4a8cc24a7ff5e40e37b1db243e7 pgpool-II-3.1.3.tar.gz
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue