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