]>
Commit | Line | Data |
---|---|---|
c8ef6def | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
c8ef6def SS |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = systemd |
8823e1f9 | 7 | version = 221 |
747db4fd | 8 | release = 3 |
c8ef6def | 9 | |
802ea3af MT |
10 | maintainer = Stefan Schantl <stefan.schantl@ipfire.org> |
11 | groups = System/Base | |
12 | url = http://www.freedesktop.org/wiki/Software/systemd | |
13 | license = GPLv2+ | |
14 | summary = A System and Service Manager. | |
c8ef6def | 15 | |
802ea3af MT |
16 | description |
17 | systemd is a system and service manager for Linux, compatible with | |
c8ef6def | 18 | SysV and LSB init scripts. |
802ea3af MT |
19 | end |
20 | ||
8823e1f9 SS |
21 | source_dl = http://www.freedesktop.org/software/systemd/ |
22 | sources = %{thisapp}.tar.xz | |
802ea3af MT |
23 | |
24 | build | |
6793fec1 MT |
25 | unitdir = %{prefix}/lib/systemd/system |
26 | ||
802ea3af | 27 | requires |
b329a155 | 28 | attr-devel |
802ea3af | 29 | audit-devel |
2d01364a | 30 | cryptsetup-luks-devel >= 1.4.2 |
802ea3af | 31 | dbus-devel |
fe6e3719 SS |
32 | docbook-utils |
33 | docbook-xsl | |
8823e1f9 | 34 | elfutils-devel |
bfabb323 | 35 | gettext-devel |
2d01364a SS |
36 | glib2-devel |
37 | gobject-introspection-devel >= 1.31 | |
38 | gperf | |
39 | hwdata | |
802ea3af | 40 | intltool |
7e97512a | 41 | kmod-devel >= 15 |
2a824e90 | 42 | libacl-devel |
2d01364a | 43 | libblkid-devel |
802ea3af | 44 | libcap-devel |
4990bf7f | 45 | libgcrypt-devel |
8823e1f9 | 46 | libmount-devel |
802ea3af | 47 | libselinux-devel |
4990bf7f | 48 | libuuid-devel |
8823e1f9 | 49 | m4 |
802ea3af | 50 | pam-devel |
2d01364a SS |
51 | pciutils-devel |
52 | usbutils | |
53a325cb | 53 | vala |
6793fec1 | 54 | xz-devel |
8823e1f9 | 55 | zlib-devel |
802ea3af MT |
56 | end |
57 | ||
58 | configure_options += \ | |
7f84cbd5 SS |
59 | --with-sysvinit-path= \ |
60 | --with-sysvrcnd-path= \ | |
8823e1f9 SS |
61 | --enable-introspection \ |
62 | --enable-zlib \ | |
4cdcf127 | 63 | --enable-compat-libs \ |
8823e1f9 SS |
64 | --disable-smack \ |
65 | --disable-backlight \ | |
66 | --disable-firstboot \ | |
67 | --disable-hibernate \ | |
68 | --disable-importd \ | |
69 | --disable-libiptc \ | |
70 | --disable-machined \ | |
7e97512a | 71 | --disable-networkd \ |
8823e1f9 | 72 | --disable-resolved \ |
7e97512a SS |
73 | --disable-sysusers \ |
74 | --disable-timesyncd \ | |
8823e1f9 SS |
75 | --disable-timedated \ |
76 | --disable-polkit \ | |
77 | --disable-kdbus \ | |
2d01364a | 78 | --disable-static |
802ea3af MT |
79 | |
80 | prepare_cmds | |
8823e1f9 | 81 | %{create_groups} |
802ea3af MT |
82 | end |
83 | ||
802ea3af | 84 | install_cmds |
755fe986 SS |
85 | # Create folder in log to store the journal. |
86 | mkdir -pv %{BUILDROOT}/var/log/journal | |
87 | ||
802ea3af | 88 | # Create sysv compatible symlinks. |
6793fec1 MT |
89 | mkdir -pv %{BUILDROOT}%{sbindir} |
90 | ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init | |
91 | ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd | |
92 | ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot | |
93 | ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt | |
94 | ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff | |
95 | ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown | |
802ea3af MT |
96 | |
97 | # Create empty machine-id file. | |
98 | touch %{BUILDROOT}/etc/machine-id | |
99 | ||
100 | # Copy locale and console settings | |
6793fec1 MT |
101 | mkdir -pv %{BUILDROOT}%{sysconfdir} |
102 | cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir} | |
802ea3af MT |
103 | |
104 | # Recreate all targets | |
0976fbe4 SS |
105 | rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants |
106 | for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \ | |
107 | multi-user.target.wants syslog.target.wants; do | |
108 | mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1 | |
6793fec1 | 109 | done |
802ea3af MT |
110 | |
111 | # Remove runlevel targets and graphical.target | |
6793fec1 MT |
112 | rm -rfv %{BUILDROOT}%{unitdir}/runlevel* |
113 | rm -rfv %{BUILDROOT}%{unitdir}/graphical.target | |
802ea3af | 114 | |
2d01364a SS |
115 | # Remove service files for utmp update. |
116 | rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service | |
117 | rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service | |
118 | ||
802ea3af | 119 | # Set default target to multi-user |
6793fec1 | 120 | ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target |
802ea3af MT |
121 | |
122 | # Replace absolute symlinks by relative ones. | |
6793fec1 | 123 | cd %{BUILDROOT}%{unitdir}/../user |
7f84cbd5 | 124 | for i in bluetooth local-fs paths printer remote-fs shutdown smartcard sockets sound swap timers; do |
6793fec1 MT |
125 | ln -svf ../system/${i}.target ${i}.target || exit 1 |
126 | done | |
127 | ||
802ea3af MT |
128 | # Remove tmpfile for X11 |
129 | rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf | |
130 | ||
7f84cbd5 SS |
131 | # Remove unneeded stuff for xdg |
132 | rm -rfv %{BUILDROOT}/etc/xdg | |
133 | ||
134 | # Remove unneeded stuff for rpm. | |
135 | rm -rvf %{BUILDROOT}/etc/rpm | |
8823e1f9 | 136 | rm -rvf %{BUILDROOT}/usr/lib/rpm |
755fe986 SS |
137 | |
138 | # Use journald. Enable the import of kernel messages. | |
139 | # Stop forwarding to a syslog daemon. | |
140 | sed \ | |
141 | -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \ | |
142 | -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \ | |
143 | -i %{BUILDROOT}/etc/systemd/journald.conf | |
f2ada565 SS |
144 | |
145 | # Install legacy tmpfile to autocreate /run/lock on startup. | |
146 | install -v -m 644 %{DIR_APP}/tmpfiles.d/legacy.conf %{BUILDROOT}%{prefix}/lib/tmpfiles.d/ | |
4f209325 MT |
147 | |
148 | # Remove udev rules for "predictable" network device renaming. | |
149 | # http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ | |
150 | rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-name-slot.rules | |
8823e1f9 SS |
151 | |
152 | # Create journald related folders. | |
153 | mkdir -pv %{BUILDROOT}/run/log/journal | |
154 | chown root:systemd-journal %{BUILDROOT}/run/log/journal | |
155 | ||
156 | mkdir -pv %{BUILDROOT}/var/log/journal | |
157 | chown root:systemd-journal %{BUILDROOT}/var/log/journal | |
802ea3af MT |
158 | end |
159 | end | |
160 | ||
8823e1f9 SS |
161 | create_groups |
162 | # Create groups for udev. | |
163 | getent group cdrom >/dev/null || groupadd -g 11 cdrom || : | |
164 | getent group tape >/dev/null || groupadd -g 33 tape || : | |
165 | getent group dialout >/dev/null || groupadd -g 18 dialout || : | |
166 | getent group floppy >/dev/null || groupadd -g 19 floppy || : | |
747db4fd SS |
167 | getent group input >/dev/null || groupadd -r input || : |
168 | getent group utmp >/dev/null || groupadd -r -g 22 utmp || : | |
8823e1f9 SS |
169 | |
170 | # Create group for journald. | |
171 | getent group systemd-journal >/dev/null || /usr/sbin/groupadd -r systemd-journal | |
172 | end | |
173 | ||
802ea3af MT |
174 | packages |
175 | package %{name} | |
2d01364a SS |
176 | groups += Base |
177 | ||
6793fec1 MT |
178 | prerequires += authconfig |
179 | ||
514357ad SS |
180 | requires |
181 | dbus | |
2d01364a | 182 | hwdata |
514357ad | 183 | python-cairo |
1d40b321 | 184 | python-dbus |
7f84cbd5 | 185 | python-gobject3 |
519776fd | 186 | %{name}-libs=%{thisver} |
214d8f27 | 187 | %{name}-units=%{thisver} |
514357ad SS |
188 | util-linux>=2.19 |
189 | end | |
1d40b321 | 190 | |
216fde50 SS |
191 | provides |
192 | /bin/systemd | |
193 | /sbin/halt | |
194 | /sbin/init | |
195 | /sbin/poweroff | |
196 | /sbin/reboot | |
197 | /sbin/shutdown | |
2d01364a | 198 | |
755fe986 | 199 | syslog |
2d01364a | 200 | udev = %{thisver} |
216fde50 SS |
201 | end |
202 | ||
6793fec1 | 203 | conflicts |
7f84cbd5 | 204 | bash-completion < 2.1 |
2d01364a | 205 | dracut < 019 |
6793fec1 | 206 | filesystem < 002 |
755fe986 | 207 | rsyslog < 5.8.6-4 |
6793fec1 MT |
208 | upstart |
209 | end | |
ef438375 | 210 | |
2d01364a SS |
211 | obsoletes |
212 | udev < 183 | |
213 | end | |
214 | ||
215 | configfiles | |
216 | /etc/locale.conf | |
217 | /etc/machine-id | |
218 | /etc/systemd/journald.conf | |
219 | /etc/systemd/logind.conf | |
220 | /etc/systemd/system.conf | |
221 | /etc/systemd/user.conf | |
222 | /etc/udev/udev.conf | |
223 | /etc/vconsole.conf | |
224 | end | |
225 | ||
226 | script prein | |
8823e1f9 | 227 | %{create_groups} |
2d01364a SS |
228 | end |
229 | ||
1d40b321 SS |
230 | script postin |
231 | # Generate Machine ID. | |
6793fec1 | 232 | /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || : |
1d40b321 SS |
233 | |
234 | # Reexec systemd daemon. | |
6793fec1 | 235 | /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || : |
1d40b321 SS |
236 | |
237 | # Make sure pam_systemd is enabled | |
6793fec1 MT |
238 | if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then |
239 | authconfig --update --nostart >/dev/null 2>&1 || : | |
1d40b321 SS |
240 | |
241 | # Try harder | |
6793fec1 | 242 | grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || : |
1d40b321 | 243 | fi |
5e462903 MT |
244 | |
245 | /usr/bin/systemctl enable \ | |
246 | getty@.service \ | |
50affca1 | 247 | remote-fs.target \ |
5e462903 MT |
248 | systemd-readahead-replay.service \ |
249 | systemd-readahead-collect.service \ | |
250 | >/dev/null 2>&1 || : | |
1d40b321 SS |
251 | end |
252 | ||
2d01364a SS |
253 | script preup |
254 | # Be sure to stop the old udev before updating. | |
255 | /usr/bin/systemctl stop udev.service udev-trigger.service \ | |
256 | udev-control.socket udev-kernel.socket >/dev/null 2>&1 || : | |
8823e1f9 SS |
257 | |
258 | %{create_groups} | |
2d01364a SS |
259 | end |
260 | ||
1d40b321 | 261 | script postup |
56f48716 SS |
262 | # Re-exec systemd after update. |
263 | /usr/bin/systemctl daemon-reexec | |
264 | ||
1d40b321 | 265 | # Restart login service after update |
5e462903 | 266 | /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : |
6793fec1 | 267 | /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || : |
755fe986 SS |
268 | |
269 | # Use the new journald configuration file and restart the service. | |
270 | if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then | |
271 | mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf | |
272 | /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || : | |
273 | fi | |
1d40b321 | 274 | end |
2d01364a SS |
275 | |
276 | # Be sure to start the new udev after everything is done. | |
277 | script posttransup | |
278 | /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || : | |
279 | end | |
802ea3af | 280 | end |
1f9bc2f0 | 281 | |
802ea3af MT |
282 | # Package information for systemd-units |
283 | package %{name}-units | |
284 | summary = Configuration files, directories and installation tool for systemd. | |
285 | description | |
286 | This package contains all needed configuration files, directories | |
287 | and installation / configuration tool for systemd. | |
288 | end | |
1f9bc2f0 | 289 | |
5e38e9bb SS |
290 | prerequires |
291 | /bin/sh | |
292 | coreutils | |
293 | end | |
294 | ||
6793fec1 | 295 | provides |
802ea3af | 296 | /bin/systemctl |
802ea3af | 297 | end |
1d40b321 | 298 | |
6793fec1 MT |
299 | conflicts |
300 | filesystem < 002 | |
1d40b321 SS |
301 | end |
302 | ||
6793fec1 MT |
303 | files |
304 | %{sysconfdir}/etc/systemd/system | |
305 | %{sysconfdir}/tmpfiles.d | |
306 | %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh | |
307 | %{unitdir} | |
308 | %{bindir}/systemctl | |
309 | %{bindir}/systemd-tmpfiles | |
310 | %{mandir}/man1/systemctl.* | |
1d40b321 SS |
311 | end |
312 | ||
313 | script postup | |
314 | # Reload service files | |
6793fec1 | 315 | /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || : |
1d40b321 | 316 | end |
802ea3af | 317 | end |
1f9bc2f0 | 318 | |
1191e383 SS |
319 | package %{name}-libs |
320 | template LIBS | |
519776fd SS |
321 | |
322 | groups += Base | |
323 | ||
324 | prerequires | |
325 | /etc/nsswitch.conf | |
326 | end | |
327 | ||
328 | provides | |
329 | nss-myhostname = %{thisver} | |
330 | end | |
331 | ||
332 | obsoletes | |
333 | nss-myhostname <= 0.3-3 | |
334 | end | |
335 | ||
336 | conflicts | |
519776fd SS |
337 | # Ensure that the version of systemd matches systemd-libs. |
338 | systemd > %{thisver} | |
339 | systemd < %{thisver} | |
340 | end | |
341 | ||
342 | # Add myhostname to the hosts line of /etc/nsswitch.conf | |
343 | script postin | |
344 | if [ -f "/etc/nsswitch.conf" ]; then | |
345 | sed -i.bak -e ' | |
346 | /^hosts:/ !b | |
347 | /\<myhostname\>/ b | |
348 | s/[[:blank:]]*$/ myhostname/ | |
349 | ' /etc/nsswitch.conf | |
350 | fi | |
351 | end | |
352 | ||
353 | # Remove myhostname from the hosts line of /etc/nsswitch.conf | |
354 | script postun | |
355 | if [ -f "/etc/nsswitch.conf" ]; then | |
356 | sed -i.bak -e ' | |
357 | /^hosts:/ !b | |
358 | s/[[:blank:]]\+myhostname\>// | |
359 | ' /etc/nsswitch.conf | |
360 | fi | |
361 | end | |
1191e383 SS |
362 | end |
363 | ||
4cdcf127 SS |
364 | package %{name}-compat-libs |
365 | summary = systemd compatibility libraries. | |
366 | description | |
367 | Compatibility libraries for systemd. If your package requires this | |
368 | package, you need to update your link options and build. | |
369 | end | |
370 | ||
371 | requires | |
372 | %{name}-libs = %{thisver} | |
373 | end | |
374 | ||
375 | files | |
376 | %{libdir}/libsystemd-daemon.so.* | |
377 | %{libdir}/libsystemd-login.so.* | |
378 | %{libdir}/libsystemd-journal.so.* | |
379 | %{libdir}/libsystemd-id128.so.* | |
380 | end | |
381 | end | |
382 | ||
802ea3af MT |
383 | package %{name}-devel |
384 | template DEVEL | |
6793fec1 | 385 | |
4cdcf127 SS |
386 | requires += %{name}-compat-libs = %{thisver} |
387 | ||
6793fec1 | 388 | files += %{prefix}/lib/pakfire/macros/ |
802ea3af | 389 | end |
1f9bc2f0 | 390 | |
2d01364a SS |
391 | package libudev |
392 | summary = Libraries for adding libudev support to applications. | |
393 | description | |
394 | This package contains the libraries that make it easier to use libudev | |
395 | functionality from applications. | |
396 | end | |
397 | license = LGPLv2+ | |
398 | ||
399 | conflicts | |
400 | filesystem < 002 | |
401 | end | |
402 | ||
403 | files | |
1191e383 | 404 | %{libdir}/lib*udev*.so.* |
2d01364a SS |
405 | %{libidr}/girepository*/ |
406 | end | |
407 | end | |
408 | ||
409 | package libudev-devel | |
410 | summary = Header files for adding libudev support to applications. | |
411 | description | |
412 | This package contains the header and pkg-config files for developing | |
413 | applications using libudev functionality. | |
414 | end | |
415 | license = LGPLv2+ | |
416 | ||
417 | conflicts | |
418 | filesystem < 002 | |
419 | end | |
420 | ||
421 | files | |
a8aa3ead | 422 | %{libdir}/lib*udev*.so |
73eb4724 | 423 | %{libdir}/pkgconfig/lib*udev.pc |
2d01364a | 424 | %{libdir}/pkgconfig/gudev* |
a8aa3ead | 425 | %{includedir}/lib*udev.h |
2d01364a SS |
426 | %{includedir}/gudev* |
427 | %{datadir}/gir-* | |
428 | %{datadir}/gtk-doc/html/gudev | |
429 | end | |
430 | end | |
431 | ||
1f9bc2f0 MT |
432 | package %{name}-debuginfo |
433 | template DEBUGINFO | |
434 | end | |
802ea3af | 435 | end |