]> TLD Linux GIT Repositories - packages/postgresql.git/commitdiff
- killed systemd
authorMarcin Krol <hawk@tld-linux.org>
Mon, 11 May 2015 13:51:18 +0000 (13:51 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Mon, 11 May 2015 13:51:18 +0000 (13:51 +0000)
postgresql.service [deleted file]
postgresql.spec
postgresql.target [deleted file]
postgresql@.service [deleted file]

diff --git a/postgresql.service b/postgresql.service
deleted file mode 100644 (file)
index 61bb968..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=PostgreSQL server
-Wants=postgresql.target
-After=postgresql.target
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-ExecStart=/bin/systemctl is-active postgresql.target
-ExecReload=/bin/true
-
-[Install]
-WantedBy=multi-user.target
index cdf435394b8e0db3df9fe0a6f7df59fd79877335..45a4b76537d5a42225725f4b0aa53799740c861d 100644 (file)
@@ -42,9 +42,6 @@ Source1:      %{name}.init
 Source2:       pgsql-Database-HOWTO-html.tar.gz
 # Source2-md5: 5b656ddf1db41965761f85204a14398e
 Source3:       %{name}.sysconfig
-Source4:       %{name}@.service
-Source5:       %{name}.service
-Source6:       %{name}.target
 Patch0:                %{name}-conf.patch
 Patch1:                %{name}-absolute_dbpaths.patch
 Patch2:                %{name}-ecpg-includedir.patch
@@ -95,7 +92,6 @@ Requires(triggerpostun):      /usr/sbin/usermod
 Requires:      %{name}-clients >= %{version}-%{release}
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      rc-scripts >= 0.4.3.0
-Requires:      systemd-units >= 38
 Requires:      tzdata
 Obsoletes:     postgresql-module-plpgsql
 Obsoletes:     postgresql-module-tsearch2
@@ -822,7 +818,6 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
        $RPM_BUILD_ROOT{/var/{lib/pgsql,log},%{_pgsqldir}} \
        $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
        $RPM_BUILD_ROOT%{_mandir} \
-       $RPM_BUILD_ROOT{%{systemdunitdir},/etc/systemd/system/%{name}.target.requires} \
        $RPM_BUILD_ROOT/home/services/postgres
 
 install src/tutorial/*.sql $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
@@ -847,10 +842,6 @@ touch $RPM_BUILD_ROOT/var/log/pgsql
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/postgresql
 
-install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}@.service
-install %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
-install %{SOURCE6} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.target
-
 install -d howto
 tar zxf %{SOURCE2} -C howto
 
@@ -941,43 +932,12 @@ fi
 %post
 /sbin/chkconfig --add postgresql
 %service postgresql restart "postgresql server"
-if [ "$1" -eq "1" ]; then
-       PG_DB_CLUSTERS=""
-       [ -f /etc/sysconfig/postgresql ] && . /etc/sysconfig/postgresql
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog
-       for pgdir in $PG_DB_CLUSTERS; do
-               instance="$(echo "$pgdir" | sed -e 's/^\///;s/-/\\x2d/g;s/@/\\x40/g;s/\//-/g')"
-               /bin/systemctl --quiet enable "postgresql@$instance.service" || :
-       done
-fi
-%systemd_post postgresql.service
 
 %preun
 if [ "$1" = "0" ]; then
        %service postgresql stop
        /sbin/chkconfig --del postgresql
-
-       PG_DB_CLUSTERS=""
-       [ -f /etc/sysconfig/postgresql ] && . /etc/sysconfig/postgresql
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog
-       for pgdir in $PG_DB_CLUSTERS; do
-               instance="$(echo "$pgdir" | sed -e 's/^\///;s/-/\\x2d/g;s/@/\\x40/g;s/\//-/g')"
-               /bin/systemctl --quiet disable "postgresql@$instance.service" || :
-       done
 fi
-%systemd_preun postgresql.service
-
-%postun
-%systemd_reload
-
-%triggerpostun -- %{name} < 9.3.3-2
-PG_DB_CLUSTERS=""
-[ -f /etc/sysconfig/postgresql ] && . /etc/sysconfig/postgresql
-for pgdir in $PG_DB_CLUSTERS; do
-       instance="$(echo "$pgdir" | sed -e 's/^\///;s/-/\\x2d/g;s/@/\\x40/g;s/\//-/g')"
-       /bin/systemctl --quiet enable "postgresql@$instance.service" || :
-done
-%systemd_trigger postgresql.service
 
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
@@ -990,10 +950,6 @@ done
 %doc COPYRIGHT README HISTORY doc/{bug.template,KNOWN_BUGS,MISSING_FEATURES,TODO}
 %attr(754,root,root) /etc/rc.d/init.d/postgresql
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/postgresql
-%{systemdunitdir}/%{name}.service
-%{systemdunitdir}/%{name}@.service
-%{systemdunitdir}/%{name}.target
-%dir /etc/systemd/system/%{name}.target.requires
 
 %attr(755,root,root) %{_bindir}/initdb
 %attr(755,root,root) %{_bindir}/pg_basebackup
diff --git a/postgresql.target b/postgresql.target
deleted file mode 100644 (file)
index e8c6d17..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-[Unit]
-Description=PostgreSQL server instances
diff --git a/postgresql@.service b/postgresql@.service
deleted file mode 100644 (file)
index 4eb4761..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=PostgreSQL database server at %f
-PartOf=postgresql.target postgresql.service
-ReloadPropagatedFrom=postgresql.service
-
-[Service]
-Type=forking
-User=postgres
-ExecStart=/usr/bin/pg_ctl -D %f start -w -s
-ExecStop=/usr/bin/pg_ctl -D %f stop -w -s -m fast
-ExecReload=/usr/bin/pg_ctl -D %f reload -w -s
-PIDFile=%f/postmaster.pid
-
-[Install]
-RequiredBy=postgresql.target