]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blame - systemd/systemd.nm
bash-completion: Drop files which will be shipped by util-linux for now
[people/arne_f/ipfire-3.x.git] / systemd / systemd.nm
CommitLineData
c8ef6def 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
c8ef6def
SS
4###############################################################################
5
802ea3af 6name = systemd
e52f3c8b
SS
7version = 232
8release = 1
c8ef6def 9
802ea3af
MT
10maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
11groups = System/Base
12url = http://www.freedesktop.org/wiki/Software/systemd
13license = GPLv2+
14summary = A System and Service Manager.
c8ef6def 15
802ea3af
MT
16description
17 systemd is a system and service manager for Linux, compatible with
c8ef6def 18 SysV and LSB init scripts.
802ea3af
MT
19end
20
c9dd9f9b 21source_dl = https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz#/
802ea3af
MT
22
23build
6793fec1
MT
24 unitdir = %{prefix}/lib/systemd/system
25
802ea3af 26 requires
c9dd9f9b
SS
27 # Testsuite
28 /usr/bin/getfacl
29 /usr/bin/mount
30 /usr/bin/tree
31 /usr/bin/umount
32
33 autoconf
34 automake
b329a155 35 attr-devel
802ea3af 36 audit-devel
2d01364a 37 cryptsetup-luks-devel >= 1.4.2
802ea3af 38 dbus-devel
fe6e3719
SS
39 docbook-utils
40 docbook-xsl
8823e1f9 41 elfutils-devel
bfabb323 42 gettext-devel
2d01364a
SS
43 glib2-devel
44 gobject-introspection-devel >= 1.31
45 gperf
46 hwdata
c9dd9f9b 47 intltool >= 0.51.0
7e97512a 48 kmod-devel >= 15
2a824e90 49 libacl-devel
2d01364a 50 libblkid-devel
802ea3af 51 libcap-devel
4990bf7f 52 libgcrypt-devel
8823e1f9 53 libmount-devel
c9dd9f9b 54 libtool
4990bf7f 55 libuuid-devel
8823e1f9 56 m4
802ea3af 57 pam-devel
2d01364a 58 pciutils-devel
63af7a71
SS
59 python3-devel
60 python3-lxml
2d01364a 61 usbutils
53a325cb 62 vala
6793fec1 63 xz-devel
8823e1f9 64 zlib-devel
802ea3af
MT
65 end
66
c9dd9f9b
SS
67 export LD_LIBRARY_PATH = %{DIR_APP}/.libs
68
802ea3af 69 configure_options += \
63af7a71 70 PYTHON=%{python3} \
7f84cbd5
SS
71 --with-sysvinit-path= \
72 --with-sysvrcnd-path= \
8823e1f9
SS
73 --enable-zlib \
74 --disable-smack \
75 --disable-backlight \
76 --disable-firstboot \
77 --disable-hibernate \
78 --disable-importd \
79 --disable-libiptc \
80 --disable-machined \
7e97512a 81 --disable-networkd \
8823e1f9 82 --disable-resolved \
7e97512a
SS
83 --disable-sysusers \
84 --disable-timesyncd \
8823e1f9
SS
85 --disable-timedated \
86 --disable-polkit \
2d01364a 87 --disable-static
802ea3af
MT
88
89 prepare_cmds
8823e1f9 90 %{create_groups}
c9dd9f9b
SS
91
92 ./autogen.sh
93 end
94
95 test
96 # Create dummy machine-id file, which is required for some tests.
97 touch %{sysconfdir}/machine-id
98
99 # Run the testsuite.
eebef710 100 make check || true
802ea3af
MT
101 end
102
802ea3af 103 install_cmds
755fe986
SS
104 # Create folder in log to store the journal.
105 mkdir -pv %{BUILDROOT}/var/log/journal
106
802ea3af 107 # Create sysv compatible symlinks.
6793fec1
MT
108 mkdir -pv %{BUILDROOT}%{sbindir}
109 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
110 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
111 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
112 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
113 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
114 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
802ea3af
MT
115
116 # Create empty machine-id file.
117 touch %{BUILDROOT}/etc/machine-id
118
119 # Copy locale and console settings
6793fec1
MT
120 mkdir -pv %{BUILDROOT}%{sysconfdir}
121 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
802ea3af
MT
122
123 # Recreate all targets
0976fbe4
SS
124 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
125 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
126 multi-user.target.wants syslog.target.wants; do
127 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
6793fec1 128 done
802ea3af
MT
129
130 # Remove runlevel targets and graphical.target
6793fec1
MT
131 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
132 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
802ea3af 133
2d01364a
SS
134 # Remove service files for utmp update.
135 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
136 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
137
802ea3af 138 # Set default target to multi-user
6793fec1 139 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
802ea3af
MT
140
141 # Replace absolute symlinks by relative ones.
6793fec1 142 cd %{BUILDROOT}%{unitdir}/../user
7f84cbd5 143 for i in bluetooth local-fs paths printer remote-fs shutdown smartcard sockets sound swap timers; do
6793fec1
MT
144 ln -svf ../system/${i}.target ${i}.target || exit 1
145 done
146
e52f3c8b
SS
147 # Remove .so file for the shared library, it's not supposed to be used for anything.
148 rm -rvf %{BUILDROOT}%{prefix}/lib/systemd/libsystemd-shared.so
149
802ea3af
MT
150 # Remove tmpfile for X11
151 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
152
e52f3c8b
SS
153 # Drop X11 related config files
154 rm -rvf %{BUILDROOT}%{sysconfdir}/X11
155
7f84cbd5
SS
156 # Remove unneeded stuff for xdg
157 rm -rfv %{BUILDROOT}/etc/xdg
158
159 # Remove unneeded stuff for rpm.
160 rm -rvf %{BUILDROOT}/etc/rpm
8823e1f9 161 rm -rvf %{BUILDROOT}/usr/lib/rpm
755fe986 162
e52f3c8b
SS
163 # Drop ZSH related files
164 rm -rvf %{BUILDROOT}%{datadir}/zsh
165
755fe986
SS
166 # Use journald. Enable the import of kernel messages.
167 # Stop forwarding to a syslog daemon.
168 sed \
169 -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
170 -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
171 -i %{BUILDROOT}/etc/systemd/journald.conf
f2ada565
SS
172
173 # Install legacy tmpfile to autocreate /run/lock on startup.
174 install -v -m 644 %{DIR_APP}/tmpfiles.d/legacy.conf %{BUILDROOT}%{prefix}/lib/tmpfiles.d/
4f209325
MT
175
176 # Remove udev rules for "predictable" network device renaming.
177 # http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
178 rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-name-slot.rules
8823e1f9
SS
179
180 # Create journald related folders.
181 mkdir -pv %{BUILDROOT}/run/log/journal
182 chown root:systemd-journal %{BUILDROOT}/run/log/journal
183
184 mkdir -pv %{BUILDROOT}/var/log/journal
185 chown root:systemd-journal %{BUILDROOT}/var/log/journal
802ea3af
MT
186 end
187end
188
8823e1f9
SS
189create_groups
190 # Create groups for udev.
191 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
192 getent group tape >/dev/null || groupadd -g 33 tape || :
193 getent group dialout >/dev/null || groupadd -g 18 dialout || :
194 getent group floppy >/dev/null || groupadd -g 19 floppy || :
747db4fd
SS
195 getent group input >/dev/null || groupadd -r input || :
196 getent group utmp >/dev/null || groupadd -r -g 22 utmp || :
8823e1f9
SS
197
198 # Create group for journald.
199 getent group systemd-journal >/dev/null || /usr/sbin/groupadd -r systemd-journal
200end
201
802ea3af
MT
202packages
203 package %{name}
2d01364a
SS
204 groups += Base
205
6793fec1
MT
206 prerequires += authconfig
207
514357ad
SS
208 requires
209 dbus
2d01364a 210 hwdata
514357ad 211 python-cairo
1d40b321 212 python-dbus
7f84cbd5 213 python-gobject3
519776fd 214 %{name}-libs=%{thisver}
214d8f27 215 %{name}-units=%{thisver}
514357ad
SS
216 util-linux>=2.19
217 end
1d40b321 218
216fde50
SS
219 provides
220 /bin/systemd
221 /sbin/halt
222 /sbin/init
223 /sbin/poweroff
224 /sbin/reboot
225 /sbin/shutdown
2d01364a 226
755fe986 227 syslog
2d01364a 228 udev = %{thisver}
216fde50
SS
229 end
230
6793fec1 231 conflicts
7f84cbd5 232 bash-completion < 2.1
2d01364a 233 dracut < 019
6793fec1 234 filesystem < 002
755fe986 235 rsyslog < 5.8.6-4
6793fec1
MT
236 upstart
237 end
ef438375 238
2d01364a
SS
239 obsoletes
240 udev < 183
241 end
242
243 configfiles
244 /etc/locale.conf
245 /etc/machine-id
246 /etc/systemd/journald.conf
247 /etc/systemd/logind.conf
248 /etc/systemd/system.conf
249 /etc/systemd/user.conf
250 /etc/udev/udev.conf
251 /etc/vconsole.conf
252 end
253
254 script prein
8823e1f9 255 %{create_groups}
2d01364a
SS
256 end
257
1d40b321 258 script postin
1d40b321 259 # Reexec systemd daemon.
6793fec1 260 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
1d40b321
SS
261
262 # Make sure pam_systemd is enabled
6793fec1
MT
263 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
264 authconfig --update --nostart >/dev/null 2>&1 || :
1d40b321
SS
265
266 # Try harder
6793fec1 267 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
1d40b321 268 fi
5e462903
MT
269
270 /usr/bin/systemctl enable \
271 getty@.service \
50affca1 272 remote-fs.target \
5e462903
MT
273 systemd-readahead-replay.service \
274 systemd-readahead-collect.service \
275 >/dev/null 2>&1 || :
1d40b321
SS
276 end
277
2d01364a
SS
278 script preup
279 # Be sure to stop the old udev before updating.
280 /usr/bin/systemctl stop udev.service udev-trigger.service \
281 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
8823e1f9
SS
282
283 %{create_groups}
2d01364a
SS
284 end
285
1d40b321 286 script postup
56f48716
SS
287 # Re-exec systemd after update.
288 /usr/bin/systemctl daemon-reexec
289
1d40b321 290 # Restart login service after update
5e462903 291 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
6793fec1 292 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
755fe986
SS
293
294 # Use the new journald configuration file and restart the service.
295 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
296 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
297 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
298 fi
1d40b321 299 end
2d01364a
SS
300
301 # Be sure to start the new udev after everything is done.
302 script posttransup
303 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
304 end
802ea3af 305 end
1f9bc2f0 306
802ea3af
MT
307 # Package information for systemd-units
308 package %{name}-units
309 summary = Configuration files, directories and installation tool for systemd.
310 description
311 This package contains all needed configuration files, directories
312 and installation / configuration tool for systemd.
313 end
1f9bc2f0 314
5e38e9bb
SS
315 prerequires
316 /bin/sh
317 coreutils
318 end
319
6793fec1 320 provides
802ea3af 321 /bin/systemctl
802ea3af 322 end
1d40b321 323
6793fec1
MT
324 conflicts
325 filesystem < 002
1d40b321
SS
326 end
327
6793fec1
MT
328 files
329 %{sysconfdir}/etc/systemd/system
330 %{sysconfdir}/tmpfiles.d
331 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
332 %{unitdir}
333 %{bindir}/systemctl
334 %{bindir}/systemd-tmpfiles
335 %{mandir}/man1/systemctl.*
1d40b321
SS
336 end
337
338 script postup
339 # Reload service files
6793fec1 340 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
1d40b321 341 end
802ea3af 342 end
1f9bc2f0 343
1191e383
SS
344 package %{name}-libs
345 template LIBS
519776fd
SS
346
347 groups += Base
348
349 prerequires
350 /etc/nsswitch.conf
351 end
352
353 provides
354 nss-myhostname = %{thisver}
355 end
356
357 obsoletes
358 nss-myhostname <= 0.3-3
e52f3c8b 359 systemd-compat-libs < 230
519776fd
SS
360 end
361
362 conflicts
519776fd
SS
363 # Ensure that the version of systemd matches systemd-libs.
364 systemd > %{thisver}
365 systemd < %{thisver}
366 end
367
368 # Add myhostname to the hosts line of /etc/nsswitch.conf
369 script postin
370 if [ -f "/etc/nsswitch.conf" ]; then
371 sed -i.bak -e '
372 /^hosts:/ !b
373 /\<myhostname\>/ b
374 s/[[:blank:]]*$/ myhostname/
375 ' /etc/nsswitch.conf
376 fi
377 end
378
379 # Remove myhostname from the hosts line of /etc/nsswitch.conf
380 script postun
381 if [ -f "/etc/nsswitch.conf" ]; then
382 sed -i.bak -e '
383 /^hosts:/ !b
384 s/[[:blank:]]\+myhostname\>//
385 ' /etc/nsswitch.conf
386 fi
387 end
1191e383
SS
388 end
389
802ea3af
MT
390 package %{name}-devel
391 template DEVEL
6793fec1
MT
392
393 files += %{prefix}/lib/pakfire/macros/
802ea3af 394 end
1f9bc2f0 395
2d01364a
SS
396 package libudev
397 summary = Libraries for adding libudev support to applications.
398 description
399 This package contains the libraries that make it easier to use libudev
400 functionality from applications.
401 end
402 license = LGPLv2+
403
404 conflicts
405 filesystem < 002
406 end
407
408 files
1191e383 409 %{libdir}/lib*udev*.so.*
2d01364a
SS
410 %{libidr}/girepository*/
411 end
412 end
413
414 package libudev-devel
415 summary = Header files for adding libudev support to applications.
416 description
417 This package contains the header and pkg-config files for developing
418 applications using libudev functionality.
419 end
420 license = LGPLv2+
421
422 conflicts
423 filesystem < 002
424 end
425
426 files
a8aa3ead 427 %{libdir}/lib*udev*.so
73eb4724 428 %{libdir}/pkgconfig/lib*udev.pc
2d01364a 429 %{libdir}/pkgconfig/gudev*
a8aa3ead 430 %{includedir}/lib*udev.h
2d01364a
SS
431 %{includedir}/gudev*
432 %{datadir}/gir-*
433 %{datadir}/gtk-doc/html/gudev
434 end
435 end
436
1f9bc2f0
MT
437 package %{name}-debuginfo
438 template DEBUGINFO
439 end
802ea3af 440end