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
58 configure_options += \
59 --with-sysvinit-path= \
60 --with-sysvrcnd-path= \
61 --enable-introspection \
63 --enable-compat-libs \
85 # Create folder in log to store the journal.
86 mkdir -pv %{BUILDROOT}/var/log/journal
88 # Create sysv compatible symlinks.
89 mkdir -pv %{BUILDROOT}%{sbindir}
90 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
91 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
92 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
93 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
94 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
95 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
97 # Create empty machine-id file.
98 touch %{BUILDROOT}/etc/machine-id
100 # Copy locale and console settings
101 mkdir -pv %{BUILDROOT}%{sysconfdir}
102 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
104 # Recreate all targets
105 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
106 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
107 multi-user.target.wants syslog.target.wants; do
108 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
111 # Remove runlevel targets and graphical.target
112 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
113 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
115 # Remove service files for utmp update.
116 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
117 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
119 # Set default target to multi-user
120 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
122 # Replace absolute symlinks by relative ones.
123 cd %{BUILDROOT}%{unitdir}/../user
124 for i in bluetooth local-fs paths printer remote-fs shutdown smartcard sockets sound swap timers; do
125 ln -svf ../system/${i}.target ${i}.target || exit 1
128 # Remove tmpfile for X11
129 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
131 # Remove unneeded stuff for xdg
132 rm -rfv %{BUILDROOT}/etc/xdg
134 # Remove unneeded stuff for rpm.
135 rm -rvf %{BUILDROOT}/etc/rpm
136 rm -rvf %{BUILDROOT}/usr/lib/rpm
138 # Use journald. Enable the import of kernel messages.
139 # Stop forwarding to a syslog daemon.
141 -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
142 -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
143 -i %{BUILDROOT}/etc/systemd/journald.conf
145 # Install legacy tmpfile to autocreate /run/lock on startup.
146 install -v -m 644 %{DIR_APP}/tmpfiles.d/legacy.conf %{BUILDROOT}%{prefix}/lib/tmpfiles.d/
148 # Remove udev rules for "predictable" network device renaming.
149 # http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
150 rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-name-slot.rules
152 # Create journald related folders.
153 mkdir -pv %{BUILDROOT}/run/log/journal
154 chown root:systemd-journal %{BUILDROOT}/run/log/journal
156 mkdir -pv %{BUILDROOT}/var/log/journal
157 chown root:systemd-journal %{BUILDROOT}/var/log/journal
162 # Create groups for udev.
163 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
164 getent group tape >/dev/null || groupadd -g 33 tape || :
165 getent group dialout >/dev/null || groupadd -g 18 dialout || :
166 getent group floppy >/dev/null || groupadd -g 19 floppy || :
167 getent group input >/dev/null || groupadd -r input || :
168 getent group utmp >/dev/null || groupadd -r -g 22 utmp || :
170 # Create group for journald.
171 getent group systemd-journal >/dev/null || /usr/sbin/groupadd -r systemd-journal
178 prerequires += authconfig
186 %{name}-libs=%{thisver}
187 %{name}-units=%{thisver}
204 bash-completion < 2.1
218 /etc/systemd/journald.conf
219 /etc/systemd/logind.conf
220 /etc/systemd/system.conf
221 /etc/systemd/user.conf
231 # Generate Machine ID.
232 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
234 # Reexec systemd daemon.
235 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
237 # Make sure pam_systemd is enabled
238 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
239 authconfig --update --nostart >/dev/null 2>&1 || :
242 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
245 /usr/bin/systemctl enable \
248 systemd-readahead-replay.service \
249 systemd-readahead-collect.service \
254 # Be sure to stop the old udev before updating.
255 /usr/bin/systemctl stop udev.service udev-trigger.service \
256 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
262 # Re-exec systemd after update.
263 /usr/bin/systemctl daemon-reexec
265 # Restart login service after update
266 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
267 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
269 # Use the new journald configuration file and restart the service.
270 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
271 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
272 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
276 # Be sure to start the new udev after everything is done.
278 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
282 # Package information for systemd-units
283 package %{name}-units
284 summary = Configuration files, directories and installation tool for systemd.
286 This package contains all needed configuration files, directories
287 and installation / configuration tool for systemd.
304 %{sysconfdir}/etc/systemd/system
305 %{sysconfdir}/tmpfiles.d
306 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
309 %{bindir}/systemd-tmpfiles
310 %{mandir}/man1/systemctl.*
314 # Reload service files
315 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
329 nss-myhostname = %{thisver}
333 nss-myhostname <= 0.3-3
337 # Ensure that the version of systemd matches systemd-libs.
342 # Add myhostname to the hosts line of /etc/nsswitch.conf
344 if [ -f "/etc/nsswitch.conf" ]; then
348 s/[[:blank:]]*$/ myhostname/
353 # Remove myhostname from the hosts line of /etc/nsswitch.conf
355 if [ -f "/etc/nsswitch.conf" ]; then
358 s/[[:blank:]]\+myhostname\>//
364 package %{name}-compat-libs
365 summary = systemd compatibility libraries.
367 Compatibility libraries for systemd. If your package requires this
368 package, you need to update your link options and build.
372 %{name}-libs = %{thisver}
376 %{libdir}/libsystemd-daemon.so.*
377 %{libdir}/libsystemd-login.so.*
378 %{libdir}/libsystemd-journal.so.*
379 %{libdir}/libsystemd-id128.so.*
383 package %{name}-devel
386 requires += %{name}-compat-libs = %{thisver}
388 files += %{prefix}/lib/pakfire/macros/
392 summary = Libraries for adding libudev support to applications.
394 This package contains the libraries that make it easier to use libudev
395 functionality from applications.
404 %{libdir}/lib*udev*.so.*
405 %{libidr}/girepository*/
409 package libudev-devel
410 summary = Header files for adding libudev support to applications.
412 This package contains the header and pkg-config files for developing
413 applications using libudev functionality.
422 %{libdir}/lib*udev*.so
423 %{libdir}/pkgconfig/lib*udev.pc
424 %{libdir}/pkgconfig/gudev*
425 %{includedir}/lib*udev.h
428 %{datadir}/gtk-doc/html/gudev
432 package %{name}-debuginfo