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
56 libmount-devel >= 2.34-2
58 libuuid-devel >= 2.34-2
75 export LD_LIBRARY_PATH = %{DIR_APP}/.libs
100 # Call meson and pass configure options.
101 %{meson} %{configure_options}
103 # Call ninja to start build
108 # Create dummy machine-id file, which is required for some tests.
109 touch %{sysconfdir}/machine-id
112 ninja test -v %{PARALLELISMFLAGS} -C build || true
119 # Create folder in log to store the journal.
120 mkdir -pv %{BUILDROOT}/var/log/journal
122 # Create sysv compatible symlinks.
123 mkdir -pv %{BUILDROOT}%{sbindir}
124 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
125 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
126 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
127 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
128 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
129 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
131 # Create empty machine-id file.
132 touch %{BUILDROOT}/etc/machine-id
134 # Copy locale and console settings
135 mkdir -pv %{BUILDROOT}%{sysconfdir}
136 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
138 # Recreate all targets
139 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
140 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
141 multi-user.target.wants syslog.target.wants; do
142 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
145 # Remove runlevel targets and graphical.target
146 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
147 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
149 # Remove service files for utmp update.
150 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
151 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
153 # Set default target to multi-user
154 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
156 # Replace absolute symlinks by relative ones.
157 cd %{BUILDROOT}%{unitdir}/../user
158 for i in bluetooth local-fs paths printer remote-fs shutdown smartcard sockets sound swap timers; do
159 ln -svf ../system/${i}.target ${i}.target || exit 1
162 # Remove .so file for the shared library, it's not supposed to be used for anything.
163 rm -rvf %{BUILDROOT}%{prefix}/lib/systemd/libsystemd-shared.so
165 # Remove tmpfile for X11
166 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
168 # Drop X11 related config files
169 rm -rvf %{BUILDROOT}%{sysconfdir}/X11
171 # Remove unneeded stuff for xdg
172 rm -rfv %{BUILDROOT}/etc/xdg
174 # Remove unneeded stuff for rpm.
175 rm -rvf %{BUILDROOT}/etc/rpm
176 rm -rvf %{BUILDROOT}/usr/lib/rpm
178 # Drop ZSH related files
179 rm -rvf %{BUILDROOT}%{datadir}/zsh
181 # Use journald. Enable the import of kernel messages.
182 # Stop forwarding to a syslog daemon.
184 -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
185 -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
186 -i %{BUILDROOT}/etc/systemd/journald.conf
188 # Remove udev rules for "predictable" network device renaming.
189 # http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
190 rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-name-slot.rules
192 # Don't let udev set up any networking
193 rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-setup-link.rules
195 mkdir -pv %{BUILDROOT}/var/log/journal
196 chown root:systemd-journal %{BUILDROOT}/var/log/journal
198 # Create empty environment file.
199 touch %{BUILDROOT}%{sysconfdir}/environment
204 # Create groups for udev.
205 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
206 getent group tape >/dev/null || groupadd -g 33 tape || :
207 getent group dialout >/dev/null || groupadd -g 18 dialout || :
208 getent group floppy >/dev/null || groupadd -g 19 floppy || :
209 getent group input >/dev/null || groupadd -r input || :
210 getent group utmp >/dev/null || groupadd -r -g 22 utmp || :
212 # Create group for journald.
213 getent group systemd-journal >/dev/null || /usr/sbin/groupadd -r systemd-journal
218 %{prefix}/lib/systemd
230 %{name}-libs = %{thisver}
244 systemd-units = %{thisver}
250 bash-completion < 2.1
266 /etc/systemd/journald.conf
267 /etc/systemd/logind.conf
268 /etc/systemd/system.conf
269 /etc/systemd/user.conf
279 # Reexec systemd daemon.
280 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
282 # Automatically spawn a getty on TTY1
283 /usr/bin/systemctl enable getty@.service >/dev/null 2>&1 || :
285 # Enable targed to mount all remote filesystems.
286 /usr/bin/systemctl enable remote-fs.target >/dev/null 2>&1 || :
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 >/dev/null 2>&1 || :
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 >/dev/null 2>&1 || :
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 || :
328 nss-myhostname = %{thisver}
332 nss-myhostname <= 0.3-3
333 systemd-compat-libs < 230
337 # Ensure that the version of systemd matches systemd-libs.
342 # Add myhostname to the hosts line of /etc/nsswitch.conf
344 if [ -f "/etc/nsswitch.conf" ]; then
348 s/[[:blank:]]*$/ myhostname/
353 # Remove myhostname from the hosts line of /etc/nsswitch.conf
355 if [ -f "/etc/nsswitch.conf" ]; then
358 s/[[:blank:]]\+myhostname\>//
364 package %{name}-devel
367 files += %{prefix}/lib/pakfire/macros/
371 summary = Libraries for adding libudev support to applications.
373 This package contains the libraries that make it easier to use libudev
374 functionality from applications.
383 %{libdir}/lib*udev*.so.*
384 %{libidr}/girepository*/
388 package libudev-devel
389 summary = Header files for adding libudev support to applications.
391 This package contains the header and pkg-config files for developing
392 applications using libudev functionality.
401 %{libdir}/lib*udev*.so
402 %{libdir}/pkgconfig/lib*udev.pc
403 %{libdir}/pkgconfig/gudev*
404 %{includedir}/lib*udev.h
407 %{datadir}/gtk-doc/html/gudev
411 package %{name}-debuginfo