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 = http://www.freedesktop.org/software/systemd/
22 sources = %{thisapp}.tar.xz
25 unitdir = %{prefix}/lib/systemd/system
30 cryptsetup-luks-devel >= 1.4.2
37 gobject-introspection-devel >= 1.31
60 configure_options += \
62 --with-sysvinit-path= \
63 --with-sysvrcnd-path= \
64 --enable-introspection \
66 --enable-compat-libs \
88 # Create folder in log to store the journal.
89 mkdir -pv %{BUILDROOT}/var/log/journal
91 # Create sysv compatible symlinks.
92 mkdir -pv %{BUILDROOT}%{sbindir}
93 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
94 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
95 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
96 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
97 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
98 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
100 # Create empty machine-id file.
101 touch %{BUILDROOT}/etc/machine-id
103 # Copy locale and console settings
104 mkdir -pv %{BUILDROOT}%{sysconfdir}
105 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
107 # Recreate all targets
108 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
109 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
110 multi-user.target.wants syslog.target.wants; do
111 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
114 # Remove runlevel targets and graphical.target
115 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
116 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
118 # Remove service files for utmp update.
119 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
120 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
122 # Set default target to multi-user
123 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
125 # Replace absolute symlinks by relative ones.
126 cd %{BUILDROOT}%{unitdir}/../user
127 for i in bluetooth local-fs paths printer remote-fs shutdown smartcard sockets sound swap timers; do
128 ln -svf ../system/${i}.target ${i}.target || exit 1
131 # Remove tmpfile for X11
132 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
134 # Remove unneeded stuff for xdg
135 rm -rfv %{BUILDROOT}/etc/xdg
137 # Remove unneeded stuff for rpm.
138 rm -rvf %{BUILDROOT}/etc/rpm
139 rm -rvf %{BUILDROOT}/usr/lib/rpm
141 # Use journald. Enable the import of kernel messages.
142 # Stop forwarding to a syslog daemon.
144 -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
145 -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
146 -i %{BUILDROOT}/etc/systemd/journald.conf
148 # Install legacy tmpfile to autocreate /run/lock on startup.
149 install -v -m 644 %{DIR_APP}/tmpfiles.d/legacy.conf %{BUILDROOT}%{prefix}/lib/tmpfiles.d/
151 # Remove udev rules for "predictable" network device renaming.
152 # http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
153 rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-name-slot.rules
155 # Create journald related folders.
156 mkdir -pv %{BUILDROOT}/run/log/journal
157 chown root:systemd-journal %{BUILDROOT}/run/log/journal
159 mkdir -pv %{BUILDROOT}/var/log/journal
160 chown root:systemd-journal %{BUILDROOT}/var/log/journal
165 # Create groups for udev.
166 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
167 getent group tape >/dev/null || groupadd -g 33 tape || :
168 getent group dialout >/dev/null || groupadd -g 18 dialout || :
169 getent group floppy >/dev/null || groupadd -g 19 floppy || :
170 getent group input >/dev/null || groupadd -r input || :
171 getent group utmp >/dev/null || groupadd -r -g 22 utmp || :
173 # Create group for journald.
174 getent group systemd-journal >/dev/null || /usr/sbin/groupadd -r systemd-journal
181 prerequires += authconfig
189 %{name}-libs=%{thisver}
190 %{name}-units=%{thisver}
207 bash-completion < 2.1
221 /etc/systemd/journald.conf
222 /etc/systemd/logind.conf
223 /etc/systemd/system.conf
224 /etc/systemd/user.conf
234 # Generate Machine ID.
235 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
237 # Reexec systemd daemon.
238 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
240 # Make sure pam_systemd is enabled
241 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
242 authconfig --update --nostart >/dev/null 2>&1 || :
245 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
248 /usr/bin/systemctl enable \
251 systemd-readahead-replay.service \
252 systemd-readahead-collect.service \
257 # Be sure to stop the old udev before updating.
258 /usr/bin/systemctl stop udev.service udev-trigger.service \
259 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
265 # Re-exec systemd after update.
266 /usr/bin/systemctl daemon-reexec
268 # Restart login service after update
269 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
270 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
272 # Use the new journald configuration file and restart the service.
273 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
274 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
275 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
279 # Be sure to start the new udev after everything is done.
281 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
285 # Package information for systemd-units
286 package %{name}-units
287 summary = Configuration files, directories and installation tool for systemd.
289 This package contains all needed configuration files, directories
290 and installation / configuration tool for systemd.
307 %{sysconfdir}/etc/systemd/system
308 %{sysconfdir}/tmpfiles.d
309 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
312 %{bindir}/systemd-tmpfiles
313 %{mandir}/man1/systemctl.*
317 # Reload service files
318 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
332 nss-myhostname = %{thisver}
336 nss-myhostname <= 0.3-3
340 # Ensure that the version of systemd matches systemd-libs.
345 # Add myhostname to the hosts line of /etc/nsswitch.conf
347 if [ -f "/etc/nsswitch.conf" ]; then
351 s/[[:blank:]]*$/ myhostname/
356 # Remove myhostname from the hosts line of /etc/nsswitch.conf
358 if [ -f "/etc/nsswitch.conf" ]; then
361 s/[[:blank:]]\+myhostname\>//
367 package %{name}-compat-libs
368 summary = systemd compatibility libraries.
370 Compatibility libraries for systemd. If your package requires this
371 package, you need to update your link options and build.
375 %{name}-libs = %{thisver}
379 %{libdir}/libsystemd-daemon.so.*
380 %{libdir}/libsystemd-login.so.*
381 %{libdir}/libsystemd-journal.so.*
382 %{libdir}/libsystemd-id128.so.*
386 package %{name}-devel
389 requires += %{name}-compat-libs = %{thisver}
391 files += %{prefix}/lib/pakfire/macros/
395 summary = Libraries for adding libudev support to applications.
397 This package contains the libraries that make it easier to use libudev
398 functionality from applications.
407 %{libdir}/lib*udev*.so.*
408 %{libidr}/girepository*/
412 package libudev-devel
413 summary = Header files for adding libudev support to applications.
415 This package contains the header and pkg-config files for developing
416 applications using libudev functionality.
425 %{libdir}/lib*udev*.so
426 %{libdir}/pkgconfig/lib*udev.pc
427 %{libdir}/pkgconfig/gudev*
428 %{includedir}/lib*udev.h
431 %{datadir}/gtk-doc/html/gudev
435 package python3-%{name}
439 package %{name}-debuginfo