[packages/postgresql] drop all Upstart hacks

jajcus jajcus at pld-linux.org
Thu Apr 23 09:34:35 CEST 2015


commit 3a1331e3bf38303532dab020ce1e924516509adf
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Thu Apr 23 09:34:23 2015 +0200

    drop all Upstart hacks

 postgresql-instance.upstart | 20 --------------------
 postgresql.init             |  2 --
 postgresql.spec             | 35 +----------------------------------
 postgresql.upstart          | 18 ------------------
 4 files changed, 1 insertion(+), 74 deletions(-)
---
diff --git a/postgresql.spec b/postgresql.spec
index 4edfd7c..dbe4306 100644
--- a/postgresql.spec
+++ b/postgresql.spec
@@ -45,8 +45,6 @@ Source3:	%{name}.sysconfig
 Source4:	%{name}@.service
 Source5:	%{name}.service
 Source6:	%{name}.target
-Source7:	%{name}.upstart
-Source8:	%{name}-instance.upstart
 Patch0:		%{name}-conf.patch
 Patch1:		%{name}-absolute_dbpaths.patch
 Patch2:		%{name}-ecpg-includedir.patch
@@ -337,20 +335,6 @@ California, Berkeley.
 PostgreSQL працює на Solaris, SunOS, HPUX, AIX, Linux, Irix, FreeBSD
 та більшості інших різновидів Unix.
 
-%package upstart
-Summary:	Upstart job description for PostgreSQL server
-Summary(pl.UTF-8):	Opis zadania Upstart dla serwera PostgreSQL
-Group:		Daemons
-Requires:	%{name} = %{version}-%{release}
-Requires:	upstart >= 0.6
-Conflicts:	syslog-ng < 3.2.4-1
-
-%description upstart
-Upstart job description for PostgreSQL.
-
-%description upstart -l pl.UTF-8
-Opis zadania Upstart dla PostgreSQL.
-
 %package devel
 Summary:	PostgreSQL development header files and libraries
 Summary(de.UTF-8):	PostgreSQL-Entwicklungs-Header-Dateien und Libraries
@@ -834,7 +818,7 @@ done
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,init/%{name}}} \
+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} \
@@ -867,9 +851,6 @@ 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 %{SOURCE7} $RPM_BUILD_ROOT/etc/init/%{name}.conf
-install %{SOURCE8} $RPM_BUILD_ROOT/etc/init/%{name}/instance.conf
-
 install -d howto
 tar zxf %{SOURCE2} -C howto
 
@@ -998,12 +979,6 @@ for pgdir in $PG_DB_CLUSTERS; do
 done
 %systemd_trigger postgresql.service
 
-%post upstart
-%upstart_post postgresql
-
-%postun upstart
-%upstart_postun postgresql
-
 %post	libs -p /sbin/ldconfig
 %postun	libs -p /sbin/ldconfig
 
@@ -1074,14 +1049,6 @@ done
 %{_mandir}/man1/postgres.1*
 %{_mandir}/man1/postmaster.1*
 
-%if "%{pld_release}" != "ti"
-%files upstart
-%defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) /etc/init/postgresql.conf
-%dir /etc/init/postgresql
-%config(noreplace) %verify(not md5 mtime size) /etc/init/postgresql/instance.conf
-%endif
-
 %files doc
 %defattr(644,root,root,755)
 %doc doc/src/sgml/html howto
diff --git a/postgresql-instance.upstart b/postgresql-instance.upstart
deleted file mode 100644
index 9b4ea84..0000000
--- a/postgresql-instance.upstart
+++ /dev/null
@@ -1,20 +0,0 @@
-
-stop on pld.shutdown-started
-stop on stopping postgresql
-
-instance $DATADIR
-
-env DATADIR=/var/lib/pgsql
-
-script
-	exec >>/var/log/pgsql 2>&1
-
-	# please note: 'pg_ctl start' does not work with 'expect daemon' 
-	# nor 'expect fork', so we need to start postgres directly
-	exec /sbin/setuidgid -s postgres \
-		/usr/bin/postgres -D $DATADIR
-end script
-
-# TODO: wait for the server in post-start
-
-# vi: ft=upstart
diff --git a/postgresql.init b/postgresql.init
index 9fc8579..d3476e2 100644
--- a/postgresql.init
+++ b/postgresql.init
@@ -168,8 +168,6 @@ stop() {
 }
 
 
-upstart_controlled --except status init
-
 RETVAL=0
 # See how we were called.
 # Every action is performed for all given (all configured by default)
diff --git a/postgresql.upstart b/postgresql.upstart
deleted file mode 100644
index e61e63b..0000000
--- a/postgresql.upstart
+++ /dev/null
@@ -1,18 +0,0 @@
-description "Starts PostgreSQL instances for all configured clusters"
-
-start on started SERVICE_syslog=y
-
-env PG_DB_CLUSTERS
-
-pre-start script
-	exec >/tmp/pre-start 2>&1
-	set -x
-	if [ -z "$PG_DB_CLUSTERS" ] ; then
-		# read PG_DB_CLUSTERS from /etc/sysconfig/postgresql
-		# for init script compatibility
-		. /etc/sysconfig/postgresql
-	fi
-	for DATADIR in $PG_DB_CLUSTERS ; do
-		start postgresql/instance DATADIR=$DATADIR
-	done
-end script
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/postgresql.git/commitdiff/3a1331e3bf38303532dab020ce1e924516509adf



More information about the pld-cvs-commit mailing list