2006-12-14 18:06:00 +01:00
|
|
|
#
|
|
|
|
# spec file for package sysvinit (Version 2.86)
|
|
|
|
#
|
2009-01-29 01:08:29 +01:00
|
|
|
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2006-12-14 18:06:00 +01:00
|
|
|
#
|
2008-08-06 01:58:24 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2006-12-14 18:06:00 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-03-13 19:06:50 +01:00
|
|
|
|
2006-12-14 18:06:00 +01:00
|
|
|
Name: sysvinit
|
|
|
|
%define MGVER 0.9.6s
|
|
|
|
%define PDVER 2.0.2
|
2009-08-21 17:42:25 +02:00
|
|
|
%define KPVER 2.16
|
|
|
|
%define SCVER 1.10
|
2006-12-14 18:06:00 +01:00
|
|
|
%define SIVER 2.86
|
2009-08-21 17:42:25 +02:00
|
|
|
%define START 0.54
|
2009-12-07 15:53:19 +01:00
|
|
|
License: GPLv2+
|
2006-12-14 18:06:00 +01:00
|
|
|
Group: System/Base
|
|
|
|
PreReq: coreutils
|
2007-10-31 17:42:15 +01:00
|
|
|
AutoReqProv: on
|
2006-12-14 18:06:00 +01:00
|
|
|
Version: 2.86
|
2009-12-07 15:53:19 +01:00
|
|
|
Release: 216
|
2006-12-14 18:06:00 +01:00
|
|
|
Summary: SysV-Style init
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2008-08-26 02:23:47 +02:00
|
|
|
BuildRequires: libselinux-devel libsepol-devel
|
2006-12-14 18:06:00 +01:00
|
|
|
Source: sysvinit-2.86.tar.bz2
|
2009-08-21 17:42:25 +02:00
|
|
|
Source2: killproc-2.16.tar.bz2
|
2006-12-14 18:06:00 +01:00
|
|
|
Source3: powerd-2.0.2.tar.bz2
|
2009-08-21 17:42:25 +02:00
|
|
|
Source4: showconsole-1.10.tar.bz2
|
|
|
|
Source5: startpar-0.54.tar.bz2
|
2006-12-14 18:06:00 +01:00
|
|
|
Source6: rc.powerd
|
2007-11-30 16:13:55 +01:00
|
|
|
Source7: sysvinit-rpmlintrc
|
2008-07-25 05:18:53 +02:00
|
|
|
Source8: mkinitrd-boot.sh
|
|
|
|
Source9: mkinitrd-kill1.sh
|
|
|
|
Source10: mkinitrd-kill2.sh
|
2006-12-14 18:06:00 +01:00
|
|
|
Patch: sysvinit-2.86.dif
|
|
|
|
Patch1: sysvinit-2.86-nfs4pidof.patch
|
|
|
|
Patch2: powerd-2.0.2.dif
|
2009-08-21 17:42:25 +02:00
|
|
|
Patch3: killproc-2.16.dif
|
2006-12-14 18:06:00 +01:00
|
|
|
Patch5: sysvinit-2.86-sulogin.patch
|
|
|
|
Patch6: sysvinit-2.82-startstop.patch
|
|
|
|
Patch7: sysvinit-2.85-suse.patch
|
|
|
|
Patch8: sysvinit-2.85-paths.patch
|
|
|
|
Patch9: sysvinit-2.86-utmp.patch
|
2009-08-21 17:42:25 +02:00
|
|
|
Patch10: showconsole-1.10.dif
|
2006-12-14 18:06:00 +01:00
|
|
|
Patch11: sysvinit-2.86-race.patch
|
|
|
|
Patch12: sysvinit-2.86-lib64.patch
|
|
|
|
Patch13: sysvinit-2.82-multiline.patch
|
2009-08-21 17:42:25 +02:00
|
|
|
Patch14: startpar-0.54.dif
|
2006-12-14 18:06:00 +01:00
|
|
|
Patch15: sysvinit-2.86-usage-message.patch
|
|
|
|
Patch16: sysvinit-2.86-full-time.patch
|
2007-06-05 16:40:38 +02:00
|
|
|
Patch17: sysvinit-2.86-hddown.patch
|
2008-08-26 02:23:47 +02:00
|
|
|
Patch18: sysvinit-2.86-selinux.patch
|
2008-09-24 17:38:00 +02:00
|
|
|
Patch19: sysvinit-2.86-fuse-no-kill.patch
|
2009-12-04 15:15:20 +01:00
|
|
|
Patch20: sysvinit-2.86-mdmon-no-kill.patch
|
2006-12-14 18:06:00 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
System V style init programs by Miquel van Smoorenburg that control the
|
|
|
|
booting and shutdown of your system. These support a number of system
|
|
|
|
runlevels, each one associated with a specific set of utilities. For
|
|
|
|
example, the normal system runlevel is 3, which starts a getty on
|
|
|
|
virtual consoles tty1-tty6. Runlevel 5 starts xdm. Runlevel 0 shuts
|
|
|
|
down the system. See the individual man pages for inittab, initscript,
|
|
|
|
halt, init, killproc, killall5, powerd, reboot, runlevel, shutdown, and
|
|
|
|
telinit for more information.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Miquel van Smoorenburg <miquels@drinkel.ow.nl>
|
|
|
|
Florian La Roche <florian@suse.de>
|
|
|
|
Werner Fink <werner@suse.de>
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -b 2 -b 3 -b 4 -b 5
|
|
|
|
%patch -P 1 -b .nfs4pidof
|
|
|
|
%patch -P 5 -b .sulogin
|
|
|
|
%patch -P 6 -b .ststdmn
|
|
|
|
%patch -P 7 -b .suse
|
|
|
|
%patch -P 8 -b .paths
|
|
|
|
%patch -P 9 -b .utmp
|
|
|
|
%patch -P 11 -b .race
|
|
|
|
%patch -P 12 -b .lib64
|
|
|
|
%patch -P 13 -b .multiline
|
|
|
|
%patch -P 15 -b .usage
|
|
|
|
%patch -P 16 -b .fulltime
|
2007-06-05 16:40:38 +02:00
|
|
|
%patch -P 17 -b .hddown
|
2008-08-26 02:23:47 +02:00
|
|
|
%patch -P 18 -b .selinux
|
2008-09-24 17:38:00 +02:00
|
|
|
%patch -P 19 -b .fuse
|
2009-12-04 15:15:20 +01:00
|
|
|
%patch -P 20 -b .mdmon
|
2007-06-05 16:40:38 +02:00
|
|
|
%patch
|
2006-12-14 18:06:00 +01:00
|
|
|
pushd ../powerd-%{PDVER}
|
|
|
|
%patch -P 2
|
|
|
|
popd
|
|
|
|
pushd ../killproc-%{KPVER}
|
2009-03-11 21:39:53 +01:00
|
|
|
%patch -P 3
|
2006-12-14 18:06:00 +01:00
|
|
|
popd
|
|
|
|
pushd ../showconsole-%{SCVER}
|
2008-06-23 04:34:49 +02:00
|
|
|
%patch -P 10
|
2006-12-14 18:06:00 +01:00
|
|
|
popd
|
|
|
|
pushd ../startpar-%{START}
|
2008-08-16 02:57:09 +02:00
|
|
|
%patch -P 14
|
2006-12-14 18:06:00 +01:00
|
|
|
popd
|
|
|
|
%_fixowner .
|
|
|
|
%_fixgroup .
|
|
|
|
/bin/chmod -Rf a+rX,g-w,o-w .
|
|
|
|
|
|
|
|
%build
|
|
|
|
RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -D_FILE_OFFSET_BITS=64"
|
|
|
|
export RPM_OPT_FLAGS
|
|
|
|
CFLAGS="-Wall ${RPM_OPT_FLAGS} -D_GNU_SOURCE -D__NO_STRING_INLINES -pipe"
|
|
|
|
CC=gcc
|
|
|
|
make -C src CFLAGS="$CFLAGS" CC="$CC"
|
|
|
|
pushd contrib/
|
|
|
|
$CC $CFLAGS -o start-stop-daemon start-stop-daemon.c
|
|
|
|
popd
|
|
|
|
pushd ../showconsole-%{SCVER}
|
|
|
|
make
|
|
|
|
popd
|
|
|
|
pushd ../killproc-%{KPVER}
|
|
|
|
make INC="-I../showconsole-%{SCVER} -L../showconsole-%{SCVER}"
|
|
|
|
popd
|
|
|
|
pushd ../powerd-%{PDVER}
|
|
|
|
%ifnarch s390 s390x
|
|
|
|
./configure --prefix= --bindir='$(DESTDIR)/sbin' \
|
|
|
|
--mandir='$(DESTDIR)%{_mandir}' \
|
|
|
|
--sbindir='$(DESTDIR)/sbin'
|
|
|
|
make CFLAGS="-I../sysvinit-%{version}/src $CFLAGS"
|
|
|
|
%endif
|
|
|
|
popd
|
|
|
|
pushd ../startpar-%{START}
|
2009-08-21 17:42:25 +02:00
|
|
|
make INC="-I../showconsole-%{SCVER} -L../showconsole-%{SCVER}"
|
2006-12-14 18:06:00 +01:00
|
|
|
popd
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf ${RPM_BUILD_ROOT}
|
2007-11-30 16:13:55 +01:00
|
|
|
mkdir ${RPM_BUILD_ROOT}
|
2006-12-14 18:06:00 +01:00
|
|
|
mkdir -m 755 -p ${RPM_BUILD_ROOT}/bin
|
|
|
|
mkdir -m 755 -p ${RPM_BUILD_ROOT}/dev
|
|
|
|
mkdir -m 755 -p ${RPM_BUILD_ROOT}/etc
|
|
|
|
mkdir -m 755 -p ${RPM_BUILD_ROOT}/sbin
|
|
|
|
mkdir -m 755 -p ${RPM_BUILD_ROOT}/usr/bin
|
|
|
|
mkdir -m 755 -p ${RPM_BUILD_ROOT}/usr/include
|
|
|
|
mkdir -m 755 -p ${RPM_BUILD_ROOT}%{_mandir}/man1
|
|
|
|
mkdir -m 755 -p ${RPM_BUILD_ROOT}%{_mandir}/man5
|
|
|
|
mkdir -m 755 -p ${RPM_BUILD_ROOT}%{_mandir}/man8
|
|
|
|
make install -C src MANPATH=%{_mandir} ROOT=${RPM_BUILD_ROOT}
|
|
|
|
install contrib/start-stop-daemon ${RPM_BUILD_ROOT}/sbin/
|
|
|
|
test -p ${RPM_BUILD_ROOT}/dev/initctl || {
|
|
|
|
rm -f ${RPM_BUILD_ROOT}/dev/initctl
|
|
|
|
mknod ${RPM_BUILD_ROOT}/dev/initctl p
|
|
|
|
chmod 600 ${RPM_BUILD_ROOT}/dev/initctl
|
|
|
|
}
|
|
|
|
pushd ../showconsole-%{SCVER}
|
|
|
|
make install MANPATH=%{_mandir} INSTBINFLAGS="-m 0700" DESTDIR=${RPM_BUILD_ROOT}
|
|
|
|
popd
|
|
|
|
pushd ../killproc-%{KPVER}
|
|
|
|
make install MANPATH=%{_mandir} INSTBINFLAGS="-m 0755" DESTDIR=${RPM_BUILD_ROOT}
|
|
|
|
popd
|
|
|
|
pushd ../powerd-%{PDVER}
|
|
|
|
%ifnarch s390 s390x
|
|
|
|
make install DESTDIR=${RPM_BUILD_ROOT}
|
|
|
|
cp README README.powerd
|
|
|
|
cp SUPPORTED SUPPORTED.powerd
|
|
|
|
cp FAQ FAQ.powerd
|
|
|
|
echo '# ' > ${RPM_BUILD_ROOT}/etc/powerd.conf
|
|
|
|
echo '# /etc/powerd.conf for powerd version-2.02' >> ${RPM_BUILD_ROOT}/etc/powerd.conf
|
|
|
|
echo '# ' >> ${RPM_BUILD_ROOT}/etc/powerd.conf
|
|
|
|
echo '# read manual page of detectups(8) and powerd(8) its self.' >> ${RPM_BUILD_ROOT}/etc/powerd.conf
|
|
|
|
echo '# ' >> ${RPM_BUILD_ROOT}/etc/powerd.conf
|
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/etc/init.d
|
|
|
|
install -m 0744 %{SOURCE6} ${RPM_BUILD_ROOT}/etc/init.d/powerd
|
|
|
|
%endif
|
|
|
|
popd
|
|
|
|
pushd ../startpar-%{START}
|
|
|
|
make install DESTDIR=${RPM_BUILD_ROOT}
|
|
|
|
popd
|
|
|
|
#
|
2008-07-25 05:18:53 +02:00
|
|
|
# Install mkinitrd scriptlets
|
|
|
|
#
|
|
|
|
install -d $RPM_BUILD_ROOT/lib/mkinitrd/scripts
|
|
|
|
install -m 0755 %{SOURCE8} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-blogd.sh
|
|
|
|
install -m 0755 %{SOURCE9} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-killblogd.sh
|
|
|
|
install -m 0755 %{SOURCE10} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-killblogd2.sh
|
|
|
|
#
|
2006-12-14 18:06:00 +01:00
|
|
|
# Remove files not packed:
|
|
|
|
#
|
|
|
|
rm -f ${RPM_BUILD_ROOT}/usr/include/{initreq.h,libblogger.h}
|
|
|
|
rm -f ${RPM_BUILD_ROOT}/usr/lib/libblogger.a
|
|
|
|
rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/mesg.1*
|
|
|
|
%ifarch s390 s390x
|
|
|
|
rm -f ${RPM_BUILD_ROOT}%{_mandir}/man8/powerd.8*
|
|
|
|
rm -f ${RPM_BUILD_ROOT}%{_mandir}/man8/detectups.8*
|
|
|
|
rm -f ${RPM_BUILD_ROOT}/sbin/powerd
|
|
|
|
rm -f ${RPM_BUILD_ROOT}/sbin/detectups
|
|
|
|
%endif
|
|
|
|
chmod 444 ${RPM_BUILD_ROOT}%{_mandir}/man?/*
|
|
|
|
|
2009-03-09 00:29:57 +01:00
|
|
|
%preun
|
|
|
|
%stop_on_removal powered
|
|
|
|
|
2006-12-14 18:06:00 +01:00
|
|
|
%post
|
2008-09-15 12:24:56 +02:00
|
|
|
if test -x /sbin/telinit -a -p /dev/initctl -a -f /proc/1/exe -a -d /proc/1/root -a ! -d /.build ; then
|
2008-08-06 01:58:24 +02:00
|
|
|
if test $(stat -Lc '%%D-%%i' /) = $(stat -Lc '%%D-%%i' /proc/1/root) ; then
|
2006-12-14 18:06:00 +01:00
|
|
|
/sbin/telinit u
|
|
|
|
fi
|
|
|
|
fi
|
2009-03-09 00:29:57 +01:00
|
|
|
if test -x /sbin/mkinitrd_setup; then
|
|
|
|
mkinitrd_setup
|
|
|
|
fi
|
2008-09-05 20:41:38 +02:00
|
|
|
|
|
|
|
%postun
|
2009-03-09 00:29:57 +01:00
|
|
|
%insserv_cleanup
|
|
|
|
if test -x /sbin/mkinitrd_setup; then
|
|
|
|
mkinitrd_setup
|
|
|
|
fi
|
2006-12-14 18:06:00 +01:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf ${RPM_BUILD_ROOT}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr (-,root,root,755)
|
|
|
|
%ifnarch s390 s390x
|
|
|
|
%config /etc/powerd.conf
|
|
|
|
%config /etc/init.d/powerd
|
|
|
|
%doc ../powerd-%{PDVER}/README.powerd
|
|
|
|
%doc ../powerd-%{PDVER}/SUPPORTED.powerd
|
|
|
|
%doc ../powerd-%{PDVER}/FAQ.powerd
|
|
|
|
%doc ../powerd-%{PDVER}/powerd.conf.monitor
|
|
|
|
%doc ../powerd-%{PDVER}/powerd.conf.peer
|
|
|
|
%endif
|
|
|
|
%doc contrib/start-stop-daemon.README
|
|
|
|
# %doc contrib/bootlogd.README
|
2008-07-25 05:18:53 +02:00
|
|
|
%dir /lib/mkinitrd
|
|
|
|
%dir /lib/mkinitrd/scripts
|
|
|
|
/lib/mkinitrd/scripts/boot-blogd.sh
|
|
|
|
/lib/mkinitrd/scripts/boot-killblogd.sh
|
|
|
|
/lib/mkinitrd/scripts/boot-killblogd2.sh
|
2006-12-14 18:06:00 +01:00
|
|
|
/bin/mountpoint
|
|
|
|
/bin/pidof
|
|
|
|
/bin/usleep
|
2007-06-18 17:19:15 +02:00
|
|
|
/bin/fsync
|
2006-12-14 18:06:00 +01:00
|
|
|
# /sbin/bootlogd
|
|
|
|
/sbin/blogger
|
|
|
|
/sbin/blogd
|
|
|
|
/sbin/showconsole
|
|
|
|
/sbin/setconsole
|
|
|
|
/sbin/isserial
|
|
|
|
/sbin/checkproc
|
|
|
|
/sbin/pidofproc
|
|
|
|
/sbin/halt
|
|
|
|
/sbin/init
|
|
|
|
# /sbin/intr
|
|
|
|
/sbin/killproc
|
|
|
|
/sbin/killall5
|
|
|
|
/sbin/pidof
|
|
|
|
%ifnarch s390 s390x
|
|
|
|
/sbin/powerd
|
|
|
|
/sbin/detectups
|
|
|
|
%endif
|
|
|
|
/sbin/poweroff
|
|
|
|
/sbin/reboot
|
|
|
|
/sbin/runlevel
|
|
|
|
/sbin/startproc
|
|
|
|
/sbin/start_daemon
|
|
|
|
/sbin/shutdown
|
|
|
|
/sbin/start-stop-daemon
|
|
|
|
/sbin/sulogin
|
|
|
|
/sbin/telinit
|
|
|
|
/sbin/startpar
|
2008-12-05 15:50:32 +01:00
|
|
|
/sbin/vhangup
|
2008-12-06 14:47:45 +01:00
|
|
|
/sbin/mkill
|
2006-12-14 18:06:00 +01:00
|
|
|
/usr/bin/last
|
|
|
|
/usr/bin/lastb
|
|
|
|
/usr/bin/utmpdump
|
|
|
|
# /usr/include/libblogger.h
|
|
|
|
# /usr/lib/libblogger.a
|
|
|
|
%doc %{_mandir}/man1/last.1.gz
|
|
|
|
%doc %{_mandir}/man1/lastb.1.gz
|
|
|
|
%doc %{_mandir}/man1/usleep.1.gz
|
2007-06-18 17:19:15 +02:00
|
|
|
%doc %{_mandir}/man1/fsync.1.gz
|
2006-12-14 18:06:00 +01:00
|
|
|
%doc %{_mandir}/man1/mountpoint.1.gz
|
|
|
|
# %doc %{_mandir}/man8/bootlogd.8.gz
|
|
|
|
%doc %{_mandir}/man8/blogger.8.gz
|
|
|
|
%doc %{_mandir}/man8/blogd.8.gz
|
|
|
|
%doc %{_mandir}/man8/showconsole.8.gz
|
|
|
|
%doc %{_mandir}/man8/setconsole.8.gz
|
|
|
|
%doc %{_mandir}/man8/isserial.8.gz
|
|
|
|
%doc %{_mandir}/man8/checkproc.8.gz
|
|
|
|
%doc %{_mandir}/man8/pidofproc.8.gz
|
|
|
|
%doc %{_mandir}/man8/halt.8.gz
|
|
|
|
%doc %{_mandir}/man5/initscript.5.gz
|
|
|
|
%doc %{_mandir}/man5/inittab.5.gz
|
|
|
|
%doc %{_mandir}/man8/init.8.gz
|
|
|
|
#%doc %{_mandir}/man8/intr.8.gz
|
|
|
|
%doc %{_mandir}/man8/killall5.8.gz
|
|
|
|
%doc %{_mandir}/man8/killproc.8.gz
|
|
|
|
%doc %{_mandir}/man8/pidof.8.gz
|
|
|
|
%ifnarch s390 s390x
|
|
|
|
%doc %{_mandir}/man8/powerd.8.gz
|
|
|
|
%doc %{_mandir}/man8/detectups.8.gz
|
|
|
|
%endif
|
|
|
|
%doc %{_mandir}/man8/poweroff.8.gz
|
|
|
|
%doc %{_mandir}/man8/reboot.8.gz
|
|
|
|
%doc %{_mandir}/man8/runlevel.8.gz
|
|
|
|
%doc %{_mandir}/man8/startproc.8.gz
|
|
|
|
%doc %{_mandir}/man8/start_daemon.8.gz
|
|
|
|
%doc %{_mandir}/man8/shutdown.8.gz
|
|
|
|
%doc %{_mandir}/man8/sulogin.8.gz
|
|
|
|
%doc %{_mandir}/man8/telinit.8.gz
|
|
|
|
%doc %{_mandir}/man8/startpar.8.gz
|
2008-12-05 15:50:32 +01:00
|
|
|
%doc %{_mandir}/man8/vhangup.8.gz
|
2008-12-06 14:47:45 +01:00
|
|
|
%doc %{_mandir}/man8/mkill.8.gz
|
2007-11-30 16:13:55 +01:00
|
|
|
|
2007-04-19 22:43:28 +02:00
|
|
|
%changelog
|