Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37763081
en ru br
ALT Linux repos
5.0: 2.86-alt2
4.1: 2.86-alt2
4.0: 2.86-alt1
3.0: 2.85-alt8

Group :: System/Configuration/Boot and Init
RPM: SysVinit

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: SysVinit
Version: 2.85
Release: alt8

Summary: Programs which control basic system processes
License: GPL
Group: System/Configuration/Boot and Init
Url: ftp://ftp.cistron.nl/pub/people/miquels/sysvinit

Source: %url/sysvinit-%version.tar.bz2

%def_without ssd

# CVS/DEB

Patch1: ftp://ftp.debian.org/debian/pool/main/s/sysvinit/sysvinit_2.85-9.diff.bz2

# ALT/OW

Patch21: sysvinit-2.85.9-alt-fixes.patch
Patch22: sysvinit-2.85.9-alt-signedness.patch
Patch23: sysvinit-2.85.9-alt-progname-umask.patch
Patch24: sysvinit-2.85-alt-owl-start-stop-daemon.patch
Patch25: sysvinit-2.85.9-alt-mount.patch
Patch26: sysvinit-2.85.9-rh-alt-pidof.patch
Patch27: sysvinit-2.85.9-alt-makefile.patch
Patch28: sysvinit-2.85.9-alt-doc.patch
Patch29: sysvinit-2.85.9-alt-64bit.patch

# rest

Patch41: sysvinit-2.85-rh-alt-lasttime.patch
Patch42: sysvinit-2.85-unknown-alt-last-ws.patch

PreReq: coreutils
Requires: /sbin/sulogin
%if_with ssd
Provides: /sbin/start-stop-daemon
%endif
Conflicts: glibc < 6:2.2.1-ipl0.2mdk,
BuildConflicts: openssl-devel < 0.9.6a

%description
The SysVinit package contains a group of programs that control the
very basic functions of your system.  SysVinit includes the init
program, the first program started by the Linux kernel when the
system boots.  init then controls the startup, running and shutdown
of all other programs.

%prep
%setup -q -n sysvinit-%version

# CVS/DEB

%patch1 -p1

# ALT/OW

%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1

# rest

%patch41 -p1
%patch42 -p1

pushd src
find -type f -print0 |
xargs -r0 %__grep -FZl '"paths.h"' -- |
xargs -r0 %__subst 's/"paths\.h"/"paths_init.h"/g' --
mv paths.h paths_init.h
echo '#include <paths.h>' >>paths_init.h
popd

find -type f -name \*.orig -delete -print

%build
%def_enable Werror
%make_build -C src all \
DISTRO=ALT \
LCRYPT=-lcrypt \
LDFLAGS= \
#
%make_build -C src bootlogd \
DISTRO=ALT \
LCRYPT= \
LDFLAGS=-lutil \
#
%if_with ssd
pushd contrib
gcc start-stop-daemon.c $RPM_OPT_FLAGS -D_GNU_SOURCE -o start-stop-daemon
popd
%endif

%install
%__mkdir_p $RPM_BUILD_ROOT{/{s,}bin,/dev,%_bindir,%_includedir,%_mandir/man{1,3,5,8}}
%make_install install -C src \
ROOT=$RPM_BUILD_ROOT \
DISTRO=ALT \
#

%__install -p -m755 src/bootlogd $RPM_BUILD_ROOT/sbin/
%if_with ssd
%__install -p -m755 contrib/start-stop-daemon $RPM_BUILD_ROOT/sbin/
%endif

%__rm -f $RPM_BUILD_ROOT%_man8dir/sulogin.8

mkfifo -m600 $RPM_BUILD_ROOT/dev/initctl

%pre
# This is tricky.  We don't want to let RPM remove the only link to the
# old init as that would actually leave it pending for delete on process
# termination.  That delete is a filesystem write operation meaning that
# the root filesystem would need to stay mounted read/write.  But we
# absolutely want to be able to remount it read-only during shutdown,
# possibly with the old init still alive!
if [ -e /sbin/init -a ! -e /sbin/.init-working ]; then
/bin/ln /sbin/init /sbin/.init-working
fi

%post
# If /proc is mounted and /sbin/.init-working is running, tell init to
# invoke the replaced version of itself.
if /bin/pidof /sbin/.init-working >/dev/null 2>&1; then
/sbin/telinit u
sleep 1
fi

# If /proc is not mounted or /sbin/.init-working is no longer running,

# remove it.
if ! /bin/pidof /sbin/.init-working >/dev/null 2>&1; then
/bin/rm -f /sbin/.init-working
fi

%files
%defattr(700,root,root)
/sbin/init
/sbin/shutdown
/sbin/bootlogd

%defattr(-,root,root,-)
/sbin/halt
/sbin/poweroff
/sbin/reboot
/sbin/telinit
/sbin/killall5
/sbin/pidof
/sbin/runlevel
%if_with ssd
/sbin/start-stop-daemon
%endif

/bin/pidof
%_bindir/last
%_bindir/lastb
%_bindir/mesg
%attr(2711,root,tty) %_bindir/wall

%_includedir/*

%ghost /dev/initctl

%_mandir/man?/*
%doc README contrib/TODO
%doc doc/{Propaganda,Install,sysvinit-%version.lsm,bootlogd.README}
%if_with ssd
%doc contrib/start-stop-daemon.README
%endif

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin