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