diff --git a/sysvinit.spec b/sysvinit.spec index 98a82ce..17c6761 100644 --- a/sysvinit.spec +++ b/sysvinit.spec @@ -23,6 +23,7 @@ Requires: libselinux >= 1.21.10-1 libsepol >= 1.3.5 Requires: sysvinit-tools = %{version}-%{release} Obsoletes: SysVinit < 2.86-17 Provides: SysVinit = %{version}-%{release} +Conflicts: filesystem < 3 BuildRequires: libselinux-devel >= 1.21.10-1 libsepol-devel >= 1.3.5 %description @@ -35,6 +36,8 @@ of all other programs. %package tools Summary: Tools used for process and utmp management. Group: System Environment/Base +Conflicts: filesystem < 3 +Provides: /sbin/pidof %description tools The sysvinit-tools package contains various tools used for process @@ -69,19 +72,19 @@ make %{?_smp_mflags} CC="%{__cc}" CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" LDFLAGS= %install rm -rf $RPM_BUILD_ROOT -for I in bin sbin usr/{bin,include} %{_mandir}/man{1,3,5,8} etc var/run dev; do +for I in usr/{bin,sbin,include} %{_mandir}/man{1,3,5,8} etc var/run dev; do mkdir -p $RPM_BUILD_ROOT/$I done make -C src ROOT=$RPM_BUILD_ROOT MANDIR=%{_mandir} STRIP=/bin/true \ BIN_OWNER=`id -nu` BIN_GROUP=`id -ng` install rm -f $RPM_BUILD_ROOT/bin/pidof -ln -snf killall5 $RPM_BUILD_ROOT/sbin/pidof +ln -snf killall5 %{buildroot}%{_sbindir}/pidof rm -f $RPM_BUILD_ROOT/sbin/bootlogd rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/bootlogd* chmod 755 $RPM_BUILD_ROOT/usr/bin/utmpdump -# Remove these files, as we use upstart as /sbin/init. +# Remove these files, as we use systemd as init. rm -f $RPM_BUILD_ROOT/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} rm -f $RPM_BUILD_ROOT/%{_includedir}/initreq.h rm -f $RPM_BUILD_ROOT/%{_mandir}/man5/* @@ -95,48 +98,23 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/fstab-decode.8 rm -f $RPM_BUILD_ROOT/bin/mountpoint rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/mountpoint.* -%post -[ -x /sbin/telinit -a -p /dev/initctl -a -f /proc/1/exe -a -d /proc/1/root ] && /sbin/telinit u -exit 0 +# move stuff to /usr/sbin, /sbin is just a symlink +mv -f %{buildroot}/sbin/{killall5,sulogin} %{buildroot}%{_sbindir}/ || : %clean rm -rf $RPM_BUILD_ROOT -%if 0 -# Disabled for upstart. -%files -%defattr(-,root,root) -%doc doc/Changelog doc/Install COPYRIGHT -/sbin/halt -/sbin/init -/sbin/poweroff -/sbin/reboot -/sbin/runlevel -/sbin/shutdown -/sbin/telinit -%{_includedir}/initreq.h -%{_mandir}/man5/* -%{_mandir}/man8/halt* -%{_mandir}/man8/init* -%{_mandir}/man8/poweroff* -%{_mandir}/man8/reboot* -%{_mandir}/man8/runlevel* -%{_mandir}/man8/shutdown* -%{_mandir}/man8/telinit* -%endif - %files tools %defattr(-,root,root) %doc doc/Changelog COPYRIGHT -#/bin/mountpoint %{_bindir}/last %{_bindir}/lastb %{_bindir}/mesg %{_bindir}/utmpdump %attr(2555,root,tty) /usr/bin/wall -/sbin/pidof -/sbin/killall5 -/sbin/sulogin +%{_sbindir}/pidof +%{_sbindir}/killall5 +%{_sbindir}/sulogin %{_mandir}/man1/* %{_mandir}/man8/killall5* %{_mandir}/man8/pidof*