9 # TODO: - move %_libexecdir/tmpfiles.d/* to /etc/tmpfiles.d?
10 # - shouldn't ../bin/systemctl symlinks be absolute? -no they shouldn't (think browsing mounted as chroot and seeing all blink due invalid link targets when doing ls)
11 # - separate init subpackage (with symlink), one can switch to
12 # systemd using init=/bin/systemd with other one installed
13 # - verify %_sysconfdir usage vs literal '/etc'
16 %bcond_without audit # without audit support
17 %bcond_without cryptsetup # without cryptsetup support
18 %bcond_without gtk # build gtk tools
19 %bcond_without pam # PAM authentication support
20 %bcond_without selinux # without SELinux support
21 %bcond_without tcpd # libwrap (tcp_wrappers) support
23 Summary: A System and Service Manager
24 Summary(pl.UTF-8): systemd - zarządca systemu i usług dla Linuksa
30 Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.bz2
31 # Source0-md5: 1435f23be79c8c38d1121c6b150510f3
32 Source1: systemd-sysv-convert
33 Patch0: target-pld.patch
34 Patch1: config-pld.patch
35 URL: http://www.freedesktop.org/wiki/Software/systemd
36 %{?with_audit:BuildRequires: audit-libs-devel}
37 BuildRequires: autoconf >= 2.63
38 BuildRequires: automake >= 1:1.11
39 %{?with_cryptsetup:BuildRequires: cryptsetup-luks-devel}
40 BuildRequires: dbus-devel >= 1.3.2
41 BuildRequires: docbook-style-xsl
43 BuildRequires: glib2-devel >= 1:2.26.1
44 BuildRequires: gtk+2-devel >= 2:2.24.0
45 BuildRequires: libnotify-devel >= 0.7.0
48 BuildRequires: libcap-devel
49 %{?with_selinux:BuildRequires: libselinux-devel}
50 BuildRequires: libtool >= 2:2.2
51 %{?with_tcpd:BuildRequires: libwrap-devel}
52 BuildRequires: libxslt-progs
54 %{?with_pam:BuildRequires: pam-devel}
55 BuildRequires: pkgconfig >= 0.9.0
56 BuildRequires: rpmbuild(macros) >= 1.527
57 BuildRequires: udev-devel >= 160
58 BuildRequires: vala >= 0.10.0
59 Requires: %{name}-libs = %{version}-%{release}
60 Requires: %{name}-units = %{version}-%{release}
61 Requires: SysVinit-tools
63 Requires: dbus >= 1.3.2
64 Requires: dbus-systemd
65 # python modules required by systemd-analyze
66 Requires: filesystem >= 4.0
68 Requires: python-modules
70 Requires: setup >= 2.8.0-2
71 Requires: udev-core >= 160
72 Requires: udev-systemd
73 Suggests: ConsoleKit-systemd
74 Suggests: rsyslog-systemd
75 Suggests: udev-systemd
76 Provides: SysVinit = 2.86-26
77 Provides: readahead = 1:1.5.7-3
78 Provides: virtual(init-daemon)
79 Obsoletes: SysVinit < 2.86-26
80 Obsoletes: readahead < 1:1.5.7-3
81 Obsoletes: virtual(init-daemon)
82 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
84 %define _libexecdir %{_prefix}/lib
87 systemd is a system and service manager for Linux, compatible with
88 SysV and LSB init scripts. systemd provides aggressive parallelization
89 capabilities, uses socket and D-Bus activation for starting services,
90 offers on-demand starting of daemons, keeps track of processes using
91 Linux cgroups, supports snapshotting and restoring of the system
92 state, maintains mount and automount points and implements an
93 elaborate transactional dependency-based service control logic. It can
94 work as a drop-in replacement for sysvinit.
96 %description -l pl.UTF-8
97 systemd jest zarządcą systemu i usług dla Linuksa, kompatybilny ze
98 skryptami SysV i LSB. systemd udostępnia rozbudowane zdolności
99 paralelizacji, do uruchamiania usług używa socketów oraz D-Busa,
100 oferuje uruchamianie usług na życzenie, monitoruje procesy używając
101 linuksowych cgroups, wspomaga zapisywanie (snapshot) i odczytywanie
102 (restore) stanu systemu, zarządza (auto)mount pointami oraz
103 implementuje starannie opracowaną transakcjonalną, bazującą na
104 zależnościach logikę kontroli usług. Może pracować jako zastępca dla
108 Summary: Configuration files, directories and installation tool for systemd
110 Requires(post): coreutils
115 Basic configuration files, directories and installation tool for the
116 systemd system and service manager.
119 Summary: Graphical frontend for systemd
121 Requires: %{name} = %{version}-%{release}
125 Graphical front-end for systemd.
127 %package -n bash-completion-systemd
128 Summary: bash-completion for systemd
129 Group: Applications/Shells
131 Requires: bash-completion
133 %description -n bash-completion-systemd
134 bash-completion for systemd.
137 Summary: Shared systemd library
141 Shared systemd library.
144 Summary: Header files for systemd libraries
145 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek systemd
146 Group: Development/Libraries
147 Requires: %{name}-libs = %{version}-%{release}
150 Header files for systemd libraries.
152 %description devel -l pl.UTF-8
153 Pliki nagłówkowe bibliotek systemd.
166 %{__enable_disable audit} \
167 %{__enable_disable cryptsetup libcryptsetup} \
168 %{__enable_disable gtk} \
169 %{__enable_disable pam} \
170 %{__enable_disable selinux} \
171 %{__enable_disable tcpd tcpwrap} \
172 --disable-silent-rules \
179 rm -rf $RPM_BUILD_ROOT
182 DESTDIR=$RPM_BUILD_ROOT
184 for lib in libsystemd-daemon libsystemd-login; do
185 %{__mv} $RPM_BUILD_ROOT{%{_libdir}/$lib.so.*,/%{_lib}}
186 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/$lib.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/$lib.so
189 # Create SysV compatibility symlinks. systemctl/systemd are smart
190 # enough to detect in which way they are called.
191 install -d $RPM_BUILD_ROOT/sbin
192 ln -s ../bin/systemd $RPM_BUILD_ROOT/sbin/init
193 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/halt
194 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/poweroff
195 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/reboot
196 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/runlevel
197 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/shutdown
198 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/telinit
200 ln -s ../modules $RPM_BUILD_ROOT%{_sysconfdir}/modules-load.d/modules.conf
202 # We create all wants links manually at installation time to make sure
203 # they are not owned and hence overriden by rpm after the used deleted
205 %{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/*.target.wants
207 # do not cover /media (system-specific removable mountpoints) for now
208 # needs %post code to convert existing /media structure to tmpfiles
209 %{__rm} -f $RPM_BUILD_ROOT/lib/systemd/local-fs.target.wants/media.mount
210 # do not cover /var/run until packages need rpm-provided-only subdirectories
211 %{__rm} -f $RPM_BUILD_ROOT/lib/systemd/local-fs.target.wants/var-run.mount
213 # Make sure these directories are properly owned
214 install -d $RPM_BUILD_ROOT/lib/systemd/system/{basic,dbus,default,halt,kexec,poweroff,reboot,syslog}.target.wants
216 # Create new-style configuration files so that we can ghost-own them
217 touch $RPM_BUILD_ROOT%{_sysconfdir}/{hostname,locale.conf,machine-id,machine-info,os-release,timezone,vconsole.conf}
219 # Install SysV conversion tool for systemd
220 install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir}/
222 install -d $RPM_BUILD_ROOT/var/log
223 > $RPM_BUILD_ROOT/var/log/btmp
224 > $RPM_BUILD_ROOT/var/log/wtmp
227 # to shut up check-files
228 rm -f $RPM_BUILD_ROOT%{_bindir}/systemadm
229 rm -f $RPM_BUILD_ROOT%{_bindir}/systemd-gnome-ask-password-agent
230 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/systemadm.1*
233 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
234 %{__rm} $RPM_BUILD_ROOT/%{_lib}/security/pam_systemd.la
235 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
238 rm -rf $RPM_BUILD_ROOT
241 /bin/systemd-machine-id-setup > /dev/null 2>&1 || :
242 /bin/systemctl daemon-reexec > /dev/null 2>&1 || :
245 if [ $1 -ge 1 ]; then
246 /bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
249 %post libs -p /sbin/ldconfig
250 %postun libs -p /sbin/ldconfig
253 if [ $1 -eq 1 ]; then
254 # Try to read default runlevel from the old inittab if it exists
255 runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
256 if [ -z "$runlevel" ] ; then
257 target="/lib/systemd/system/graphical.target"
259 target="/lib/systemd/system/runlevel$runlevel.target"
262 # And symlink what we found to the new-style default.target
263 ln -sf "$target" /etc/systemd/system/default.target >/dev/null 2>&1 || :
265 # Enable the services we install by default.
266 /bin/systemctl enable \
269 systemd-readahead-replay.service \
270 systemd-readahead-collect.service >/dev/null 2>&1 || :
274 if [ $1 -eq 0 ] ; then
275 /bin/systemctl disable \
278 systemd-readahead-replay.service \
279 systemd-readahead-collect.service >/dev/null 2>&1 || :
281 %{__rm} -f /etc/systemd/system/default.target >/dev/null 2>&1 || :
285 if [ $1 -ge 1 ]; then
286 /bin/systemctl daemon-reload > /dev/null 2>&1 || :
290 %defattr(644,root,root,755)
291 %doc DISTRO_PORTING README TODO
292 /etc/dbus-1/system.d/org.freedesktop.hostname1.conf
293 /etc/dbus-1/system.d/org.freedesktop.locale1.conf
294 /etc/dbus-1/system.d/org.freedesktop.login1.conf
295 /etc/dbus-1/system.d/org.freedesktop.systemd1.conf
296 /etc/dbus-1/system.d/org.freedesktop.timedate1.conf
297 %ghost %config(noreplace) %{_sysconfdir}/machine-id
298 %dir %{_sysconfdir}/systemd
299 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemd/*.conf
301 %attr(755,root,root) /bin/systemd
302 %attr(755,root,root) /bin/systemd-ask-password
303 %attr(755,root,root) /bin/systemd-loginctl
304 %attr(755,root,root) /bin/systemd-machine-id-setup
305 %attr(755,root,root) /bin/systemd-notify
306 %attr(755,root,root) /bin/systemd-tty-ask-password-agent
307 %attr(755,root,root) %{_bindir}/systemd-analyze
308 %attr(755,root,root) %{_bindir}/systemd-cgls
309 %attr(755,root,root) %{_bindir}/systemd-nspawn
310 %attr(755,root,root) %{_bindir}/systemd-sysv-convert
311 %attr(755,root,root) %{_bindir}/systemd-stdio-bridge
312 %attr(755,root,root) /sbin/halt
313 %attr(755,root,root) /sbin/init
314 %attr(755,root,root) /sbin/poweroff
315 %attr(755,root,root) /sbin/reboot
316 %attr(755,root,root) /sbin/runlevel
317 %attr(755,root,root) /sbin/shutdown
318 %attr(755,root,root) /sbin/telinit
319 %attr(755,root,root) /lib/systemd/systemd-*
320 %dir /lib/systemd/system-generators
321 %attr(755,root,root) /lib/systemd/system-generators/systemd-*-generator
322 %dir /lib/systemd/system-shutdown
323 /lib/udev/rules.d/99-systemd.rules
324 /lib/udev/rules.d/70-uaccess.rules
325 /lib/udev/rules.d/71-seat.rules
326 /lib/udev/rules.d/73-seat-late.rules
327 %dir %{_libexecdir}/systemd
328 %{_libexecdir}/systemd/user
329 %config(noreplace,missingok) %{_libexecdir}/tmpfiles.d/*.conf
330 %{_datadir}/dbus-1/interfaces/org.freedesktop.hostname1.xml
331 %{_datadir}/dbus-1/interfaces/org.freedesktop.locale1.xml
332 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.*.xml
333 %{_datadir}/dbus-1/interfaces/org.freedesktop.timedate1.xml
334 %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
335 %{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
336 %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service
337 %{_datadir}/dbus-1/system-services/org.freedesktop.login1.service
338 %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
339 %{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
340 %{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy
341 %{_datadir}/polkit-1/actions/org.freedesktop.locale1.policy
342 %{_datadir}/polkit-1/actions/org.freedesktop.login1.policy
343 %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
344 %{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy
345 %dir %{_datadir}/systemd
346 %{_datadir}/systemd/kbd-model-map
347 %{_mandir}/man1/init.1
348 %{_mandir}/man1/systemd.1*
349 %{_mandir}/man1/systemd-ask-password.1*
350 %{_mandir}/man1/systemd-cgls.1*
351 %{_mandir}/man1/systemd-notify.1*
352 %{_mandir}/man1/systemd-nspawn.1*
353 %{_mandir}/man1/systemd-loginctl.1*
354 %{_mandir}/man3/sd_booted.3*
355 %{_mandir}/man3/sd_is_fifo.3*
356 %{_mandir}/man3/sd_is_socket.3
357 %{_mandir}/man3/sd_is_socket_inet.3
358 %{_mandir}/man3/sd_is_socket_unix.3
359 %{_mandir}/man3/sd_listen_fds.3*
360 %{_mandir}/man3/sd_notify.3*
361 %{_mandir}/man3/sd_notifyf.3
362 %{_mandir}/man3/sd_readahead.3*
363 %{_mandir}/man5/binfmt.d.5*
364 %{_mandir}/man5/hostname.5*
365 %{_mandir}/man5/locale.conf.5*
366 %{_mandir}/man5/machine-id.5*
367 %{_mandir}/man5/machine-info.5*
368 %{_mandir}/man5/modules-load.d.5*
369 %{_mandir}/man5/os-release.5*
370 %{_mandir}/man5/sysctl.d.5*
371 %{_mandir}/man5/systemd.*.5*
372 %{_mandir}/man5/systemd-logind.conf.5*
373 %{_mandir}/man5/timezone.5*
374 %{_mandir}/man5/vconsole.conf.5*
375 %{_mandir}/man7/daemon.7*
376 %{_mandir}/man7/sd-daemon.7*
377 %{_mandir}/man7/sd-readahead.7*
378 %{_mandir}/man7/systemd.special.7*
379 %{_mandir}/man8/halt.8*
380 %{_mandir}/man8/poweroff.8
381 %{_mandir}/man8/reboot.8
382 %{_mandir}/man8/runlevel.8*
383 %{_mandir}/man8/shutdown.8*
384 %{_mandir}/man8/telinit.8*
385 %attr(640,root,root) %ghost /var/log/btmp
386 %attr(664,root,utmp) %ghost /var/log/wtmp
389 %attr(755,root,root) /%{_lib}/security/pam_systemd.so
390 %{_mandir}/man8/pam_systemd.8*
394 %defattr(644,root,root,755)
395 %attr(755,root,root) /%{_lib}/libsystemd-daemon.so.*.*.*
396 %attr(755,root,root) %ghost /%{_lib}/libsystemd-daemon.so.0
397 %attr(755,root,root) /%{_lib}/libsystemd-login.so.*.*.*
398 %attr(755,root,root) %ghost /%{_lib}/libsystemd-login.so.0
401 %defattr(644,root,root,755)
402 %dir %{_sysconfdir}/binfmt.d
403 %dir %{_sysconfdir}/modules-load.d
404 %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/modules-load.d/modules.conf
405 %dir %{_sysconfdir}/sysctl.d
406 %dir %{_sysconfdir}/systemd
407 %dir %{_sysconfdir}/systemd/system
408 %dir %{_sysconfdir}/tmpfiles.d
409 %dir %{_libexecdir}/binfmt.d
410 %dir %{_libexecdir}/modules-load.d
411 %dir %{_libexecdir}/sysctl.d
412 %attr(755,root,root) /bin/systemctl
413 %attr(755,root,root) /bin/systemd-tmpfiles
414 %{_mandir}/man1/systemctl.1*
415 %{_mandir}/man5/tmpfiles.d.5*
416 %{_mandir}/man8/systemd-tmpfiles.8*
417 %{_npkgconfigdir}/systemd.pc
421 %defattr(644,root,root,755)
422 %attr(755,root,root) %{_bindir}/systemadm
423 %attr(755,root,root) %{_bindir}/systemd-gnome-ask-password-agent
424 %{_mandir}/man1/systemadm.1*
427 %files -n bash-completion-systemd
428 %defattr(644,root,root,755)
429 /etc/bash_completion.d/systemctl-bash-completion.sh
432 %defattr(644,root,root,755)
433 %{_includedir}/systemd
434 %attr(755,root,root) %{_libdir}/libsystemd-daemon.so
435 %attr(755,root,root) %{_libdir}/libsystemd-login.so
436 %{_pkgconfigdir}/libsystemd-daemon.pc
437 %{_pkgconfigdir}/libsystemd-login.pc