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