1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
12 url = http://www.freedesktop.org/wiki/Software/systemd
14 summary = A System and Service Manager
17 systemd is a system and service manager for Linux, compatible with
18 SysV and LSB init scripts.
21 source_dl = https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz#/
24 unitdir = %{prefix}/lib/systemd/system
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
39 cryptsetup-luks-devel >= 1.4.2
46 gobject-introspection-devel >= 1.31
61 libmount-devel >= 2.34-2
64 libuuid-devel >= 2.34-2
84 export LD_LIBRARY_PATH = %{DIR_APP}/.libs
89 -Dnobody-user=nobody \
90 -Dnobody-group=nobody \
91 -Dfallback-hostname="localhost" \
109 configure_options += \
127 -Dsystemd-journal-gid=190
130 # Call meson and pass configure options.
131 %{meson} %{configure_options}
133 # Call ninja to start build
138 # Create dummy machine-id file, which is required for some tests.
139 touch %{sysconfdir}/machine-id
142 %{meson_test} || true
149 # Use the installed files to create all users and groups
153 # Create folder in log to store the journal.
154 mkdir -pv %{BUILDROOT}/var/log/journal
156 # Create sysv compatible symlinks.
157 mkdir -pv %{BUILDROOT}%{sbindir}
158 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
159 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
160 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
161 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
162 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
163 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
165 # Create empty machine-id file.
166 touch %{BUILDROOT}/etc/machine-id
168 # Copy locale and console settings
169 mkdir -pv %{BUILDROOT}%{sysconfdir}
170 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
172 # Recreate all targets
173 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
174 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
175 multi-user.target.wants syslog.target.wants; do
176 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
179 # Remove runlevel targets and graphical.target
180 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
181 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
183 # Remove service files for utmp update.
184 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
185 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
187 # Set default target to multi-user
188 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
190 # Replace absolute symlinks by relative ones.
191 cd %{BUILDROOT}%{unitdir}/../user
192 for i in bluetooth local-fs paths printer remote-fs shutdown smartcard sockets sound swap timers; do
193 ln -svf ../system/${i}.target ${i}.target || exit 1
196 # Remove .so file for the shared library, it's not supposed to be used for anything.
197 rm -rvf %{BUILDROOT}%{prefix}/lib/systemd/libsystemd-shared.so
199 # Remove tmpfile for X11
200 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
202 # Drop X11 related config files
203 rm -rvf %{BUILDROOT}%{sysconfdir}/X11
205 # Remove unneeded stuff for xdg
206 rm -rfv %{BUILDROOT}/etc/xdg
208 # Remove unneeded stuff for rpm.
209 rm -rvf %{BUILDROOT}/etc/rpm
210 rm -rvf %{BUILDROOT}/usr/lib/rpm
212 # Drop ZSH related files
213 rm -rvf %{BUILDROOT}%{datadir}/zsh
215 # Use journald. Enable the import of kernel messages.
216 # Stop forwarding to a syslog daemon.
218 -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
219 -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
220 -i %{BUILDROOT}/etc/systemd/journald.conf
222 # Remove udev rules for "predictable" network device renaming.
223 # http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
224 rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-name-slot.rules
226 # Don't let udev set up any networking
227 rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-setup-link.rules
229 mkdir -pv %{BUILDROOT}/var/log/journal
230 chown root:systemd-journal %{BUILDROOT}/var/log/journal
232 # Create empty environment file.
233 touch %{BUILDROOT}%{sysconfdir}/environment
238 # Create the sysusers folder in the jail.
239 mkdir -pv %{sysusersdir}
241 # Copy all sysusers files from BUILDROOT into the jail's sysusers directory.
242 install -v -m 644 %{BUILDROOT}%{sysusersdir}/*.conf %{sysusersdir}
244 # We do not have a libsystemd or systemd-sysusers binary, so
245 # call the installed one inside BUILDROOT to create all users and
246 # groups in one shot.
247 LD_LIBRARY_PATH="%{BUILDROOT}%{libdir}/systemd/" \
248 %{BUILDROOT}%{bindir}/systemd-sysusers
259 %{name}-basetools = %{thisver}
260 %{name}-libs = %{thisver}
274 systemd-units = %{thisver}
280 bash-completion < 2.1
296 /etc/systemd/journald.conf
297 /etc/systemd/logind.conf
298 /etc/systemd/system.conf
299 /etc/systemd/user.conf
305 # Reexec systemd daemon.
306 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
308 # Automatically spawn a getty on TTY1
309 /usr/bin/systemctl enable getty@.service >/dev/null 2>&1 || :
311 # Enable targed to mount all remote filesystems.
312 /usr/bin/systemctl enable remote-fs.target >/dev/null 2>&1 || :
316 # Be sure to stop the old udev before updating.
317 /usr/bin/systemctl stop udev.service udev-trigger.service \
318 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
324 # Re-exec systemd after update.
325 /usr/bin/systemctl daemon-reexec >/dev/null 2>&1 || :
327 # Restart login service after update
328 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
329 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
331 # Use the new journald configuration file and restart the service.
332 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
333 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf >/dev/null 2>&1 || :
334 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
338 # Be sure to start the new udev after everything is done.
340 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
344 package %{name}-basetools
345 summary = Basetools from the systemd package, like sysuses and tmpfiles.
347 This package contains some very basic tools from systemd like
348 systemd-sysusers and systemd-tmpfiles.
350 They mostly are required in a very early stage and shipping them
351 in an own package allows us to handle this properly.
355 systemd-sysusers = %{thisver}
356 systemd-tmpfiles = %{thisver}
360 %{name}-libs = %{thisver}
364 %{bindir}/%{name}-sysusers
365 %{bindir}/%{name}-tmpfiles
366 %{mandir}/man1/%{name}-sysusers*
367 %{mandir}/man1/%{name}-tmpfiles*
369 # Only ship the sysusers.d folder without
372 !%{sysusersdir}/*.conf
386 nss-myhostname = %{thisver}
390 nss-myhostname <= 0.3-3
391 systemd-compat-libs < 230
395 # Ensure that the version of systemd matches systemd-libs.
403 # Add myhostname to the hosts line of /etc/nsswitch.conf
405 if [ -f "/etc/nsswitch.conf" ]; then
409 s/[[:blank:]]*$/ myhostname/
414 # Remove myhostname from the hosts line of /etc/nsswitch.conf
416 if [ -f "/etc/nsswitch.conf" ]; then
419 s/[[:blank:]]\+myhostname\>//
425 package %{name}-devel
428 files += %{prefix}/lib/pakfire/macros/
432 summary = Libraries for adding libudev support to applications.
434 This package contains the libraries that make it easier to use libudev
435 functionality from applications.
444 %{libdir}/lib*udev*.so.*
445 %{libidr}/girepository*/
449 package libudev-devel
450 summary = Header files for adding libudev support to applications.
452 This package contains the header and pkg-config files for developing
453 applications using libudev functionality.
462 %{libdir}/lib*udev*.so
463 %{libdir}/pkgconfig/lib*udev.pc
464 %{libdir}/pkgconfig/gudev*
465 %{includedir}/lib*udev.h
468 %{datadir}/gtk-doc/html/gudev
472 package %{name}-debuginfo