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 \
71 # Create folder in log to store the journal.
72 mkdir -pv %{BUILDROOT}/var/log/journal
74 # Create sysv compatible symlinks.
75 mkdir -pv %{BUILDROOT}%{sbindir}
76 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
77 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
78 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
79 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
80 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
81 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
83 # Create empty machine-id file.
84 touch %{BUILDROOT}/etc/machine-id
86 # Copy locale and console settings
87 mkdir -pv %{BUILDROOT}%{sysconfdir}
88 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
90 # Recreate all targets
91 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
92 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
93 multi-user.target.wants syslog.target.wants; do
94 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
97 # Remove runlevel targets and graphical.target
98 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
99 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
101 # Remove service files for utmp update.
102 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
103 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
105 # Set default target to multi-user
106 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
108 # Replace absolute symlinks by relative ones.
109 cd %{BUILDROOT}%{unitdir}/../user
110 for i in bluetooth local-fs paths printer remote-fs shutdown smartcard sockets sound swap timers; do
111 ln -svf ../system/${i}.target ${i}.target || exit 1
114 # Remove tmpfile for X11
115 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
117 # Remove unneeded stuff for xdg
118 rm -rfv %{BUILDROOT}/etc/xdg
120 # Remove unneeded stuff for rpm.
121 rm -rvf %{BUILDROOT}/etc/rpm
123 # Use journald. Enable the import of kernel messages.
124 # Stop forwarding to a syslog daemon.
126 -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
127 -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
128 -i %{BUILDROOT}/etc/systemd/journald.conf
130 # Install legacy tmpfile to autocreate /run/lock on startup.
131 install -v -m 644 %{DIR_APP}/tmpfiles.d/legacy.conf %{BUILDROOT}%{prefix}/lib/tmpfiles.d/
133 # Remove udev rules for "predictable" network device renaming.
134 # http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
135 rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-name-slot.rules
143 prerequires += authconfig
151 %{name}-libs=%{thisver}
152 %{name}-units=%{thisver}
169 bash-completion < 2.1
183 /etc/systemd/journald.conf
184 /etc/systemd/logind.conf
185 /etc/systemd/system.conf
186 /etc/systemd/user.conf
192 # Create groups for udev.
193 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
194 getent group tape >/dev/null || groupadd -g 33 tape || :
195 getent group dialout >/dev/null || groupadd -g 18 dialout || :
196 getent group floppy >/dev/null || groupadd -g 19 floppy || :
200 # Generate Machine ID.
201 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
203 # Reexec systemd daemon.
204 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
206 # Make sure pam_systemd is enabled
207 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
208 authconfig --update --nostart >/dev/null 2>&1 || :
211 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
214 /usr/bin/systemctl enable \
217 systemd-readahead-replay.service \
218 systemd-readahead-collect.service \
223 # Be sure to stop the old udev before updating.
224 /usr/bin/systemctl stop udev.service udev-trigger.service \
225 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
229 # Restart login service after update
230 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
231 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
233 # Use the new journald configuration file and restart the service.
234 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
235 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
236 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
240 # Be sure to start the new udev after everything is done.
242 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
246 # Package information for systemd-units
247 package %{name}-units
248 summary = Configuration files, directories and installation tool for systemd.
250 This package contains all needed configuration files, directories
251 and installation / configuration tool for systemd.
268 %{sysconfdir}/etc/systemd/system
269 %{sysconfdir}/tmpfiles.d
270 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
273 %{bindir}/systemd-tmpfiles
274 %{mandir}/man1/systemctl.*
278 # Reload service files
279 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
293 nss-myhostname = %{thisver}
297 nss-myhostname <= 0.3-3
301 # Ensure that the version of systemd matches systemd-libs.
306 # Add myhostname to the hosts line of /etc/nsswitch.conf
308 if [ -f "/etc/nsswitch.conf" ]; then
312 s/[[:blank:]]*$/ myhostname/
317 # Remove myhostname from the hosts line of /etc/nsswitch.conf
319 if [ -f "/etc/nsswitch.conf" ]; then
322 s/[[:blank:]]\+myhostname\>//
328 package %{name}-devel
331 files += %{prefix}/lib/pakfire/macros/
335 summary = Libraries for adding libudev support to applications.
337 This package contains the libraries that make it easier to use libudev
338 functionality from applications.
347 %{libdir}/lib*udev*.so.*
348 %{libidr}/girepository*/
352 package libudev-devel
353 summary = Header files for adding libudev support to applications.
355 This package contains the header and pkg-config files for developing
356 applications using libudev functionality.
365 %{libdir}/lib*udev*.so
366 %{libdir}/pkgconfig/lib*udev.pc
367 %{libdir}/pkgconfig/gudev*
368 %{includedir}/lib*udev.h
371 %{datadir}/gtk-doc/html/gudev
375 package %{name}-debuginfo