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