]> git.pld-linux.org Git - packages/SysVinit.git/blob - SysVinit.spec
- added selinux bcond; rel 9; STBR
[packages/SysVinit.git] / SysVinit.spec
1 #
2 # Conditional build:
3 %bcond_with     preconfigured
4 %bcond_without  selinux         # build without SELinux support
5 #
6 Summary:        System V initialization program
7 Summary(de):    System V-Intialisierungsprogramm
8 Summary(es):    Programa de inicialización System V
9 Summary(fr):    Programme d'initialisation Sys V
10 Summary(pl):    Program inicjalizuj±cy w Systemie V
11 Summary(pt_BR): Programa de inicialização System V
12 Summary(ru):    ðÒÏÇÒÁÍÍÙ, ÕÐÒÁ×ÌÑÀÝÉÅ ÂÁÚÏ×ÙÍÉ ÓÉÓÔÅÍÎÙÍÉ ÐÒÏÃÅÓÓÁÍÉ
13 Summary(tr):    System V baþlatma programý
14 Summary(uk):    ðÒÏÇÒÁÍÉ, ÝÏ ËÅÒÕÀÔØ ÂÁÚÏ×ÉÍÉ ÓÉÓÔÅÍÎÉÍÉ ÐÒÏÃÅÓÁÍÉ
15 Name:           SysVinit
16 Version:        2.85
17 Release:        9
18 License:        GPL
19 Group:          Base
20 Source0:        ftp://ftp.cistron.nl/pub/people/miquels/software/sysvinit-%{version}.tar.gz
21 # Source0-md5:  8a2d8f1ed5a2909da04132fefa44905e
22 Source1:        sysvinit.logrotate
23 Source2:        http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/sysvinit-non-english-man-pages.tar.bz2
24 # Source2-md5:  9ae8a63a4685368fae19707f95475cca
25 Patch0:         sysvinit-paths.patch
26 Patch1:         sysvinit-bequiet.patch
27 Patch2:         sysvinit-md5-bigendian.patch
28 Patch3:         sysvinit-wtmp.patch
29 Patch4:         sysvinit-man.patch
30 Patch5:         sysvinit-halt.patch
31 Patch6:         sysvinit-blowfish.patch
32 Patch7:         sysvinit-initctl.patch
33 Patch8:         sysvinit-autofsck.patch
34 Patch9:         sysvinit-pidof.patch
35 Patch10:        sysvinit-log-signals.patch
36 Patch11:        sysvinit-killall5.patch
37 # based on http://www.nsa.gov/selinux/patches/sysvinit-selinux.patch.gz
38 Patch12:        sysvinit-selinux.patch
39 %{?with_selinux:BuildRequires:  libselinux-devel >= 1.14}
40 BuildRequires:  rpmbuild(macros) >= 1.159
41 Requires(pre):  /usr/bin/getgid
42 Requires(pre):  /usr/sbin/groupadd
43 Requires(post): fileutils
44 Requires(postun):       /usr/sbin/groupdel
45 Requires:       /bin/awk
46 Requires:       login
47 %if %{with preconfigured}
48 Requires:       logrotate
49 %endif
50 Requires:       mingetty
51 %{?with_selinux:Requires:       libselinux >= 1.14}
52 Provides:       group(utmp)
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %define         _sbindir        /sbin
56
57 %description
58 The SysVinit package contains a group of processes that control the
59 very basic functions of your system. SysVinit includes the init
60 program, the first program started by the Linux kernel when the system
61 boots. Init then controls the startup, running and shutdown of all
62 other programs.
63
64 %description -l de
65 SysVinit ist das erste Programm, das beim Systemstart vom Linux-Kernel
66 gestartet wird. Es steuert das Starten, Ausführen und Beenden aller
67 anderen Programme.
68
69 %description -l es
70 SysVinit es el primer programa ejecutado por el kernel Linux cuando se
71 inicia el sistema. Controla arranque, funcionamiento y cierre de todos
72 los otros programas.
73
74 %description -l fr
75 SysVinit est le premier programme exécuté par le noyau de Linux
76 lorsque le système démarre, il contrôle le lancement, l'exécution et
77 l'arrêt de tous les autres programmes.
78
79 %description -l pl
80 SysVinit jest pierwszym programem uruchamianym przez j±dro podczas
81 startu systemu. Kontroluje start, pracê oraz zamykanie wszystkich
82 innych programów.
83
84 %description -l pt_BR
85 SysVinit é o primeiro programa executado pelo kernel Linux quando o
86 sistema é inicializado. Controla inicialização, funcionamento e
87 finalização de todos os outros programas.
88
89 %description -l ru
90 ðÁËÅÔ SysVinit ÓÏÄÅÒÖÉÔ ÇÒÕÐÐÕ ÐÒÏÃÅÓÓÏ×, ËÏÔÏÒÙÅ ÕÐÒÁ×ÌÑÀÔ ÓÁÍÙÍÉ
91 ÂÁÚÏ×ÙÍÉ ÆÕÎËÃÉÑÍÉ ×ÁÛÅÊ ÓÉÓÔÅÍÙ. SysVinit ×ËÌÀÞÁÅÔ ÐÒÏÇÒÁÍÍÕ init,
92 ÓÁÍÕÀ ÐÅÒ×ÕÀ ÐÒÏÇÒÁÍÍÕ, ËÏÔÏÒÁÑ ÚÁÐÕÓËÁÅÔÓÑ ÑÄÒÏÍ Linux ÐÒÉ ÚÁÇÒÕÚËÅ
93 ÓÉÓÔÅÍÙ. ðÏÓÌÅ ÜÔÏÇÏ init ÕÐÒÁ×ÌÑÅÔ ÚÁÐÕÓËÏÍ, ÉÓÐÏÌÎÅÎÉÅÍ É ÏÓÔÁÎÏ×ÏÍ
94 ×ÓÅÈ ÏÓÔÁÌØÎÙÈ ÐÒÏÇÒÁÍÍ.
95
96 %description -l tr
97 SysVinit, sistem açýlýrken Linux çekirdeði tarafýndan çalýþtýrýlan ilk
98 programdýr. Diðer programlarýn baþlamalarýný, çalýþmalarýný ve
99 sonlanmalarýný saðlar/denetler.
100
101 %description -l uk
102 ðÁËÅÔ SysVinit Í¦ÓÔÉÔØ ÇÒÕÐÕ ÐÒÏÃÅÓ¦×, ËÏÔÒ¦ ËÅÒÕÀÔØ ÓÁÍÉÍÉ ÂÁÚÏ×ÉÍÉ
103 ÆÕÎËæÑÍÉ ×ÁÛϧ ÓÉÓÔÅÍÉ. SysVinit Í¦ÓÔÉÔØ ÐÒÏÇÒÁÍÕ init, ÐÅÒÛÕ
104 ÐÒÏÇÒÁÍÕ, ÑËÕ ÚÁÐÕÓËÁ¤ ÑÄÒÏ Linux Ð¦Ä ÞÁÓ ÚÁÇÒÕÚËÉ ÓÉÓÔÅÍÉ. ð¦ÓÌÑ
105 ÃØÏÇÏ init ËÅÒÕ¤ ÚÁÐÕÓËÏÍ, ×ÉËÏÎÁÎÎÑÍ ÔÁ ÚÕÐÉÎËÏÀ ×ӦȠ¦ÎÛÉÈ ÐÒÏÇÒÁÍ.
106
107 %prep
108 %setup -q -n sysvinit-%{version}
109 %patch0 -p1
110 %patch1 -p1
111 %patch2 -p1
112 %patch3 -p1
113 %patch4 -p1
114 %patch5 -p1
115 %patch6 -p1
116 %patch7 -p1
117 %patch8 -p1
118 %patch9 -p1
119 %patch10 -p1
120 %patch11 -p1
121 %{?with_selinux:%patch12 -p1}
122
123 %build
124 %{__make} -C src \
125         CC="%{__cc}" \
126         LCRYPT="-lcrypt" \
127         OPTIMIZE="%{rpmcflags}"
128
129 %install
130 rm -rf $RPM_BUILD_ROOT
131 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man{1,5,8}} \
132         $RPM_BUILD_ROOT{%{_sysconfdir},/etc/logrotate.d,/var/log}
133
134 %{__make} install -C src \
135         ROOT=$RPM_BUILD_ROOT \
136         BIN_OWNER=`id -u` \
137         BIN_GROUP=`id -g`
138
139 install %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/sysvinit
140
141 ln -sf ../var/run/initrunlvl $RPM_BUILD_ROOT%{_sysconfdir}
142 ln -sf killall5 $RPM_BUILD_ROOT%{_sbindir}/pidof
143
144 > $RPM_BUILD_ROOT%{_sysconfdir}/ioctl.save
145 > $RPM_BUILD_ROOT/var/log/faillog
146 > $RPM_BUILD_ROOT/var/log/lastlog
147 > $RPM_BUILD_ROOT/var/log/wtmpx
148 > $RPM_BUILD_ROOT/var/log/btmpx
149
150 echo .so last.1 > $RPM_BUILD_ROOT%{_mandir}/man1/lastb.1
151 echo .so halt.8 > $RPM_BUILD_ROOT%{_mandir}/man8/poweroff.8
152 echo .so halt.8 > $RPM_BUILD_ROOT%{_mandir}/man8/reboot.8
153 echo .so init.8 > $RPM_BUILD_ROOT%{_mandir}/man8/telinit.8
154 bzip2 -dc %{SOURCE2} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
155
156 %clean
157 rm -rf $RPM_BUILD_ROOT
158
159 %pre
160 if [ -n "`/usr/bin/getgid utmp`" ]; then
161         if [ "`/usr/bin/getgid utmp`" != 22 ]; then
162                 echo "Error: group utmp doesn't have gid=22. Correct this before installing SysVinit." 1>&2
163                 exit 1
164         fi
165 else
166         /usr/sbin/groupadd -g 22 utmp 1>&2
167 fi
168
169 %post
170 touch %{_sysconfdir}/ioctl.save /var/log/{fail,last}log
171 chmod 000 %{_sysconfdir}/ioctl.save /var/log/{fail,last}log
172 chown root:root %{_sysconfdir}/ioctl.save /var/log/faillog
173 chown root:utmp /var/log/lastlog
174 chmod 600 %{_sysconfdir}/ioctl.save
175 chmod 640 /var/log/faillog
176 chmod 660 /var/log/lastlog
177
178 %{_sbindir}/telinit u || :
179
180 %postun
181 if [ "$1" = "0" ]; then
182         %groupremove utmp
183 fi
184
185 %files
186 %defattr(644,root,root,755)
187 %doc doc/{Propaganda,Changelog,*.lsm}
188
189 %attr(755,root,root) %{_sbindir}/*
190 %attr(755,root,root) %{_bindir}/last
191 %attr(755,root,root) %{_bindir}/lastb
192 %attr(755,root,root) %{_bindir}/mesg
193 %attr(755,root,root) %{_bindir}/utmpx-dump
194 %attr(2755,root,tty) %{_bindir}/wall
195
196 %attr(640,root,root) /etc/logrotate.d/sysvinit
197 %ghost %{_sysconfdir}/initrunlvl
198 %attr(600,root,root) %ghost %{_sysconfdir}/ioctl.save
199 %attr(640,root,root) %ghost /var/log/faillog
200 %attr(660,root,utmp) %ghost /var/log/lastlog
201 %attr(664,root,utmp) %ghost /var/log/wtmpx
202 %attr(640,root,root) %ghost /var/log/btmpx
203
204 %{_mandir}/man[158]/*
205 %lang(de) %{_mandir}/de/man[158]/*
206 %lang(es) %{_mandir}/es/man[158]/*
207 %lang(fi) %{_mandir}/fi/man[158]/*
208 %lang(fr) %{_mandir}/fr/man[158]/*
209 %lang(hu) %{_mandir}/hu/man[158]/*
210 %lang(id) %{_mandir}/id/man[158]/*
211 %lang(it) %{_mandir}/it/man[158]/*
212 %lang(ja) %{_mandir}/ja/man[158]/*
213 %lang(ko) %{_mandir}/ko/man[158]/*
214 %lang(pl) %{_mandir}/pl/man[158]/*
This page took 0.048426 seconds and 3 git commands to generate.