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
39 cryptsetup-luks-devel >= 1.4.2
46 gobject-introspection-devel >= 1.31
70 export LD_LIBRARY_PATH = %{DIR_APP}/.libs
97 # Call meson and pass configure options.
98 meson --buildtype=plain %{configure_options} . build
100 # Call ninja to start build
101 ninja -v %{PARALLELISMFLAGS} -C build
105 # Create dummy machine-id file, which is required for some tests.
106 touch %{sysconfdir}/machine-id
108 # Generate temporary machine-id, which is required at least by the id128 test.
109 systemd-machine-id-setup
112 ninja test -v %{PARALLELISMFLAGS} -C build || true
117 export DESTDIR=%{BUILDROOT}
119 # Call ninja to perform installation
120 ninja install -v %{PARALLELISMFLAGS} -C build
122 # Create folder in log to store the journal.
123 mkdir -pv %{BUILDROOT}/var/log/journal
125 # Create sysv compatible symlinks.
126 mkdir -pv %{BUILDROOT}%{sbindir}
127 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
128 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
129 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
130 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
131 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
132 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
134 # Create empty machine-id file.
135 touch %{BUILDROOT}/etc/machine-id
137 # Copy locale and console settings
138 mkdir -pv %{BUILDROOT}%{sysconfdir}
139 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
141 # Recreate all targets
142 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
143 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
144 multi-user.target.wants syslog.target.wants; do
145 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
148 # Remove runlevel targets and graphical.target
149 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
150 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
152 # Remove service files for utmp update.
153 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
154 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
156 # Set default target to multi-user
157 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
159 # Replace absolute symlinks by relative ones.
160 cd %{BUILDROOT}%{unitdir}/../user
161 for i in bluetooth local-fs paths printer remote-fs shutdown smartcard sockets sound swap timers; do
162 ln -svf ../system/${i}.target ${i}.target || exit 1
165 # Remove .so file for the shared library, it's not supposed to be used for anything.
166 rm -rvf %{BUILDROOT}%{prefix}/lib/systemd/libsystemd-shared.so
168 # Remove tmpfile for X11
169 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
171 # Drop X11 related config files
172 rm -rvf %{BUILDROOT}%{sysconfdir}/X11
174 # Remove unneeded stuff for xdg
175 rm -rfv %{BUILDROOT}/etc/xdg
177 # Remove unneeded stuff for rpm.
178 rm -rvf %{BUILDROOT}/etc/rpm
179 rm -rvf %{BUILDROOT}/usr/lib/rpm
181 # Drop ZSH related files
182 rm -rvf %{BUILDROOT}%{datadir}/zsh
184 # Use journald. Enable the import of kernel messages.
185 # Stop forwarding to a syslog daemon.
187 -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
188 -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
189 -i %{BUILDROOT}/etc/systemd/journald.conf
191 # Install legacy tmpfile to autocreate /run/lock on startup.
192 install -v -m 644 %{DIR_APP}/tmpfiles.d/legacy.conf %{BUILDROOT}%{prefix}/lib/tmpfiles.d/
194 # Remove udev rules for "predictable" network device renaming.
195 # http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
196 rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-name-slot.rules
198 # Don't let udev set up any networking
199 rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-setup-link.rules
201 # Create journald related folders.
202 mkdir -pv %{BUILDROOT}/run/log/journal
203 chown root:systemd-journal %{BUILDROOT}/run/log/journal
205 mkdir -pv %{BUILDROOT}/var/log/journal
206 chown root:systemd-journal %{BUILDROOT}/var/log/journal
208 # Create empty environment file.
209 touch %{BUILDROOT}%{sysconfdir}/environment
214 # Create groups for udev.
215 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
216 getent group tape >/dev/null || groupadd -g 33 tape || :
217 getent group dialout >/dev/null || groupadd -g 18 dialout || :
218 getent group floppy >/dev/null || groupadd -g 19 floppy || :
219 getent group input >/dev/null || groupadd -r input || :
220 getent group utmp >/dev/null || groupadd -r -g 22 utmp || :
222 # Create group for journald.
223 getent group systemd-journal >/dev/null || /usr/sbin/groupadd -r systemd-journal
228 %{prefix}/lib/systemd
236 prerequires += authconfig
244 %{name}-libs=%{thisver}
245 %{name}-units=%{thisver}
262 bash-completion < 2.1
277 /etc/systemd/journald.conf
278 /etc/systemd/logind.conf
279 /etc/systemd/system.conf
280 /etc/systemd/user.conf
290 # Reexec systemd daemon.
291 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
293 # Make sure pam_systemd is enabled
294 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
295 authconfig --update --nostart >/dev/null 2>&1 || :
298 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
301 /usr/bin/systemctl enable \
303 serial-getty@.service \
305 systemd-readahead-replay.service \
306 systemd-readahead-collect.service \
311 # Be sure to stop the old udev before updating.
312 /usr/bin/systemctl stop udev.service udev-trigger.service \
313 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
319 # Re-exec systemd after update.
320 /usr/bin/systemctl daemon-reexec
322 # Restart login service after update
323 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
324 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
326 # Use the new journald configuration file and restart the service.
327 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
328 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
329 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
332 # Enable spawning getty's on serial devices.
333 systemctl enable serial-getty@.service >/dev/null 2>&1 || :
336 # Be sure to start the new udev after everything is done.
338 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
342 # Package information for systemd-units
343 package %{name}-units
344 summary = Configuration files, directories and installation tool for systemd.
346 This package contains all needed configuration files, directories
347 and installation / configuration tool for systemd.
364 %{sysconfdir}/etc/systemd/system
365 %{sysconfdir}/tmpfiles.d
366 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
369 %{bindir}/systemd-tmpfiles
370 %{mandir}/man1/systemctl.*
374 # Reload service files
375 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
389 nss-myhostname = %{thisver}
393 nss-myhostname <= 0.3-3
394 systemd-compat-libs < 230
398 # Ensure that the version of systemd matches systemd-libs.
403 # Add myhostname to the hosts line of /etc/nsswitch.conf
405 if [ -f "/etc/nsswitch.conf" ]; then
409 s/[[:blank:]]*$/ myhostname/
414 # Remove myhostname from the hosts line of /etc/nsswitch.conf
416 if [ -f "/etc/nsswitch.conf" ]; then
419 s/[[:blank:]]\+myhostname\>//
425 package %{name}-devel
428 files += %{prefix}/lib/pakfire/macros/
432 summary = Libraries for adding libudev support to applications.
434 This package contains the libraries that make it easier to use libudev
435 functionality from applications.
444 %{libdir}/lib*udev*.so.*
445 %{libidr}/girepository*/
449 package libudev-devel
450 summary = Header files for adding libudev support to applications.
452 This package contains the header and pkg-config files for developing
453 applications using libudev functionality.
462 %{libdir}/lib*udev*.so
463 %{libdir}/pkgconfig/lib*udev.pc
464 %{libdir}/pkgconfig/gudev*
465 %{includedir}/lib*udev.h
468 %{datadir}/gtk-doc/html/gudev
472 package %{name}-debuginfo