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