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
41 cryptsetup-luks-devel >= 1.4.2
48 gobject-introspection-devel >= 1.31
71 export LD_LIBRARY_PATH = %{DIR_APP}/.libs
73 configure_options += \
75 --with-sysvinit-path= \
76 --with-sysvrcnd-path= \
100 # Create dummy machine-id file, which is required for some tests.
101 touch %{sysconfdir}/machine-id
103 # Generate temporary machine-id, which is required at least by the id128 test.
104 systemd-machine-id-setup
111 # Create folder in log to store the journal.
112 mkdir -pv %{BUILDROOT}/var/log/journal
114 # Create sysv compatible symlinks.
115 mkdir -pv %{BUILDROOT}%{sbindir}
116 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
117 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
118 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
119 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
120 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
121 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
123 # Create empty machine-id file.
124 touch %{BUILDROOT}/etc/machine-id
126 # Copy locale and console settings
127 mkdir -pv %{BUILDROOT}%{sysconfdir}
128 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
130 # Recreate all targets
131 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
132 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
133 multi-user.target.wants syslog.target.wants; do
134 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
137 # Remove runlevel targets and graphical.target
138 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
139 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
141 # Remove service files for utmp update.
142 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
143 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
145 # Set default target to multi-user
146 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
148 # Replace absolute symlinks by relative ones.
149 cd %{BUILDROOT}%{unitdir}/../user
150 for i in bluetooth local-fs paths printer remote-fs shutdown smartcard sockets sound swap timers; do
151 ln -svf ../system/${i}.target ${i}.target || exit 1
154 # Remove .so file for the shared library, it's not supposed to be used for anything.
155 rm -rvf %{BUILDROOT}%{prefix}/lib/systemd/libsystemd-shared.so
157 # Remove tmpfile for X11
158 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
160 # Drop X11 related config files
161 rm -rvf %{BUILDROOT}%{sysconfdir}/X11
163 # Remove unneeded stuff for xdg
164 rm -rfv %{BUILDROOT}/etc/xdg
166 # Remove unneeded stuff for rpm.
167 rm -rvf %{BUILDROOT}/etc/rpm
168 rm -rvf %{BUILDROOT}/usr/lib/rpm
170 # Drop ZSH related files
171 rm -rvf %{BUILDROOT}%{datadir}/zsh
173 # Use journald. Enable the import of kernel messages.
174 # Stop forwarding to a syslog daemon.
176 -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
177 -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
178 -i %{BUILDROOT}/etc/systemd/journald.conf
180 # Install legacy tmpfile to autocreate /run/lock on startup.
181 install -v -m 644 %{DIR_APP}/tmpfiles.d/legacy.conf %{BUILDROOT}%{prefix}/lib/tmpfiles.d/
183 # Remove udev rules for "predictable" network device renaming.
184 # http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
185 rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-name-slot.rules
187 # Don't let udev set up any networking
188 rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-setup-link.rules
190 # Create journald related folders.
191 mkdir -pv %{BUILDROOT}/run/log/journal
192 chown root:systemd-journal %{BUILDROOT}/run/log/journal
194 mkdir -pv %{BUILDROOT}/var/log/journal
195 chown root:systemd-journal %{BUILDROOT}/var/log/journal
197 # Create empty environment file.
198 touch %{BUILDROOT}%{sysconfdir}/environment
203 # Create groups for udev.
204 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
205 getent group tape >/dev/null || groupadd -g 33 tape || :
206 getent group dialout >/dev/null || groupadd -g 18 dialout || :
207 getent group floppy >/dev/null || groupadd -g 19 floppy || :
208 getent group input >/dev/null || groupadd -r input || :
209 getent group utmp >/dev/null || groupadd -r -g 22 utmp || :
211 # Create group for journald.
212 getent group systemd-journal >/dev/null || /usr/sbin/groupadd -r systemd-journal
217 %{prefix}/lib/systemd
225 prerequires += authconfig
233 %{name}-libs=%{thisver}
234 %{name}-units=%{thisver}
251 bash-completion < 2.1
265 /etc/systemd/journald.conf
266 /etc/systemd/logind.conf
267 /etc/systemd/system.conf
268 /etc/systemd/user.conf
278 # Reexec systemd daemon.
279 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
281 # Make sure pam_systemd is enabled
282 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
283 authconfig --update --nostart >/dev/null 2>&1 || :
286 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
289 /usr/bin/systemctl enable \
291 serial-getty@.service \
293 systemd-readahead-replay.service \
294 systemd-readahead-collect.service \
299 # Be sure to stop the old udev before updating.
300 /usr/bin/systemctl stop udev.service udev-trigger.service \
301 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
307 # Re-exec systemd after update.
308 /usr/bin/systemctl daemon-reexec
310 # Restart login service after update
311 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
312 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
314 # Use the new journald configuration file and restart the service.
315 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
316 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
317 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
320 # Enable spawning getty's on serial devices.
321 systemctl enable serial-getty@.service >/dev/null 2>&1 || :
324 # Be sure to start the new udev after everything is done.
326 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
330 # Package information for systemd-units
331 package %{name}-units
332 summary = Configuration files, directories and installation tool for systemd.
334 This package contains all needed configuration files, directories
335 and installation / configuration tool for systemd.
352 %{sysconfdir}/etc/systemd/system
353 %{sysconfdir}/tmpfiles.d
354 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
357 %{bindir}/systemd-tmpfiles
358 %{mandir}/man1/systemctl.*
362 # Reload service files
363 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
377 nss-myhostname = %{thisver}
381 nss-myhostname <= 0.3-3
382 systemd-compat-libs < 230
386 # Ensure that the version of systemd matches systemd-libs.
391 # Add myhostname to the hosts line of /etc/nsswitch.conf
393 if [ -f "/etc/nsswitch.conf" ]; then
397 s/[[:blank:]]*$/ myhostname/
402 # Remove myhostname from the hosts line of /etc/nsswitch.conf
404 if [ -f "/etc/nsswitch.conf" ]; then
407 s/[[:blank:]]\+myhostname\>//
413 package %{name}-devel
416 files += %{prefix}/lib/pakfire/macros/
420 summary = Libraries for adding libudev support to applications.
422 This package contains the libraries that make it easier to use libudev
423 functionality from applications.
432 %{libdir}/lib*udev*.so.*
433 %{libidr}/girepository*/
437 package libudev-devel
438 summary = Header files for adding libudev support to applications.
440 This package contains the header and pkg-config files for developing
441 applications using libudev functionality.
450 %{libdir}/lib*udev*.so
451 %{libdir}/pkgconfig/lib*udev.pc
452 %{libdir}/pkgconfig/gudev*
453 %{includedir}/lib*udev.h
456 %{datadir}/gtk-doc/html/gudev
460 package %{name}-debuginfo