5140721974dc6bd0341f506a2f944dc09aa454a0
[external/systemd.git] / packaging / systemd.spec
1 %define _sbindir /sbin
2 Name:       systemd
3 Summary:    System and Session Manager
4 Version:    43
5 Release:    1
6 Group:      System/System Control
7 License:    GPLv2
8 URL:        http://www.freedesktop.org/wiki/Software/systemd
9 Source0:    http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.xz
10 Source1:    pamconsole-tmp.conf
11 Source1001: systemd.manifest
12 Patch1:     0002-systemd-fsck-disable-l-until-linux.patch
13 Patch2:     add-tmp.mount-as-tmpfs.patch
14 Patch3:     tizen-login-location.patch
15 Patch4:     tizen-service-file-workaround.patch
16
17 BuildRequires:  pkgconfig(dbus-1) >= 1.4.0
18 BuildRequires:  pkgconfig(dbus-glib-1)
19 BuildRequires:  pkgconfig(gio-unix-2.0)
20 BuildRequires:  pkgconfig(libudev) >= 174
21 BuildRequires:  libcap-devel
22 BuildRequires:  gperf
23 BuildRequires:  libxslt
24 BuildRequires:  docbook-dtds
25 BuildRequires:  docbook-xsl
26 BuildRequires:  pam-devel
27 BuildRequires:  intltool >= 0.40.0
28 BuildRequires:  libacl-devel
29 BuildRequires:  fdupes
30 BuildRequires:  pkgconfig(libkmod)
31 Requires(post): %{_sbindir}/ldconfig
32 Requires(postun): %{_sbindir}/ldconfig
33
34 %description
35 system and session manager for Linux, compatible with SysV and
36 LSB init scripts. systemd provides aggressive parallelization
37 capabilities, uses socket and D-Bus activation for starting
38 services, offers on-demand starting of daemons, keeps track of
39 processes using Linux cgroups, supports snapshotting and restoring
40 of the system state, maintains mount and automount points and
41 implements an elaborate transactional dependency-based service
42 control logic. It can work as a drop-in replacement for sysvinit.
43
44 %package tools
45 Summary:    Analyze systemd startup timing
46 Group:      Development/Tools
47 Requires:   pycairo
48 Requires:   python-xml
49 Requires:   %{name} = %{version}-%{release}
50
51 %description tools
52 This package installs the systemd-analyze tool, which allows one to
53 inspect and graph service startup timing in table or graph format.
54
55 %package devel
56 Summary:    Development tools for systemd
57 Group:      Development/Libraries
58 Requires:   %{name} = %{version}-%{release}
59 Requires(post): %{_sbindir}/ldconfig
60 Requires(postun): %{_sbindir}/ldconfig
61
62 %description devel
63 This package includes the libraries and header files you will need
64 to compile applications for systemd.
65
66 %package console-ttyS0
67 Summary:    Systemd console ttyS0
68 Group:      System/System Control
69 Requires:   %{name}
70
71 %description console-ttyS0
72 This package will setup a serial getty for ttyS0 is desired.
73
74
75 %package console-ttyS1
76 Summary:    Systemd console ttyS1
77 Group:      System/System Control
78 Requires:   %{name}
79
80 %description console-ttyS1
81 This package will setup a serial getty for ttyS1 is desired.
82
83
84 %package console-tty01
85 Summary:    Systemd console tty01
86 Group:      System/System Control
87 Requires:   %{name}
88
89 %description console-tty01
90 This package will setup a serial getty for tty01 is desired.
91
92
93 %package console-ttyO2
94 Summary:    Systemd console ttyO2
95 Group:      System/System Control
96 Requires:   %{name}
97
98 %description console-ttyO2
99 This package will setup a serial getty for ttyO2 is desired.
100
101 %package console-ttyMFD2
102 Summary:    Systemd console ttyMFD2
103 Group:      System/System Control
104 Requires:   %{name}
105
106 %description console-ttyMFD2
107 This package will setup a serial getty for ttyMFD2 is desired.
108
109 %package console-ttySAC2
110 Summary:    Systemd console ttySAC2
111 Group:      System/System Control
112 Requires:   %{name}
113
114 %description console-ttySAC2
115 This package will setup a serial getty for ttySAC2 is desired.
116
117
118 %package docs
119 Summary:   System and session manager man pages
120 Group:     Development/Libraries
121 Requires:  %{name} = %{version}-%{release}
122
123 %description docs
124 This package includes the man pages for systemd.
125
126
127 %package sysv-docs
128 Summary:   System and session manager man pages - SysV links
129 Group:     Development/Libraries
130 Requires:  %{name} = %{version}-%{release}
131
132 %description sysv-docs
133 This package provides the manual pages needed for systemd
134 to replace sysvinit.
135
136 %package sysv
137 Summary:   System and session manager - SysV links
138 Group:     System/Startup Services
139 Requires:  %{name} = %{version}-%{release}
140 Obsoletes: sysvinit < 3.0
141 Obsoletes: sysvinit-utils < 3.0
142 Provides:  sysvinit = 3.0
143 Provides:  sysvinit-utils = 3.0
144
145
146 %description sysv
147 Systemd is a replacement for sysvinit.  It is dependency-based and
148 able to read the LSB init script headers in addition to parsing rcN.d
149 links as hints.
150
151 It also provides process supervision using cgroups and the ability to
152 not only depend on other init script being started, but also
153 availability of a given mount point or dbus service.
154
155 This package provides the links needed for systemd
156 to replace sysvinit.
157
158
159 %prep
160 %setup -q -n %{name}-%{version}
161 %patch1 -p1
162 %patch2 -p1
163 %patch3 -p1
164 %patch4 -p1
165
166 %build
167 cp %{SOURCE1001} .
168 %configure --disable-static \
169     --with-rootdir="" \
170     --with-distro=meego \
171     --disable-gtk \
172     --disable-selinux \
173     --disable-tcpwrap \
174     --enable-split-usr \
175     --enable-manpages \
176     --with-pamlibdir="/%{_libdir}/security" \
177     --with-udevrulesdir="%{_libdir}/udev/rules.d"
178
179 make %{?_smp_mflags}
180
181 %install
182 %make_install
183
184 # Create SysV compatibility symlinks. systemctl/systemd are smart
185 # enough to detect in which way they are called.
186 install -d %{buildroot}%{_sbindir}/
187 ln -s ..%{_libdir}/systemd/systemd %{buildroot}%{_sbindir}/init
188 ln -s ..%{_bindir}/systemctl %{buildroot}%{_sbindir}/halt
189 ln -s ..%{_bindir}/systemctl %{buildroot}%{_sbindir}/poweroff
190 ln -s ..%{_bindir}/systemctl %{buildroot}%{_sbindir}/reboot
191 ln -s ..%{_bindir}/systemctl %{buildroot}%{_sbindir}/runlevel
192 ln -s ..%{_bindir}/systemctl %{buildroot}%{_sbindir}/shutdown
193 ln -s ..%{_bindir}/systemctl %{buildroot}%{_sbindir}/telinit
194
195 # /usr compat - delete when no longer needed
196 install -d %{buildroot}/bin/
197 ln -s ..%{_bindir}/systemctl %{buildroot}/bin/systemctl
198
199 mkdir %{buildroot}/run
200
201 # Make sure these directories are properly owned
202 mkdir -p %{buildroot}%{_libdir}/systemd/system/basic.target.wants
203 mkdir -p %{buildroot}%{_libdir}/systemd/system/dbus.target.wants
204
205 # enable readahead by default
206 ln -s ../systemd-readahead-collect.service %{buildroot}%{_libdir}/systemd/system/sysinit.target.wants/systemd-readahead-collect.service
207 ln -s ../systemd-readahead-replay.service %{buildroot}%{_libdir}/systemd/system/sysinit.target.wants/systemd-readahead-replay.service
208
209 # Don't ship documentation in the wrong place
210 rm %{buildroot}/%{_docdir}/systemd/*
211
212 mkdir -p %{buildroot}/etc/systemd/system/basic.target.wants
213 mkdir -p %{buildroot}/etc/systemd/system/getty.target.wants
214 mkdir -p %{buildroot}%{_libdir}/systemd/system/getty.target.wants
215
216 #console-ttyMFD2
217 ln -s ../serial-getty@.service %{buildroot}%{_libdir}/systemd/system/getty.target.wants/serial-getty@ttyMFD2.service
218
219 #console-ttySAC2
220 ln -s ../serial-getty@.service %{buildroot}%{_libdir}/systemd/system/getty.target.wants/serial-getty@ttySAC2.service
221
222 #console-ttyS0
223 ln -s ../serial-getty@.service %{buildroot}%{_libdir}/systemd/system/getty.target.wants/serial-getty@ttyS0.service
224
225 #console-ttyS1
226 ln -s ../serial-getty@.service %{buildroot}%{_libdir}/systemd/system/getty.target.wants/serial-getty@ttyS1.service
227
228 #console-tty01
229 ln -s ../serial-getty@.service %{buildroot}%{_libdir}/systemd/system/getty.target.wants/serial-getty@tty01.service
230
231 #console-ttyO2
232 ln -s ../serial-getty@.service %{buildroot}%{_libdir}/systemd/system/getty.target.wants/serial-getty@ttyO2.service
233
234 %fdupes  %{buildroot}/%{_datadir}/man/
235
236 %post
237 if [ "`readlink /etc/mtab`" != "/proc/self/mounts" ]; then
238         rm -f /etc/mtab
239         ln -s /proc/self/mounts /etc/mtab
240 fi
241
242 /usr/bin/systemd-machine-id-setup >/dev/null 2>&1 || :
243
244 %{_sbindir}/ldconfig
245
246 %postun -p %{_sbindir}/ldconfig
247 %post devel -p %{_sbindir}/ldconfig
248 %postun devel -p %{_sbindir}/ldconfig
249
250
251 %files
252 %defattr(-,root,root,-)
253 %manifest systemd.manifest
254 /bin/systemctl
255 %{_bindir}/*
256 /run
257 %config %{_libdir}/sysctl.d/coredump.conf
258 %config %{_sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf
259 %config %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf
260 %config %{_sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf
261 %config %{_sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf
262 %config %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf
263 %attr(0644,root,root) %{_libdir}/udev/rules.d/70-uaccess.rules
264 %attr(0644,root,root) %{_libdir}/udev/rules.d/71-seat.rules
265 %attr(0644,root,root) %{_libdir}/udev/rules.d/73-seat-late.rules
266 %config %{_sysconfdir}/systemd
267 %config %{_sysconfdir}/xdg/systemd/user
268 %config %{_sysconfdir}/bash_completion.d/systemd-bash-completion.sh
269 %{_prefix}/%{_lib}/tmpfiles.d/*
270 %{_libdir}/systemd
271 /%{_libdir}/security/pam_systemd.so
272 %{_libdir}/udev/rules.d/99-systemd.rules
273 %{_libdir}/libsystemd-daemon.so.0
274 %{_libdir}/libsystemd-daemon.so.0.0.1
275 %{_libdir}/libsystemd-login.so.0
276 %{_libdir}/libsystemd-login.so.0.2.0
277 %{_libdir}/libsystemd-id128.so.0
278 %{_libdir}/libsystemd-id128.so.0.0.2
279 %{_libdir}/libsystemd-journal.so.0
280 %{_libdir}/libsystemd-journal.so.0.0.2
281 %{_datadir}/dbus-1/*/org.freedesktop.systemd1.*
282 %{_defaultdocdir}/systemd
283 %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
284 %{_datadir}/polkit-1/actions/org.freedesktop.locale1.policy
285 %{_datadir}/polkit-1/actions/org.freedesktop.login1.policy
286 %{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy
287 %{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy
288 %{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
289 %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service
290 %{_datadir}/dbus-1/system-services/org.freedesktop.login1.service
291 %{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
292 %{_datadir}/dbus-1/interfaces/org.freedesktop.hostname1.xml
293 %{_datadir}/dbus-1/interfaces/org.freedesktop.locale1.xml
294 %{_datadir}/dbus-1/interfaces/org.freedesktop.timedate1.xml
295 %{_mandir}/man1/*
296 %{_mandir}/man3/*
297 %{_mandir}/man5/*
298 %{_mandir}/man7/*
299 %{_mandir}/man8/*
300 %exclude %{_libdir}/systemd/system/getty.target.wants/serial-getty@tty01.service
301 %exclude %{_libdir}/systemd/system/getty.target.wants/serial-getty@ttyMFD2.service
302 %exclude %{_libdir}/systemd/system/getty.target.wants/serial-getty@ttySAC2.service
303 %exclude %{_libdir}/systemd/system/getty.target.wants/serial-getty@ttyO2.service
304 %exclude %{_libdir}/systemd/system/getty.target.wants/serial-getty@ttyS0.service
305 %exclude %{_libdir}/systemd/system/getty.target.wants/serial-getty@ttyS1.service
306 %exclude %{_libdir}/systemd/system/sysinit.target.wants/systemd-vconsole-setup.service
307 %exclude %{_libdir}/systemd/user/default.target
308
309 %files console-ttySAC2
310 %defattr(-,root,root,-)
311 %{_libdir}/systemd/system/getty.target.wants/serial-getty@ttySAC2.service
312
313 %files console-ttyMFD2
314 %defattr(-,root,root,-)
315 %{_libdir}/systemd/system/getty.target.wants/serial-getty@ttyMFD2.service
316
317 %files console-ttyS0
318 %defattr(-,root,root,-)
319 %{_libdir}/systemd/system/getty.target.wants/serial-getty@ttyS0.service
320
321 %files console-ttyS1
322 %defattr(-,root,root,-)
323 %{_libdir}/systemd/system/getty.target.wants/serial-getty@ttyS1.service
324
325 %files console-tty01
326 %defattr(-,root,root,-)
327 %{_libdir}/systemd/system/getty.target.wants/serial-getty@tty01.service
328
329 %files console-ttyO2
330 %defattr(-,root,root,-)
331 %{_libdir}/systemd/system/getty.target.wants/serial-getty@ttyO2.service
332
333
334 %files tools
335 %defattr(-,root,root,-)
336 %manifest systemd.manifest
337 %{_bindir}/systemd-analyze
338
339 %files devel
340 %defattr(-,root,root,-)
341 %manifest systemd.manifest
342 %{_datadir}/pkgconfig/systemd.pc
343 %{_includedir}/systemd/sd-daemon.h
344 %{_includedir}/systemd/sd-login.h
345 %{_includedir}/systemd/sd-id128.h
346 %{_includedir}/systemd/sd-journal.h
347 %{_includedir}/systemd/sd-messages.h
348 %{_libdir}/libsystemd-daemon.so
349 %{_libdir}/libsystemd-login.so
350 %{_libdir}/libsystemd-journal.so
351 %{_libdir}/libsystemd-id128.so
352 %{_libdir}/pkgconfig/libsystemd-daemon.pc
353 %{_libdir}/pkgconfig/libsystemd-login.pc
354 %{_libdir}/pkgconfig/libsystemd-id128.pc
355 %{_libdir}/pkgconfig/libsystemd-journal.pc
356 %{_datadir}/systemd/kbd-model-map
357
358 %files sysv
359 %defattr(-,root,root,-)
360 %doc LICENSE
361 %{_sbindir}/halt
362 %{_sbindir}/init
363 %{_sbindir}/poweroff
364 %{_sbindir}/reboot
365 %{_sbindir}/runlevel
366 %{_sbindir}/shutdown
367 %{_sbindir}/telinit