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