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