]> git.pld-linux.org Git - packages/systemd.git/blame_incremental - systemd.spec
- systemd-init R: systemd (no strict EVR as there are symlinks only),
[packages/systemd.git] / systemd.spec
... / ...
CommitLineData
1#
2# Conditional build:
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
9
10Summary: A System and Service Manager
11Summary(pl.UTF-8): systemd - zarządca systemu i usług dla Linuksa
12Name: systemd
13Version: 37
14Release: 3
15License: GPL v2+
16Group: Base
17Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.bz2
18# Source0-md5: 1435f23be79c8c38d1121c6b150510f3
19Source1: %{name}-sysv-convert
20Source2: systemd_booted.c
21Patch0: target-pld.patch
22Patch1: config-pld.patch
23Patch2: shut-sysv-up.patch
24URL: http://www.freedesktop.org/wiki/Software/systemd
25%{?with_audit:BuildRequires: audit-libs-devel}
26BuildRequires: autoconf >= 2.63
27BuildRequires: automake >= 1:1.11
28%{?with_cryptsetup:BuildRequires: cryptsetup-luks-devel}
29BuildRequires: dbus-devel >= 1.3.2
30BuildRequires: docbook-style-xsl
31%if %{with gtk}
32BuildRequires: glib2-devel >= 1:2.26.1
33BuildRequires: gtk+2-devel >= 2:2.24.0
34BuildRequires: libnotify-devel >= 0.7.0
35%endif
36BuildRequires: gperf
37BuildRequires: libcap-devel
38%{?with_selinux:BuildRequires: libselinux-devel}
39BuildRequires: libtool >= 2:2.2
40%{?with_tcpd:BuildRequires: libwrap-devel}
41BuildRequires: libxslt-progs
42BuildRequires: m4
43%{?with_pam:BuildRequires: pam-devel}
44BuildRequires: pkgconfig >= 0.9.0
45BuildRequires: rpmbuild(macros) >= 1.527
46BuildRequires: udev-devel >= 172
47BuildRequires: vala >= 0.10.0
48Requires: %{name}-libs = %{version}-%{release}
49Requires: %{name}-units = %{version}-%{release}
50Requires: SysVinit-tools
51Requires: agetty
52Requires: dbus >= 1.3.2
53Requires: dbus-systemd
54Requires: filesystem >= 4.0
55Requires: rc-scripts
56Requires: setup >= 2.8.0-2
57Requires: udev-core >= 1:172
58Requires: udev-systemd >= 1:172
59Requires: udev-libs >= 1:172
60Suggests: ConsoleKit-systemd
61Suggests: fsck >= 2.20
62# python modules required by systemd-analyze
63Suggests: python-dbus
64Suggests: python-modules
65Suggests: rsyslog-systemd
66Provides: udev-acl
67BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68
69%define _libexecdir %{_prefix}/lib
70
71%description
72systemd is a system and service manager for Linux, compatible with
73SysV and LSB init scripts. systemd provides aggressive parallelization
74capabilities, uses socket and D-Bus activation for starting services,
75offers on-demand starting of daemons, keeps track of processes using
76Linux cgroups, supports snapshotting and restoring of the system
77state, maintains mount and automount points and implements an
78elaborate transactional dependency-based service control logic. It can
79work as a drop-in replacement for sysvinit.
80
81%description -l pl.UTF-8
82systemd jest zarządcą systemu i usług dla Linuksa, kompatybilny ze
83skryptami SysV i LSB. systemd udostępnia rozbudowane zdolności
84paralelizacji, do uruchamiania usług używa socketów oraz D-Busa,
85oferuje uruchamianie usług na życzenie, monitoruje procesy używając
86linuksowych cgroups, wspomaga zapisywanie (snapshot) i odczytywanie
87(restore) stanu systemu, zarządza (auto)mount pointami oraz
88implementuje starannie opracowaną transakcjonalną, bazującą na
89zależnościach logikę kontroli usług. Może pracować jako zastępca dla
90sysvinit.
91
92%package init
93Summary: systemd /sbin/init and LSB/SysV compatibility symlinks
94Group: Base
95Requires: systemd
96Provides: readahead = 1:1.5.7-3
97Provides: virtual(init-daemon)
98Obsoletes: SysVinit
99Obsoletes: readahead < 1:1.5.7-3
100Obsoletes: virtual(init-daemon)
101
102%description init
103Install this package when you are ready to final switch to systemd.
104
105%package units
106Summary: Configuration files, directories and installation tool for systemd
107Group: Base
108Requires(post): coreutils
109Requires(post): gawk
110Requires: pkgconfig
111
112%description units
113Basic configuration files, directories and installation tool for the
114systemd system and service manager.
115
116This is common config, use %{_sysconfdir}/systemd/system to override.
117
118%package gtk
119Summary: Graphical frontend for systemd
120Group: Base
121Requires: %{name} = %{version}-%{release}
122Requires: polkit
123
124%description gtk
125Graphical front-end for systemd.
126
127%package -n bash-completion-systemd
128Summary: bash-completion for systemd
129Group: Applications/Shells
130Requires: %{name}
131Requires: bash-completion
132
133%description -n bash-completion-systemd
134bash-completion for systemd.
135
136%package libs
137Summary: Shared systemd library
138Group: Libraries
139
140%description libs
141Shared systemd library.
142
143%package devel
144Summary: Header files for systemd libraries
145Summary(pl.UTF-8): Pliki nagłówkowe bibliotek systemd
146Group: Development/Libraries
147Requires: %{name}-libs = %{version}-%{release}
148
149%description devel
150Header files for systemd libraries.
151
152%description devel -l pl.UTF-8
153Pliki nagłówkowe bibliotek systemd.
154
155%prep
156%setup -q
157%patch0 -p1
158%patch1 -p1
159%patch2 -p1
160cp -p %{SOURCE2} src/systemd_booted.c
161
162%build
163%{__aclocal} -I m4
164%{__autoconf}
165%{__autoheader}
166%{__automake}
167%configure \
168 %{__enable_disable audit} \
169 %{__enable_disable cryptsetup libcryptsetup} \
170 %{__enable_disable gtk} \
171 %{__enable_disable pam} \
172 %{__enable_disable selinux} \
173 %{__enable_disable tcpd tcpwrap} \
174 --disable-silent-rules \
175 --disable-static \
176 --with-rootdir=
177
178%{__make}
179./libtool --mode=link --tag=CC %{__cc} %{rpmcppflags} %{rpmcflags} -o systemd_booted %{rpmldflags} src/systemd_booted.c -L. -lsystemd-daemon
180
181%install
182rm -rf $RPM_BUILD_ROOT
183
184%{__make} install \
185 DESTDIR=$RPM_BUILD_ROOT
186
187./libtool --mode=install install -m755 systemd_booted $RPM_BUILD_ROOT/bin/systemd_booted
188
189for lib in libsystemd-daemon libsystemd-login; do
190 %{__mv} $RPM_BUILD_ROOT{%{_libdir}/$lib.so.*,/%{_lib}}
191 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/$lib.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/$lib.so
192done
193
194# Create SysV compatibility symlinks. systemctl/systemd are smart
195# enough to detect the way they were called
196install -d $RPM_BUILD_ROOT/sbin
197ln -s ../bin/systemd $RPM_BUILD_ROOT/sbin/init
198ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/halt
199ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/poweroff
200ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/reboot
201ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/runlevel
202ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/shutdown
203ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/telinit
204
205ln -s ../modules $RPM_BUILD_ROOT%{_sysconfdir}/modules-load.d/modules.conf
206
207# All wants links are created at %post to make sure they are not owned
208# and hence overriden by rpm if the user deletes them (missingok?)
209%{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/*.target.wants
210
211# do not cover /media (system-specific removable mountpoints) for now
212# needs %post code to convert existing /media structure to tmpfiles
213%{__rm} -f $RPM_BUILD_ROOT/lib/systemd/local-fs.target.wants/media.mount
214# do not cover /var/run until packages need rpm-provided-only subdirectories
215%{__rm} -f $RPM_BUILD_ROOT/lib/systemd/local-fs.target.wants/var-run.mount
216
217# Make sure these directories are properly owned:
218# - halt,kexec,poweroff,reboot: generic ones used by ConsoleKit-systemd,
219# - syslog _might_ be used by some syslog implementation (none for now),
220# - isn't dbus populated by dbus-systemd only (so to be moved there)?
221install -d $RPM_BUILD_ROOT/lib/systemd/system/{dbus,halt,kexec,poweroff,reboot,syslog}.target.wants
222
223# Create new-style configuration files so that we can ghost-own them
224touch $RPM_BUILD_ROOT%{_sysconfdir}/{hostname,locale.conf,machine-id,machine-info,os-release,timezone,vconsole.conf}
225
226# Install SysV conversion tool for systemd
227install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
228
229install -d $RPM_BUILD_ROOT/var/log
230> $RPM_BUILD_ROOT/var/log/btmp
231> $RPM_BUILD_ROOT/var/log/wtmp
232
233%if %{without gtk}
234%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/systemadm.1*
235%endif
236
237%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
238%{__rm} $RPM_BUILD_ROOT/%{_lib}/security/pam_systemd.la
239%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
240
241%clean
242rm -rf $RPM_BUILD_ROOT
243
244%post
245/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
246/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
247
248%postun
249if [ $1 -ge 1 ]; then
250 /bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
251fi
252
253%post libs -p /sbin/ldconfig
254%postun libs -p /sbin/ldconfig
255
256%post units
257if [ $1 -eq 1 ]; then
258 # Try to read default runlevel from the old inittab if it exists
259 runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
260 if [ -z "$runlevel" ] ; then
261 target="/lib/systemd/system/graphical.target"
262 else
263 target="/lib/systemd/system/runlevel$runlevel.target"
264 fi
265
266 # And symlink what we found to the new-style default.target
267 ln -s "$target" %{_sysconfdir}/systemd/system/default.target >/dev/null 2>&1 || :
268
269 # Enable the services we install by default.
270 /bin/systemctl enable \
271 getty@.service \
272 remote-fs.target \
273 systemd-readahead-replay.service \
274 systemd-readahead-collect.service >/dev/null 2>&1 || :
275fi
276
277%preun units
278if [ $1 -eq 0 ] ; then
279 /bin/systemctl disable \
280 getty@.service \
281 remote-fs.target \
282 systemd-readahead-replay.service \
283 systemd-readahead-collect.service >/dev/null 2>&1 || :
284
285 %{__rm} -f %{_sysconfdir}/systemd/system/default.target >/dev/null 2>&1 || :
286fi
287
288%postun units
289if [ $1 -ge 1 ]; then
290 /bin/systemctl daemon-reload > /dev/null 2>&1 || :
291fi
292
293%files
294%defattr(644,root,root,755)
295%doc DISTRO_PORTING README TODO
296/etc/dbus-1/system.d/org.freedesktop.hostname1.conf
297/etc/dbus-1/system.d/org.freedesktop.locale1.conf
298/etc/dbus-1/system.d/org.freedesktop.login1.conf
299/etc/dbus-1/system.d/org.freedesktop.systemd1.conf
300/etc/dbus-1/system.d/org.freedesktop.timedate1.conf
301%ghost %config(noreplace) %{_sysconfdir}/machine-id
302%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hostname
303%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/locale.conf
304%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/machine-info
305%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/os-release
306%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/timezone
307%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vconsole.conf
308%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemd/*.conf
309%dir %{_sysconfdir}/systemd/user
310/etc/xdg/systemd
311%attr(755,root,root) /bin/systemd
312%attr(755,root,root) /bin/systemd-ask-password
313%attr(755,root,root) /bin/systemd-loginctl
314%attr(755,root,root) /bin/systemd-machine-id-setup
315%attr(755,root,root) /bin/systemd-notify
316%attr(755,root,root) /bin/systemd-tty-ask-password-agent
317%attr(755,root,root) %{_bindir}/systemd-analyze
318%attr(755,root,root) %{_bindir}/systemd-cgls
319%attr(755,root,root) %{_bindir}/systemd-nspawn
320%attr(755,root,root) %{_bindir}/systemd-stdio-bridge
321%attr(755,root,root) %{_bindir}/systemd-sysv-convert
322%attr(755,root,root) /lib/systemd/systemd-*
323%dir /lib/systemd/system-generators
324%attr(755,root,root) /lib/systemd/system-generators/systemd-*-generator
325%dir /lib/systemd/system-shutdown
326/lib/udev/rules.d/99-systemd.rules
327/lib/udev/rules.d/70-uaccess.rules
328/lib/udev/rules.d/71-seat.rules
329/lib/udev/rules.d/73-seat-late.rules
330%dir %{_libexecdir}/systemd
331%{_libexecdir}/systemd/user
332%dir %{_libexecdir}/systemd/user-generators
333%config(noreplace,missingok) %{_libexecdir}/tmpfiles.d/*.conf
334%{_datadir}/dbus-1/interfaces/org.freedesktop.hostname1.xml
335%{_datadir}/dbus-1/interfaces/org.freedesktop.locale1.xml
336%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.*.xml
337%{_datadir}/dbus-1/interfaces/org.freedesktop.timedate1.xml
338%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
339%{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
340%{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service
341%{_datadir}/dbus-1/system-services/org.freedesktop.login1.service
342%{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
343%{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
344%{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy
345%{_datadir}/polkit-1/actions/org.freedesktop.locale1.policy
346%{_datadir}/polkit-1/actions/org.freedesktop.login1.policy
347%{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
348%{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy
349%dir %{_datadir}/systemd
350%{_datadir}/systemd/kbd-model-map
351%{_mandir}/man1/systemd.1*
352%{_mandir}/man1/systemd-*.1*
353%{_mandir}/man3/sd_booted.3*
354%{_mandir}/man3/sd_is_fifo.3*
355%{_mandir}/man3/sd_is_socket.3
356%{_mandir}/man3/sd_is_socket_inet.3
357%{_mandir}/man3/sd_is_socket_unix.3
358%{_mandir}/man3/sd_listen_fds.3*
359%{_mandir}/man3/sd_notify.3*
360%{_mandir}/man3/sd_notifyf.3
361%{_mandir}/man3/sd_readahead.3*
362%{_mandir}/man5/binfmt.d.5*
363%{_mandir}/man5/hostname.5*
364%{_mandir}/man5/locale.conf.5*
365%{_mandir}/man5/machine-id.5*
366%{_mandir}/man5/machine-info.5*
367%{_mandir}/man5/modules-load.d.5*
368%{_mandir}/man5/os-release.5*
369%{_mandir}/man5/sysctl.d.5*
370%{_mandir}/man5/systemd.*.5*
371%{_mandir}/man5/systemd-logind.conf.5*
372%{_mandir}/man5/timezone.5*
373%{_mandir}/man5/vconsole.conf.5*
374%{_mandir}/man7/daemon.7*
375%{_mandir}/man7/sd-daemon.7*
376%{_mandir}/man7/sd-readahead.7*
377%{_mandir}/man7/systemd.special.7*
378%attr(640,root,root) %ghost /var/log/btmp
379%attr(664,root,utmp) %ghost /var/log/wtmp
380
381%if %{with pam}
382%attr(755,root,root) /%{_lib}/security/pam_systemd.so
383%{_mandir}/man8/pam_systemd.8*
384%endif
385
386%files init
387%attr(755,root,root) /sbin/halt
388%attr(755,root,root) /sbin/init
389%attr(755,root,root) /sbin/poweroff
390%attr(755,root,root) /sbin/reboot
391%attr(755,root,root) /sbin/runlevel
392%attr(755,root,root) /sbin/shutdown
393%attr(755,root,root) /sbin/telinit
394%{_mandir}/man1/init.1
395%{_mandir}/man8/halt.8*
396%{_mandir}/man8/poweroff.8
397%{_mandir}/man8/reboot.8
398%{_mandir}/man8/runlevel.8*
399%{_mandir}/man8/shutdown.8*
400%{_mandir}/man8/telinit.8*
401
402%files libs
403%defattr(644,root,root,755)
404%attr(755,root,root) /%{_lib}/libsystemd-daemon.so.*.*.*
405%attr(755,root,root) %ghost /%{_lib}/libsystemd-daemon.so.0
406%attr(755,root,root) /%{_lib}/libsystemd-login.so.*.*.*
407%attr(755,root,root) %ghost /%{_lib}/libsystemd-login.so.0
408
409%files units
410%defattr(644,root,root,755)
411%dir %{_sysconfdir}/binfmt.d
412%dir %{_sysconfdir}/modules-load.d
413%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/modules-load.d/modules.conf
414%dir %{_sysconfdir}/sysctl.d
415%dir %{_sysconfdir}/systemd
416%dir %{_sysconfdir}/systemd/system
417%dir %{_sysconfdir}/tmpfiles.d
418%dir %{_libexecdir}/binfmt.d
419%dir %{_libexecdir}/modules-load.d
420%dir %{_libexecdir}/sysctl.d
421%attr(755,root,root) /bin/systemctl
422%attr(755,root,root) /bin/systemd-tmpfiles
423%attr(755,root,root) /bin/systemd_booted
424%{_mandir}/man1/systemctl.1*
425%{_mandir}/man5/tmpfiles.d.5*
426%{_mandir}/man8/systemd-tmpfiles.8*
427%{_npkgconfigdir}/systemd.pc
428
429/lib/systemd/system/*.automount
430/lib/systemd/system/*.mount
431/lib/systemd/system/*.path
432/lib/systemd/system/*.service
433/lib/systemd/system/*.socket
434/lib/systemd/system/*.target
435/lib/systemd/system/*.timer
436%dir /lib/systemd/system/*.wants
437%config(noreplace,missingok) /lib/systemd/system/*.wants/*
438
439%if %{with gtk}
440%files gtk
441%defattr(644,root,root,755)
442%attr(755,root,root) %{_bindir}/systemadm
443%attr(755,root,root) %{_bindir}/systemd-gnome-ask-password-agent
444%{_mandir}/man1/systemadm.1*
445%endif
446
447%files -n bash-completion-systemd
448%defattr(644,root,root,755)
449/etc/bash_completion.d/systemctl-bash-completion.sh
450
451%files devel
452%defattr(644,root,root,755)
453%{_includedir}/%{name}
454%attr(755,root,root) %{_libdir}/libsystemd-daemon.so
455%attr(755,root,root) %{_libdir}/libsystemd-login.so
456%{_pkgconfigdir}/libsystemd-daemon.pc
457%{_pkgconfigdir}/libsystemd-login.pc
This page took 0.029921 seconds and 4 git commands to generate.