소스 검색

build: Remove support for upstart

Upstart files were already mostly removed but not from spec file and
configure.ac.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse 8 년 전
부모
커밋
59bd5f0fa6
4개의 변경된 파일4개의 추가작업 그리고 88개의 파일을 삭제
  1. 0 16
      configure.ac
  2. 1 10
      corosync.spec.in
  3. 3 8
      init/Makefile.am
  4. 0 54
      init/corosync.conf.in

+ 0 - 16
configure.ac

@@ -358,11 +358,6 @@ AC_ARG_ENABLE([systemd],
 	[ enable_systemd="no" ])
 AM_CONDITIONAL(INSTALL_SYSTEMD, test x$enable_systemd = xyes)
 
-AC_ARG_ENABLE([upstart],
-	      [  --enable-upstart                : Install upstart service files],,
-	[ enable_upstart="no" ])
-AM_CONDITIONAL(INSTALL_UPSTART, test x$enable_upstart = xyes)
-
 AC_ARG_WITH([initconfigdir],
 	[AS_HELP_STRING([--with-initconfigdir=DIR],
 		[configuration directory @<:@SYSCONFDIR/sysconfig@:>@])],
@@ -380,11 +375,6 @@ AC_ARG_WITH([systemddir],
 	[ SYSTEMDDIR="$withval" ],
 	[ SYSTEMDDIR="/lib/systemd/system" ])
 
-AC_ARG_WITH([upstartdir],
-	[  --with-upstartdir=DIR   : path to upstart config files directory. ],
-	[ UPSTARTDIR="$withval" ],
-	[ UPSTARTDIR="$sysconfdir/init" ])
-
 AC_ARG_WITH([logdir],
 	[  --with-logdir=DIR       : the base directory for corosync logging files. ],
 	[ LOGDIR="$withval" ],
@@ -477,10 +467,6 @@ if test "x${enable_systemd}" = xyes; then
 	PACKAGE_FEATURES="$PACKAGE_FEATURES systemd"
 	WITH_LIST="$WITH_LIST --with systemd"
 fi
-if test "x${enable_upstart}" = xyes; then
-	PACKAGE_FEATURES="$PACKAGE_FEATURES upstart"
-	WITH_LIST="$WITH_LIST --with upstart"
-fi
 if test "x${enable_xmlconf}" = xyes; then
 	PACKAGE_FEATURES="$PACKAGE_FEATURES xmlconf"
 	WITH_LIST="$WITH_LIST --with xmlconf"
@@ -706,7 +692,6 @@ fi
 AC_SUBST([BASHPATH])
 AC_SUBST([INITDDIR])
 AC_SUBST([SYSTEMDDIR])
-AC_SUBST([UPSTARTDIR])
 AC_SUBST([LOGDIR])
 AC_SUBST([LOGROTATEDIR])
 
@@ -749,7 +734,6 @@ AC_MSG_RESULT([  State information        = ${localstatedir}])
 AC_MSG_RESULT([  System configuration     = ${sysconfdir}])
 AC_MSG_RESULT([  System init.d directory  = ${INITDDIR}])
 AC_MSG_RESULT([  System systemd directory = ${SYSTEMDDIR}])
-AC_MSG_RESULT([  System upstart directory = ${UPSTARTDIR}])
 AC_MSG_RESULT([  Log directory            = ${LOGDIR}])
 AC_MSG_RESULT([  Log rotate directory     = ${LOGROTATEDIR}])
 AC_MSG_RESULT([  corosync config dir      = ${COROSYSCONFDIR}])

+ 1 - 10
corosync.spec.in

@@ -11,7 +11,6 @@
 %bcond_with snmp
 %bcond_with dbus
 %bcond_with systemd
-%bcond_with upstart
 %bcond_with xmlconf
 %bcond_with runautogen
 %bcond_with libcgroup
@@ -98,9 +97,6 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 %if %{with systemd}
 	--enable-systemd \
 %endif
-%if %{with upstart}
-	--enable-upstart \
-%endif
 %if %{with xmlconf}
 	--enable-xmlconf \
 %endif
@@ -108,8 +104,7 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 	--enable-libcgroup \
 %endif
 	--with-initddir=%{_initrddir} \
-	--with-systemddir=%{_unitdir} \
-	--with-upstartdir=%{_sysconfdir}/init
+	--with-systemddir=%{_unitdir}
 
 make %{_smp_mflags}
 
@@ -207,10 +202,6 @@ fi
 %{_initrddir}/corosync
 %{_initrddir}/corosync-notifyd
 %endif
-%if %{with upstart}
-%{_sysconfdir}/init/corosync.conf
-%{_sysconfdir}/init/corosync-notifyd.conf
-%endif
 %dir %{_localstatedir}/lib/corosync
 %dir %{_localstatedir}/log/cluster
 %{_mandir}/man8/corosync_overview.8*

+ 3 - 8
init/Makefile.am

@@ -35,7 +35,7 @@
 MAINTAINERCLEANFILES	= Makefile.in
 
 EXTRA_DIST		= corosync.in corosync-notifyd.in corosync.service.in \
-                          corosync-notifyd.service.in corosync.conf.in corosync-notifyd.conf.in \
+                          corosync-notifyd.service.in corosync-notifyd.conf.in \
                           corosync.sysconfig.example
 
 if INSTALL_SYSTEMD
@@ -46,11 +46,6 @@ initscriptdir	   = $(INITDDIR)
 initscript_SCRIPTS  = corosync corosync-notifyd
 endif
 
-if INSTALL_UPSTART
-upstartconfdir     = $(UPSTARTDIR)
-upstartconf_DATA   = corosync.conf corosync-notifyd.conf
-endif
-
 %: %.in Makefile
 	rm -f $@-t $@
 	cat $< | sed \
@@ -64,7 +59,7 @@ endif
 	    > $@-t
 	mv $@-t $@
 
-all-local: $(initscript_SCRIPTS) $(systemdconf_DATA) $(upstartconf_DATA)
+all-local: $(initscript_SCRIPTS) $(systemdconf_DATA)
 
 clean-local:
-	rm -rf $(initscript_SCRIPTS) $(systemdconf_DATA) $(upstartconf_DATA)
+	rm -rf $(initscript_SCRIPTS) $(systemdconf_DATA)

+ 0 - 54
init/corosync.conf.in

@@ -1,54 +0,0 @@
-# corosync - Corosync Cluster Engine
-#
-# Starts corosync
-
-expect fork
-
-env prog=corosync
-env initconf=@INITCONFIGDIR@/corosync
-env rpm_lockfile=@LOCALSTATEDIR@/lock/subsys/corosync
-env deb_lockfile=@LOCALSTATEDIR@/lock/corosync
-
-script
-    [ -f "$initconf" ] && . $initconf
-    exec $prog $COROSYNC_OPTIONS
-end script
-
-pre-start script
-    mkdir -p @LOCALSTATEDIR@/run
-    # rewrite according to environment.
-    #[ -c /dev/watchdog ] || modprobe softdog
-end script
-
-post-start script
-wait_for_ipc()
-{
-    [ -f "$initconf" ] && . $initconf
-    try=0
-    max_try=$((COROSYNC_INIT_TIMEOUT*2-1))
-    [ "$max_try" -le "0" ] && max_try=120
-
-    while [ "$try" -le "$max_try" ]; do
-        if corosync-cfgtool -s > /dev/null 2>&1; then
-            return 0
-        fi
-        sleep 0.5
-        try=$((try + 1))
-    done
-    logger -i -t "$UPSTART_JOB" "ERROR: Any interfaces are faulty!"
-    return 1
-}
-    wait_for_ipc || { stop; exit 1; }
-
-    [ -f "$initconf" ] && . $initconf
-    [ -z "$LOCK_FILE" -a -d @SYSCONFDIR@/sysconfig ] && LOCK_FILE="$rpm_lockfile"
-    [ -z "$LOCK_FILE" -a -d @SYSCONFDIR@/default ] && LOCK_FILE="$deb_lockfile"
-    touch $LOCK_FILE
-end script
-
-post-stop script
-    [ -f "$initconf" ] && . $initconf
-    [ -z "$LOCK_FILE" -a -d @SYSCONFDIR@/sysconfig ] && LOCK_FILE="$rpm_lockfile"
-    [ -z "$LOCK_FILE" -a -d @SYSCONFDIR@/default ] && LOCK_FILE="$deb_lockfile"
-    rm -f $LOCK_FILE
-end script