]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/blame - systemd/systemd.nm
systemd: Update to 253
[people/stevee/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
SS
7version = 253
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
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 \
81 -Dsmack=false \
82 -Dbacklight=false \
83 -Dfirstboot=false \
84 -Dhibernate=false \
85 -Dimportd=false \
86 -Dlibiptc=false \
87 -Dmachined=false \
88 -Dnetworkd=false \
89 -Dresolve=false \
90 -Dportabled=false \
91 -Dsysusers=false \
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
231 %{name}-libs = %{thisver}
232 util-linux >= 2.19
514357ad 233 end
1d40b321 234
216fde50 235 provides
884e7dc4 236 /bin/systemctl
216fde50
SS
237 /bin/systemd
238 /sbin/halt
239 /sbin/init
240 /sbin/poweroff
241 /sbin/reboot
242 /sbin/shutdown
2d01364a
SS
243
244 udev = %{thisver}
884e7dc4
MT
245 systemd-units = %{thisver}
246
247 syslog
216fde50
SS
248 end
249
6793fec1 250 conflicts
7f84cbd5 251 bash-completion < 2.1
2d01364a 252 dracut < 019
6793fec1 253 filesystem < 002
755fe986 254 rsyslog < 5.8.6-4
dc322253 255 setup < 3.0-13
6793fec1
MT
256 upstart
257 end
ef438375 258
2d01364a
SS
259 obsoletes
260 udev < 183
cefc1a9b 261 systemd-units <= 242
2d01364a
SS
262 end
263
264 configfiles
265 /etc/locale.conf
266 /etc/machine-id
267 /etc/systemd/journald.conf
268 /etc/systemd/logind.conf
269 /etc/systemd/system.conf
270 /etc/systemd/user.conf
271 /etc/udev/udev.conf
272 /etc/vconsole.conf
273 end
274
275 script prein
8823e1f9 276 %{create_groups}
2d01364a
SS
277 end
278
1d40b321 279 script postin
1d40b321 280 # Reexec systemd daemon.
6793fec1 281 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
1d40b321 282
56a7990e
SS
283 # Automatically spawn a getty on TTY1
284 /usr/bin/systemctl enable getty@.service >/dev/null 2>&1 || :
285
286 # Enable targed to mount all remote filesystems.
287 /usr/bin/systemctl enable remote-fs.target >/dev/null 2>&1 || :
1d40b321
SS
288 end
289
2d01364a
SS
290 script preup
291 # Be sure to stop the old udev before updating.
292 /usr/bin/systemctl stop udev.service udev-trigger.service \
293 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
8823e1f9
SS
294
295 %{create_groups}
2d01364a
SS
296 end
297
1d40b321 298 script postup
56f48716 299 # Re-exec systemd after update.
e296cea0 300 /usr/bin/systemctl daemon-reexec >/dev/null 2>&1 || :
56f48716 301
1d40b321 302 # Restart login service after update
5e462903 303 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
6793fec1 304 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
755fe986
SS
305
306 # Use the new journald configuration file and restart the service.
307 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
e296cea0 308 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf >/dev/null 2>&1 || :
755fe986
SS
309 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
310 fi
1d40b321 311 end
2d01364a
SS
312
313 # Be sure to start the new udev after everything is done.
314 script posttransup
315 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
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
e52f3c8b 334 systemd-compat-libs < 230
519776fd
SS
335 end
336
337 conflicts
519776fd
SS
338 # Ensure that the version of systemd matches systemd-libs.
339 systemd > %{thisver}
340 systemd < %{thisver}
341 end
342
343 # Add myhostname to the hosts line of /etc/nsswitch.conf
344 script postin
345 if [ -f "/etc/nsswitch.conf" ]; then
346 sed -i.bak -e '
347 /^hosts:/ !b
348 /\<myhostname\>/ b
349 s/[[:blank:]]*$/ myhostname/
350 ' /etc/nsswitch.conf
351 fi
352 end
353
354 # Remove myhostname from the hosts line of /etc/nsswitch.conf
355 script postun
356 if [ -f "/etc/nsswitch.conf" ]; then
357 sed -i.bak -e '
358 /^hosts:/ !b
359 s/[[:blank:]]\+myhostname\>//
360 ' /etc/nsswitch.conf
361 fi
362 end
1191e383
SS
363 end
364
802ea3af
MT
365 package %{name}-devel
366 template DEVEL
6793fec1
MT
367
368 files += %{prefix}/lib/pakfire/macros/
802ea3af 369 end
1f9bc2f0 370
2d01364a
SS
371 package libudev
372 summary = Libraries for adding libudev support to applications.
373 description
374 This package contains the libraries that make it easier to use libudev
375 functionality from applications.
376 end
377 license = LGPLv2+
378
379 conflicts
380 filesystem < 002
381 end
382
383 files
1191e383 384 %{libdir}/lib*udev*.so.*
2d01364a
SS
385 %{libidr}/girepository*/
386 end
387 end
388
389 package libudev-devel
390 summary = Header files for adding libudev support to applications.
391 description
392 This package contains the header and pkg-config files for developing
393 applications using libudev functionality.
394 end
395 license = LGPLv2+
396
397 conflicts
398 filesystem < 002
399 end
400
401 files
a8aa3ead 402 %{libdir}/lib*udev*.so
73eb4724 403 %{libdir}/pkgconfig/lib*udev.pc
2d01364a 404 %{libdir}/pkgconfig/gudev*
a8aa3ead 405 %{includedir}/lib*udev.h
2d01364a
SS
406 %{includedir}/gudev*
407 %{datadir}/gir-*
408 %{datadir}/gtk-doc/html/gudev
409 end
410 end
411
1f9bc2f0
MT
412 package %{name}-debuginfo
413 template DEBUGINFO
414 end
802ea3af 415end