3 %bcond_without audit # without audit support
4 %bcond_without cryptsetup # without cryptsetup support
5 %bcond_without gtk # build gtk tools
6 %bcond_without pam # PAM authentication support
7 %bcond_without selinux # without SELinux support
8 %bcond_without tcpd # libwrap (tcp_wrappers) support
10 Summary: A System and Service Manager
11 Summary(pl.UTF-8): systemd - zarządca systemu i usług dla Linuksa
17 Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.xz
18 # Source0-md5: 68c66dce5a28c0efd7c210af5d11efed
19 Source1: %{name}-sysv-convert
20 Source2: systemd_booted.c
21 Source3: ifup@.service
22 Source4: network-post.service
23 Source5: network.service
24 Patch0: target-pld.patch
25 Patch1: config-pld.patch
26 Patch2: shut-sysv-up.patch
27 Patch3: virt-libvirt.patch
28 URL: http://www.freedesktop.org/wiki/Software/systemd
29 BuildRequires: acl-devel
30 %{?with_audit:BuildRequires: audit-libs-devel}
31 BuildRequires: autoconf >= 2.63
32 BuildRequires: automake >= 1:1.11
33 %{?with_cryptsetup:BuildRequires: cryptsetup-luks-devel}
34 BuildRequires: dbus-devel >= 1.3.2
35 BuildRequires: docbook-style-xsl
37 BuildRequires: glib2-devel >= 1:2.26.1
38 BuildRequires: gtk+2-devel >= 2:2.24.0
39 BuildRequires: libgee-devel
40 BuildRequires: libnotify-devel >= 0.7.0
43 BuildRequires: intltool >= 0.40.0
44 BuildRequires: libcap-devel
45 %{?with_selinux:BuildRequires: libselinux-devel}
46 BuildRequires: libtool >= 2:2.2
47 %{?with_tcpd:BuildRequires: libwrap-devel}
48 BuildRequires: libxslt-progs
50 %{?with_pam:BuildRequires: pam-devel}
51 BuildRequires: pkgconfig >= 0.9.0
52 BuildRequires: rpmbuild(macros) >= 1.527
53 BuildRequires: udev-devel >= 172
54 # not required for building from release (which contains *.c for *.vala)
55 #BuildRequires: vala >= 0.10.0
56 Requires: %{name}-libs = %{version}-%{release}
57 Requires: %{name}-units = %{version}-%{release}
58 Requires: SysVinit-tools
60 Requires: dbus >= 1.3.2
61 Requires: dbus-systemd
62 Requires: filesystem >= 4.0
63 Requires: rc-scripts >= 0.4.5.1-7
64 Requires: setup >= 2.8.0-2
65 Requires: udev-core >= 1:172
66 Requires: udev-systemd >= 1:172
67 Requires: udev-libs >= 1:172
68 Suggests: ConsoleKit-systemd
69 Suggests: fsck >= 2.20
70 # python modules required by systemd-analyze
72 Suggests: python-modules
73 Suggests: rsyslog-systemd
75 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
77 %define _libexecdir %{_prefix}/lib
80 systemd is a system and service manager for Linux, compatible with
81 SysV and LSB init scripts. systemd provides aggressive parallelization
82 capabilities, uses socket and D-Bus activation for starting services,
83 offers on-demand starting of daemons, keeps track of processes using
84 Linux cgroups, supports snapshotting and restoring of the system
85 state, maintains mount and automount points and implements an
86 elaborate transactional dependency-based service control logic. It can
87 work as a drop-in replacement for sysvinit.
89 %description -l pl.UTF-8
90 systemd jest zarządcą systemu i usług dla Linuksa, kompatybilny ze
91 skryptami SysV i LSB. systemd udostępnia rozbudowane zdolności
92 paralelizacji, do uruchamiania usług używa socketów oraz D-Busa,
93 oferuje uruchamianie usług na życzenie, monitoruje procesy używając
94 linuksowych cgroups, wspomaga zapisywanie (snapshot) i odczytywanie
95 (restore) stanu systemu, zarządza (auto)mount pointami oraz
96 implementuje starannie opracowaną transakcjonalną, bazującą na
97 zależnościach logikę kontroli usług. Może pracować jako zastępca dla
101 Summary: systemd /sbin/init and LSB/SysV compatibility symlinks
102 Summary(pl.UTF-8): /sbin/init z systemd i dowiązania dla kompatybilności z LSB/SysV
105 Provides: readahead = 1:1.5.7-3
106 Provides: virtual(init-daemon)
108 Obsoletes: readahead < 1:1.5.7-3
109 Obsoletes: virtual(init-daemon)
112 Install this package when you are ready to final switch to systemd.
114 %description init -l pl.UTF-8
115 Ten pakiet należy zainstalować po przygotowaniu się do ostatecznego
116 przejścia na systemd.
119 Summary: Configuration files, directories and installation tool for systemd
120 Summary(pl.UTF-8): Pliki konfiguracyjne, katalogi i narzędzie instalacyjne dla systemd
122 Requires(post): coreutils
127 Basic configuration files, directories and installation tool for the
128 systemd system and service manager.
130 This is common config, use %{_sysconfdir}/systemd/system to override.
132 %description units -l pl.UTF-8
133 Podstawowe pliki konfiguracyjne, katalogi i narzędzie instalacyjne dla
134 zarządcy systemu i usług systemd.
136 Ten pakiet zawiera ogólną konfigurację, ustawienia można nadpisać
137 poprzez katalog %{_sysconfdir}/systemd/system.
140 Summary: Graphical frontend for systemd
141 Summary(pl.UTF-8): Graficzny interfejs do systemd
143 Requires: %{name} = %{version}-%{release}
147 Graphical front-end for systemd.
149 %description gtk -l pl.UTF-8
150 Graficzny interfejs do systemd.
153 Summary: Shared systemd libraries
154 Summary(pl.UTF-8): Biblioteki współdzielone systemd
158 Shared systemd libraries.
160 %description libs -l pl.UTF-8
161 Biblioteki współdzielone systemd.
164 Summary: Header files for systemd libraries
165 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek systemd
166 Group: Development/Libraries
167 Requires: %{name}-libs = %{version}-%{release}
170 Header files for systemd libraries.
172 %description devel -l pl.UTF-8
173 Pliki nagłówkowe bibliotek systemd.
175 %package -n bash-completion-systemd
176 Summary: bash-completion for systemd
177 Summary(pl.UTF-8): Bashowe dopełnianie składni dla systemd
178 Group: Applications/Shells
180 Requires: bash-completion
182 %description -n bash-completion-systemd
183 bash-completion for systemd.
185 %description -n bash-completion-systemd -l pl.UTF-8
186 Bashowe dopełnianie składni dla systemd
194 cp -p %{SOURCE2} src/systemd_booted.c
202 %{__enable_disable audit} \
203 %{__enable_disable cryptsetup libcryptsetup} \
204 %{__enable_disable gtk} \
205 %{__enable_disable pam} \
206 %{__enable_disable selinux} \
207 %{__enable_disable tcpd tcpwrap} \
208 --disable-silent-rules \
212 --with-rootlibdir=/%{_lib}
215 ./libtool --mode=link --tag=CC %{__cc} %{rpmcppflags} %{rpmcflags} -o systemd_booted %{rpmldflags} src/systemd_booted.c -L. -lsystemd-daemon
218 rm -rf $RPM_BUILD_ROOT
221 DESTDIR=$RPM_BUILD_ROOT
223 ./libtool --mode=install install -m755 systemd_booted $RPM_BUILD_ROOT/bin/systemd_booted
225 # Create SysV compatibility symlinks. systemctl/systemd are smart
226 # enough to detect the way they were called
227 install -d $RPM_BUILD_ROOT/sbin
228 ln -s ../bin/systemd $RPM_BUILD_ROOT/sbin/init
229 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/halt
230 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/poweroff
231 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/reboot
232 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/runlevel
233 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/shutdown
234 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/telinit
236 ln -s ../modules $RPM_BUILD_ROOT%{_sysconfdir}/modules-load.d/modules.conf
237 # disable random and console SYSV service
238 ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/random.service
239 ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/console.service
241 # add static (non-NetworkManager) networking
242 install %{SOURCE3} $RPM_BUILD_ROOT/lib/systemd/system/ifup@.service
243 install %{SOURCE4} $RPM_BUILD_ROOT/lib/systemd/system/network-post.service
244 install %{SOURCE5} $RPM_BUILD_ROOT/lib/systemd/system/network.service
246 # All wants links are created at %post to make sure they are not owned
247 # and hence overriden by rpm if the user deletes them (missingok?)
248 %{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/*.target.wants
250 # do not cover /media (system-specific removable mountpoints) for now
251 # needs %post code to convert existing /media structure to tmpfiles
252 %{__rm} $RPM_BUILD_ROOT/lib/systemd/system/local-fs.target.wants/media.mount
253 # do not cover /var/run until packages need rpm-provided-only subdirectories
254 %{__rm} $RPM_BUILD_ROOT/lib/systemd/system/local-fs.target.wants/var-run.mount
256 # it is in rc-scripts pkg
257 %{__rm} $RPM_BUILD_ROOT/lib/systemd/system/rc-local.service
259 # Make sure these directories are properly owned:
260 # - halt,kexec,poweroff,reboot: generic ones used by ConsoleKit-systemd,
261 # - syslog _might_ be used by some syslog implementation (none for now),
262 # - isn't dbus populated by dbus-systemd only (so to be moved there)?
263 install -d $RPM_BUILD_ROOT/lib/systemd/system/{dbus,halt,kexec,poweroff,reboot,syslog}.target.wants
265 # Create new-style configuration files so that we can ghost-own them
266 touch $RPM_BUILD_ROOT%{_sysconfdir}/{hostname,locale.conf,machine-id,machine-info,os-release,timezone,vconsole.conf}
268 # Install SysV conversion tool for systemd
269 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
271 install -d $RPM_BUILD_ROOT/var/log
272 :> $RPM_BUILD_ROOT/var/log/btmp
273 :> $RPM_BUILD_ROOT/var/log/wtmp
276 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/systemadm.1*
279 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
280 %{__rm} $RPM_BUILD_ROOT/%{_lib}/security/pam_systemd.la
281 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
284 rm -rf $RPM_BUILD_ROOT
287 /bin/systemd-machine-id-setup > /dev/null 2>&1 || :
288 /bin/systemctl daemon-reexec > /dev/null 2>&1 || :
291 if [ $1 -ge 1 ]; then
292 /bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
295 %post libs -p /sbin/ldconfig
296 %postun libs -p /sbin/ldconfig
299 if [ $1 -eq 1 ]; then
300 # Try to read default runlevel from the old inittab if it exists
301 runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
302 if [ -z "$runlevel" ] ; then
303 target="/lib/systemd/system/graphical.target"
305 target="/lib/systemd/system/runlevel$runlevel.target"
308 # And symlink what we found to the new-style default.target
309 ln -s "$target" %{_sysconfdir}/systemd/system/default.target >/dev/null 2>&1 || :
311 # Enable the services we install by default.
312 /bin/systemctl enable \
315 network-post.service \
317 systemd-readahead-replay.service \
318 systemd-readahead-collect.service >/dev/null 2>&1 || :
320 # Find and enable all installed interfaces
321 mkdir -p %{_sysconfdir}/systemd/system/network.target.wants >/dev/null 2>&1 || :
322 for f in /etc/sysconfig/interfaces/ifcfg-* ; do
326 *.rpmorig|*.rpmnew|*.rpmsave|*~|*.orig)
330 ln -s /lib/systemd/system/ifup@.service \
331 %{_sysconfdir}/systemd/system/network.target.wants/ifcfg@$ff.service >/dev/null 2>&1 || :
337 if [ $1 -eq 0 ] ; then
338 /bin/systemctl disable \
341 network-post.service \
343 systemd-readahead-replay.service \
344 systemd-readahead-collect.service >/dev/null 2>&1 || :
346 %{__rm} -f %{_sysconfdir}/systemd/system/default.target >/dev/null 2>&1 || :
347 %{__rm} -f %{_sysconfdir}/systemd/system/network.target.wants/ifcfg@*.service >/dev/null 2>&1 || :
351 if [ $1 -ge 1 ]; then
352 /bin/systemctl daemon-reload > /dev/null 2>&1 || :
356 %defattr(644,root,root,755)
357 %doc DISTRO_PORTING README TODO
358 /etc/dbus-1/system.d/org.freedesktop.hostname1.conf
359 /etc/dbus-1/system.d/org.freedesktop.locale1.conf
360 /etc/dbus-1/system.d/org.freedesktop.login1.conf
361 /etc/dbus-1/system.d/org.freedesktop.systemd1.conf
362 /etc/dbus-1/system.d/org.freedesktop.timedate1.conf
363 %ghost %config(noreplace) %{_sysconfdir}/machine-id
364 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hostname
365 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/locale.conf
366 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/machine-info
367 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/os-release
368 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/timezone
369 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vconsole.conf
370 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemd/*.conf
371 %dir %{_sysconfdir}/systemd/user
373 %attr(755,root,root) /bin/systemd
374 %attr(755,root,root) /bin/systemd-ask-password
375 %attr(755,root,root) /bin/systemd-journalctl
376 %attr(755,root,root) /bin/systemd-loginctl
377 %attr(755,root,root) /bin/systemd-machine-id-setup
378 %attr(755,root,root) /bin/systemd-notify
379 %attr(755,root,root) /bin/systemd-tty-ask-password-agent
380 %attr(755,root,root) %{_bindir}/systemd-analyze
381 %attr(755,root,root) %{_bindir}/systemd-cgls
382 %attr(755,root,root) %{_bindir}/systemd-nspawn
383 %attr(755,root,root) %{_bindir}/systemd-stdio-bridge
384 %attr(755,root,root) %{_bindir}/systemd-sysv-convert
385 %attr(755,root,root) /lib/systemd/systemd-*
386 %dir /lib/systemd/system-generators
387 %attr(755,root,root) /lib/systemd/system-generators/systemd-*-generator
388 %dir /lib/systemd/system-shutdown
389 /lib/udev/rules.d/99-systemd.rules
390 /lib/udev/rules.d/70-uaccess.rules
391 /lib/udev/rules.d/71-seat.rules
392 /lib/udev/rules.d/73-seat-late.rules
393 %dir %{_libexecdir}/systemd
394 %{_libexecdir}/systemd/user
395 %dir %{_libexecdir}/systemd/user-generators
396 %config(noreplace,missingok) %{_libexecdir}/tmpfiles.d/*.conf
397 %{_datadir}/dbus-1/interfaces/org.freedesktop.hostname1.xml
398 %{_datadir}/dbus-1/interfaces/org.freedesktop.locale1.xml
399 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.*.xml
400 %{_datadir}/dbus-1/interfaces/org.freedesktop.timedate1.xml
401 %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
402 %{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
403 %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service
404 %{_datadir}/dbus-1/system-services/org.freedesktop.login1.service
405 %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
406 %{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
407 %{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy
408 %{_datadir}/polkit-1/actions/org.freedesktop.locale1.policy
409 %{_datadir}/polkit-1/actions/org.freedesktop.login1.policy
410 %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
411 %{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy
412 %dir %{_datadir}/systemd
413 %{_datadir}/systemd/kbd-model-map
414 %{_mandir}/man1/systemd.1*
415 %{_mandir}/man1/systemd-*.1*
416 %{_mandir}/man3/sd_booted.3*
417 %{_mandir}/man3/sd_is_fifo.3*
418 %{_mandir}/man3/sd_is_socket.3
419 %{_mandir}/man3/sd_is_socket_inet.3
420 %{_mandir}/man3/sd_is_socket_unix.3
421 %{_mandir}/man3/sd_listen_fds.3*
422 %{_mandir}/man3/sd_notify.3*
423 %{_mandir}/man3/sd_notifyf.3
424 %{_mandir}/man3/sd_readahead.3*
425 %{_mandir}/man5/binfmt.d.5*
426 %{_mandir}/man5/hostname.5*
427 %{_mandir}/man5/locale.conf.5*
428 %{_mandir}/man5/machine-id.5*
429 %{_mandir}/man5/machine-info.5*
430 %{_mandir}/man5/modules-load.d.5*
431 %{_mandir}/man5/os-release.5*
432 %{_mandir}/man5/sysctl.d.5*
433 %{_mandir}/man5/systemd.*.5*
434 %{_mandir}/man5/systemd-logind.conf.5*
435 %{_mandir}/man5/timezone.5*
436 %{_mandir}/man5/vconsole.conf.5*
437 %{_mandir}/man7/daemon.7*
438 %{_mandir}/man7/sd-daemon.7*
439 %{_mandir}/man7/sd-login.7*
440 %{_mandir}/man7/sd-readahead.7*
441 %{_mandir}/man7/systemd.special.7*
442 %attr(640,root,root) %ghost /var/log/btmp
443 %attr(664,root,utmp) %ghost /var/log/wtmp
446 %attr(755,root,root) /%{_lib}/security/pam_systemd.so
447 %{_mandir}/man8/pam_systemd.8*
451 %defattr(644,root,root,755)
452 %attr(755,root,root) /sbin/halt
453 %attr(755,root,root) /sbin/init
454 %attr(755,root,root) /sbin/poweroff
455 %attr(755,root,root) /sbin/reboot
456 %attr(755,root,root) /sbin/runlevel
457 %attr(755,root,root) /sbin/shutdown
458 %attr(755,root,root) /sbin/telinit
459 %{_mandir}/man1/init.1
460 %{_mandir}/man8/halt.8*
461 %{_mandir}/man8/poweroff.8
462 %{_mandir}/man8/reboot.8
463 %{_mandir}/man8/runlevel.8*
464 %{_mandir}/man8/shutdown.8*
465 %{_mandir}/man8/telinit.8*
468 %defattr(644,root,root,755)
469 %dir %{_sysconfdir}/binfmt.d
470 %dir %{_sysconfdir}/modules-load.d
471 %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/modules-load.d/modules.conf
472 %dir %{_sysconfdir}/sysctl.d
473 %dir %{_sysconfdir}/systemd
474 %dir %{_sysconfdir}/systemd/system
475 %dir %{_sysconfdir}/tmpfiles.d
476 %dir %{_libexecdir}/binfmt.d
477 %dir %{_libexecdir}/modules-load.d
478 %dir %{_libexecdir}/sysctl.d
479 %attr(755,root,root) /bin/systemctl
480 %attr(755,root,root) /bin/systemd-tmpfiles
481 %attr(755,root,root) /bin/systemd_booted
482 %{_mandir}/man1/systemctl.1*
483 %{_mandir}/man5/tmpfiles.d.5*
484 %{_mandir}/man8/systemd-tmpfiles.8*
485 %{_npkgconfigdir}/systemd.pc
487 /lib/systemd/system/*.automount
488 /lib/systemd/system/*.mount
489 /lib/systemd/system/*.path
490 /lib/systemd/system/*.service
491 /lib/systemd/system/*.socket
492 /lib/systemd/system/*.target
493 /lib/systemd/system/*.timer
494 %dir /lib/systemd/system/*.wants
495 %config(noreplace,missingok) /lib/systemd/system/*.wants/*
499 %defattr(644,root,root,755)
500 %attr(755,root,root) %{_bindir}/systemadm
501 %attr(755,root,root) %{_bindir}/systemd-gnome-ask-password-agent
502 %{_mandir}/man1/systemadm.1*
506 %defattr(644,root,root,755)
507 %attr(755,root,root) /%{_lib}/libsystemd-daemon.so.*.*.*
508 %attr(755,root,root) %ghost /%{_lib}/libsystemd-daemon.so.0
509 %attr(755,root,root) /%{_lib}/libsystemd-id128.so.*.*.*
510 %attr(755,root,root) %ghost /%{_lib}/libsystemd-id128.so.0
511 %attr(755,root,root) /%{_lib}/libsystemd-journal.so.*.*.*
512 %attr(755,root,root) %ghost /%{_lib}/libsystemd-journal.so.0
513 %attr(755,root,root) /%{_lib}/libsystemd-login.so.*.*.*
514 %attr(755,root,root) %ghost /%{_lib}/libsystemd-login.so.0
517 %defattr(644,root,root,755)
518 %attr(755,root,root) %{_libdir}/libsystemd-daemon.so
519 %attr(755,root,root) %{_libdir}/libsystemd-id128.so
520 %attr(755,root,root) %{_libdir}/libsystemd-journal.so
521 %attr(755,root,root) %{_libdir}/libsystemd-login.so
522 %{_includedir}/%{name}
523 %{_pkgconfigdir}/libsystemd-daemon.pc
524 %{_pkgconfigdir}/libsystemd-id128.pc
525 %{_pkgconfigdir}/libsystemd-journal.pc
526 %{_pkgconfigdir}/libsystemd-login.pc
527 %{_mandir}/man3/sd_get_seats.3*
528 %{_mandir}/man3/sd_get_sessions.3*
529 %{_mandir}/man3/sd_get_uids.3*
530 %{_mandir}/man3/sd_is_mq.3*
531 %{_mandir}/man3/sd_login_monitor_flush.3*
532 %{_mandir}/man3/sd_login_monitor_get_fd.3*
533 %{_mandir}/man3/sd_login_monitor_new.3*
534 %{_mandir}/man3/sd_login_monitor_unref.3*
535 %{_mandir}/man3/sd_pid_get_owner_uid.3*
536 %{_mandir}/man3/sd_pid_get_session.3*
537 %{_mandir}/man3/sd_pid_get_unit.3*
538 %{_mandir}/man3/sd_seat_can_multi_session.3*
539 %{_mandir}/man3/sd_seat_get_active.3*
540 %{_mandir}/man3/sd_seat_get_sessions.3*
541 %{_mandir}/man3/sd_session_get_seat.3*
542 %{_mandir}/man3/sd_session_get_uid.3*
543 %{_mandir}/man3/sd_session_is_active.3*
544 %{_mandir}/man3/sd_uid_get_seats.3*
545 %{_mandir}/man3/sd_uid_get_sessions.3*
546 %{_mandir}/man3/sd_uid_get_state.3*
547 %{_mandir}/man3/sd_uid_is_on_seat.3*
549 %files -n bash-completion-systemd
550 %defattr(644,root,root,755)
551 /etc/bash_completion.d/systemd-bash-completion.sh