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