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