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