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/
129 # Remove udev rules for "predictable" network device renaming.
130 # http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
131 rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-name-slot.rules
139 prerequires += authconfig
147 %{name}-libs=%{thisver}
148 %{name}-units=%{thisver}
165 bash-completion < 2.1
179 /etc/systemd/journald.conf
180 /etc/systemd/logind.conf
181 /etc/systemd/system.conf
182 /etc/systemd/user.conf
188 # Create groups for udev.
189 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
190 getent group tape >/dev/null || groupadd -g 33 tape || :
191 getent group dialout >/dev/null || groupadd -g 18 dialout || :
192 getent group floppy >/dev/null || groupadd -g 19 floppy || :
196 # Generate Machine ID.
197 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
199 # Reexec systemd daemon.
200 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
202 # Make sure pam_systemd is enabled
203 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
204 authconfig --update --nostart >/dev/null 2>&1 || :
207 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
210 /usr/bin/systemctl enable \
213 systemd-readahead-replay.service \
214 systemd-readahead-collect.service \
219 # Be sure to stop the old udev before updating.
220 /usr/bin/systemctl stop udev.service udev-trigger.service \
221 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
225 # Restart login service after update
226 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
227 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
229 # Use the new journald configuration file and restart the service.
230 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
231 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
232 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
236 # Be sure to start the new udev after everything is done.
238 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
242 # Package information for systemd-units
243 package %{name}-units
244 summary = Configuration files, directories and installation tool for systemd.
246 This package contains all needed configuration files, directories
247 and installation / configuration tool for systemd.
264 %{sysconfdir}/etc/systemd/system
265 %{sysconfdir}/tmpfiles.d
266 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
269 %{bindir}/systemd-tmpfiles
270 %{mandir}/man1/systemctl.*
274 # Reload service files
275 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
289 nss-myhostname = %{thisver}
293 nss-myhostname <= 0.3-3
297 # Ensure that the version of systemd matches systemd-libs.
302 # Add myhostname to the hosts line of /etc/nsswitch.conf
304 if [ -f "/etc/nsswitch.conf" ]; then
308 s/[[:blank:]]*$/ myhostname/
313 # Remove myhostname from the hosts line of /etc/nsswitch.conf
315 if [ -f "/etc/nsswitch.conf" ]; then
318 s/[[:blank:]]\+myhostname\>//
324 package %{name}-devel
327 files += %{prefix}/lib/pakfire/macros/
331 summary = Libraries for adding libudev support to applications.
333 This package contains the libraries that make it easier to use libudev
334 functionality from applications.
343 %{libdir}/lib*udev*.so.*
344 %{libidr}/girepository*/
348 package libudev-devel
349 summary = Header files for adding libudev support to applications.
351 This package contains the header and pkg-config files for developing
352 applications using libudev functionality.
361 %{libdir}/lib*udev*.so
362 %{libdir}/pkgconfig/lib*udev.pc
363 %{libdir}/pkgconfig/gudev*
364 %{includedir}/lib*udev.h
367 %{datadir}/gtk-doc/html/gudev
371 package %{name}-debuginfo