sysvinit/sysvinit.spec
Dr. Werner Fink 3afec739d5 - Add patch to make last(1) knowing latest IPv6 specs
- Update to sysvinit (2.88dsf) world; urgency=low
  * Mention new home on Savannah in README.
  * Revert change from Fedora/RedHat where the now obsolete command
    INIT_CMD_CHANGECONS was introduced.  Based on feedback and patch
    from Bill Nottingham.
  * Adjust makefile to make sure the install directories are created
    before files are copied into them.
  * Simplify build rules, based on patch from Mike Frysinger and Gentoo.
  * Fix minor bug in optimizing of argument parsing.  Based on
    report from jakemus on freshmeat.
  * Add casts to get rid of compiler warning about signed/unsigned issues.
  * Change tty handling in init to make sure the UTF-8 flag is not cleared
    on boot.  Patch from Samuel Thibault.
  * Add Makefile in toplevel directory.
  * Print usage information when shutdown is used by non-root user.
    Patch from Mike Frysinger and Gentoo.
  * Sync shutdown manual page and usage information.  Patch from Mike
    Frysinger and Gentoo.
  * Fix race condition in utmp writing.  Patch from Gil Kloepfer via
    Mike Frysinger and Gentoo.
  * Rewrite findtty() in bootlogd to recursively search /dev/ for the
    correct device, to handle terminal devices for example in /dev/pty/.
    Patch from Debian.
  * Make sure bootlogd findpty() returns an error value when it fails to
    find a usable pty.  Patch from Rob Leslie via Debian.
  * Make sure bootlogd fflush() every line, even if asked not to flush
    to disk using fdatasync().  Patch from Scott Gifford via Debian.
  * Add compatibility code to handle old path "/etc/powerstatus" for a
    while.
  * Incude definition for MNT_DETACH which is missing in older GNU libc
    headers.
  * Do not strip binaries before installing them, to make it easier to
    get binaries with debug information installed.
  * Add the comment from Andrea Arcangeli about the correct
    place of setting the default childhandler within spawn().
  * Make sure that newline is printed out for last(1) even
    if an utmp record entry is truncated.
  * Check if utmp not only exists but also is writable and delay
    writing out of the utmp runlevel record if utmp is not writable.
  * Be able to find libcrypt also on 64 bit based architectures.
  * Add option -w to the last command to display the full user and
    domain names in the output.  Patch from Petr Lautrbach.
  * Add a manual page for utmpdump as this tool is sometimes
    very useful even if not intended for normal use.
  * Use paths.h macros for wall
  * Change path "/etc/powerstatus" to "/var/run/powerstatus"
  * Detected also removable block devices at halt/reboot to be able
    to flush data and send them the ATA standby command.  This should
    avoid data loss on USB sticks and other removable block devices.
  * Flush block devices on halt/reboot if not done by the kernel.
  * Set SHELL to /bin/sh in the environmant of shutdown.
  * Retry to write out shutdown messages if interrupted.
  * pidof/killall5 - make omit pid list a dynamic one.
  * pidof - provide '-n' to skip stat(2) syscall on network based FS.
  * init - avoid compiler warnings
  * init - initialize console by using the macros from ttydefaults.h
  * init - add the possiblity to ignore further interrupts from keyboard
  * init - add the possiblity to set sane terminal line settings
  * sulogin - add the possibility to reset the terminal io
  * Fix some minor problems
  * init - enable is_selinux_enabled() to detect selinuxfs
  * Add fix for Debian bug #536574 -- Can be enabled by -DACCTON_OFF
  * Add helper program fstab-decode to make it easier to handle
    /etc/mtab content. Patch by Miloslav Trmac and Fedora.
  * Add fix for Debian bug #335023 - Make sure TERM is set on FreeBSD.
  * Add fix for Debian bug #374038 - Make it clear that shutdown -c can
    only cancel a waiting shutdown, not an active one.
  * Add note to pidof manual page about the use of readlink(2). Patch by
    Bill Nottingham and Fedora.
  * Add PAM patch contrib/notify-pam-dead.patch based on Debian bug
    #68621, which will add PAM support for programs spawned by init on
    the console like sulogin. Based on patch by Topi Miettinen.  This
    patch is not applied by default yet while we review its
    usefullness.  It is only helpful for session handling, as sulogin
    do not use and will not use a PAM conv() function.  The current
    sulogin is able to handle DES as well as MD5, SHA, and Blowfish
    encrypted passwords due using getpwnam(3).
  * Move utmp/wtmp before the execvp() in spawn() to be sure to
    use the correct pid even on a controlling tty
  * Remaining problem is that the pid of the second fork() for
    getting a controlling tty isn't that reported by spawn()
  * Re-enable writting utmp/wtmp for boot scripts
  * Extend sulogin to support additional encryption algorithms
  * Re-enable maintenance message of sulogin
  * Enable the sulogin fallback password check to handle  MD5, SHA, and
    Blowfish encrypted passwords in case of getpwnam(3) fails.
  * sulogin picking the SELinux context was broken. Patch by Daniel Walsh

- Test out sysvinit (2.88dsf) UNRELEASED; urgency=low
- Update to sysvinit (2.87dsf) world; urgency=low
 * Document -e and -t options for telinit in init(8).
 * Document in halt(8) that -n might not disable all syncing.
   Patch by Bill Nottingham and Fedora
 * Adjust output from "last -x".  In reboot lines, print endpoint
   of uptime too.  In shutdown lines print downtimes rather than
   the time between downs.  Fix typo in string compare in last.c.
   Patch by Thomas Hood.
 * Improve handling of IPv6 addresses in last.  Patch from Fedora.
 * Add new option -F to last, to output full date string instead
   of the short form provided by default.  Patch from Olaf Dabrunz
   and SuSe.
 * Fix utmp/wtmp updating on 64-bit platforms.  Patch by Bill
   Nottingham and Fedora.
 * Avoid unchecked return value from malloc() in utmpdump.
   Patch from Christian 'Dr. Disk' Hechelmann and Fedora.
 * Make sure to use execle and no execl when passing environment to
   the new process.  Patch from RedHat.
 * Correct init to make sure the waiting status is preserved across
   re-exec.  Patch from RedHat.
 * Correct init to avoid race condition when starting programs during
   boot.  Patch from SuSe.
 * Allow 'telinit u' in runlevels 0 and 6.  Patch from Thomas Hood.
 * Improve error message from init if fork() fail.  Patch found in Suse.
 * Add support for SE Linux capability handling.  Patch from Manoj
   Srivastava, adjusted to avoid aborting if SE policy was loaded in
   the initrd with patch from Bill Nottingham and Fedora.
 * Add -c option to pidof for only matching processes with the same
   process root.  Ignore -c when not running as root.  Patch from
   Thomas Woerner and Fedora.
 * Add usleep in killall5 after killing processes, to force the kernel
   to reschedule.  Patch from SuSe.
 * Modify pidof to not print empty line if no pid was found.
 * Modify init and sulogin to fix emergency mode's tty, making sure ^C
   and ^Z work when booting with 'emergency' kernel option.  Patch from
   Samuel Thibault.
 * Modify init to allow some time for failed opens to resolve themselves.
   Patch from Bill Nottingham and Fedora.
 * Modify init to shut down IDE, SCSI and SATA disks properly.  Patches
   from Sebastian Reichelt, Werner Fink and SuSe.
 * Modify wall to use UT_LINESIZE from <utmp.h> instead of hardcoded
   string lengths.  Patch from SuSe.
 * Change wall to make halt include hostname in output.
 * Change killall to avoid killing init by mistake.  Patch from SuSe.
 * Change killall5 to use the exit value to report if it found any
   processes to kill.  Patch from Debian.
 * Add option -o opmitpid to killall5, to make it possible to skip
   some pids during shutdown.  Based on patch from Colin Watson and
   Ubuntu.
 * Modify killall to work better with user space file system, by
   changing cwd to /proc when stopping and killing processes, and
   avoiding stat() when the value isn't used.  Also, lock process
   pages in memory to avoid paging when user processes are stopped.
   Patch from Debian and Goswin von Brederlow with changes by Kel
   Modderman.
 * Change shutdown to only accept flags -H and -P with the -h flag,
   and document this requirement in the manual page.
 * Change reboot/halt to work properly when used as a login shell.
   Patch by Dale R. Worley and Fedora.
 * Let sulogin fall back to the staticly linked /bin/sash if both roots
   shell and /bin/sh fail to execute.

OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=40
2010-04-15 10:39:52 +00:00

317 lines
9.3 KiB
RPMSpec

#
# spec file for package sysvinit (Version 2.88)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: sysvinit
%define MGVER 0.9.6s
%define PDVER 2.0.2
%define KPVER 2.16
%define SCVER 1.10
%define SIVER 2.88
%define START 0.54
License: GPLv2+
Group: System/Base
AutoReqProv: on
Version: 2.88
Release: 1
Summary: SysV-Style init
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: audit-devel libselinux-devel libsepol-devel pam-devel
Source: http://download.savannah.gnu.org/releases/sysvinit/sysvinit-2.88dsf.tar.bz2
Source2: killproc-2.16.tar.bz2
Source3: powerd-2.0.2.tar.bz2
Source4: showconsole-1.10.tar.bz2
Source5: startpar-0.54.tar.bz2
Source6: rc.powerd
Source7: sysvinit-rpmlintrc
Source8: mkinitrd-boot.sh
Source9: mkinitrd-kill1.sh
Source10: mkinitrd-kill2.sh
Patch: sysvinit-2.88dsf.dif
Patch1: sysvinit-2.82-startstop.patch
Patch2: sysvinit-2.88dsf-suse.patch
Patch3: sysvinit-2.88dsf-no-kill.patch
Patch4: notify-pam-dead.patch
Patch5: sysvinit-last-ipv6-heuristic.patch
Patch20: powerd-2.0.2.dif
Patch30: killproc-2.16.dif
Patch40: showconsole-1.10.dif
Patch50: startpar-0.54.dif
Requires: sysvinit-tools
Provides: sbin_init
%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, powerd, reboot, runlevel, shutdown, and telinit for
more information.
%package tools
License: GPLv2+
Summary: Tools for basic booting
Group: System/Base
%if 0%{suse_version} > 1120
Requires(preun): coreutils mkinitrd %insserv_prereq
Requires(postun): coreutils mkinitrd %insserv_prereq
%else
PreReq: coreutils mkinitrd %insserv_prereq
%endif
%description tools
Helper tools from sysvinit that support booting, including but not exclusive
to startpar, killproc and pidof. System V init specific programs are in the
sysvinit package.
%prep
%setup -n sysvinit-%{SIVER}dsf -q -b 2 -b 3 -b 4 -b 5
%patch1 -p0 -b .startstop
%patch2 -p0 -b .suse
%patch3 -p0 -b .no-kill
%patch4 -p0 -b .pam
%patch5 -p2 -b .ipv6
%patch
pushd ../powerd-%{PDVER}
%patch20
popd
pushd ../killproc-%{KPVER}
%patch30
popd
pushd ../showconsole-%{SCVER}
%patch40
popd
pushd ../startpar-%{START}
%patch50
popd
%_fixowner .
%_fixgroup .
/bin/chmod -Rf a+rX,g-w,o-w .
%build
RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -D_FILE_OFFSET_BITS=64 -pipe"
CC=gcc
export RPM_OPT_FLAGS CC
make %{?_smp_mflags} WITH_SELINUX=yes DISTRO=SuSE
pushd ../showconsole-%{SCVER}
make %{?_smp_mflags}
popd
pushd ../killproc-%{KPVER}
make %{?_smp_mflags} 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 %{?_smp_mflags} CFLAGS="-I../sysvinit-%{SIVER}dsf/src $RPM_OPT_FLAGS "
%endif
popd
pushd ../startpar-%{START}
make %{?_smp_mflags} INC="-I../showconsole-%{SCVER} -L../showconsole-%{SCVER}"
popd
%install
rm -rf ${RPM_BUILD_ROOT}
mkdir ${RPM_BUILD_ROOT}
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} WITH_SELINUX=yes DISTRO=SuSE
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
#
# 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
#
# 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?/*
%preun tools
%stop_on_removal powered
%post tools
if test -x /sbin/telinit -a -p /dev/initctl -a -f /proc/1/exe -a -d /proc/1/root -a ! -d /.build ; then
if test $(stat -Lc '%%D-%%i' /) = $(stat -Lc '%%D-%%i' /proc/1/root) ; then
/sbin/telinit u
fi
fi
if test -x /sbin/mkinitrd_setup; then
mkinitrd_setup
fi
%postun tools
%insserv_cleanup
if test -x /sbin/mkinitrd_setup; then
mkinitrd_setup
fi
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr (-,root,root,755)
%config /etc/pam.d/init
/sbin/halt
/sbin/init
/sbin/poweroff
/sbin/reboot
/sbin/runlevel
/sbin/shutdown
/sbin/telinit
%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/poweroff.8.gz
%doc %{_mandir}/man8/reboot.8.gz
%doc %{_mandir}/man8/runlevel.8.gz
%doc %{_mandir}/man8/shutdown.8.gz
%doc %{_mandir}/man8/telinit.8.gz
%files tools
%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/bootlogd.README
%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
/bin/mountpoint
/bin/pidof
/bin/usleep
/bin/fsync
/usr/bin/last
/usr/bin/lastb
/usr/bin/utmpdump
# /sbin/bootlogd
# /sbin/intr
/sbin/blogger
/sbin/blogd
/sbin/fstab-decode
/sbin/showconsole
/sbin/setconsole
/sbin/isserial
/sbin/checkproc
/sbin/pidofproc
/sbin/killproc
/sbin/killall5
/sbin/pidof
%ifnarch s390 s390x
/sbin/powerd
/sbin/detectups
%endif
/sbin/startpar
/sbin/vhangup
/sbin/mkill
/sbin/startproc
/sbin/start_daemon
/sbin/sulogin
%doc %{_mandir}/man1/last.1.gz
%doc %{_mandir}/man1/lastb.1.gz
%doc %{_mandir}/man1/usleep.1.gz
%doc %{_mandir}/man1/fsync.1.gz
# /usr/include/libblogger.h
# /usr/lib/libblogger.a
%doc %{_mandir}/man1/mountpoint.1.gz
%doc %{_mandir}/man1/utmpdump.1.gz
# %doc %{_mandir}/man8/bootlogd.8.gz
%doc %{_mandir}/man8/blogger.8.gz
%doc %{_mandir}/man8/blogd.8.gz
%doc %{_mandir}/man8/fstab-decode.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/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/startproc.8.gz
%doc %{_mandir}/man8/start_daemon.8.gz
%doc %{_mandir}/man8/startpar.8.gz
%doc %{_mandir}/man8/sulogin.8.gz
%doc %{_mandir}/man8/vhangup.8.gz
%doc %{_mandir}/man8/mkill.8.gz
%changelog