|
@@ -1,6 +1,8 @@
|
|
|
+%global prepare_systemd 1
|
|
|
+
|
|
|
Name: upstart
|
|
|
Version: 1.12.1
|
|
|
-Release: 4%{?_dist_release}
|
|
|
+Release: 6%{?_dist_release}
|
|
|
Summary: An event-driven init system
|
|
|
Summary(ja): イベントドリブン型 init システム
|
|
|
|
|
@@ -8,6 +10,9 @@ Group: System Environment/Base
|
|
|
License: GPLv2 and LGPLv2+
|
|
|
URL: http://launchpad.net/upstart
|
|
|
|
|
|
+Vendor: Project Vine
|
|
|
+Distribution: Vine Linux
|
|
|
+
|
|
|
Source0: http://launchpad.net/upstart/1.x/%{version}/+download/upstart-%{version}.tar.gz
|
|
|
Source1: init-system-dbus.conf
|
|
|
#Patch1: upstart-telinit.patch
|
|
@@ -22,6 +27,15 @@ BuildRequires: json-c-devel >= 0.10
|
|
|
BuildRequires: eudev-libudev-devel
|
|
|
BuildRequires: dconf-devel
|
|
|
Requires: initscripts >= 8.90.4
|
|
|
+Requires(post,postun): bash
|
|
|
+
|
|
|
+Provides: /sbin/halt
|
|
|
+Provides: /sbin/init
|
|
|
+Provides: /sbin/poweroff
|
|
|
+Provides: /sbin/reboot
|
|
|
+Provides: /sbin/runlevel
|
|
|
+Provides: /sbin/shutdown
|
|
|
+Provides: /sbin/telinit
|
|
|
|
|
|
%description
|
|
|
Upstart is an event-based replacement for the /sbin/init daemon which
|
|
@@ -75,6 +89,19 @@ rm %{buildroot}/%{_lib}/*.{a,la}
|
|
|
|
|
|
%find_lang %{name}
|
|
|
|
|
|
+# for alternatives
|
|
|
+%if 0%{?prepare_systemd}
|
|
|
+mkdir -p %{buildroot}/%{_lib}/upstart
|
|
|
+for f in init halt poweroff reboot runlevel shutdown telinit; do
|
|
|
+ mv -f %{buildroot}/sbin/$f %{buildroot}/%{_lib}/upstart/
|
|
|
+done
|
|
|
+
|
|
|
+for f in halt poweroff reboot runlevel shutdown telinit; do
|
|
|
+ mv -f %{buildroot}/%{_mandir}/man8/$f.8 \
|
|
|
+ %{buildroot}/%{_mandir}/man8/upstart-$f.8
|
|
|
+done
|
|
|
+%endif
|
|
|
+
|
|
|
%check
|
|
|
#some tests fail in koji while pass in mock and local build
|
|
|
#to run make check use "--with check"
|
|
@@ -82,6 +109,46 @@ rm %{buildroot}/%{_lib}/*.{a,la}
|
|
|
make check
|
|
|
%endif
|
|
|
|
|
|
+%if 0%{?prepare_systemd}
|
|
|
+%post
|
|
|
+/sbin/alternatives \
|
|
|
+ --install /sbin/init init /%{_lib}/upstart/init 200 \
|
|
|
+ --slave /sbin/halt halt /%{_lib}/upstart/halt \
|
|
|
+ --slave /sbin/poweroff poweroff /%{_lib}/upstart/poweroff \
|
|
|
+ --slave /sbin/reboot reboot /%{_lib}/upstart/reboot \
|
|
|
+ --slave /sbin/runlevel runlevel /%{_lib}/upstart/runlevel \
|
|
|
+ --slave /sbin/shutdown shutdown /%{_lib}/upstart/shutdown \
|
|
|
+ --slave /sbin/telinit telinit /%{_lib}/upstart/telinit \
|
|
|
+ --slave %{_mandir}/man8/halt.8.gz halt.8 %{_mandir}/man8/upstart-halt.8.gz \
|
|
|
+ --slave %{_mandir}/man8/poweroff.8.gz poweroff.8 %{_mandir}/man8/upstart-poweroff.8.gz \
|
|
|
+ --slave %{_mandir}/man8/reboot.8.gz reboot.8 %{_mandir}/man8/upstart-reboot.8.gz \
|
|
|
+ --slave %{_mandir}/man8/runlevel.8.gz runlevel.8 %{_mandir}/man8/upstart-runlevel.8.gz \
|
|
|
+ --slave %{_mandir}/man8/shutdown.8.gz shutdown.8 %{_mandir}/man8/upstart-shutdown.8.gz \
|
|
|
+ --slave %{_mandir}/man8/telinit.8.gz telinit.8 %{_mandir}/man8/upstart-telinit.8.gz
|
|
|
+
|
|
|
+%postun
|
|
|
+if [ "$1" = "0" ]; then
|
|
|
+ /sbin/alternatives --remove init /%{_lib}/upstart/init
|
|
|
+fi
|
|
|
+
|
|
|
+%triggerpostun -- upstart <= 1.12.1-5vl7
|
|
|
+/sbin/alternatives \
|
|
|
+ --install /sbin/init init /%{_lib}/upstart/init 200 \
|
|
|
+ --slave /sbin/halt halt /%{_lib}/upstart/halt \
|
|
|
+ --slave /sbin/poweroff poweroff /%{_lib}/upstart/poweroff \
|
|
|
+ --slave /sbin/reboot reboot /%{_lib}/upstart/reboot \
|
|
|
+ --slave /sbin/runlevel runlevel /%{_lib}/upstart/runlevel \
|
|
|
+ --slave /sbin/shutdown shutdown /%{_lib}/upstart/shutdown \
|
|
|
+ --slave /sbin/telinit telinit /%{_lib}/upstart/telinit \
|
|
|
+ --slave %{_mandir}/man8/halt.8.gz halt.8 %{_mandir}/man8/upstart-halt.8.gz \
|
|
|
+ --slave %{_mandir}/man8/poweroff.8.gz poweroff.8 %{_mandir}/man8/upstart-poweroff.8.gz \
|
|
|
+ --slave %{_mandir}/man8/reboot.8.gz reboot.8 %{_mandir}/man8/upstart-reboot.8.gz \
|
|
|
+ --slave %{_mandir}/man8/runlevel.8.gz runlevel.8 %{_mandir}/man8/upstart-runlevel.8.gz \
|
|
|
+ --slave %{_mandir}/man8/shutdown.8.gz shutdown.8 %{_mandir}/man8/upstart-shutdown.8.gz \
|
|
|
+ --slave %{_mandir}/man8/telinit.8.gz telinit.8 %{_mandir}/man8/upstart-telinit.8.gz
|
|
|
+
|
|
|
+%endif
|
|
|
+
|
|
|
%clean
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
@@ -96,18 +163,22 @@ rm -rf %{buildroot}
|
|
|
%{_sysconfdir}/init/
|
|
|
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/Upstart.conf
|
|
|
/%{_lib}/libupstart.so.*
|
|
|
+%if 0%{?prepare_systemd}
|
|
|
+/%{_lib}/upstart
|
|
|
+%else
|
|
|
/sbin/halt
|
|
|
/sbin/init
|
|
|
-/sbin/initctl
|
|
|
/sbin/poweroff
|
|
|
/sbin/reboot
|
|
|
/sbin/runlevel
|
|
|
/sbin/shutdown
|
|
|
+/sbin/telinit
|
|
|
+%endif
|
|
|
+/sbin/initctl
|
|
|
/sbin/start
|
|
|
/sbin/status
|
|
|
/sbin/stop
|
|
|
/sbin/restart
|
|
|
-/sbin/telinit
|
|
|
/sbin/reload
|
|
|
/sbin/upstart-socket-bridge
|
|
|
/sbin/upstart-udev-bridge
|
|
@@ -144,6 +215,13 @@ rm -rf %{buildroot}
|
|
|
%{_mandir}/man8/upstart-monitor.8*
|
|
|
|
|
|
%changelog
|
|
|
+* Wed Jan 02 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.12.1-6
|
|
|
+- manuals for {halt,poweroff,reboot,runlevel,shutdown,telinit} are alternatives ready.
|
|
|
+
|
|
|
+* Tue Jan 01 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.12.1-5
|
|
|
+- rebuilt with json-c-0.13.
|
|
|
+- /sbin/{init,halt,poweroff,reboot,runlevel,shutdown,telinit} are alternatives ready.
|
|
|
+
|
|
|
* Tue Jun 24 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.1-4
|
|
|
- change BuildRequires: eudev-libudev-devel instead of libudev-devel
|
|
|
|