]> git.pld-linux.org Git - packages/SysVinit.git/blobdiff - SysVinit.spec
- added selinux bcond; rel 9; STBR
[packages/SysVinit.git] / SysVinit.spec
index 68cf182551da432ba741885a11fe2dbdfb615b4f..5b7ca16d5ece67172e4115dc1e550e3f979fe851 100644 (file)
@@ -1,40 +1,59 @@
+#
+# Conditional build:
+%bcond_with    preconfigured
+%bcond_without selinux         # build without SELinux support
+#
 Summary:       System V initialization program
 Summary(de):   System V-Intialisierungsprogramm
+Summary(es):   Programa de inicialización System V
 Summary(fr):   Programme d'initialisation Sys V
-Summary(pl):   Program inicjalizuj±cy w Systemie V 
+Summary(pl):   Program inicjalizuj±cy w Systemie V
+Summary(pt_BR):        Programa de inicialização System V
+Summary(ru):   ðÒÏÇÒÁÍÍÙ, ÕÐÒÁ×ÌÑÀÝÉÅ ÂÁÚÏ×ÙÍÉ ÓÉÓÔÅÍÎÙÍÉ ÐÒÏÃÅÓÓÁÍÉ
 Summary(tr):   System V baþlatma programý
+Summary(uk):   ðÒÏÇÒÁÍÉ, ÝÏ ËÅÒÕÀÔØ ÂÁÚÏ×ÉÍÉ ÓÉÓÔÅÍÎÉÍÉ ÐÒÏÃÅÓÁÍÉ
 Name:          SysVinit
-Version:       2.78
-Release:       24
+Version:       2.85
+Release:       9
 License:       GPL
 Group:         Base
-Group(de):     Gründsätzlich
-Group(pl):     Podstawowe
 Source0:       ftp://ftp.cistron.nl/pub/people/miquels/software/sysvinit-%{version}.tar.gz
+# Source0-md5: 8a2d8f1ed5a2909da04132fefa44905e
 Source1:       sysvinit.logrotate
+Source2:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/sysvinit-non-english-man-pages.tar.bz2
+# Source2-md5: 9ae8a63a4685368fae19707f95475cca
 Patch0:                sysvinit-paths.patch
 Patch1:                sysvinit-bequiet.patch
 Patch2:                sysvinit-md5-bigendian.patch
 Patch3:                sysvinit-wtmp.patch
 Patch4:                sysvinit-man.patch
-Patch5:                sysvinit-sigint.patch
-Patch6:                sysvinit-ai64.patch
-Patch7:                sysvinit-halt.patch
-Patch8:                sysvinit-blowfish.patch
-Patch9:                sysvinit-notty.patch
-Patch10:       sysvinit-wall-n.patch
-Patch11:       sysvinit-owl-bound-format.patch
-Patch12:       sysvinit-cread.patch
-Patch13:       sysvinit-umask.patch
-BuildRequires: glibc-devel
-Prereq:                shadow
-Prereq:                make
-Prereq:                /bin/awk
+Patch5:                sysvinit-halt.patch
+Patch6:                sysvinit-blowfish.patch
+Patch7:                sysvinit-initctl.patch
+Patch8:                sysvinit-autofsck.patch
+Patch9:                sysvinit-pidof.patch
+Patch10:       sysvinit-log-signals.patch
+Patch11:       sysvinit-killall5.patch
+# based on http://www.nsa.gov/selinux/patches/sysvinit-selinux.patch.gz
+Patch12:       sysvinit-selinux.patch
+%{?with_selinux:BuildRequires: libselinux-devel >= 1.14}
+BuildRequires: rpmbuild(macros) >= 1.159
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(post):        fileutils
+Requires(postun):      /usr/sbin/groupdel
+Requires:      /bin/awk
+Requires:      login
+%if %{with preconfigured}
 Requires:      logrotate
+%endif
 Requires:      mingetty
-Requires:      login
+%{?with_selinux:Requires:      libselinux >= 1.14}
+Provides:      group(utmp)
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                _sbindir        /sbin
+
 %description
 The SysVinit package contains a group of processes that control the
 very basic functions of your system. SysVinit includes the init
@@ -47,21 +66,44 @@ SysVinit ist das erste Programm, das beim Systemstart vom Linux-Kernel
 gestartet wird. Es steuert das Starten, Ausführen und Beenden aller
 anderen Programme.
 
+%description -l es
+SysVinit es el primer programa ejecutado por el kernel Linux cuando se
+inicia el sistema. Controla arranque, funcionamiento y cierre de todos
+los otros programas.
+
 %description -l fr
 SysVinit est le premier programme exécuté par le noyau de Linux
 lorsque le système démarre, il contrôle le lancement, l'exécution et
 l'arrêt de tous les autres programmes.
 
 %description -l pl
-SysVinit jest pierwszym programem uruchamianym przez j±dro, podczas
+SysVinit jest pierwszym programem uruchamianym przez j±dro podczas
 startu systemu. Kontroluje start, pracê oraz zamykanie wszystkich
 innych programów.
 
+%description -l pt_BR
+SysVinit é o primeiro programa executado pelo kernel Linux quando o
+sistema é inicializado. Controla inicialização, funcionamento e
+finalização de todos os outros programas.
+
+%description -l ru
+ðÁËÅÔ SysVinit ÓÏÄÅÒÖÉÔ ÇÒÕÐÐÕ ÐÒÏÃÅÓÓÏ×, ËÏÔÏÒÙÅ ÕÐÒÁ×ÌÑÀÔ ÓÁÍÙÍÉ
+ÂÁÚÏ×ÙÍÉ ÆÕÎËÃÉÑÍÉ ×ÁÛÅÊ ÓÉÓÔÅÍÙ. SysVinit ×ËÌÀÞÁÅÔ ÐÒÏÇÒÁÍÍÕ init,
+ÓÁÍÕÀ ÐÅÒ×ÕÀ ÐÒÏÇÒÁÍÍÕ, ËÏÔÏÒÁÑ ÚÁÐÕÓËÁÅÔÓÑ ÑÄÒÏÍ Linux ÐÒÉ ÚÁÇÒÕÚËÅ
+ÓÉÓÔÅÍÙ. ðÏÓÌÅ ÜÔÏÇÏ init ÕÐÒÁ×ÌÑÅÔ ÚÁÐÕÓËÏÍ, ÉÓÐÏÌÎÅÎÉÅÍ É ÏÓÔÁÎÏ×ÏÍ
+×ÓÅÈ ÏÓÔÁÌØÎÙÈ ÐÒÏÇÒÁÍÍ.
+
 %description -l tr
 SysVinit, sistem açýlýrken Linux çekirdeði tarafýndan çalýþtýrýlan ilk
 programdýr. Diðer programlarýn baþlamalarýný, çalýþmalarýný ve
 sonlanmalarýný saðlar/denetler.
 
+%description -l uk
+ðÁËÅÔ SysVinit Í¦ÓÔÉÔØ ÇÒÕÐÕ ÐÒÏÃÅÓ¦×, ËÏÔÒ¦ ËÅÒÕÀÔØ ÓÁÍÉÍÉ ÂÁÚÏ×ÉÍÉ
+ÆÕÎËæÑÍÉ ×ÁÛϧ ÓÉÓÔÅÍÉ. SysVinit Í¦ÓÔÉÔØ ÐÒÏÇÒÁÍÕ init, ÐÅÒÛÕ
+ÐÒÏÇÒÁÍÕ, ÑËÕ ÚÁÐÕÓËÁ¤ ÑÄÒÏ Linux Ð¦Ä ÞÁÓ ÚÁÇÒÕÚËÉ ÓÉÓÔÅÍÉ. ð¦ÓÌÑ
+ÃØÏÇÏ init ËÅÒÕ¤ ÚÁÐÕÓËÏÍ, ×ÉËÏÎÁÎÎÑÍ ÔÁ ÚÕÐÉÎËÏÀ ×ӦȠ¦ÎÛÉÈ ÐÒÏÇÒÁÍ.
+
 %prep
 %setup -q -n sysvinit-%{version}
 %patch0 -p1
@@ -76,17 +118,18 @@ sonlanmalar
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
-%patch12 -p1
-%patch13 -p1
+%{?with_selinux:%patch12 -p1}
 
 %build
-%{__make} -C src LCRYPT="-lcrypt" \
+%{__make} -C src \
+       CC="%{__cc}" \
+       LCRYPT="-lcrypt" \
        OPTIMIZE="%{rpmcflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},/sbin,%{_mandir}/man{1,5,8}} \
-       $RPM_BUILD_ROOT/{etc/{logrotate.d,sysconfig},var/log}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man{1,5,8}} \
+       $RPM_BUILD_ROOT{%{_sysconfdir},/etc/logrotate.d,/var/log}
 
 %{__make} install -C src \
        ROOT=$RPM_BUILD_ROOT \
@@ -96,50 +139,76 @@ install -d $RPM_BUILD_ROOT{%{_bindir},/sbin,%{_mandir}/man{1,5,8}} \
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/sysvinit
 
 ln -sf ../var/run/initrunlvl $RPM_BUILD_ROOT%{_sysconfdir}
-ln -sf killall5 $RPM_BUILD_ROOT/sbin/pidof
-
-touch $RPM_BUILD_ROOT/var/log/{lastlog,wtmpx,btmpx}
+ln -sf killall5 $RPM_BUILD_ROOT%{_sbindir}/pidof
 
-rm -f $RPM_BUILD_ROOT%{_mandir}/man8/poweroff.8
-rm -f $RPM_BUILD_ROOT%{_mandir}/man8/telinit.8
-rm -f $RPM_BUILD_ROOT%{_mandir}/man8/reboot.8
+> $RPM_BUILD_ROOT%{_sysconfdir}/ioctl.save
+> $RPM_BUILD_ROOT/var/log/faillog
+> $RPM_BUILD_ROOT/var/log/lastlog
+> $RPM_BUILD_ROOT/var/log/wtmpx
+> $RPM_BUILD_ROOT/var/log/btmpx
 
+echo .so last.1 > $RPM_BUILD_ROOT%{_mandir}/man1/lastb.1
+echo .so halt.8 > $RPM_BUILD_ROOT%{_mandir}/man8/poweroff.8
 echo .so halt.8 > $RPM_BUILD_ROOT%{_mandir}/man8/reboot.8
 echo .so init.8 > $RPM_BUILD_ROOT%{_mandir}/man8/telinit.8
-echo .so halt.8 > $RPM_BUILD_ROOT%{_mandir}/man8/poweroff.8
-echo .so last.1 > $RPM_BUILD_ROOT%{_mandir}/man1/lastb.1
+bzip2 -dc %{SOURCE2} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
 
-gzip -9nf doc/Propaganda debian/changelog doc/sysvinit-%{version}.lsm  
+%clean
+rm -rf $RPM_BUILD_ROOT
 
 %pre
-groupadd -f -r -g 22 utmp
+if [ -n "`/usr/bin/getgid utmp`" ]; then
+       if [ "`/usr/bin/getgid utmp`" != 22 ]; then
+               echo "Error: group utmp doesn't have gid=22. Correct this before installing SysVinit." 1>&2
+               exit 1
+       fi
+else
+       /usr/sbin/groupadd -g 22 utmp 1>&2
+fi
 
 %post
-/sbin/telinit u || :
+touch %{_sysconfdir}/ioctl.save /var/log/{fail,last}log
+chmod 000 %{_sysconfdir}/ioctl.save /var/log/{fail,last}log
+chown root:root %{_sysconfdir}/ioctl.save /var/log/faillog
+chown root:utmp /var/log/lastlog
+chmod 600 %{_sysconfdir}/ioctl.save
+chmod 640 /var/log/faillog
+chmod 660 /var/log/lastlog
+
+%{_sbindir}/telinit u || :
 
 %postun
 if [ "$1" = "0" ]; then
-       groupdel utmp
+       %groupremove utmp
 fi
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %files
 %defattr(644,root,root,755)
-%doc doc/Propaganda.gz debian/changelog.gz doc/sysvinit-%{version}.lsm.gz
+%doc doc/{Propaganda,Changelog,*.lsm}
 
-%attr(755,root,root) /sbin/*
+%attr(755,root,root) %{_sbindir}/*
 %attr(755,root,root) %{_bindir}/last
 %attr(755,root,root) %{_bindir}/lastb
 %attr(755,root,root) %{_bindir}/mesg
 %attr(755,root,root) %{_bindir}/utmpx-dump
-%attr(2555,root,tty) %{_bindir}/wall
+%attr(2755,root,tty) %{_bindir}/wall
 
-%attr(640,root,root) /etc/logrotate.d/*
+%attr(640,root,root) /etc/logrotate.d/sysvinit
 %ghost %{_sysconfdir}/initrunlvl
+%attr(600,root,root) %ghost %{_sysconfdir}/ioctl.save
+%attr(640,root,root) %ghost /var/log/faillog
 %attr(660,root,utmp) %ghost /var/log/lastlog
-%attr(660,root,utmp) %ghost /var/log/wtmpx
+%attr(664,root,utmp) %ghost /var/log/wtmpx
 %attr(640,root,root) %ghost /var/log/btmpx
 
-%{_mandir}/man*/*
+%{_mandir}/man[158]/*
+%lang(de) %{_mandir}/de/man[158]/*
+%lang(es) %{_mandir}/es/man[158]/*
+%lang(fi) %{_mandir}/fi/man[158]/*
+%lang(fr) %{_mandir}/fr/man[158]/*
+%lang(hu) %{_mandir}/hu/man[158]/*
+%lang(id) %{_mandir}/id/man[158]/*
+%lang(it) %{_mandir}/it/man[158]/*
+%lang(ja) %{_mandir}/ja/man[158]/*
+%lang(ko) %{_mandir}/ko/man[158]/*
+%lang(pl) %{_mandir}/pl/man[158]/*
This page took 0.144843 seconds and 4 git commands to generate.