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