]>
Commit | Line | Data |
---|---|---|
9c4bd736 | 1 | # |
c3037397 | 2 | # Conditional build: |
6e34428f | 3 | %bcond_without gtk # build gtk tools (needs devel libnotify>=0.7 and gtk+2) |
6c89bbd4 ER |
4 | %bcond_without selinux # without SELinux support |
5 | %bcond_without tcpd # libwrap (tcp_wrappers) support | |
6e34428f | 6 | %bcond_without pam # PAM authentication support |
6c89bbd4 ER |
7 | %bcond_without audit # without audit support |
8 | %bcond_without cryptsetup # without cryptsetup support | |
9c0b975d | 9 | |
c3037397 | 10 | Summary: A System and Service Manager |
ede8d3e5 | 11 | Summary(pl.UTF-8): systemd - zarządca systemu i usług dla Linuksa |
12 | Name: systemd | |
6e34428f | 13 | Version: 26 |
ede8d3e5 | 14 | Release: 0.1 |
15 | License: GPL v2+ | |
16 | Group: Base | |
17 | Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.bz2 | |
6e34428f | 18 | # Source0-md5: b7c468aa400c64d02d533eba6359e283 |
7619c097 ER |
19 | Patch0: target-pld.patch |
20 | Patch1: pld-port.patch | |
ede8d3e5 | 21 | URL: http://www.freedesktop.org/wiki/Software/systemd |
6c89bbd4 | 22 | %{?with_audit:BuildRequires: audit-libs-devel} |
6e34428f MB |
23 | BuildRequires: autoconf >= 2.63 |
24 | BuildRequires: automake >= 1:1.11 | |
25 | %{?with_cryptsetup:BuildRequires: cryptsetup-luks-devel} | |
9c0b975d | 26 | BuildRequires: dbus-devel |
c3037397 | 27 | BuildRequires: docbook-style-xsl |
6e34428f MB |
28 | %{?with_gtk:BuildRequires: glib2-devel >= 1:2.26.1} |
29 | %{?with_gtk:BuildRequires: gtk+2-devel >= 2:2.24.0} | |
b82d0bf2 | 30 | BuildRequires: libcap-devel |
6e34428f | 31 | %{?with_gtk:BuildRequires: libnotify-devel >= 0.7.0} |
6c89bbd4 ER |
32 | %{?with_selinux:BuildRequires: libselinux-devel} |
33 | BuildRequires: libtool >= 2:2.2 | |
34 | %{?with_tcpd:BuildRequires: libwrap-devel} | |
6e34428f MB |
35 | BuildRequires: m4 |
36 | BuildRequires: libxslt-progs | |
6c89bbd4 | 37 | %{?with_pam:BuildRequires: pam-devel} |
c3037397 | 38 | BuildRequires: pkgconfig |
6c89bbd4 | 39 | BuildRequires: rpmbuild(macros) >= 1.527 |
ede8d3e5 | 40 | BuildRequires: udev-devel >= 160 |
6e34428f | 41 | BuildRequires: vala >= 0.10.0 |
c3037397 ER |
42 | Requires: %{name}-units = %{version}-%{release} |
43 | Requires: dbus >= 1.3.2 | |
44 | Requires: rc-scripts | |
45 | Requires: udev-core >= 160 | |
b8651d75 | 46 | Provides: SysVinit = 2.86-23 |
c3037397 | 47 | Provides: readahead = 1:1.5.7-3 |
1dcb74bb | 48 | Provides: virtual(init-daemon) |
c3037397 ER |
49 | Obsoletes: SysVinit < 2.86-23 |
50 | Obsoletes: readahead < 1:1.5.7-3 | |
1dcb74bb | 51 | Obsoletes: virtual(init-daemon) |
ede8d3e5 | 52 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
53 | ||
54 | %description | |
1c239f8b | 55 | systemd is a system and service manager for Linux, compatible with |
ede8d3e5 | 56 | SysV and LSB init scripts. systemd provides aggressive parallelization |
57 | capabilities, uses socket and D-Bus activation for starting services, | |
58 | offers on-demand starting of daemons, keeps track of processes using | |
59 | Linux cgroups, supports snapshotting and restoring of the system | |
60 | state, maintains mount and automount points and implements an | |
61 | elaborate transactional dependency-based service control logic. It can | |
1c239f8b | 62 | work as a drop-in replacement for sysvinit. |
ede8d3e5 | 63 | |
64 | %description -l pl.UTF-8 | |
65 | systemd jest zarządcą systemu i usług dla Linuksa, kompatybilny ze | |
66 | skryptami SysV i LSB. systemd udostępnia rozbudowane zdolności | |
67 | paralelizacji, do uruchamiania usług używa socketów oraz D-Busa, | |
68 | oferuje uruchamianie usług na życzenie, monitoruje procesy używając | |
69 | linuksowych cgroups, wspomaga zapisywanie (snapshot) i odczytywanie | |
70 | (restore) stanu systemu, zarządza (auto)mount pointami oraz | |
71 | implementuje starannie opracowaną transakcjonalną, bazującą na | |
d45dfc3a | 72 | zależnościach logikę kontroli usług. Może pracować jako zastępca dla |
ede8d3e5 | 73 | sysvinit. |
74 | ||
c3037397 ER |
75 | %package units |
76 | Summary: Configuration files, directories and installation tool for systemd | |
77 | Group: Base | |
78 | Requires: pkgconfig | |
79 | Requires(post): coreutils | |
80 | Requires(post): gawk | |
81 | ||
82 | %description units | |
83 | Basic configuration files, directories and installation tool for the | |
84 | systemd system and service manager. | |
85 | ||
86 | %package gtk | |
87 | Summary: Graphical frontend for systemd | |
88 | Group: Base | |
89 | Requires: %{name} = %{version}-%{release} | |
90 | Requires: polkit | |
91 | ||
92 | %description gtk | |
93 | Graphical front-end for systemd. | |
94 | ||
6c89bbd4 ER |
95 | %package -n bash-completion-systemd |
96 | Summary: bash-completion for systemd | |
97 | Group: Applications/Shells | |
98 | Requires: %{name} | |
99 | Requires: bash-completion | |
100 | ||
101 | %description -n bash-completion-systemd | |
102 | bash-completion for systemd. | |
103 | ||
ede8d3e5 | 104 | %prep |
105 | %setup -q | |
4c5b5ab6 | 106 | %patch0 -p1 |
7619c097 | 107 | %patch1 -p1 |
ede8d3e5 | 108 | |
109 | %build | |
4c5b5ab6 | 110 | %{__aclocal} -I m4 |
ede8d3e5 | 111 | %{__autoconf} |
6e34428f | 112 | %{__autoheader} |
ede8d3e5 | 113 | %{__automake} |
9c0b975d | 114 | %configure \ |
6c89bbd4 ER |
115 | %{__enable_disable audit} \ |
116 | %{__enable_disable cryptsetup libcryptsetup} \ | |
117 | %{__enable_disable gtk} \ | |
118 | %{__enable_disable pam} \ | |
119 | %{__enable_disable selinux} \ | |
120 | %{__enable_disable tcpd tcpwrap} \ | |
121 | --disable-silent-rules \ | |
4c5b5ab6 | 122 | --with-distro=pld \ |
1dcb74bb | 123 | --with-rootdir= |
e1d9cc15 | 124 | |
ede8d3e5 | 125 | %{__make} |
126 | ||
127 | %install | |
128 | rm -rf $RPM_BUILD_ROOT | |
ede8d3e5 | 129 | %{__make} install \ |
130 | DESTDIR=$RPM_BUILD_ROOT | |
131 | ||
6c89bbd4 | 132 | find $RPM_BUILD_ROOT '(' -name '*.a' -o -name '*.la' ')' | xargs -r rm -v |
c3037397 ER |
133 | |
134 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} | |
135 | ||
136 | # no -devel (yet) | |
137 | rm -f $RPM_BUILD_ROOT%{_npkgconfigdir}/systemd.pc | |
138 | ||
139 | %if %{without gtk} | |
140 | # to shut up check-files | |
141 | rm -f $RPM_BUILD_ROOT%{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy | |
142 | rm -f $RPM_BUILD_ROOT%{_bindir}/systemadm | |
143 | rm -f $RPM_BUILD_ROOT%{_bindir}/systemd-gnome-ask-password-agent | |
144 | rm -f $RPM_BUILD_ROOT%{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy | |
145 | rm -f $RPM_BUILD_ROOT%{_mandir}/man1/systemadm.1* | |
146 | %endif | |
147 | ||
1dcb74bb | 148 | # Create SysV compatibility symlinks. systemctl/systemd are smart |
149 | # enough to detect in which way they are called. | |
150 | install -d $RPM_BUILD_ROOT/sbin | |
151 | ln -s ../bin/systemd $RPM_BUILD_ROOT/sbin/init | |
152 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/reboot | |
153 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/halt | |
154 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/poweroff | |
155 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/shutdown | |
156 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/telinit | |
157 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/runlevel | |
158 | ||
c3037397 ER |
159 | # We create all wants links manually at installation time to make sure |
160 | # they are not owned and hence overriden by rpm after the used deleted | |
161 | # them. | |
162 | rm -r $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/*.target.wants | |
163 | ||
ede8d3e5 | 164 | %clean |
165 | rm -rf $RPM_BUILD_ROOT | |
166 | ||
9638c72f | 167 | %post |
168 | /bin/systemctl daemon-reexec > /dev/null 2>&1 || : | |
c3037397 ER |
169 | |
170 | %post units | |
171 | if [ $1 -ne 1 ]; then | |
172 | exit 0 | |
9638c72f | 173 | fi |
174 | ||
c3037397 ER |
175 | # Try to read default runlevel from the old inittab if it exists |
176 | runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null) | |
177 | if [ -z "$runlevel" ] ; then | |
178 | runlevel=3 | |
9638c72f | 179 | fi |
c3037397 ER |
180 | target="/lib/systemd/system/runlevel$runlevel.target" |
181 | ||
182 | # And symlink what we found to the new-style default.target | |
183 | ln -sf "$target" %{_sysconfdir}/systemd/system/default.target > /dev/null 2>&1 || : | |
184 | #/bin/systemctl enable SERVICES > /dev/null 2>&1 || : | |
185 | ||
186 | %preun units | |
187 | if [ $1 -ne 0 ]; then | |
188 | exit 0 | |
189 | fi | |
190 | #/bin/systemctl disable SERVICES > /dev/null 2>&1 || : | |
191 | rm -f %{_sysconfdir}/systemd/system/default.target > /dev/null 2>&1 || : | |
9638c72f | 192 | |
193 | %postun | |
194 | if [ $1 -ge 1 ] ; then | |
195 | /bin/systemctl daemon-reload > /dev/null 2>&1 || : | |
196 | fi | |
197 | ||
ede8d3e5 | 198 | %files |
199 | %defattr(644,root,root,755) | |
1c239f8b | 200 | %doc DISTRO_PORTING README TODO |
6e34428f | 201 | /etc/dbus-1/system.d/org.freedesktop.hostname1.conf |
c3037397 ER |
202 | /etc/dbus-1/system.d/org.freedesktop.systemd1.conf |
203 | %dir %{_sysconfdir}/systemd | |
c3037397 ER |
204 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemd/system.conf |
205 | %dir /etc/xdg/systemd | |
206 | /etc/xdg/systemd/user | |
1dcb74bb | 207 | %attr(755,root,root) /bin/systemd |
208 | %attr(755,root,root) /bin/systemd-ask-password | |
7a76bc86 | 209 | %attr(755,root,root) /bin/systemd-machine-id-setup |
1dcb74bb | 210 | %attr(755,root,root) /bin/systemd-notify |
211 | %attr(755,root,root) /bin/systemd-tty-ask-password-agent | |
c3037397 | 212 | %attr(755,root,root) %{_bindir}/systemd-cgls |
57cd0d13 ZU |
213 | %attr(755,root,root) %{_bindir}/systemd-analyze |
214 | %attr(755,root,root) %{_bindir}/systemd-nspawn | |
215 | %attr(755,root,root) %{_bindir}/systemd-stdio-bridge | |
c3037397 ER |
216 | %attr(755,root,root) /sbin/halt |
217 | %attr(755,root,root) /sbin/init | |
218 | %attr(755,root,root) /sbin/poweroff | |
219 | %attr(755,root,root) /sbin/reboot | |
220 | %attr(755,root,root) /sbin/runlevel | |
221 | %attr(755,root,root) /sbin/shutdown | |
222 | %attr(755,root,root) /sbin/telinit | |
223 | %dir /lib/systemd | |
224 | /lib/systemd/systemd-* | |
57cd0d13 ZU |
225 | %dir %{_libdir}/systemd |
226 | %{_libdir}/systemd/user | |
227 | %dir %{_libdir}/systemd/user-generators | |
c3037397 | 228 | %dir /lib/systemd/system-generators |
57cd0d13 | 229 | /lib/systemd/system-generators/systemd-getty-generator |
1c239f8b | 230 | /lib/udev/rules.d/99-systemd.rules |
6e34428f MB |
231 | %{_prefix}/lib/tmpfiles.d/legacy.conf |
232 | %{_prefix}/lib/tmpfiles.d/systemd.conf | |
233 | %{_prefix}/lib/tmpfiles.d/x11.conf | |
c3037397 | 234 | %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.*.xml |
1c239f8b | 235 | %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service |
6e34428f | 236 | %{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service |
1c239f8b | 237 | %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service |
6e34428f | 238 | %{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy |
1c239f8b | 239 | %{_mandir}/man1/init.1 |
7a76bc86 | 240 | %{_mandir}/man1/systemd.1* |
6e34428f | 241 | %{_mandir}/man1/systemd-ask-password.1* |
1c239f8b | 242 | %{_mandir}/man1/systemd-cgls.1* |
243 | %{_mandir}/man1/systemd-notify.1* | |
6e34428f | 244 | %{_mandir}/man1/systemd-nspawn.1* |
1c239f8b | 245 | %{_mandir}/man3/sd_booted.3* |
246 | %{_mandir}/man3/sd_is_fifo.3* | |
247 | %{_mandir}/man3/sd_is_socket.3 | |
248 | %{_mandir}/man3/sd_is_socket_inet.3 | |
249 | %{_mandir}/man3/sd_is_socket_unix.3 | |
250 | %{_mandir}/man3/sd_listen_fds.3* | |
251 | %{_mandir}/man3/sd_notify.3* | |
252 | %{_mandir}/man3/sd_notifyf.3 | |
253 | %{_mandir}/man3/sd_readahead.3* | |
6e34428f | 254 | %{_mandir}/man5/binfmt.d.5* |
1c239f8b | 255 | %{_mandir}/man5/hostname.5* |
256 | %{_mandir}/man5/locale.conf.5* | |
7a76bc86 | 257 | %{_mandir}/man5/machine-id.5* |
6e34428f | 258 | %{_mandir}/man5/machine-info.5* |
1c239f8b | 259 | %{_mandir}/man5/modules-load.d.5* |
260 | %{_mandir}/man5/os-release.5* | |
6e34428f | 261 | %{_mandir}/man5/sysctl.d.5* |
1c239f8b | 262 | %{_mandir}/man5/systemd.automount.5* |
263 | %{_mandir}/man5/systemd.conf.5* | |
264 | %{_mandir}/man5/systemd.device.5* | |
265 | %{_mandir}/man5/systemd.exec.5* | |
266 | %{_mandir}/man5/systemd.mount.5* | |
267 | %{_mandir}/man5/systemd.path.5* | |
268 | %{_mandir}/man5/systemd.service.5* | |
269 | %{_mandir}/man5/systemd.snapshot.5* | |
270 | %{_mandir}/man5/systemd.socket.5* | |
271 | %{_mandir}/man5/systemd.swap.5* | |
272 | %{_mandir}/man5/systemd.target.5* | |
273 | %{_mandir}/man5/systemd.timer.5* | |
274 | %{_mandir}/man5/systemd.unit.5* | |
1c239f8b | 275 | %{_mandir}/man5/vconsole.conf.5* |
276 | %{_mandir}/man7/daemon.7* | |
277 | %{_mandir}/man7/sd-daemon.7* | |
278 | %{_mandir}/man7/sd-readahead.7* | |
279 | %{_mandir}/man7/systemd.special.7* | |
280 | %{_mandir}/man8/halt.8* | |
1c239f8b | 281 | %{_mandir}/man8/poweroff.8 |
282 | %{_mandir}/man8/reboot.8 | |
283 | %{_mandir}/man8/runlevel.8* | |
284 | %{_mandir}/man8/shutdown.8* | |
285 | %{_mandir}/man8/telinit.8* | |
c3037397 | 286 | |
6c89bbd4 ER |
287 | %if %{with cryptsetup} |
288 | /lib/systemd/system-generators/systemd-cryptsetup-generator | |
289 | %endif | |
290 | ||
291 | %if %{with pam} | |
292 | %attr(755,root,root) /%{_lib}/security/pam_systemd.so | |
293 | %{_mandir}/man8/pam_systemd.8* | |
294 | %endif | |
295 | ||
c3037397 ER |
296 | %files units |
297 | %defattr(644,root,root,755) | |
298 | %dir %{_sysconfdir}/systemd | |
299 | %dir %{_sysconfdir}/systemd/system | |
300 | %dir %{_sysconfdir}/tmpfiles.d | |
301 | %dir /lib/systemd | |
302 | /lib/systemd/system | |
6e34428f | 303 | %dir %{_prefix}/lib/tmpfiles.d |
c3037397 ER |
304 | %attr(755,root,root) /bin/systemctl |
305 | %attr(755,root,root) /bin/systemd-tmpfiles | |
306 | %{_mandir}/man5/tmpfiles.d.5* | |
307 | %{_mandir}/man1/systemctl.1* | |
308 | %{_mandir}/man8/systemd-tmpfiles.8* | |
309 | ||
310 | %if %{with gtk} | |
311 | %files gtk | |
312 | %defattr(644,root,root,755) | |
313 | %attr(755,root,root) %{_bindir}/systemadm | |
314 | %attr(755,root,root) %{_bindir}/systemd-gnome-ask-password-agent | |
1c239f8b | 315 | %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy |
c3037397 ER |
316 | %{_mandir}/man1/systemadm.1* |
317 | %endif | |
6c89bbd4 ER |
318 | |
319 | %files -n bash-completion-systemd | |
320 | %defattr(644,root,root,755) | |
321 | /etc/bash_completion.d/systemctl-bash-completion.sh |