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://cgit.freedesktop.org/systemd/systemd/snapshot/
24 unitdir = %{prefix}/lib/systemd/system
31 cryptsetup-luks-devel >= 1.4.2
37 gobject-introspection-devel >= 1.31
56 configure_options += \
57 --with-sysvinit-path= \
58 --with-sysvrcnd-path= \
59 --enable-introspection=yes \
67 # Create folder in log to store the journal.
68 mkdir -pv %{BUILDROOT}/var/log/journal
70 # Create sysv compatible symlinks.
71 mkdir -pv %{BUILDROOT}%{sbindir}
72 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
73 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
74 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
75 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
76 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
77 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
79 # Create empty machine-id file.
80 touch %{BUILDROOT}/etc/machine-id
82 # Copy locale and console settings
83 mkdir -pv %{BUILDROOT}%{sysconfdir}
84 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
86 # Recreate all targets
87 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
88 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
89 multi-user.target.wants syslog.target.wants; do
90 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
93 # Remove runlevel targets and graphical.target
94 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
95 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
97 # Remove service files for utmp update.
98 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
99 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
101 # Set default target to multi-user
102 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
104 # Replace absolute symlinks by relative ones.
105 cd %{BUILDROOT}%{unitdir}/../user
106 for i in bluetooth local-fs paths printer remote-fs shutdown smartcard sockets sound swap timers; do
107 ln -svf ../system/${i}.target ${i}.target || exit 1
110 # Remove tmpfile for X11
111 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
113 # Remove unneeded stuff for xdg
114 rm -rfv %{BUILDROOT}/etc/xdg
116 # Remove unneeded stuff for rpm.
117 rm -rvf %{BUILDROOT}/etc/rpm
119 # Use journald. Enable the import of kernel messages.
120 # Stop forwarding to a syslog daemon.
122 -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
123 -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
124 -i %{BUILDROOT}/etc/systemd/journald.conf
126 # Install legacy tmpfile to autocreate /run/lock on startup.
127 install -v -m 644 %{DIR_APP}/tmpfiles.d/legacy.conf %{BUILDROOT}%{prefix}/lib/tmpfiles.d/
135 prerequires += authconfig
143 %{name}-libs=%{thisver}
144 %{name}-units=%{thisver}
161 bash-completion < 2.1
175 /etc/systemd/journald.conf
176 /etc/systemd/logind.conf
177 /etc/systemd/system.conf
178 /etc/systemd/user.conf
184 # Create groups for udev.
185 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
186 getent group tape >/dev/null || groupadd -g 33 tape || :
187 getent group dialout >/dev/null || groupadd -g 18 dialout || :
188 getent group floppy >/dev/null || groupadd -g 19 floppy || :
192 # Generate Machine ID.
193 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
195 # Reexec systemd daemon.
196 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
198 # Make sure pam_systemd is enabled
199 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
200 authconfig --update --nostart >/dev/null 2>&1 || :
203 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
206 /usr/bin/systemctl enable \
209 systemd-readahead-replay.service \
210 systemd-readahead-collect.service \
215 # Be sure to stop the old udev before updating.
216 /usr/bin/systemctl stop udev.service udev-trigger.service \
217 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
221 # Restart login service after update
222 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
223 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
225 # Use the new journald configuration file and restart the service.
226 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
227 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
228 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
232 # Be sure to start the new udev after everything is done.
234 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
238 # Package information for systemd-units
239 package %{name}-units
240 summary = Configuration files, directories and installation tool for systemd.
242 This package contains all needed configuration files, directories
243 and installation / configuration tool for systemd.
260 %{sysconfdir}/etc/systemd/system
261 %{sysconfdir}/tmpfiles.d
262 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
265 %{bindir}/systemd-tmpfiles
266 %{mandir}/man1/systemctl.*
270 # Reload service files
271 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
285 nss-myhostname = %{thisver}
289 nss-myhostname <= 0.3-3
293 # Ensure that the version of systemd matches systemd-libs.
298 # Add myhostname to the hosts line of /etc/nsswitch.conf
300 if [ -f "/etc/nsswitch.conf" ]; then
304 s/[[:blank:]]*$/ myhostname/
309 # Remove myhostname from the hosts line of /etc/nsswitch.conf
311 if [ -f "/etc/nsswitch.conf" ]; then
314 s/[[:blank:]]\+myhostname\>//
320 package %{name}-devel
323 files += %{prefix}/lib/pakfire/macros/
327 summary = Libraries for adding libudev support to applications.
329 This package contains the libraries that make it easier to use libudev
330 functionality from applications.
339 %{libdir}/lib*udev*.so.*
340 %{libidr}/girepository*/
344 package libudev-devel
345 summary = Header files for adding libudev support to applications.
347 This package contains the header and pkg-config files for developing
348 applications using libudev functionality.
357 %{libdir}/lib*udev*.so
358 %{libdir}/pkgconfig/lib*udev.pc
359 %{libdir}/pkgconfig/gudev*
360 %{includedir}/lib*udev.h
363 %{datadir}/gtk-doc/html/gudev
367 package %{name}-debuginfo