From ebf52bc5e1046b06ace6c4dd82e5eeb9ba86756a Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Thu, 12 Jun 2014 15:38:04 +0200 Subject: [PATCH] spec: create /var/run/pgpool immediately Version: 3.3.3-2 Related: #1094713 --- postgresql-pgpool-II.spec | 19 +++++++++++++------ postgresql-pgpool-II.tmpfiles.d | 1 - 2 files changed, 13 insertions(+), 7 deletions(-) delete mode 100644 postgresql-pgpool-II.tmpfiles.d diff --git a/postgresql-pgpool-II.spec b/postgresql-pgpool-II.spec index 3143114..52fad8d 100644 --- a/postgresql-pgpool-II.spec +++ b/postgresql-pgpool-II.spec @@ -5,10 +5,12 @@ %define systemd_enabled 1 %endif +%global _varrundir %{_localstatedir}/run/pgpool + Summary: Pgpool is a connection pooling/replication server for PostgreSQL Name: postgresql-%{short_name} Version: 3.3.3 -Release: 1%{?dist} +Release: 2%{?dist} License: BSD Group: Applications/Databases URL: http://pgpool.net @@ -16,13 +18,12 @@ Source0: http://www.pgpool.net/download.php?f=%{short_name}-%{version}.tar.gz Source1: pgpool.service Source2: pgpool.sysconfig Source3: pgpool.init -Source4: postgresql-pgpool-II.tmpfiles.d Patch1: pgpool-3.1-conf.sample.patch BuildRequires: postgresql-devel pam-devel %if %{systemd_enabled} BuildRequires: systemd # We require this to be present for %%{_prefix}/lib/tmpfiles.d -Requires: systemd-units +Requires: systemd Requires(post): systemd-sysv Requires(post): systemd Requires(preun): systemd @@ -98,7 +99,9 @@ install -m 755 %{SOURCE1} %{buildroot}%{_unitdir}/pgpool.service # ... and make a tmpfiles script to recreate it at reboot. mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir} -install -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_tmpfilesdir}/postgresql-pgpool-II.conf +cat > $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}.conf < - 3.3.3-2 +- create %%_varrundir after installation, specify it on one place, + * Thu Jun 05 2014 Jozef Mlich - 3.3.3-1 - adding tmpfiles.d (allow pid file to be created in /var/run/pgpool - dir created after reboot) diff --git a/postgresql-pgpool-II.tmpfiles.d b/postgresql-pgpool-II.tmpfiles.d deleted file mode 100644 index 94f2939..0000000 --- a/postgresql-pgpool-II.tmpfiles.d +++ /dev/null @@ -1 +0,0 @@ -d /var/run/pgpool 0755 root root -