]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without static # link binaries with glib dynamically | |
4 | ||
5 | Summary: inittab and /etc/rc.d scripts | |
6 | Summary(de.UTF-8): inittab und /etc/rc.d Scripts | |
7 | Summary(fr.UTF-8): inittab et scripts /etc/rc.d | |
8 | Summary(pl.UTF-8): inittab i skrypty startowe z katalogu /etc/rc.d | |
9 | Summary(tr.UTF-8): inittab ve /etc/rc.d dosyaları | |
10 | Name: rc-scripts | |
11 | Version: 0.4.5.1 | |
12 | Release: 3 | |
13 | License: GPL v2 | |
14 | Group: Base | |
15 | Source0: ftp://distfiles.pld-linux.org/src/%{name}-%{version}.tar.gz | |
16 | # Source0-md5: 00d0cbd7bb54c89fed07ebce20a4a0b7 | |
17 | Source1: rc-scripts-systemd-tmpfiles.d.conf | |
18 | URL: http://svn.pld-linux.org/trac/svn/wiki/packages/rc-scripts | |
19 | Patch0: %{name}-svn.patch | |
20 | BuildRequires: autoconf | |
21 | BuildRequires: automake | |
22 | BuildRequires: gettext-devel | |
23 | BuildRequires: glib2-devel | |
24 | %{?with_static:BuildRequires: glib2-static} | |
25 | %{?with_static:BuildRequires: glibc-static} | |
26 | BuildRequires: libcap-devel >= 1:2.17 | |
27 | BuildRequires: linux-libc-headers >= 7:2.6.27 | |
28 | BuildRequires: pkgconfig | |
29 | BuildRequires: popt-devel | |
30 | BuildRequires: rpm >= 4.4.9-56 | |
31 | Requires(post): fileutils | |
32 | %ifarch sparc sparcv9 sparc64 | |
33 | Requires: agetty | |
34 | %endif | |
35 | Requires: /bin/awk | |
36 | Requires: /bin/basename | |
37 | Requires: /bin/gettext | |
38 | Requires: /bin/nice | |
39 | Requires: /bin/ps | |
40 | Requires: SysVinit | |
41 | Requires: blockdev | |
42 | Requires: coreutils | |
43 | Requires: ethtool | |
44 | %if "%{pld_release}" == "ac" | |
45 | Requires: filesystem >= 3.0-11 | |
46 | %else | |
47 | Requires: filesystem >= 3.0-35 | |
48 | %endif | |
49 | Requires: findutils | |
50 | Requires: fsck | |
51 | Requires: gettext | |
52 | Requires: grep | |
53 | Requires: hostname | |
54 | Requires: iproute2 | |
55 | Requires: iputils-arping | |
56 | Requires: mingetty | |
57 | Requires: mktemp | |
58 | Requires: module-init-tools | |
59 | Requires: mount >= 2.12 | |
60 | Requires: procps >= 1:3.2.6-1.1 | |
61 | Requires: psmisc >= 22.5-2 | |
62 | Requires: utempter | |
63 | Requires: util-linux | |
64 | Suggests: libcgroup | |
65 | Provides: initscripts | |
66 | Obsoletes: initscripts | |
67 | Obsoletes: vserver-rc-scripts | |
68 | Conflicts: LPRng < 3.8.0-2 | |
69 | Conflicts: dev < 2.9.0-22 | |
70 | Conflicts: iputils-arping < 2:s20070202-1 | |
71 | Conflicts: openssh-server < 2:3.6.1p2-6 | |
72 | Conflicts: psacct < 6.3.5-10 | |
73 | Conflicts: tzdata < 2007b-1.1 | |
74 | %if "%{pld_release}" == "th" | |
75 | Conflicts: udev-core < 1:135-2 | |
76 | %else | |
77 | Conflicts: udev-core < 1:124-3 | |
78 | %endif | |
79 | Conflicts: upstart-SysVinit < 2.86-25 | |
80 | Conflicts: wpa_supplicant < 0.6.3 | |
81 | Conflicts: lvm2 < 2.02.83 | |
82 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
83 | ||
84 | %define _exec_prefix / | |
85 | %define localedir /etc/sysconfig/locale | |
86 | %define _bindir /bin | |
87 | %define _sbindir /sbin | |
88 | ||
89 | %description | |
90 | This package contains the scripts use to boot a system, change run | |
91 | levels, and shut the system down cleanly. | |
92 | ||
93 | %description -l de.UTF-8 | |
94 | Dieses Paket enthält die Scripts, die zum Hochfahren des Systems, | |
95 | Ändern der Betriebsebene und sauberem Herunterfahren des Systems | |
96 | erforderlich sind. Außerdem enthält es die Scripts, die | |
97 | Netzwerkschnittstellen aktivieren und deaktivieren. | |
98 | ||
99 | %description -l fr.UTF-8 | |
100 | Ce package contient les scripts utilisés pour démarrer le systéme, | |
101 | changer les niveaux d'exécution, et arréter le systéme proprement. Il | |
102 | contient aussi les scripts qui activent et désactivent la plupart des | |
103 | inetrfaces réseau. | |
104 | ||
105 | %description -l pl.UTF-8 | |
106 | Pakiet zawiera skrypty uruchamiane przy starcie i zamykaniu systemu, a | |
107 | także przy zmianie jego poziomu pracy. | |
108 | ||
109 | %description -l tr.UTF-8 | |
110 | Bu paket, sistem açmak, çalışma düzeylerini değiştirmek ve sistemi | |
111 | düzgün bir şekilde kapatmak için gereken dosyaları içerir. Ayrıca pek | |
112 | çok bilgisayar ağı arayüzlerini etkinleştiren ya da edilginleştiren | |
113 | programcıklar içerir. | |
114 | ||
115 | %prep | |
116 | %setup -q | |
117 | %patch0 -p0 | |
118 | ||
119 | # hack, currently this results -lgcc_s not found error: | |
120 | #GLIB_LIBS="-Wl,-static `$PKG_CONFIG --libs --static glib-2.0` -Wl,-Bdynamic" | |
121 | sed -i -e 's#^GLIB_LIBS=.*#GLIB_LIBS="%{_prefix}/%{_lib}/libglib-2.0.a %{_prefix}/%{_lib}/librt.a"#' configure.ac | |
122 | ||
123 | %build | |
124 | %{__aclocal} | |
125 | %{__autoheader} | |
126 | %{__autoconf} | |
127 | %{__automake} | |
128 | %configure \ | |
129 | --with-localedir=%{localedir} | |
130 | %{__make} \ | |
131 | %{!?with_static:ppp_watch_LDADD="$(pkg-config --libs glib-2.0)" ppp_watch_DEPENDENCIES=} | |
132 | ||
133 | %install | |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | install -d $RPM_BUILD_ROOT/var/{run/netreport,log} | |
136 | install -d $RPM_BUILD_ROOT/etc/sysconfig/hwprofiles | |
137 | ||
138 | %{__make} install \ | |
139 | DESTDIR=$RPM_BUILD_ROOT \ | |
140 | %{!?with_static:ppp_watch_LDADD="$(pkg-config --libs glib-2.0)" ppp_watch_DEPENDENCIES=} | |
141 | ||
142 | for i in 0 1 2 3 4 5 6; do | |
143 | install -d $RPM_BUILD_ROOT/etc/rc.d/rc$i.d | |
144 | done | |
145 | ||
146 | for i in 2 3 4 5; do | |
147 | ln -s ../init.d/local $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/S99local | |
148 | ln -s ../init.d/netfs $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/S25netfs | |
149 | ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/S10network | |
150 | ln -s ../init.d/allowlogin $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/S99allowlogin | |
151 | ln -s ../init.d/sys-chroots $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/S99sys-chroots | |
152 | done | |
153 | ||
154 | for i in 1 2 3 4 5; do | |
155 | ln -s ../init.d/killall $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/S00killall | |
156 | ln -s ../init.d/cpusets $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/S01cpusets | |
157 | ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/S20random | |
158 | done | |
159 | ||
160 | for i in 0 2 3 4 5 6; do | |
161 | ln -s ../init.d/single $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/K00single | |
162 | done | |
163 | ||
164 | ln -s ../init.d/single $RPM_BUILD_ROOT/etc/rc.d/rc1.d/S00single | |
165 | ||
166 | for i in 0 6; do | |
167 | ln -s ../init.d/cpusets $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/K99cpusets | |
168 | ln -s ../init.d/killall $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/K90killall | |
169 | ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/K80random | |
170 | done | |
171 | ||
172 | for i in 0 1 6; do | |
173 | ln -s ../init.d/netfs $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/K75netfs | |
174 | ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/K90network | |
175 | ln -s ../init.d/allowlogin $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/K01allowlogin | |
176 | ln -s ../init.d/sys-chroots $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/K01sys-chroots | |
177 | ln -s ../init.d/local $RPM_BUILD_ROOT/etc/rc.d/rc$i.d/K01local | |
178 | done | |
179 | ||
180 | > $RPM_BUILD_ROOT/var/log/dmesg | |
181 | ||
182 | # make /etc/init.d symlink relative | |
183 | ln -nfs rc.d/init.d $RPM_BUILD_ROOT/etc/init.d | |
184 | ||
185 | install -D %{SOURCE1} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/rc-scripts.conf | |
186 | ||
187 | %if "%{pld_release}" == "ac" | |
188 | rm -rf $RPM_BUILD_ROOT/etc/init | |
189 | %endif | |
190 | ||
191 | %clean | |
192 | rm -rf $RPM_BUILD_ROOT | |
193 | ||
194 | %post | |
195 | if [ -f /etc/inittab.rpmsave ]; then | |
196 | echo "**** Found old /etc/inittab.rpmsave ****" | |
197 | echo "/etc/inittab renamed to /etc/inittab.rpmnew" | |
198 | mv -f /etc/inittab /etc/inittab.rpmnew | |
199 | echo "/etc/inittab.rpmsave renamed to /etc/inittab." | |
200 | mv -f /etc/inittab.rpmsave /etc/inittab | |
201 | fi | |
202 | touch /var/log/dmesg | |
203 | chown root:root /var/log/dmesg | |
204 | chmod 640 /var/log/dmesg | |
205 | touch /var/cache/rc-scripts/msg.cache | |
206 | chmod 644 /var/cache/rc-scripts/msg.cache | |
207 | chown root:root /var/cache/rc-scripts/msg.cache | |
208 | ||
209 | # move network interfaces description files to new location | |
210 | %triggerpostun -- initscripts | |
211 | mv -f /etc/sysconfig/network-scripts/ifcfg-* /etc/sysconfig/interfaces | |
212 | ||
213 | %files | |
214 | %defattr(644,root,root,755) | |
215 | %doc ChangeLog | |
216 | %doc doc/*.txt doc/template.init | |
217 | %doc sysconfig/interfaces/data/chat-ppp* | |
218 | %doc sysconfig/interfaces/ifc* | |
219 | %doc sysconfig/interfaces/tnl* | |
220 | %doc sysconfig/init-colors* | |
221 | %doc doc/sysvinitfiles | |
222 | ||
223 | %dir /etc/rc.d | |
224 | %dir /etc/rc.d/init.d | |
225 | %dir /etc/rc.d/rc?.d | |
226 | /etc/init.d | |
227 | /etc/rc.d/init.d/functions | |
228 | ||
229 | %if "%{pld_release}" != "ac" | |
230 | %config(noreplace) %verify(not md5 mtime size) /etc/init/allowlogin.conf | |
231 | %config(noreplace) %verify(not md5 mtime size) /etc/init/cpusets.conf | |
232 | %config(noreplace) %verify(not md5 mtime size) /etc/init/cryptsetup.conf | |
233 | %config(noreplace) %verify(not md5 mtime size) /etc/init/random.conf | |
234 | %config(noreplace) %verify(not md5 mtime size) /etc/init/rc.conf | |
235 | %config(noreplace) %verify(not md5 mtime size) /etc/init/rcS.conf | |
236 | %config(noreplace) %verify(not md5 mtime size) /etc/init/rcS-sulogin.conf | |
237 | %config(noreplace) %verify(not md5 mtime size) /etc/init/sys-chroots.conf | |
238 | %config(noreplace) %verify(not md5 mtime size) /etc/init/udev.conf | |
239 | %endif | |
240 | ||
241 | %attr(754,root,root) /etc/rc.d/init.d/allowlogin | |
242 | %attr(754,root,root) /etc/rc.d/init.d/cpusets | |
243 | %attr(754,root,root) /etc/rc.d/init.d/cryptsetup | |
244 | %attr(754,root,root) /etc/rc.d/init.d/killall | |
245 | %attr(754,root,root) /etc/rc.d/init.d/local | |
246 | %attr(754,root,root) /etc/rc.d/init.d/netfs | |
247 | %attr(754,root,root) /etc/rc.d/init.d/network | |
248 | %attr(754,root,root) /etc/rc.d/init.d/random | |
249 | %attr(754,root,root) /etc/rc.d/init.d/single | |
250 | %attr(754,root,root) /etc/rc.d/init.d/sys-chroots | |
251 | ||
252 | %attr(754,root,root) /etc/rc.d/rc | |
253 | %config(noreplace) %verify(not md5 mtime size) /etc/rc.d/rc.local | |
254 | %attr(754,root,root) /etc/rc.d/rc.init | |
255 | %attr(754,root,root) /etc/rc.d/rc.sysinit | |
256 | %attr(754,root,root) /etc/rc.d/rc.shutdown | |
257 | %attr(754,root,root) /etc/rc.d/rc?.d/K??allowlogin | |
258 | %attr(754,root,root) /etc/rc.d/rc?.d/K??cpusets | |
259 | %attr(754,root,root) /etc/rc.d/rc?.d/K??killall | |
260 | %attr(754,root,root) /etc/rc.d/rc?.d/K??local | |
261 | %attr(754,root,root) /etc/rc.d/rc?.d/K??netfs | |
262 | %attr(754,root,root) /etc/rc.d/rc?.d/K??network | |
263 | %attr(754,root,root) /etc/rc.d/rc?.d/K??random | |
264 | %attr(754,root,root) /etc/rc.d/rc?.d/K??single | |
265 | %attr(754,root,root) /etc/rc.d/rc?.d/K??sys-chroots | |
266 | %attr(754,root,root) /etc/rc.d/rc?.d/S??allowlogin | |
267 | %attr(754,root,root) /etc/rc.d/rc?.d/S??cpusets | |
268 | %attr(754,root,root) /etc/rc.d/rc?.d/S??killall | |
269 | %attr(754,root,root) /etc/rc.d/rc?.d/S??local | |
270 | %attr(754,root,root) /etc/rc.d/rc?.d/S??netfs | |
271 | %attr(754,root,root) /etc/rc.d/rc?.d/S??network | |
272 | %attr(754,root,root) /etc/rc.d/rc?.d/S??random | |
273 | %attr(754,root,root) /etc/rc.d/rc?.d/S??single | |
274 | %attr(754,root,root) /etc/rc.d/rc?.d/S??sys-chroots | |
275 | ||
276 | %dir /var/cache/rc-scripts | |
277 | %ghost /var/cache/rc-scripts/msg.cache | |
278 | ||
279 | %attr(755,root,root) /etc/profile.d/lang.*sh | |
280 | ||
281 | %attr(755,root,root) %{_bindir}/doexec | |
282 | %attr(755,root,root) %{_bindir}/ipcalc | |
283 | %attr(755,root,root) %{_bindir}/resolvesymlink | |
284 | %attr(755,root,root) %{_bindir}/run-parts | |
285 | %attr(755,root,root) %{_bindir}/usleep | |
286 | ||
287 | %attr(755,root,root) %{_sbindir}/consoletype | |
288 | %attr(755,root,root) %{_sbindir}/fstab-decode | |
289 | %attr(755,root,root) %{_sbindir}/genhostid | |
290 | %attr(755,root,root) %{_sbindir}/getkey | |
291 | %attr(755,root,root) %{_sbindir}/hwprofile | |
292 | %attr(755,root,root) %{_sbindir}/if* | |
293 | %attr(755,root,root) %{_sbindir}/initlog | |
294 | %attr(755,root,root) %{_sbindir}/loglevel | |
295 | %attr(755,root,root) %{_sbindir}/minilogd | |
296 | %attr(755,root,root) %{_sbindir}/netreport | |
297 | %attr(755,root,root) %{_sbindir}/ppp-watch | |
298 | %attr(755,root,root) %{_sbindir}/service | |
299 | %attr(755,root,root) %{_sbindir}/setsysfont | |
300 | %attr(755,root,root) %{_sbindir}/setuidgid | |
301 | %attr(755,root,root) %{_sbindir}/start-stop-daemon | |
302 | %attr(755,root,root) %{_sbindir}/tnl* | |
303 | %attr(4755,root,root) %{_sbindir}/usernetctl | |
304 | ||
305 | %attr(755,root,root) /lib/firmware/firmware-loader.sh | |
306 | ||
307 | /usr/lib/tmpfiles.d/rc-scripts.conf | |
308 | ||
309 | %dir /lib/rc-scripts | |
310 | %attr(755,root,root) /lib/rc-scripts/ifdown-br | |
311 | %attr(755,root,root) /lib/rc-scripts/ifdown-irda | |
312 | %attr(755,root,root) /lib/rc-scripts/ifdown-post | |
313 | %attr(755,root,root) /lib/rc-scripts/ifdown-ppp | |
314 | %attr(755,root,root) /lib/rc-scripts/ifdown-sl | |
315 | %attr(755,root,root) /lib/rc-scripts/ifdown-vlan | |
316 | /lib/rc-scripts/ifup-aliases | |
317 | %attr(755,root,root) /lib/rc-scripts/ifup-br | |
318 | %attr(755,root,root) /lib/rc-scripts/ifup-ipx | |
319 | %attr(755,root,root) /lib/rc-scripts/ifup-irda | |
320 | %attr(755,root,root) /lib/rc-scripts/ifup-iucv | |
321 | /lib/rc-scripts/ifup-neigh | |
322 | %attr(755,root,root) /lib/rc-scripts/ifup-plip | |
323 | %attr(755,root,root) /lib/rc-scripts/ifup-plusb | |
324 | %attr(755,root,root) /lib/rc-scripts/ifup-post | |
325 | %attr(755,root,root) /lib/rc-scripts/ifup-ppp | |
326 | /lib/rc-scripts/ifup-routes | |
327 | %attr(755,root,root) /lib/rc-scripts/ifup-sl | |
328 | %attr(755,root,root) /lib/rc-scripts/ifup-vlan | |
329 | /lib/rc-scripts/functions.network | |
330 | /lib/rc-scripts/functions | |
331 | ||
332 | %dir %{_sysconfdir}/ppp | |
333 | %attr(754,root,root) %{_sysconfdir}/ppp/* | |
334 | %dir /etc/sysconfig/cpusets | |
335 | %dir /etc/sysconfig/hwprofiles | |
336 | %dir /etc/sysconfig/interfaces | |
337 | %dir /etc/sysconfig/interfaces/data | |
338 | %dir /etc/sysconfig/isapnp | |
339 | ||
340 | %dir /etc/sysconfig/interfaces/down.d | |
341 | %dir /etc/sysconfig/interfaces/down.d/* | |
342 | %dir /etc/sysconfig/interfaces/up.d | |
343 | %dir /etc/sysconfig/interfaces/up.d/* | |
344 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/interfaces/down.d/ppp/logger | |
345 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/interfaces/up.d/ppp/logger | |
346 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/isapnp/isapnp-kernel.conf | |
347 | ||
348 | %attr(640,root,root) %ghost /var/log/dmesg | |
349 | %attr(750,root,root) %dir /var/run/netreport | |
350 | ||
351 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/adjtime | |
352 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/crypttab | |
353 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/initlog.conf | |
354 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/inittab | |
355 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/modules | |
356 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sysctl.conf | |
357 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpusets/cpuset-test | |
358 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/hwprof | |
359 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/i18n | |
360 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/init-colors | |
361 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/interfaces/ifcfg-eth0 | |
362 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/network | |
363 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/static-arp | |
364 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/static-nat | |
365 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/static-routes | |
366 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/static-routes6 | |
367 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/system | |
368 | ||
369 | %{_mandir}/man?/* | |
370 | %lang(de) %{_mandir}/de/man?/* | |
371 | %lang(es) %{_mandir}/es/man?/* | |
372 | %lang(fr) %{_mandir}/fr/man?/* | |
373 | %lang(ja) %{_mandir}/ja/man?/* | |
374 | %lang(ru) %{_mandir}/ru/man?/* | |
375 | %lang(sv) %{_mandir}/sv/man?/* | |
376 | ||
377 | %dir %{localedir} | |
378 | %lang(de) %{localedir}/de | |
379 | %lang(pl) %{localedir}/pl |