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.bz2
18 # Source0-md5: 1435f23be79c8c38d1121c6b150510f3
19 Source1: %{name}-sysv-convert
20 Source2: systemd_booted.c
21 Patch0: target-pld.patch
22 Patch1: config-pld.patch
23 Patch2: shut-sysv-up.patch
24 URL: http://www.freedesktop.org/wiki/Software/systemd
25 BuildRequires: acl-devel
26 %{?with_audit:BuildRequires: audit-libs-devel}
27 BuildRequires: autoconf >= 2.63
28 BuildRequires: automake >= 1:1.11
29 %{?with_cryptsetup:BuildRequires: cryptsetup-luks-devel}
30 BuildRequires: dbus-devel >= 1.3.2
31 BuildRequires: docbook-style-xsl
33 BuildRequires: glib2-devel >= 1:2.26.1
34 BuildRequires: gtk+2-devel >= 2:2.24.0
35 BuildRequires: libnotify-devel >= 0.7.0
38 BuildRequires: intltool >= 0.40.0
39 BuildRequires: libcap-devel
40 %{?with_selinux:BuildRequires: libselinux-devel}
41 BuildRequires: libtool >= 2:2.2
42 %{?with_tcpd:BuildRequires: libwrap-devel}
43 BuildRequires: libxslt-progs
45 %{?with_pam:BuildRequires: pam-devel}
46 BuildRequires: pkgconfig >= 0.9.0
47 BuildRequires: rpmbuild(macros) >= 1.527
48 BuildRequires: udev-devel >= 172
49 # not required for building from release (which contains *.c for *.vala)
50 #BuildRequires: vala >= 0.10.0
51 Requires: %{name}-libs = %{version}-%{release}
52 Requires: %{name}-units = %{version}-%{release}
53 Requires: SysVinit-tools
55 Requires: dbus >= 1.3.2
56 Requires: dbus-systemd
57 Requires: filesystem >= 4.0
59 Requires: setup >= 2.8.0-2
60 Requires: udev-core >= 1:172
61 Requires: udev-systemd >= 1:172
62 Requires: udev-libs >= 1:172
63 Suggests: ConsoleKit-systemd
64 Suggests: fsck >= 2.20
65 # python modules required by systemd-analyze
67 Suggests: python-modules
68 Suggests: rsyslog-systemd
70 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72 %define _libexecdir %{_prefix}/lib
75 systemd is a system and service manager for Linux, compatible with
76 SysV and LSB init scripts. systemd provides aggressive parallelization
77 capabilities, uses socket and D-Bus activation for starting services,
78 offers on-demand starting of daemons, keeps track of processes using
79 Linux cgroups, supports snapshotting and restoring of the system
80 state, maintains mount and automount points and implements an
81 elaborate transactional dependency-based service control logic. It can
82 work as a drop-in replacement for sysvinit.
84 %description -l pl.UTF-8
85 systemd jest zarządcą systemu i usług dla Linuksa, kompatybilny ze
86 skryptami SysV i LSB. systemd udostępnia rozbudowane zdolności
87 paralelizacji, do uruchamiania usług używa socketów oraz D-Busa,
88 oferuje uruchamianie usług na życzenie, monitoruje procesy używając
89 linuksowych cgroups, wspomaga zapisywanie (snapshot) i odczytywanie
90 (restore) stanu systemu, zarządza (auto)mount pointami oraz
91 implementuje starannie opracowaną transakcjonalną, bazującą na
92 zależnościach logikę kontroli usług. Może pracować jako zastępca dla
96 Summary: systemd /sbin/init and LSB/SysV compatibility symlinks
97 Summary(pl.UTF-8): /sbin/init z systemd i dowiązania dla kompatybilności z LSB/SysV
100 Provides: readahead = 1:1.5.7-3
101 Provides: virtual(init-daemon)
103 Obsoletes: readahead < 1:1.5.7-3
104 Obsoletes: virtual(init-daemon)
107 Install this package when you are ready to final switch to systemd.
109 %description init -l pl.UTF-8
110 Ten pakiet należy zainstalować po przygotowaniu się do ostatecznego
111 przejścia na systemd.
114 Summary: Configuration files, directories and installation tool for systemd
115 Summary(pl.UTF-8): Pliki konfiguracyjne, katalogi i narzędzie instalacyjne dla systemd
117 Requires(post): coreutils
122 Basic configuration files, directories and installation tool for the
123 systemd system and service manager.
125 This is common config, use %{_sysconfdir}/systemd/system to override.
127 %description units -l pl.UTF-8
128 Podstawowe pliki konfiguracyjne, katalogi i narzędzie instalacyjne dla
129 zarządcy systemu i usług systemd.
131 Ten pakiet zawiera ogólną konfigurację, ustawienia można nadpisać
132 poprzez katalog %{_sysconfdir}/systemd/system.
135 Summary: Graphical frontend for systemd
136 Summary(pl.UTF-8): Graficzny interfejs do systemd
138 Requires: %{name} = %{version}-%{release}
142 Graphical front-end for systemd.
144 %description gtk -l pl.UTF-8
145 Graficzny interfejs do systemd.
148 Summary: Shared systemd libraries
149 Summary(pl.UTF-8): Biblioteki współdzielone systemd
153 Shared systemd libraries.
155 %description libs -l pl.UTF-8
156 Biblioteki współdzielone systemd.
159 Summary: Header files for systemd libraries
160 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek systemd
161 Group: Development/Libraries
162 Requires: %{name}-libs = %{version}-%{release}
165 Header files for systemd libraries.
167 %description devel -l pl.UTF-8
168 Pliki nagłówkowe bibliotek systemd.
170 %package -n bash-completion-systemd
171 Summary: bash-completion for systemd
172 Summary(pl.UTF-8): Bashowe dopełnianie składni dla systemd
173 Group: Applications/Shells
175 Requires: bash-completion
177 %description -n bash-completion-systemd
178 bash-completion for systemd.
180 %description -n bash-completion-systemd -l pl.UTF-8
181 Bashowe dopełnianie składni dla systemd
188 cp -p %{SOURCE2} src/systemd_booted.c
196 %{__enable_disable audit} \
197 %{__enable_disable cryptsetup libcryptsetup} \
198 %{__enable_disable gtk} \
199 %{__enable_disable pam} \
200 %{__enable_disable selinux} \
201 %{__enable_disable tcpd tcpwrap} \
202 --disable-silent-rules \
208 ./libtool --mode=link --tag=CC %{__cc} %{rpmcppflags} %{rpmcflags} -o systemd_booted %{rpmldflags} src/systemd_booted.c -L. -lsystemd-daemon
211 rm -rf $RPM_BUILD_ROOT
214 DESTDIR=$RPM_BUILD_ROOT
216 ./libtool --mode=install install -m755 systemd_booted $RPM_BUILD_ROOT/bin/systemd_booted
218 for lib in libsystemd-daemon libsystemd-login; do
219 %{__mv} $RPM_BUILD_ROOT{%{_libdir}/$lib.so.*,/%{_lib}}
220 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/$lib.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/$lib.so
223 # Create SysV compatibility symlinks. systemctl/systemd are smart
224 # enough to detect the way they were called
225 install -d $RPM_BUILD_ROOT/sbin
226 ln -s ../bin/systemd $RPM_BUILD_ROOT/sbin/init
227 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/halt
228 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/poweroff
229 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/reboot
230 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/runlevel
231 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/shutdown
232 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/telinit
234 ln -s ../modules $RPM_BUILD_ROOT%{_sysconfdir}/modules-load.d/modules.conf
235 ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/random.service
237 # All wants links are created at %post to make sure they are not owned
238 # and hence overriden by rpm if the user deletes them (missingok?)
239 %{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/*.target.wants
241 # do not cover /media (system-specific removable mountpoints) for now
242 # needs %post code to convert existing /media structure to tmpfiles
243 %{__rm} $RPM_BUILD_ROOT/lib/systemd/system/local-fs.target.wants/media.mount
244 # do not cover /var/run until packages need rpm-provided-only subdirectories
245 %{__rm} $RPM_BUILD_ROOT/lib/systemd/system/local-fs.target.wants/var-run.mount
247 # Make sure these directories are properly owned:
248 # - halt,kexec,poweroff,reboot: generic ones used by ConsoleKit-systemd,
249 # - syslog _might_ be used by some syslog implementation (none for now),
250 # - isn't dbus populated by dbus-systemd only (so to be moved there)?
251 install -d $RPM_BUILD_ROOT/lib/systemd/system/{dbus,halt,kexec,poweroff,reboot,syslog}.target.wants
253 # Create new-style configuration files so that we can ghost-own them
254 touch $RPM_BUILD_ROOT%{_sysconfdir}/{hostname,locale.conf,machine-id,machine-info,os-release,timezone,vconsole.conf}
256 # Install SysV conversion tool for systemd
257 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
259 install -d $RPM_BUILD_ROOT/var/log
260 :> $RPM_BUILD_ROOT/var/log/btmp
261 :> $RPM_BUILD_ROOT/var/log/wtmp
264 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/systemadm.1*
267 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
268 %{__rm} $RPM_BUILD_ROOT/%{_lib}/security/pam_systemd.la
269 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
272 rm -rf $RPM_BUILD_ROOT
275 /bin/systemd-machine-id-setup > /dev/null 2>&1 || :
276 /bin/systemctl daemon-reexec > /dev/null 2>&1 || :
279 if [ $1 -ge 1 ]; then
280 /bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
283 %post libs -p /sbin/ldconfig
284 %postun libs -p /sbin/ldconfig
287 if [ $1 -eq 1 ]; then
288 # Try to read default runlevel from the old inittab if it exists
289 runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
290 if [ -z "$runlevel" ] ; then
291 target="/lib/systemd/system/graphical.target"
293 target="/lib/systemd/system/runlevel$runlevel.target"
296 # And symlink what we found to the new-style default.target
297 ln -s "$target" %{_sysconfdir}/systemd/system/default.target >/dev/null 2>&1 || :
299 # Enable the services we install by default.
300 /bin/systemctl enable \
303 systemd-readahead-replay.service \
304 systemd-readahead-collect.service >/dev/null 2>&1 || :
308 if [ $1 -eq 0 ] ; then
309 /bin/systemctl disable \
312 systemd-readahead-replay.service \
313 systemd-readahead-collect.service >/dev/null 2>&1 || :
315 %{__rm} -f %{_sysconfdir}/systemd/system/default.target >/dev/null 2>&1 || :
319 if [ $1 -ge 1 ]; then
320 /bin/systemctl daemon-reload > /dev/null 2>&1 || :
324 %defattr(644,root,root,755)
325 %doc DISTRO_PORTING README TODO
326 /etc/dbus-1/system.d/org.freedesktop.hostname1.conf
327 /etc/dbus-1/system.d/org.freedesktop.locale1.conf
328 /etc/dbus-1/system.d/org.freedesktop.login1.conf
329 /etc/dbus-1/system.d/org.freedesktop.systemd1.conf
330 /etc/dbus-1/system.d/org.freedesktop.timedate1.conf
331 %ghost %config(noreplace) %{_sysconfdir}/machine-id
332 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hostname
333 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/locale.conf
334 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/machine-info
335 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/os-release
336 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/timezone
337 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vconsole.conf
338 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemd/*.conf
339 %dir %{_sysconfdir}/systemd/user
341 %attr(755,root,root) /bin/systemd
342 %attr(755,root,root) /bin/systemd-ask-password
343 %attr(755,root,root) /bin/systemd-loginctl
344 %attr(755,root,root) /bin/systemd-machine-id-setup
345 %attr(755,root,root) /bin/systemd-notify
346 %attr(755,root,root) /bin/systemd-tty-ask-password-agent
347 %attr(755,root,root) %{_bindir}/systemd-analyze
348 %attr(755,root,root) %{_bindir}/systemd-cgls
349 %attr(755,root,root) %{_bindir}/systemd-nspawn
350 %attr(755,root,root) %{_bindir}/systemd-stdio-bridge
351 %attr(755,root,root) %{_bindir}/systemd-sysv-convert
352 %attr(755,root,root) /lib/systemd/systemd-*
353 %dir /lib/systemd/system-generators
354 %attr(755,root,root) /lib/systemd/system-generators/systemd-*-generator
355 %dir /lib/systemd/system-shutdown
356 /lib/udev/rules.d/99-systemd.rules
357 /lib/udev/rules.d/70-uaccess.rules
358 /lib/udev/rules.d/71-seat.rules
359 /lib/udev/rules.d/73-seat-late.rules
360 %dir %{_libexecdir}/systemd
361 %{_libexecdir}/systemd/user
362 %dir %{_libexecdir}/systemd/user-generators
363 %config(noreplace,missingok) %{_libexecdir}/tmpfiles.d/*.conf
364 %{_datadir}/dbus-1/interfaces/org.freedesktop.hostname1.xml
365 %{_datadir}/dbus-1/interfaces/org.freedesktop.locale1.xml
366 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.*.xml
367 %{_datadir}/dbus-1/interfaces/org.freedesktop.timedate1.xml
368 %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
369 %{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
370 %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service
371 %{_datadir}/dbus-1/system-services/org.freedesktop.login1.service
372 %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
373 %{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
374 %{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy
375 %{_datadir}/polkit-1/actions/org.freedesktop.locale1.policy
376 %{_datadir}/polkit-1/actions/org.freedesktop.login1.policy
377 %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
378 %{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy
379 %dir %{_datadir}/systemd
380 %{_datadir}/systemd/kbd-model-map
381 %{_mandir}/man1/systemd.1*
382 %{_mandir}/man1/systemd-*.1*
383 %{_mandir}/man3/sd_booted.3*
384 %{_mandir}/man3/sd_is_fifo.3*
385 %{_mandir}/man3/sd_is_socket.3
386 %{_mandir}/man3/sd_is_socket_inet.3
387 %{_mandir}/man3/sd_is_socket_unix.3
388 %{_mandir}/man3/sd_listen_fds.3*
389 %{_mandir}/man3/sd_notify.3*
390 %{_mandir}/man3/sd_notifyf.3
391 %{_mandir}/man3/sd_readahead.3*
392 %{_mandir}/man5/binfmt.d.5*
393 %{_mandir}/man5/hostname.5*
394 %{_mandir}/man5/locale.conf.5*
395 %{_mandir}/man5/machine-id.5*
396 %{_mandir}/man5/machine-info.5*
397 %{_mandir}/man5/modules-load.d.5*
398 %{_mandir}/man5/os-release.5*
399 %{_mandir}/man5/sysctl.d.5*
400 %{_mandir}/man5/systemd.*.5*
401 %{_mandir}/man5/systemd-logind.conf.5*
402 %{_mandir}/man5/timezone.5*
403 %{_mandir}/man5/vconsole.conf.5*
404 %{_mandir}/man7/daemon.7*
405 %{_mandir}/man7/sd-daemon.7*
406 %{_mandir}/man7/sd-readahead.7*
407 %{_mandir}/man7/systemd.special.7*
408 %attr(640,root,root) %ghost /var/log/btmp
409 %attr(664,root,utmp) %ghost /var/log/wtmp
412 %attr(755,root,root) /%{_lib}/security/pam_systemd.so
413 %{_mandir}/man8/pam_systemd.8*
417 %defattr(644,root,root,755)
418 %attr(755,root,root) /sbin/halt
419 %attr(755,root,root) /sbin/init
420 %attr(755,root,root) /sbin/poweroff
421 %attr(755,root,root) /sbin/reboot
422 %attr(755,root,root) /sbin/runlevel
423 %attr(755,root,root) /sbin/shutdown
424 %attr(755,root,root) /sbin/telinit
425 %{_mandir}/man1/init.1
426 %{_mandir}/man8/halt.8*
427 %{_mandir}/man8/poweroff.8
428 %{_mandir}/man8/reboot.8
429 %{_mandir}/man8/runlevel.8*
430 %{_mandir}/man8/shutdown.8*
431 %{_mandir}/man8/telinit.8*
434 %defattr(644,root,root,755)
435 %dir %{_sysconfdir}/binfmt.d
436 %dir %{_sysconfdir}/modules-load.d
437 %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/modules-load.d/modules.conf
438 %dir %{_sysconfdir}/sysctl.d
439 %dir %{_sysconfdir}/systemd
440 %dir %{_sysconfdir}/systemd/system
441 %dir %{_sysconfdir}/tmpfiles.d
442 %dir %{_libexecdir}/binfmt.d
443 %dir %{_libexecdir}/modules-load.d
444 %dir %{_libexecdir}/sysctl.d
445 %attr(755,root,root) /bin/systemctl
446 %attr(755,root,root) /bin/systemd-tmpfiles
447 %attr(755,root,root) /bin/systemd_booted
448 %{_mandir}/man1/systemctl.1*
449 %{_mandir}/man5/tmpfiles.d.5*
450 %{_mandir}/man8/systemd-tmpfiles.8*
451 %{_npkgconfigdir}/systemd.pc
453 /lib/systemd/system/*.automount
454 /lib/systemd/system/*.mount
455 /lib/systemd/system/*.path
456 /lib/systemd/system/*.service
457 /lib/systemd/system/*.socket
458 /lib/systemd/system/*.target
459 /lib/systemd/system/*.timer
460 %dir /lib/systemd/system/*.wants
461 %config(noreplace,missingok) /lib/systemd/system/*.wants/*
465 %defattr(644,root,root,755)
466 %attr(755,root,root) %{_bindir}/systemadm
467 %attr(755,root,root) %{_bindir}/systemd-gnome-ask-password-agent
468 %{_mandir}/man1/systemadm.1*
472 %defattr(644,root,root,755)
473 %attr(755,root,root) /%{_lib}/libsystemd-daemon.so.*.*.*
474 %attr(755,root,root) %ghost /%{_lib}/libsystemd-daemon.so.0
475 %attr(755,root,root) /%{_lib}/libsystemd-login.so.*.*.*
476 %attr(755,root,root) %ghost /%{_lib}/libsystemd-login.so.0
479 %defattr(644,root,root,755)
480 %attr(755,root,root) %{_libdir}/libsystemd-daemon.so
481 %attr(755,root,root) %{_libdir}/libsystemd-login.so
482 %{_includedir}/%{name}
483 %{_pkgconfigdir}/libsystemd-daemon.pc
484 %{_pkgconfigdir}/libsystemd-login.pc
486 %files -n bash-completion-systemd
487 %defattr(644,root,root,755)
488 /etc/bash_completion.d/systemctl-bash-completion.sh