]> git.ipfire.org Git - ipfire-3.x.git/blame - systemd/systemd.nm
systemd: Build manpages again
[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
0b0c2be2 7version = 253
e4b39d70 8release = 4
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
b329a155 38 attr-devel
2d01364a 39 cryptsetup-luks-devel >= 1.4.2
802ea3af 40 dbus-devel
fe6e3719
SS
41 docbook-utils
42 docbook-xsl
8823e1f9 43 elfutils-devel
bfabb323 44 gettext-devel
2d01364a
SS
45 glib2-devel
46 gobject-introspection-devel >= 1.31
47 gperf
48 hwdata
c9dd9f9b 49 intltool >= 0.51.0
884e7dc4 50 kbd
7e97512a 51 kmod-devel >= 15
2a824e90 52 libacl-devel
2d01364a 53 libblkid-devel
802ea3af 54 libcap-devel
4990bf7f 55 libgcrypt-devel
cefc1a9b 56 libmount-devel >= 2.34-2
cbaab290 57 libseccomp-devel
cefc1a9b 58 libuuid-devel >= 2.34-2
c1bf5bac 59 libxcrypt-devel
8823e1f9 60 m4
cefc1a9b
SS
61 meson >= 0.50.1
62 ninja >= 1.9.0
802ea3af 63 pam-devel
2d01364a 64 pciutils-devel
63af7a71 65 python3-devel
884e7dc4 66 python3-jinja2
63af7a71 67 python3-lxml
cefc1a9b 68 setup >= 3.0-13
2d01364a 69 usbutils
53a325cb 70 vala
6793fec1 71 xz-devel
8823e1f9 72 zlib-devel
802ea3af
MT
73 end
74
c9dd9f9b
SS
75 export LD_LIBRARY_PATH = %{DIR_APP}/.libs
76
aaa616e7
SS
77 configure_options = \
78 -Dsysvinit-path= \
79 -Dsysvrcnd-path= \
80 -Dzlib=true \
e4b39d70 81 -Dman=true \
aaa616e7
SS
82 -Dsmack=false \
83 -Dbacklight=false \
84 -Dfirstboot=false \
85 -Dhibernate=false \
86 -Dimportd=false \
87 -Dlibiptc=false \
88 -Dmachined=false \
89 -Dnetworkd=false \
90 -Dresolve=false \
91 -Dportabled=false \
aaa616e7
SS
92 -Dtimesyncd=false \
93 -Dtimedated=false \
884e7dc4 94 -Dpolkit=false
802ea3af
MT
95
96 prepare_cmds
8823e1f9 97 %{create_groups}
aaa616e7
SS
98 end
99
100 build
101 # Call meson and pass configure options.
cefc1a9b 102 %{meson} %{configure_options}
c9dd9f9b 103
aaa616e7 104 # Call ninja to start build
cefc1a9b 105 %{meson_build}
c9dd9f9b
SS
106 end
107
108 test
109 # Create dummy machine-id file, which is required for some tests.
110 touch %{sysconfdir}/machine-id
111
112 # Run the testsuite.
aaa616e7 113 ninja test -v %{PARALLELISMFLAGS} -C build || true
802ea3af
MT
114 end
115
aaa616e7 116 install
cefc1a9b
SS
117 # Install systemd.
118 %{meson_install}
aaa616e7 119
755fe986
SS
120 # Create folder in log to store the journal.
121 mkdir -pv %{BUILDROOT}/var/log/journal
122
802ea3af 123 # Create sysv compatible symlinks.
6793fec1
MT
124 mkdir -pv %{BUILDROOT}%{sbindir}
125 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
126 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
127 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
128 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
129 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
130 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
802ea3af
MT
131
132 # Create empty machine-id file.
133 touch %{BUILDROOT}/etc/machine-id
134
135 # Copy locale and console settings
6793fec1
MT
136 mkdir -pv %{BUILDROOT}%{sysconfdir}
137 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
802ea3af
MT
138
139 # Recreate all targets
0976fbe4
SS
140 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
141 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
142 multi-user.target.wants syslog.target.wants; do
143 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
6793fec1 144 done
802ea3af
MT
145
146 # Remove runlevel targets and graphical.target
6793fec1
MT
147 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
148 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
802ea3af 149
2d01364a
SS
150 # Remove service files for utmp update.
151 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
152 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
153
802ea3af 154 # Set default target to multi-user
6793fec1 155 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
802ea3af
MT
156
157 # Replace absolute symlinks by relative ones.
6793fec1 158 cd %{BUILDROOT}%{unitdir}/../user
7f84cbd5 159 for i in bluetooth local-fs paths printer remote-fs shutdown smartcard sockets sound swap timers; do
6793fec1
MT
160 ln -svf ../system/${i}.target ${i}.target || exit 1
161 done
162
e52f3c8b
SS
163 # Remove .so file for the shared library, it's not supposed to be used for anything.
164 rm -rvf %{BUILDROOT}%{prefix}/lib/systemd/libsystemd-shared.so
165
802ea3af
MT
166 # Remove tmpfile for X11
167 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
168
e52f3c8b
SS
169 # Drop X11 related config files
170 rm -rvf %{BUILDROOT}%{sysconfdir}/X11
171
7f84cbd5
SS
172 # Remove unneeded stuff for xdg
173 rm -rfv %{BUILDROOT}/etc/xdg
174
175 # Remove unneeded stuff for rpm.
176 rm -rvf %{BUILDROOT}/etc/rpm
8823e1f9 177 rm -rvf %{BUILDROOT}/usr/lib/rpm
755fe986 178
e52f3c8b
SS
179 # Drop ZSH related files
180 rm -rvf %{BUILDROOT}%{datadir}/zsh
181
755fe986
SS
182 # Use journald. Enable the import of kernel messages.
183 # Stop forwarding to a syslog daemon.
184 sed \
185 -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
186 -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
187 -i %{BUILDROOT}/etc/systemd/journald.conf
f2ada565 188
4f209325
MT
189 # Remove udev rules for "predictable" network device renaming.
190 # http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
191 rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-name-slot.rules
8823e1f9 192
c4296a3d
MT
193 # Don't let udev set up any networking
194 rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-setup-link.rules
195
8823e1f9
SS
196 mkdir -pv %{BUILDROOT}/var/log/journal
197 chown root:systemd-journal %{BUILDROOT}/var/log/journal
20bbeabf
SS
198
199 # Create empty environment file.
200 touch %{BUILDROOT}%{sysconfdir}/environment
802ea3af
MT
201 end
202end
203
8823e1f9
SS
204create_groups
205 # Create groups for udev.
206 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
207 getent group tape >/dev/null || groupadd -g 33 tape || :
208 getent group dialout >/dev/null || groupadd -g 18 dialout || :
209 getent group floppy >/dev/null || groupadd -g 19 floppy || :
747db4fd
SS
210 getent group input >/dev/null || groupadd -r input || :
211 getent group utmp >/dev/null || groupadd -r -g 22 utmp || :
8823e1f9
SS
212
213 # Create group for journald.
214 getent group systemd-journal >/dev/null || /usr/sbin/groupadd -r systemd-journal
215end
216
557068de
SS
217quality-agent
218 whitelist_rpath
219 %{prefix}/lib/systemd
220 end
221end
222
802ea3af
MT
223packages
224 package %{name}
514357ad
SS
225 requires
226 dbus
2d01364a 227 hwdata
c1bf5bac
MT
228 python3-cairo
229 python3-dbus
230 python3-gobject3
2d448045 231 %{name}-basetools = %{thisver}
c1bf5bac
MT
232 %{name}-libs = %{thisver}
233 util-linux >= 2.19
514357ad 234 end
1d40b321 235
216fde50 236 provides
884e7dc4 237 /bin/systemctl
216fde50
SS
238 /bin/systemd
239 /sbin/halt
240 /sbin/init
241 /sbin/poweroff
242 /sbin/reboot
243 /sbin/shutdown
2d01364a
SS
244
245 udev = %{thisver}
884e7dc4
MT
246 systemd-units = %{thisver}
247
248 syslog
216fde50
SS
249 end
250
6793fec1 251 conflicts
7f84cbd5 252 bash-completion < 2.1
2d01364a 253 dracut < 019
6793fec1 254 filesystem < 002
755fe986 255 rsyslog < 5.8.6-4
dc322253 256 setup < 3.0-13
6793fec1
MT
257 upstart
258 end
ef438375 259
2d01364a
SS
260 obsoletes
261 udev < 183
cefc1a9b 262 systemd-units <= 242
2d01364a
SS
263 end
264
265 configfiles
266 /etc/locale.conf
267 /etc/machine-id
268 /etc/systemd/journald.conf
269 /etc/systemd/logind.conf
270 /etc/systemd/system.conf
271 /etc/systemd/user.conf
272 /etc/udev/udev.conf
273 /etc/vconsole.conf
274 end
275
276 script prein
8823e1f9 277 %{create_groups}
2d01364a
SS
278 end
279
1d40b321 280 script postin
1d40b321 281 # Reexec systemd daemon.
6793fec1 282 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
1d40b321 283
56a7990e
SS
284 # Automatically spawn a getty on TTY1
285 /usr/bin/systemctl enable getty@.service >/dev/null 2>&1 || :
286
287 # Enable targed to mount all remote filesystems.
288 /usr/bin/systemctl enable remote-fs.target >/dev/null 2>&1 || :
1d40b321
SS
289 end
290
2d01364a
SS
291 script preup
292 # Be sure to stop the old udev before updating.
293 /usr/bin/systemctl stop udev.service udev-trigger.service \
294 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
8823e1f9
SS
295
296 %{create_groups}
2d01364a
SS
297 end
298
1d40b321 299 script postup
56f48716 300 # Re-exec systemd after update.
e296cea0 301 /usr/bin/systemctl daemon-reexec >/dev/null 2>&1 || :
56f48716 302
1d40b321 303 # Restart login service after update
5e462903 304 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
6793fec1 305 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
755fe986
SS
306
307 # Use the new journald configuration file and restart the service.
308 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
e296cea0 309 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf >/dev/null 2>&1 || :
755fe986
SS
310 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
311 fi
1d40b321 312 end
2d01364a
SS
313
314 # Be sure to start the new udev after everything is done.
315 script posttransup
316 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
317 end
802ea3af 318 end
1f9bc2f0 319
2d448045
SS
320 package %{name}-basetools
321 summary = Basetools from the systemd package, like sysuses and tmpfiles.
322 description
323 This package contains some very basic tools from systemd like
324 systemd-sysusers and systemd-tmpfiles.
325
326 They mostly are required in a very early stage and shipping them
327 in an own package allows us to handle this properly.
328 end
329
330 provides
331 systemd-sysusers = %{thisver}
332 systemd-tmpfiles = %{thisver}
333 end
334
335 requires
336 %{name}-libs = %{thisver}
337 end
338
339 files
340 %{bindir}/%{name}-sysusers
341 %{bindir}/%{name}-tmpfiles
342 %{mandir}/man1/%{name}-sysusers*
343 %{mandir}/man1/%{name}-tmpfiles*
344
345 # Only ship the sysusers.d folder without
346 # any config files.
347 /usr/lib/sysusers.d
348 !/usr/lib/sysusers.d/*.conf
349 end
350 end
351
1191e383
SS
352 package %{name}-libs
353 template LIBS
519776fd
SS
354
355 groups += Base
356
357 prerequires
358 /etc/nsswitch.conf
359 end
360
361 provides
362 nss-myhostname = %{thisver}
363 end
364
365 obsoletes
366 nss-myhostname <= 0.3-3
e52f3c8b 367 systemd-compat-libs < 230
519776fd
SS
368 end
369
370 conflicts
519776fd
SS
371 # Ensure that the version of systemd matches systemd-libs.
372 systemd > %{thisver}
373 systemd < %{thisver}
374 end
375
2d448045
SS
376 files += \
377 %{libdir}/%{name}
378
519776fd
SS
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