4 # For a breakdown of the licensing, see README
5 License: LGPL-2.0+ and MIT and GPL-2.0+
6 Summary: A System and Service Manager
7 Url: http://www.freedesktop.org/wiki/Software/systemd
9 Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.xz
10 Source1: pamconsole-tmp.conf
11 Source1001: systemd.manifest
14 BuildRequires: intltool >= 0.40.0
15 BuildRequires: libacl-devel
16 BuildRequires: libblkid-devel >= 2.20
17 BuildRequires: libcap-devel
18 BuildRequires: libgcrypt-devel
19 BuildRequires: libkmod-devel >= 14
20 BuildRequires: libxslt
21 BuildRequires: pam-devel
22 BuildRequires: pkgconfig
23 BuildRequires: usbutils >= 0.82
24 BuildRequires: pkgconfig(dbus-1)
25 BuildRequires: pkgconfig(glib-2.0)
26 BuildRequires: pkgconfig(liblzma)
27 BuildRequires: pkgconfig(libpci)
28 BuildRequires: attr-devel
32 Requires(post): coreutils
34 Requires(post): /usr/bin/chsmack
35 Requires(pre): coreutils
36 Requires(pre): /usr/bin/getent
37 Requires(pre): /usr/sbin/groupadd
39 Obsoletes: SysVinit < 2.86-24
40 Obsoletes: sysvinit < 2.86-24
41 Provides: SysVinit = 2.86-24
42 Provides: sysvinit = 2.86-24
43 Provides: /bin/systemctl
44 Provides: /sbin/shutdown
45 Provides: udev = %{version}
49 systemd is a system and service manager for Linux, compatible with
50 SysV and LSB init scripts. systemd provides aggressive parallelization
51 capabilities, uses socket and D-Bus activation for starting services,
52 offers on-demand starting of daemons, keeps track of processes using
53 Linux cgroups, supports snapshotting and restoring of the system
54 state, maintains mount and automount points and implements an
55 elaborate transactional dependency-based service control logic. It can
56 work as a drop-in replacement for sysvinit.
58 %package -n libsystemd
59 License: LGPL-2.0+ and MIT
60 Summary: Systemd libraries
62 Obsoletes: libudev < 183
63 Obsoletes: systemd < 185-4
64 Conflicts: systemd < 185-4
66 %description -n libsystemd
67 Libraries for systemd and udev, as well as the systemd PAM module.
70 License: LGPL-2.0+ and MIT
71 Summary: Development headers for systemd
72 Requires: %{name} = %{version}
73 Provides: libudev-devel = %{version}
74 Obsoletes: libudev-devel < 183
77 Development headers and auxiliary files for developing applications for systemd.
81 Summary: Tool for processing systemd profiling information
82 Requires: %{name} = %{version}
83 Obsoletes: systemd < 38-5
86 'systemd-analyze blame' lists which systemd unit needed how much time to finish
87 initialization at boot.
88 'systemd-analyze plot' renders an SVG visualizing the parallel start of units
93 Summary: Libraries for adding libudev support to applications that use glib
94 Requires: %{name} = %{version}
96 %description -n libgudev
97 This package contains the libraries that make it easier to use libudev
98 functionality from applications that use glib.
100 %package -n libgudev-devel
102 Summary: Header files for adding libudev support to applications that use glib
103 Requires: libgudev = %{version}
105 %description -n libgudev-devel
106 This package contains the header and pkg-config files for developing
107 glib-based applications using libudev functionality.
114 if which gtkdocize >/dev/null 2>/dev/null; then
115 gtkdocize --docdir docs/ --flavour no-tmpl
116 gtkdocargs=--enable-gtk-doc
118 echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
119 rm -f docs/gtk-doc.make
120 echo 'EXTRA_DIST =' > docs/gtk-doc.make
123 intltoolize --force --automake
126 --libexecdir=%{_prefix}/lib \
127 --docdir=%{_docdir}/systemd \
129 --with-sysvinit-path= \
130 --with-sysvrcnd-path= \
131 --with-smack-run-label=System
132 %__make %{?_smp_mflags} \
133 systemunitdir=%{_unitdir} \
134 userunitdir=%{_unitdir_user}
140 %{_bindir}/mkdir -p %{buildroot}%{_sbindir}
141 %{_bindir}/ln -sf ../bin/udevadm %{buildroot}%{_sbindir}/udevadm
142 %{_bindir}/mkdir -p %{buildroot}%{_prefix}/lib/firmware/updates
144 # Create SysV compatibility symlinks. systemctl/systemd are smart
145 # enough to detect in which way they are called.
146 %{_bindir}/ln -s ../lib/systemd/systemd %{buildroot}%{_sbindir}/init
147 %{_bindir}/ln -s ../lib/systemd/systemd %{buildroot}%{_bindir}/systemd
148 %{_bindir}/ln -s ../bin/systemctl %{buildroot}%{_sbindir}/reboot
149 %{_bindir}/ln -s ../bin/systemctl %{buildroot}%{_sbindir}/halt
150 %{_bindir}/ln -s ../bin/systemctl %{buildroot}%{_sbindir}/poweroff
151 %{_bindir}/ln -s ../bin/systemctl %{buildroot}%{_sbindir}/shutdown
152 %{_bindir}/ln -s ../bin/systemctl %{buildroot}%{_sbindir}/telinit
153 %{_bindir}/ln -s ../bin/systemctl %{buildroot}%{_sbindir}/runlevel
156 %{_bindir}/ln -s loginctl %{buildroot}%{_bindir}/systemd-loginctl
158 # We create all wants links manually at installation time to make sure
159 # they are not owned and hence overriden by rpm after the used deleted
161 %{_bindir}/rm -r %{buildroot}%{_sysconfdir}/systemd/system/*.target.wants
163 # Make sure the ghost-ing below works
164 %{_bindir}/touch %{buildroot}%{_sysconfdir}/systemd/system/runlevel2.target
165 %{_bindir}/touch %{buildroot}%{_sysconfdir}/systemd/system/runlevel3.target
166 %{_bindir}/touch %{buildroot}%{_sysconfdir}/systemd/system/runlevel4.target
167 %{_bindir}/touch %{buildroot}%{_sysconfdir}/systemd/system/runlevel5.target
169 # Make sure these directories are properly owned
170 %{_bindir}/mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/basic.target.wants
171 %{_bindir}/mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/default.target.wants
172 %{_bindir}/mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/dbus.target.wants
173 %{_bindir}/mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/syslog.target.wants
175 # Make sure the user generators dir exists too
176 %{_bindir}/mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-generators
177 %{_bindir}/mkdir -p %{buildroot}%{_prefix}/lib/systemd/user-generators
179 # Create new-style configuration files so that we can ghost-own them
180 %{_bindir}/touch %{buildroot}%{_sysconfdir}/hostname
181 %{_bindir}/touch %{buildroot}%{_sysconfdir}/vconsole.conf
182 %{_bindir}/touch %{buildroot}%{_sysconfdir}/locale.conf
183 %{_bindir}/touch %{buildroot}%{_sysconfdir}/machine-id
184 %{_bindir}/touch %{buildroot}%{_sysconfdir}/machine-info
185 %{_bindir}/touch %{buildroot}%{_sysconfdir}/timezone
186 #%{_bindir}/mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
187 #%{_bindir}/touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
189 %{_bindir}/mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-preset/
190 %{_bindir}/mkdir -p %{buildroot}%{_prefix}/lib/systemd/user-preset/
192 # Make sure the shutdown/sleep drop-in dirs exist
193 %{_bindir}/mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-shutdown/
194 %{_bindir}/mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-sleep/
196 # Make sure the NTP units dir exists
197 %{_bindir}/mkdir -p %{buildroot}%{_prefix}/lib/systemd/ntp-units.d/
199 # Install modprobe fragment
200 %{_bindir}/mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d/
202 # Enable readahead services
203 %{_bindir}/ln -s ../systemd-readahead-collect.service %{buildroot}%{_prefix}/lib/systemd/system/default.target.wants/
204 %{_bindir}/ln -s ../systemd-readahead-replay.service %{buildroot}%{_prefix}/lib/systemd/system/default.target.wants/
206 # Fix the dangling /var/lock -> /run/lock symlink
207 install -Dm644 tmpfiles.d/legacy.conf %{buildroot}%{_prefix}/lib/tmpfiles.d/legacy.conf
209 install -m644 %{SOURCE1} %{buildroot}%{_prefix}/lib/tmpfiles.d/
211 rm -rf %{buildroot}%{_prefix}/lib/systemd/user/default.target
213 rm -rf %{buildroot}%{_docdir}/%{name}
215 # Move macros to the proper location for Tizen
216 mkdir -p %{buildroot}%{_sysconfdir}/rpm
217 install -m644 src/core/macros.systemd %{buildroot}%{_sysconfdir}/rpm/macros.systemd
218 rm -f %{buildroot}%{_prefix}/lib/rpm/macros.d/macros.systemd
221 %{_bindir}/getent group cdrom >/dev/null 2>&1 || %{_sbindir}/groupadd -r -g 11 cdrom >/dev/null 2>&1 || :
222 %{_bindir}/getent group tape >/dev/null 2>&1 || %{_sbindir}/groupadd -r -g 33 tape >/dev/null 2>&1 || :
223 %{_bindir}/getent group dialout >/dev/null 2>&1 || %{_sbindir}/groupadd -r -g 18 dialout >/dev/null 2>&1 || :
224 %{_bindir}/getent group floppy >/dev/null 2>&1 || %{_sbindir}/groupadd -r -g 19 floppy >/dev/null 2>&1 || :
225 %{_bindir}/systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd.service >/dev/null 2>&1 || :
227 # Rename configuration files that changed their names
228 %{_bindir}/mv -n %{_sysconfdir}/systemd/systemd-logind.conf %{_sysconfdir}/systemd/logind.conf >/dev/null 2>&1 || :
229 %{_bindir}/mv -n %{_sysconfdir}/systemd/systemd-journald.conf %{_sysconfdir}/systemd/journald.conf >/dev/null 2>&1 || :
232 %{_bindir}/systemd-machine-id-setup > /dev/null 2>&1 || :
233 %{_prefix}/lib/systemd/systemd-random-seed save > /dev/null 2>&1 || :
234 %{_bindir}/systemctl daemon-reexec > /dev/null 2>&1 || :
235 %{_bindir}/systemctl start systemd-udevd.service >/dev/null 2>&1 || :
238 if [ $1 -ge 1 ] ; then
239 %{_bindir}/systemctl daemon-reload > /dev/null 2>&1 || :
240 %{_bindir}/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
244 if [ $1 -eq 0 ] ; then
245 %{_bindir}/systemctl disable \
248 systemd-readahead-replay.service \
249 systemd-readahead-collect.service >/dev/null 2>&1 || :
251 %{_bindir}/rm -f %{_sysconfdir}/systemd/system/default.target >/dev/null 2>&1 || :
254 %post -n libsystemd -p /sbin/ldconfig
255 %postun -n libsystemd -p /sbin/ldconfig
257 %post -n libgudev -p /sbin/ldconfig
258 %postun -n libgudev -p /sbin/ldconfig
263 %manifest %{name}.manifest
264 %config %{_sysconfdir}/systemd/bootchart.conf
265 %config %{_sysconfdir}/pam.d/systemd-user
267 %{_bindir}/kernel-install
268 %{_bindir}/machinectl
269 %{_bindir}/systemd-run
270 %dir %{_prefix}/lib/kernel
271 %dir %{_prefix}/lib/kernel/install.d
272 %{_prefix}/lib/kernel/install.d/50-depmod.install
273 %{_prefix}/lib/kernel/install.d/90-loaderentry.install
274 %{_prefix}/lib/systemd/system-generators/systemd-efi-boot-generator
275 %{_bindir}/hostnamectl
277 %{_bindir}/systemd-coredumpctl
278 %{_bindir}/timedatectl
279 %dir %{_sysconfdir}/systemd
280 %dir %{_sysconfdir}/systemd/system
281 %dir %{_sysconfdir}/systemd/user
282 %dir %{_sysconfdir}/tmpfiles.d
283 %dir %{_sysconfdir}/sysctl.d
284 %dir %{_sysconfdir}/modules-load.d
285 %dir %{_sysconfdir}/binfmt.d
286 %{_datadir}/bash-completion/*
287 %dir %{_datadir}/zsh/site-functions
288 %{_datadir}/zsh/site-functions/*
289 %dir %{_sysconfdir}/udev
290 %dir %{_sysconfdir}/udev/rules.d
291 %dir %{_prefix}/lib/systemd
292 %dir %{_prefix}/lib/systemd/system
293 %dir %{_prefix}/lib/systemd/system-generators
294 %dir %{_prefix}/lib/systemd/user-generators
295 %dir %{_prefix}/lib/systemd/system-preset
296 %dir %{_prefix}/lib/systemd/user-preset
297 %dir %{_prefix}/lib/systemd/system-shutdown
298 %dir %{_prefix}/lib/systemd/system-sleep
299 %dir %{_prefix}/lib/tmpfiles.d
300 %dir %{_prefix}/lib/sysctl.d
301 %dir %{_prefix}/lib/modules-load.d
302 %dir %{_prefix}/lib/binfmt.d
303 %dir %{_prefix}/lib/firmware
304 %dir %{_prefix}/lib/firmware/updates
305 %dir %{_datadir}/systemd
306 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf
307 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf
308 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf
309 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf
310 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf
311 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf
312 %config(noreplace) %{_sysconfdir}/systemd/system.conf
313 %config(noreplace) %{_sysconfdir}/systemd/user.conf
314 %config(noreplace) %{_sysconfdir}/systemd/logind.conf
315 %config(noreplace) %{_sysconfdir}/systemd/journald.conf
316 %config(noreplace) %{_sysconfdir}/udev/udev.conf
317 #%{_sysconfdir}/bash_completion.d/systemd-bash-completion.sh
318 %config %{_sysconfdir}/rpm/macros.systemd
319 %{_sysconfdir}/xdg/systemd
320 %ghost %config(noreplace) %{_sysconfdir}/hostname
321 %ghost %config(noreplace) %{_sysconfdir}/vconsole.conf
322 %ghost %config(noreplace) %{_sysconfdir}/locale.conf
323 %ghost %config(noreplace) %{_sysconfdir}/machine-id
324 %ghost %config(noreplace) %{_sysconfdir}/machine-info
325 %ghost %config(noreplace) %{_sysconfdir}/timezone
328 %{_bindir}/systemd-notify
329 %{_bindir}/systemd-ask-password
330 %{_bindir}/systemd-tty-ask-password-agent
331 %{_bindir}/systemd-machine-id-setup
333 %{_bindir}/systemd-loginctl
334 %{_bindir}/journalctl
335 %{_bindir}/systemd-tmpfiles
336 %{_bindir}/systemd-nspawn
337 %{_bindir}/systemd-stdio-bridge
338 %{_bindir}/systemd-cat
339 %{_bindir}/systemd-cgls
340 %{_bindir}/systemd-cgtop
341 %{_bindir}/systemd-delta
342 %{_bindir}/systemd-detect-virt
343 %{_bindir}/systemd-inhibit
345 %{_prefix}/lib/sysctl.d/*.conf
346 %{_prefix}/lib/systemd/systemd
347 %{_prefix}/lib/systemd/system
349 %dir %{_prefix}/lib/systemd/system/basic.target.wants
350 %dir %{_prefix}/lib/systemd/user
351 %{_prefix}/lib/systemd/user/bluetooth.target
352 %{_prefix}/lib/systemd/user/exit.target
353 %{_prefix}/lib/systemd/user/printer.target
354 %{_prefix}/lib/systemd/user/shutdown.target
355 %{_prefix}/lib/systemd/user/sockets.target
356 %{_prefix}/lib/systemd/user/sound.target
357 %{_prefix}/lib/systemd/user/systemd-exit.service
358 %{_prefix}/lib/systemd/user/paths.target
359 %{_prefix}/lib/systemd/user/smartcard.target
360 %{_prefix}/lib/systemd/user/timers.target
362 %{_prefix}/lib/systemd/systemd-*
363 %dir %{_prefix}/lib/systemd/catalog
364 %{_prefix}/lib/systemd/catalog/systemd.catalog
366 %{_prefix}/lib/systemd/system-generators/systemd-getty-generator
367 %{_prefix}/lib/systemd/system-generators/systemd-fstab-generator
368 %{_prefix}/lib/systemd/system-generators/systemd-system-update-generator
369 %{_prefix}/lib/systemd/system-generators/systemd-gpt-auto-generator
370 %{_prefix}/lib/tmpfiles.d/systemd.conf
371 %{_prefix}/lib/tmpfiles.d/x11.conf
372 %{_prefix}/lib/tmpfiles.d/tmp.conf
373 %{_prefix}/lib/tmpfiles.d/legacy.conf
374 %{_prefix}/lib/tmpfiles.d/pamconsole-tmp.conf
383 %{_datadir}/systemd/kbd-model-map
384 %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
385 %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
386 %{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
387 %{_datadir}/dbus-1/system-services/org.freedesktop.login1.service
388 %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service
389 %{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
390 %{_datadir}/dbus-1/system-services/org.freedesktop.machine1.service
391 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.*.xml
392 %{_datadir}/dbus-1/interfaces/org.freedesktop.hostname1.xml
393 %{_datadir}/dbus-1/interfaces/org.freedesktop.locale1.xml
394 %{_datadir}/dbus-1/interfaces/org.freedesktop.timedate1.xml
395 %dir %{_datadir}/polkit-1
396 %dir %{_datadir}/polkit-1/actions
397 %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
398 %{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy
399 %{_datadir}/polkit-1/actions/org.freedesktop.login1.policy
400 %{_datadir}/polkit-1/actions/org.freedesktop.locale1.policy
401 %{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy
402 %{_datadir}/pkgconfig/systemd.pc
403 %{_datadir}/pkgconfig/udev.pc
405 # Make sure we don't remove runlevel targets from F14 alpha installs,
406 # but make sure we don't create then anew.
407 %ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel2.target
408 %ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel3.target
409 %ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel4.target
410 %ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel5.target
413 %manifest %{name}.manifest
414 %{_libdir}/security/pam_systemd.so
415 %{_libdir}/libsystemd-daemon.so.*
416 %{_libdir}/libsystemd-login.so.*
417 %{_libdir}/libsystemd-journal.so.*
418 %{_libdir}/libsystemd-id128.so.*
419 %{_libdir}/libudev.so.*
420 %{_libdir}/libnss_myhostname.so.2
423 %manifest %{name}.manifest
424 %{_libdir}/libsystemd-daemon.so
425 %{_libdir}/libsystemd-login.so
426 %{_libdir}/libsystemd-journal.so
427 %{_libdir}/libsystemd-id128.so
428 %{_libdir}/libudev.so
429 %dir %{_includedir}/systemd
430 %{_includedir}/systemd/sd-daemon.h
431 %{_includedir}/systemd/sd-login.h
432 %{_includedir}/systemd/sd-journal.h
433 %{_includedir}/systemd/sd-id128.h
434 %{_includedir}/systemd/sd-messages.h
435 %{_includedir}/systemd/sd-shutdown.h
436 %{_includedir}/libudev.h
437 %{_libdir}/pkgconfig/libsystemd-daemon.pc
438 %{_libdir}/pkgconfig/libsystemd-login.pc
439 %{_libdir}/pkgconfig/libsystemd-journal.pc
440 %{_libdir}/pkgconfig/libsystemd-id128.pc
441 %{_libdir}/pkgconfig/libudev.pc
445 %manifest %{name}.manifest
446 %{_bindir}/systemd-analyze
449 %manifest %{name}.manifest
450 %{_libdir}/libgudev-1.0.so.*
452 %files -n libgudev-devel
453 %manifest %{name}.manifest
454 %{_libdir}/libgudev-1.0.so
455 %dir %{_includedir}/gudev-1.0
456 %dir %{_includedir}/gudev-1.0/gudev
457 %{_includedir}/gudev-1.0/gudev/*.h
458 %{_libdir}/pkgconfig/gudev-1.0*