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 = https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz#/
24 unitdir = %{prefix}/lib/systemd/system
26 # The tools which are shipped by systemd requires an rpath to
27 # the libsystemd-shared binary to run properly. So the macro for
28 # removing any rpath's have to be disabled.
29 MACRO_FIX_LIBTOOL = # Do nothing
42 cryptsetup-luks-devel >= 1.4.2
49 gobject-introspection-devel >= 1.31
72 export LD_LIBRARY_PATH = %{DIR_APP}/.libs
74 configure_options += \
76 --with-sysvinit-path= \
77 --with-sysvrcnd-path= \
101 # Create dummy machine-id file, which is required for some tests.
102 touch %{sysconfdir}/machine-id
109 # Create folder in log to store the journal.
110 mkdir -pv %{BUILDROOT}/var/log/journal
112 # Create sysv compatible symlinks.
113 mkdir -pv %{BUILDROOT}%{sbindir}
114 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
115 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
116 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
117 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
118 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
119 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
121 # Create empty machine-id file.
122 touch %{BUILDROOT}/etc/machine-id
124 # Copy locale and console settings
125 mkdir -pv %{BUILDROOT}%{sysconfdir}
126 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
128 # Recreate all targets
129 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
130 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
131 multi-user.target.wants syslog.target.wants; do
132 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
135 # Remove runlevel targets and graphical.target
136 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
137 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
139 # Remove service files for utmp update.
140 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
141 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
143 # Set default target to multi-user
144 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
146 # Replace absolute symlinks by relative ones.
147 cd %{BUILDROOT}%{unitdir}/../user
148 for i in bluetooth local-fs paths printer remote-fs shutdown smartcard sockets sound swap timers; do
149 ln -svf ../system/${i}.target ${i}.target || exit 1
152 # Remove .so file for the shared library, it's not supposed to be used for anything.
153 rm -rvf %{BUILDROOT}%{prefix}/lib/systemd/libsystemd-shared.so
155 # Remove tmpfile for X11
156 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
158 # Drop X11 related config files
159 rm -rvf %{BUILDROOT}%{sysconfdir}/X11
161 # Remove unneeded stuff for xdg
162 rm -rfv %{BUILDROOT}/etc/xdg
164 # Remove unneeded stuff for rpm.
165 rm -rvf %{BUILDROOT}/etc/rpm
166 rm -rvf %{BUILDROOT}/usr/lib/rpm
168 # Drop ZSH related files
169 rm -rvf %{BUILDROOT}%{datadir}/zsh
171 # Use journald. Enable the import of kernel messages.
172 # Stop forwarding to a syslog daemon.
174 -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
175 -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
176 -i %{BUILDROOT}/etc/systemd/journald.conf
178 # Install legacy tmpfile to autocreate /run/lock on startup.
179 install -v -m 644 %{DIR_APP}/tmpfiles.d/legacy.conf %{BUILDROOT}%{prefix}/lib/tmpfiles.d/
181 # Remove udev rules for "predictable" network device renaming.
182 # http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
183 rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-name-slot.rules
185 # Create journald related folders.
186 mkdir -pv %{BUILDROOT}/run/log/journal
187 chown root:systemd-journal %{BUILDROOT}/run/log/journal
189 mkdir -pv %{BUILDROOT}/var/log/journal
190 chown root:systemd-journal %{BUILDROOT}/var/log/journal
195 # Create groups for udev.
196 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
197 getent group tape >/dev/null || groupadd -g 33 tape || :
198 getent group dialout >/dev/null || groupadd -g 18 dialout || :
199 getent group floppy >/dev/null || groupadd -g 19 floppy || :
200 getent group input >/dev/null || groupadd -r input || :
201 getent group utmp >/dev/null || groupadd -r -g 22 utmp || :
203 # Create group for journald.
204 getent group systemd-journal >/dev/null || /usr/sbin/groupadd -r systemd-journal
209 %{prefix}/lib/systemd
217 prerequires += authconfig
225 %{name}-libs=%{thisver}
226 %{name}-units=%{thisver}
243 bash-completion < 2.1
257 /etc/systemd/journald.conf
258 /etc/systemd/logind.conf
259 /etc/systemd/system.conf
260 /etc/systemd/user.conf
270 # Reexec systemd daemon.
271 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
273 # Make sure pam_systemd is enabled
274 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
275 authconfig --update --nostart >/dev/null 2>&1 || :
278 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
281 /usr/bin/systemctl enable \
284 systemd-readahead-replay.service \
285 systemd-readahead-collect.service \
290 # Be sure to stop the old udev before updating.
291 /usr/bin/systemctl stop udev.service udev-trigger.service \
292 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
298 # Re-exec systemd after update.
299 /usr/bin/systemctl daemon-reexec
301 # Restart login service after update
302 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
303 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
305 # Use the new journald configuration file and restart the service.
306 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
307 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
308 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
312 # Be sure to start the new udev after everything is done.
314 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
318 # Package information for systemd-units
319 package %{name}-units
320 summary = Configuration files, directories and installation tool for systemd.
322 This package contains all needed configuration files, directories
323 and installation / configuration tool for systemd.
340 %{sysconfdir}/etc/systemd/system
341 %{sysconfdir}/tmpfiles.d
342 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
345 %{bindir}/systemd-tmpfiles
346 %{mandir}/man1/systemctl.*
350 # Reload service files
351 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
365 nss-myhostname = %{thisver}
369 nss-myhostname <= 0.3-3
370 systemd-compat-libs < 230
374 # Ensure that the version of systemd matches systemd-libs.
379 # Add myhostname to the hosts line of /etc/nsswitch.conf
381 if [ -f "/etc/nsswitch.conf" ]; then
385 s/[[:blank:]]*$/ myhostname/
390 # Remove myhostname from the hosts line of /etc/nsswitch.conf
392 if [ -f "/etc/nsswitch.conf" ]; then
395 s/[[:blank:]]\+myhostname\>//
401 package %{name}-devel
404 files += %{prefix}/lib/pakfire/macros/
408 summary = Libraries for adding libudev support to applications.
410 This package contains the libraries that make it easier to use libudev
411 functionality from applications.
420 %{libdir}/lib*udev*.so.*
421 %{libidr}/girepository*/
425 package libudev-devel
426 summary = Header files for adding libudev support to applications.
428 This package contains the header and pkg-config files for developing
429 applications using libudev functionality.
438 %{libdir}/lib*udev*.so
439 %{libdir}/pkgconfig/lib*udev.pc
440 %{libdir}/pkgconfig/gudev*
441 %{includedir}/lib*udev.h
444 %{datadir}/gtk-doc/html/gudev
448 package %{name}-debuginfo