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