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