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