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