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