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
276 /etc/systemd/journald.conf
277 /etc/systemd/logind.conf
278 /etc/systemd/system.conf
279 /etc/systemd/user.conf
289 # Reexec systemd daemon.
290 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
292 # Make sure pam_systemd is enabled
293 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
294 authconfig --update --nostart >/dev/null 2>&1 || :
297 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
300 /usr/bin/systemctl enable \
302 serial-getty@.service \
304 systemd-readahead-replay.service \
305 systemd-readahead-collect.service \
310 # Be sure to stop the old udev before updating.
311 /usr/bin/systemctl stop udev.service udev-trigger.service \
312 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
318 # Re-exec systemd after update.
319 /usr/bin/systemctl daemon-reexec
321 # Restart login service after update
322 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
323 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
325 # Use the new journald configuration file and restart the service.
326 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
327 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
328 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
331 # Enable spawning getty's on serial devices.
332 systemctl enable serial-getty@.service >/dev/null 2>&1 || :
335 # Be sure to start the new udev after everything is done.
337 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
341 # Package information for systemd-units
342 package %{name}-units
343 summary = Configuration files, directories and installation tool for systemd.
345 This package contains all needed configuration files, directories
346 and installation / configuration tool for systemd.
363 %{sysconfdir}/etc/systemd/system
364 %{sysconfdir}/tmpfiles.d
365 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
368 %{bindir}/systemd-tmpfiles
369 %{mandir}/man1/systemctl.*
373 # Reload service files
374 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
388 nss-myhostname = %{thisver}
392 nss-myhostname <= 0.3-3
393 systemd-compat-libs < 230
397 # Ensure that the version of systemd matches systemd-libs.
402 # Add myhostname to the hosts line of /etc/nsswitch.conf
404 if [ -f "/etc/nsswitch.conf" ]; then
408 s/[[:blank:]]*$/ myhostname/
413 # Remove myhostname from the hosts line of /etc/nsswitch.conf
415 if [ -f "/etc/nsswitch.conf" ]; then
418 s/[[:blank:]]\+myhostname\>//
424 package %{name}-devel
427 files += %{prefix}/lib/pakfire/macros/
431 summary = Libraries for adding libudev support to applications.
433 This package contains the libraries that make it easier to use libudev
434 functionality from applications.
443 %{libdir}/lib*udev*.so.*
444 %{libidr}/girepository*/
448 package libudev-devel
449 summary = Header files for adding libudev support to applications.
451 This package contains the header and pkg-config files for developing
452 applications using libudev functionality.
461 %{libdir}/lib*udev*.so
462 %{libdir}/pkgconfig/lib*udev.pc
463 %{libdir}/pkgconfig/gudev*
464 %{includedir}/lib*udev.h
467 %{datadir}/gtk-doc/html/gudev
471 package %{name}-debuginfo