]>
Commit | Line | Data |
---|---|---|
5d32f234 | 1 | # |
d374e721 JR |
2 | # TODO: |
3 | # - remove compat-pld-var-run.tmpfiles and maybe tmpfiles-not-fatal.patch | |
4 | # after enough packages provide their own tmpfiles.d configs for | |
5 | # /var/run directories | |
6 | # | |
c3037397 | 7 | # Conditional build: |
6c89bbd4 ER |
8 | %bcond_without audit # without audit support |
9 | %bcond_without cryptsetup # without cryptsetup support | |
23107006 TP |
10 | %bcond_without gtk # build gtk tools |
11 | %bcond_without pam # PAM authentication support | |
4389e6f9 | 12 | %bcond_with plymouth # plymouth support |
23107006 TP |
13 | %bcond_without selinux # without SELinux support |
14 | %bcond_without tcpd # libwrap (tcp_wrappers) support | |
9c0b975d | 15 | |
c3037397 | 16 | Summary: A System and Service Manager |
ede8d3e5 | 17 | Summary(pl.UTF-8): systemd - zarządca systemu i usług dla Linuksa |
18 | Name: systemd | |
4389e6f9 | 19 | Version: 42 |
fcfde7e0 | 20 | Release: 1 |
ede8d3e5 | 21 | License: GPL v2+ |
22 | Group: Base | |
440d1d13 | 23 | Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.xz |
4389e6f9 | 24 | # Source0-md5: 7686b44e368d2523901d3e903ed4dcea |
4f25b6ac | 25 | Source1: %{name}-sysv-convert |
b0980573 | 26 | Source2: %{name}_booted.c |
f1586299 JR |
27 | Source3: ifup@.service |
28 | Source4: network-post.service | |
29 | Source5: network.service | |
5c8fe698 JR |
30 | Source6: compat-pld-media.tmpfiles |
31 | Source7: compat-pld-var-run.tmpfiles | |
7619c097 | 32 | Patch0: target-pld.patch |
252e1bad | 33 | Patch1: config-pld.patch |
8e088cd5 | 34 | Patch2: shut-sysv-up.patch |
2e1f31c8 | 35 | Patch3: pld-sysv-network.patch |
d374e721 | 36 | Patch4: tmpfiles-not-fatal.patch |
ede8d3e5 | 37 | URL: http://www.freedesktop.org/wiki/Software/systemd |
5b9bde26 | 38 | BuildRequires: acl-devel |
6c89bbd4 | 39 | %{?with_audit:BuildRequires: audit-libs-devel} |
6e34428f MB |
40 | BuildRequires: autoconf >= 2.63 |
41 | BuildRequires: automake >= 1:1.11 | |
42 | %{?with_cryptsetup:BuildRequires: cryptsetup-luks-devel} | |
23107006 | 43 | BuildRequires: dbus-devel >= 1.3.2 |
c3037397 | 44 | BuildRequires: docbook-style-xsl |
23107006 TP |
45 | %if %{with gtk} |
46 | BuildRequires: glib2-devel >= 1:2.26.1 | |
47 | BuildRequires: gtk+2-devel >= 2:2.24.0 | |
a86320a6 | 48 | BuildRequires: libgee-devel |
23107006 TP |
49 | BuildRequires: libnotify-devel >= 0.7.0 |
50 | %endif | |
9cd79e34 | 51 | BuildRequires: binutils >= 3:2.22.52.0.1-2 |
3fc7a1cc | 52 | BuildRequires: gperf |
5b9bde26 | 53 | BuildRequires: intltool >= 0.40.0 |
4389e6f9 | 54 | BuildRequires: kmod-devel >= 5 |
b82d0bf2 | 55 | BuildRequires: libcap-devel |
6c89bbd4 ER |
56 | %{?with_selinux:BuildRequires: libselinux-devel} |
57 | BuildRequires: libtool >= 2:2.2 | |
58 | %{?with_tcpd:BuildRequires: libwrap-devel} | |
6e34428f | 59 | BuildRequires: libxslt-progs |
961baf80 | 60 | BuildRequires: m4 |
6c89bbd4 | 61 | %{?with_pam:BuildRequires: pam-devel} |
4389e6f9 | 62 | %{?with_plymouth:BuildRequires: plymouth-devel} |
23107006 | 63 | BuildRequires: pkgconfig >= 0.9.0 |
4cc1cb1d | 64 | BuildRequires: rpmbuild(macros) >= 1.627 |
58fd72e9 | 65 | BuildRequires: udev-devel >= 1:172 |
5b9bde26 JB |
66 | # not required for building from release (which contains *.c for *.vala) |
67 | #BuildRequires: vala >= 0.10.0 | |
58fd72e9 | 68 | BuildRequires: xz-devel |
011bccb6 | 69 | Requires: %{name}-libs = %{version}-%{release} |
c3037397 | 70 | Requires: %{name}-units = %{version}-%{release} |
2ff27c26 | 71 | Requires: SysVinit-tools |
37b8df82 | 72 | Requires: agetty |
b0980573 | 73 | Requires: dbus >= 1.4.16-6 |
7cb5cfc8 | 74 | Requires: filesystem >= 4.0-2 |
4389e6f9 | 75 | Requires: kmod >= 5 |
851fb4d8 | 76 | Requires: rc-scripts >= 0.4.5.1-7 |
56701781 | 77 | Requires: setup >= 2.8.0-2 |
b0980573 | 78 | Requires: udev-core >= 1:175-5 |
fe6ae5ab | 79 | Requires: udev-libs >= 1:172 |
b0980573 | 80 | Suggests: ConsoleKit |
2a61be78 | 81 | Suggests: fsck >= 2.20 |
4b15486a | 82 | Suggests: nss_myhostname |
2a61be78 | 83 | # python modules required by systemd-analyze |
b0980573 | 84 | Suggests: %{name}-no-compat-tmpfiles |
2a61be78 TP |
85 | Suggests: python-dbus |
86 | Suggests: python-modules | |
c35aa49c | 87 | Suggests: service(klogd) |
1cdd35cf | 88 | Suggests: service(syslog) |
fda563d5 | 89 | Provides: udev-acl |
3baeefca PG |
90 | # systemd takes care of that and causes problems |
91 | Conflicts: binfmt-detector | |
a6203073 | 92 | # sytemd wants pam with pam_systemd.so in system-auth... |
3b292a99 | 93 | Conflicts: pam < 1:1.1.5-5 |
a6203073 JR |
94 | # ...and sudo hates it |
95 | Conflicts: sudo < 1:1.7.8p2-4 | |
ff9cae1d | 96 | Conflicts: upstart |
ede8d3e5 | 97 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
98 | ||
85879912 ER |
99 | %define _libexecdir %{_prefix}/lib |
100 | ||
ede8d3e5 | 101 | %description |
1c239f8b | 102 | systemd is a system and service manager for Linux, compatible with |
ede8d3e5 | 103 | SysV and LSB init scripts. systemd provides aggressive parallelization |
104 | capabilities, uses socket and D-Bus activation for starting services, | |
105 | offers on-demand starting of daemons, keeps track of processes using | |
106 | Linux cgroups, supports snapshotting and restoring of the system | |
107 | state, maintains mount and automount points and implements an | |
108 | elaborate transactional dependency-based service control logic. It can | |
1c239f8b | 109 | work as a drop-in replacement for sysvinit. |
ede8d3e5 | 110 | |
111 | %description -l pl.UTF-8 | |
112 | systemd jest zarządcą systemu i usług dla Linuksa, kompatybilny ze | |
113 | skryptami SysV i LSB. systemd udostępnia rozbudowane zdolności | |
114 | paralelizacji, do uruchamiania usług używa socketów oraz D-Busa, | |
115 | oferuje uruchamianie usług na życzenie, monitoruje procesy używając | |
116 | linuksowych cgroups, wspomaga zapisywanie (snapshot) i odczytywanie | |
117 | (restore) stanu systemu, zarządza (auto)mount pointami oraz | |
118 | implementuje starannie opracowaną transakcjonalną, bazującą na | |
d45dfc3a | 119 | zależnościach logikę kontroli usług. Może pracować jako zastępca dla |
ede8d3e5 | 120 | sysvinit. |
121 | ||
c97dacdd TP |
122 | %package init |
123 | Summary: systemd /sbin/init and LSB/SysV compatibility symlinks | |
5b9bde26 | 124 | Summary(pl.UTF-8): /sbin/init z systemd i dowiązania dla kompatybilności z LSB/SysV |
c97dacdd | 125 | Group: Base |
d6829efa | 126 | Requires: systemd |
c97dacdd TP |
127 | Provides: readahead = 1:1.5.7-3 |
128 | Provides: virtual(init-daemon) | |
129 | Obsoletes: SysVinit | |
130 | Obsoletes: readahead < 1:1.5.7-3 | |
131 | Obsoletes: virtual(init-daemon) | |
132 | ||
133 | %description init | |
134 | Install this package when you are ready to final switch to systemd. | |
135 | ||
5b9bde26 JB |
136 | %description init -l pl.UTF-8 |
137 | Ten pakiet należy zainstalować po przygotowaniu się do ostatecznego | |
138 | przejścia na systemd. | |
139 | ||
c3037397 ER |
140 | %package units |
141 | Summary: Configuration files, directories and installation tool for systemd | |
5b9bde26 | 142 | Summary(pl.UTF-8): Pliki konfiguracyjne, katalogi i narzędzie instalacyjne dla systemd |
c3037397 | 143 | Group: Base |
c3037397 ER |
144 | Requires(post): coreutils |
145 | Requires(post): gawk | |
146 | ||
147 | %description units | |
148 | Basic configuration files, directories and installation tool for the | |
149 | systemd system and service manager. | |
150 | ||
f341cd9b | 151 | This is common config, use %{_sysconfdir}/systemd/system to override. |
10ffdcd2 | 152 | |
5b9bde26 JB |
153 | %description units -l pl.UTF-8 |
154 | Podstawowe pliki konfiguracyjne, katalogi i narzędzie instalacyjne dla | |
155 | zarządcy systemu i usług systemd. | |
156 | ||
157 | Ten pakiet zawiera ogólną konfigurację, ustawienia można nadpisać | |
158 | poprzez katalog %{_sysconfdir}/systemd/system. | |
159 | ||
c3037397 ER |
160 | %package gtk |
161 | Summary: Graphical frontend for systemd | |
5b9bde26 | 162 | Summary(pl.UTF-8): Graficzny interfejs do systemd |
c3037397 ER |
163 | Group: Base |
164 | Requires: %{name} = %{version}-%{release} | |
165 | Requires: polkit | |
166 | ||
167 | %description gtk | |
168 | Graphical front-end for systemd. | |
169 | ||
5b9bde26 JB |
170 | %description gtk -l pl.UTF-8 |
171 | Graficzny interfejs do systemd. | |
6c89bbd4 | 172 | |
011bccb6 | 173 | %package libs |
5b9bde26 JB |
174 | Summary: Shared systemd libraries |
175 | Summary(pl.UTF-8): Biblioteki współdzielone systemd | |
011bccb6 BZ |
176 | Group: Libraries |
177 | ||
178 | %description libs | |
5b9bde26 JB |
179 | Shared systemd libraries. |
180 | ||
181 | %description libs -l pl.UTF-8 | |
182 | Biblioteki współdzielone systemd. | |
011bccb6 | 183 | |
961baf80 AF |
184 | %package devel |
185 | Summary: Header files for systemd libraries | |
186 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek systemd | |
187 | Group: Development/Libraries | |
011bccb6 | 188 | Requires: %{name}-libs = %{version}-%{release} |
961baf80 AF |
189 | |
190 | %description devel | |
191 | Header files for systemd libraries. | |
192 | ||
193 | %description devel -l pl.UTF-8 | |
194 | Pliki nagłówkowe bibliotek systemd. | |
195 | ||
5b9bde26 JB |
196 | %package -n bash-completion-systemd |
197 | Summary: bash-completion for systemd | |
198 | Summary(pl.UTF-8): Bashowe dopełnianie składni dla systemd | |
199 | Group: Applications/Shells | |
200 | Requires: %{name} | |
201 | Requires: bash-completion | |
202 | ||
203 | %description -n bash-completion-systemd | |
204 | bash-completion for systemd. | |
205 | ||
206 | %description -n bash-completion-systemd -l pl.UTF-8 | |
207 | Bashowe dopełnianie składni dla systemd | |
208 | ||
ae4d0acb JR |
209 | %package no-compat-tmpfiles |
210 | Summary: Force update of packages that provide tmpfiles.d configuration | |
211 | Group: Base | |
212 | Requires(post): sed > 4.0 | |
213 | Conflicts: ConsoleKit-dirs < 0.4.5-7 | |
214 | Conflicts: NetworkManager < 2:0.9.2.0-3 | |
215 | Conflicts: Zope < 2.11.8-2 | |
216 | Conflicts: amavisd-new < 1:2.7.0-1 | |
ae4d0acb JR |
217 | Conflicts: apache-base < 2.2.21-4 |
218 | Conflicts: apache-mod_bw < 0.92-3 | |
219 | Conflicts: apache-mod_fastcgi < 2.4.6-6 | |
b0980573 ŁK |
220 | Conflicts: apache1-base < 1.3.42-5 |
221 | Conflicts: apache1-mod_fastcgi < 2.4.6-2 | |
ae4d0acb JR |
222 | Conflicts: asterisk < 10.0.1-2 |
223 | Conflicts: autossh-init < 1.4b-3 | |
224 | Conflicts: balance < 3.54-2 | |
225 | Conflicts: bind < 7:9.8.1.P1-4 | |
226 | Conflicts: bopm < 3.1.3-4 | |
227 | Conflicts: callweaver < 1.2.1-9 | |
228 | Conflicts: cassandra-bin < 0.8.9-2 | |
229 | Conflicts: clamav < 0.97.3-3 | |
230 | Conflicts: cups < 1:1.5.0-10 | |
231 | Conflicts: dbus < 1.4.16-4 | |
232 | Conflicts: dovecot < 1:2.0.16-3 | |
233 | Conflicts: dspam < 3.9.0-6 | |
234 | Conflicts: fail2ban < 0.8.4-4 | |
235 | Conflicts: filesystem < 4.0-3 | |
236 | Conflicts: gammu-smsd < 1:1.31.0-3 | |
a6203073 JR |
237 | # Break gdm2.20 installs |
238 | #Conflicts: gdm < 2:3.2.1.1-9 | |
ae4d0acb JR |
239 | Conflicts: greylistd < 0.8.8-2 |
240 | Conflicts: inn < 2.4.6-7 | |
241 | Conflicts: ipsec-tools < 0.8.0-3 | |
242 | Conflicts: jabber-common < 0-9 | |
243 | Conflicts: laptop-mode-tools < 1.58-2 | |
244 | Conflicts: libgpod < 0.8.0-6 | |
245 | Conflicts: libvirt-utils < 0.9.9-4 | |
246 | Conflicts: lighttpd < 1.4.30-5 | |
247 | Conflicts: lirc < 0.9.0-20 | |
248 | Conflicts: mailman < 5:2.1.14-4 | |
249 | Conflicts: memcached < 1.4.11-2 | |
250 | Conflicts: mpd < 0.16.5-4 | |
251 | Conflicts: mrtg < 2.17.0-3 | |
252 | Conflicts: munin-common < 1.4.5-5 | |
253 | Conflicts: nagios-nrpe < 2.13-2 | |
254 | Conflicts: ndisc6-rdnssd < 1.0.1-3 | |
255 | Conflicts: nscd < 6:2.14.1-5 | |
256 | Conflicts: nss_ldapd-nslcd < 0.8.4-2 | |
257 | Conflicts: openct < 0.6.20-3 | |
258 | Conflicts: openl2tp < 1.8-3 | |
259 | Conflicts: openldap-overlay-nssov < 2.4.28-4 | |
260 | Conflicts: openldap-servers < 2.4.28-4 | |
261 | Conflicts: openvpn < 2.2.2-2 | |
ae4d0acb JR |
262 | Conflicts: pam-pam_mount < 2.12-3 |
263 | Conflicts: pam-pam_ssh < 1.97-2 | |
264 | Conflicts: pcsc-lite < 1.8.1-2 | |
265 | Conflicts: php-dirs < 1.2-3 | |
266 | Conflicts: policyd < 2.0.10-3 | |
267 | Conflicts: pound < 2.6-2 | |
268 | Conflicts: pptp < 1.7.2-3 | |
269 | Conflicts: proftpd-common < 2:1.3.4a-2 | |
270 | Conflicts: pulseaudio-server < 1.1-2 | |
271 | Conflicts: quagga < 0.99.20-3 | |
272 | Conflicts: radvd < 1.8.5-2 | |
273 | Conflicts: rc-scripts < 0.4.5.2-3 | |
274 | Conflicts: red5 < 0.9.0-2 | |
275 | Conflicts: redis-server < 2.4.2-4 | |
276 | Conflicts: smokeping < 2.4.2-10 | |
277 | Conflicts: smtp-gated < 1.4.17-2 | |
278 | Conflicts: socat < 1.7.2.0-2 | |
279 | Conflicts: speech-dispatcher < 0.7.1-2 | |
280 | Conflicts: sphinx < 2.0.3-4 | |
281 | Conflicts: splashutils < 1.5.4.3-3 | |
282 | Conflicts: stunnel < 4.50-2 | |
ae4d0acb JR |
283 | Conflicts: tenshi < 0.12-2 |
284 | Conflicts: tor < 0.2.2.35-2 | |
285 | Conflicts: ucarp < 1.5.2-3 | |
286 | Conflicts: udisks < 1.0.4-3 | |
287 | Conflicts: util-vserver < 0.30.216-1.pre3002.3 | |
288 | Conflicts: vpnc < 0.5.3-2 | |
289 | Conflicts: web2ldap < 1.1.0rc1-2 | |
290 | Conflicts: wesnoth-server < 1:1.10-2 | |
291 | Conflicts: wpa_supplicant < 0.7.3-10 | |
292 | Conflicts: xl2tpd < 1.3.0-2 | |
293 | ||
294 | %description no-compat-tmpfiles | |
295 | Force update of packages that provide tmpfiles.d configuration | |
296 | ||
ede8d3e5 | 297 | %prep |
298 | %setup -q | |
4c5b5ab6 | 299 | %patch0 -p1 |
252e1bad | 300 | %patch1 -p1 |
a6203073 | 301 | %patch2 -p1 |
942c9075 | 302 | %patch3 -p1 |
d374e721 | 303 | %patch4 -p1 |
b77423ae | 304 | cp -p %{SOURCE2} src/systemd_booted.c |
ede8d3e5 | 305 | |
306 | %build | |
4c5b5ab6 | 307 | %{__aclocal} -I m4 |
ede8d3e5 | 308 | %{__autoconf} |
6e34428f | 309 | %{__autoheader} |
ede8d3e5 | 310 | %{__automake} |
9c0b975d | 311 | %configure \ |
6c89bbd4 ER |
312 | %{__enable_disable audit} \ |
313 | %{__enable_disable cryptsetup libcryptsetup} \ | |
314 | %{__enable_disable gtk} \ | |
315 | %{__enable_disable pam} \ | |
4389e6f9 | 316 | %{__enable_disable plymouth} \ |
6c89bbd4 ER |
317 | %{__enable_disable selinux} \ |
318 | %{__enable_disable tcpd tcpwrap} \ | |
319 | --disable-silent-rules \ | |
961baf80 | 320 | --disable-static \ |
5b9bde26 | 321 | --with-distro=pld \ |
391eea76 | 322 | --with-rootprefix= \ |
4389e6f9 JR |
323 | --with-rootlibdir=/%{_lib} \ |
324 | --enable-split-usr | |
e1d9cc15 | 325 | |
ede8d3e5 | 326 | %{__make} |
b77423ae | 327 | ./libtool --mode=link --tag=CC %{__cc} %{rpmcppflags} %{rpmcflags} -o systemd_booted %{rpmldflags} src/systemd_booted.c -L. -lsystemd-daemon |
ede8d3e5 | 328 | |
329 | %install | |
330 | rm -rf $RPM_BUILD_ROOT | |
23107006 | 331 | |
ede8d3e5 | 332 | %{__make} install \ |
333 | DESTDIR=$RPM_BUILD_ROOT | |
334 | ||
b77423ae AF |
335 | ./libtool --mode=install install -m755 systemd_booted $RPM_BUILD_ROOT/bin/systemd_booted |
336 | ||
4389e6f9 JR |
337 | # Main binary has been moved, but we don't want to break existing installs |
338 | ln -s ../lib/systemd/systemd $RPM_BUILD_ROOT/bin/systemd | |
339 | ||
1dcb74bb | 340 | # Create SysV compatibility symlinks. systemctl/systemd are smart |
2a61be78 | 341 | # enough to detect the way they were called |
c28b0c1c | 342 | install -d $RPM_BUILD_ROOT/sbin |
4389e6f9 | 343 | ln -s ../lib/systemd/systemd $RPM_BUILD_ROOT/sbin/init |
1dcb74bb | 344 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/halt |
345 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/poweroff | |
23107006 TP |
346 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/reboot |
347 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/runlevel | |
1dcb74bb | 348 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/shutdown |
349 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/telinit | |
1dcb74bb | 350 | |
5d32f234 | 351 | ln -s ../modules $RPM_BUILD_ROOT%{_sysconfdir}/modules-load.d/modules.conf |
4cc1cb1d ER |
352 | # disable random and console SYSV service |
353 | ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/random.service | |
354 | ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/console.service | |
5d32f234 | 355 | |
f1586299 | 356 | # add static (non-NetworkManager) networking |
4cc1cb1d ER |
357 | install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/ifup@.service |
358 | install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/network-post.service | |
359 | install %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}/network.service | |
f1586299 | 360 | |
5c8fe698 JR |
361 | # install compatibility tmpfiles configs |
362 | install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/compat-pld-media.conf | |
d374e721 | 363 | install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/compat-pld-var-run.conf |
5c8fe698 | 364 | |
2a61be78 TP |
365 | # All wants links are created at %post to make sure they are not owned |
366 | # and hence overriden by rpm if the user deletes them (missingok?) | |
23107006 | 367 | %{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/*.target.wants |
c3037397 | 368 | |
e64703a8 | 369 | # it is in rc-scripts pkg |
4cc1cb1d | 370 | %{__rm} $RPM_BUILD_ROOT%{systemdunitdir}/rc-local.service |
e64703a8 | 371 | |
2a61be78 TP |
372 | # Make sure these directories are properly owned: |
373 | # - halt,kexec,poweroff,reboot: generic ones used by ConsoleKit-systemd, | |
374 | # - syslog _might_ be used by some syslog implementation (none for now), | |
375 | # - isn't dbus populated by dbus-systemd only (so to be moved there)? | |
4cc1cb1d | 376 | install -d $RPM_BUILD_ROOT%{systemdunitdir}/{dbus,halt,kexec,poweroff,reboot,syslog}.target.wants |
961baf80 AF |
377 | |
378 | # Create new-style configuration files so that we can ghost-own them | |
23107006 | 379 | touch $RPM_BUILD_ROOT%{_sysconfdir}/{hostname,locale.conf,machine-id,machine-info,os-release,timezone,vconsole.conf} |
4bbef33c | 380 | |
9d8b5dfe | 381 | # Install SysV conversion tool for systemd |
4f25b6ac | 382 | install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir} |
9d8b5dfe BZ |
383 | |
384 | install -d $RPM_BUILD_ROOT/var/log | |
5a65c84e TP |
385 | :> $RPM_BUILD_ROOT/var/log/btmp |
386 | :> $RPM_BUILD_ROOT/var/log/wtmp | |
a761f93e | 387 | |
5d32f234 | 388 | %if %{without gtk} |
5d32f234 TP |
389 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/systemadm.1* |
390 | %endif | |
391 | ||
392 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} | |
a86320a6 | 393 | %{__rm} $RPM_BUILD_ROOT/%{_lib}/security/pam_systemd.la |
5d32f234 TP |
394 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la |
395 | ||
ede8d3e5 | 396 | %clean |
397 | rm -rf $RPM_BUILD_ROOT | |
398 | ||
9638c72f | 399 | %post |
4bbef33c | 400 | /bin/systemd-machine-id-setup > /dev/null 2>&1 || : |
9638c72f | 401 | /bin/systemctl daemon-reexec > /dev/null 2>&1 || : |
c3037397 | 402 | |
961baf80 | 403 | %postun |
85879912 | 404 | if [ $1 -ge 1 ]; then |
961baf80 | 405 | /bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || : |
9638c72f | 406 | fi |
407 | ||
3edd52a6 TP |
408 | %post libs -p /sbin/ldconfig |
409 | %postun libs -p /sbin/ldconfig | |
011bccb6 | 410 | |
961baf80 | 411 | %post units |
85879912 | 412 | if [ $1 -eq 1 ]; then |
961baf80 AF |
413 | # Try to read default runlevel from the old inittab if it exists |
414 | runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null) | |
415 | if [ -z "$runlevel" ] ; then | |
4cc1cb1d | 416 | target="%{systemdunitdir}/graphical.target" |
961baf80 | 417 | else |
4cc1cb1d | 418 | target="%{systemdunitdir}/runlevel$runlevel.target" |
961baf80 AF |
419 | fi |
420 | ||
421 | # And symlink what we found to the new-style default.target | |
f341cd9b | 422 | ln -s "$target" %{_sysconfdir}/systemd/system/default.target >/dev/null 2>&1 || : |
cf819365 JR |
423 | |
424 | # Setup hostname | |
425 | [ -f /etc/sysconfig/network ] && . /etc/sysconfig/network | |
426 | if [ -n "$HOSTNAME" -a "$HOSTNAME" != "pldmachine" ]; then | |
427 | [ -f /etc/hostname ] && mv -f /etc/hostname /etc/hostname.rpmsave | |
428 | echo $HOSTNAME > /etc/hostname | |
429 | chmod 644 /etc/hostname | |
430 | fi | |
9638c72f | 431 | fi |
f1586299 JR |
432 | # Enable the services we install by default. |
433 | /bin/systemctl enable \ | |
434 | getty@.service \ | |
435 | network.service \ | |
436 | network-post.service \ | |
437 | remote-fs.target \ | |
438 | systemd-readahead-replay.service \ | |
439 | systemd-readahead-collect.service >/dev/null 2>&1 || : | |
440 | ||
441 | # Find and enable all installed interfaces | |
d37b4980 | 442 | mkdir -p %{_sysconfdir}/systemd/system/network.target.wants >/dev/null 2>&1 || : |
f1586299 JR |
443 | for f in /etc/sysconfig/interfaces/ifcfg-* ; do |
444 | ff=$(basename $f) | |
445 | ff=${ff##ifcfg-} | |
446 | case "$ff" in | |
447 | *.rpmorig|*.rpmnew|*.rpmsave|*~|*.orig) | |
448 | continue | |
449 | ;; | |
450 | *) | |
663b637e | 451 | DEVICE="" ; ONBOOT="" ; USERS="" |
72878cbd | 452 | . $f 2>/dev/null |
663b637e | 453 | [ ${USERS:-no} != no ] && continue |
90de2714 | 454 | if [ "$DEVICE" = "$ff" -a ${ONBOOT:-no} = "yes" ]; then |
4cc1cb1d | 455 | ln -s %{systemdunitdir}/ifup@.service \ |
90de2714 JR |
456 | %{_sysconfdir}/systemd/system/network.target.wants/ifcfg@$ff.service >/dev/null 2>&1 || : |
457 | fi | |
f1586299 JR |
458 | ;; |
459 | esac | |
460 | done | |
c3037397 ER |
461 | |
462 | %preun units | |
961baf80 AF |
463 | if [ $1 -eq 0 ] ; then |
464 | /bin/systemctl disable \ | |
465 | getty@.service \ | |
f1586299 JR |
466 | network.service \ |
467 | network-post.service \ | |
961baf80 AF |
468 | remote-fs.target \ |
469 | systemd-readahead-replay.service \ | |
470 | systemd-readahead-collect.service >/dev/null 2>&1 || : | |
471 | ||
f341cd9b | 472 | %{__rm} -f %{_sysconfdir}/systemd/system/default.target >/dev/null 2>&1 || : |
f1586299 | 473 | %{__rm} -f %{_sysconfdir}/systemd/system/network.target.wants/ifcfg@*.service >/dev/null 2>&1 || : |
c3037397 | 474 | fi |
9638c72f | 475 | |
961baf80 | 476 | %postun units |
85879912 | 477 | if [ $1 -ge 1 ]; then |
9638c72f | 478 | /bin/systemctl daemon-reload > /dev/null 2>&1 || : |
479 | fi | |
480 | ||
ae4d0acb | 481 | %post no-compat-tmpfiles |
a6203073 | 482 | %{__sed} -i -e '/^#/!s/^/# /g' %{_sysconfdir}/tmpfiles.d/compat-pld-var-run.conf |
ae4d0acb | 483 | |
ede8d3e5 | 484 | %files |
485 | %defattr(644,root,root,755) | |
1c239f8b | 486 | %doc DISTRO_PORTING README TODO |
6e34428f | 487 | /etc/dbus-1/system.d/org.freedesktop.hostname1.conf |
961baf80 AF |
488 | /etc/dbus-1/system.d/org.freedesktop.locale1.conf |
489 | /etc/dbus-1/system.d/org.freedesktop.login1.conf | |
c3037397 | 490 | /etc/dbus-1/system.d/org.freedesktop.systemd1.conf |
961baf80 | 491 | /etc/dbus-1/system.d/org.freedesktop.timedate1.conf |
3edd52a6 | 492 | %ghost %config(noreplace) %{_sysconfdir}/machine-id |
b77423ae AF |
493 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hostname |
494 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/locale.conf | |
495 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/machine-info | |
496 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/os-release | |
497 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/timezone | |
498 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vconsole.conf | |
5d32f234 | 499 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemd/*.conf |
2a61be78 | 500 | %dir %{_sysconfdir}/systemd/user |
abd479ee | 501 | /etc/xdg/systemd |
1dcb74bb | 502 | %attr(755,root,root) /bin/systemd |
503 | %attr(755,root,root) /bin/systemd-ask-password | |
c76a8951 | 504 | %attr(755,root,root) /bin/systemd-journalctl |
961baf80 | 505 | %attr(755,root,root) /bin/systemd-loginctl |
7a76bc86 | 506 | %attr(755,root,root) /bin/systemd-machine-id-setup |
1dcb74bb | 507 | %attr(755,root,root) /bin/systemd-notify |
508 | %attr(755,root,root) /bin/systemd-tty-ask-password-agent | |
57cd0d13 | 509 | %attr(755,root,root) %{_bindir}/systemd-analyze |
d374e721 JR |
510 | %attr(755,root,root) %{_bindir}/systemd-cat |
511 | %attr(755,root,root) %{_bindir}/systemd-cgtop | |
23107006 | 512 | %attr(755,root,root) %{_bindir}/systemd-cgls |
57cd0d13 ZU |
513 | %attr(755,root,root) %{_bindir}/systemd-nspawn |
514 | %attr(755,root,root) %{_bindir}/systemd-stdio-bridge | |
2a61be78 | 515 | %attr(755,root,root) %{_bindir}/systemd-sysv-convert |
abd479ee | 516 | %attr(755,root,root) /lib/systemd/systemd-* |
c3037397 | 517 | %dir /lib/systemd/system-generators |
4389e6f9 | 518 | %attr(755,root,root) /lib/systemd/systemd |
5d32f234 | 519 | %attr(755,root,root) /lib/systemd/system-generators/systemd-*-generator |
abd479ee | 520 | %dir /lib/systemd/system-shutdown |
1c239f8b | 521 | /lib/udev/rules.d/99-systemd.rules |
961baf80 AF |
522 | /lib/udev/rules.d/70-uaccess.rules |
523 | /lib/udev/rules.d/71-seat.rules | |
524 | /lib/udev/rules.d/73-seat-late.rules | |
3edd52a6 TP |
525 | %dir %{_libexecdir}/systemd |
526 | %{_libexecdir}/systemd/user | |
2a61be78 | 527 | %dir %{_libexecdir}/systemd/user-generators |
89d58574 | 528 | %config(noreplace,missingok) %{_libexecdir}/tmpfiles.d/*.conf |
961baf80 AF |
529 | %{_datadir}/dbus-1/interfaces/org.freedesktop.hostname1.xml |
530 | %{_datadir}/dbus-1/interfaces/org.freedesktop.locale1.xml | |
c3037397 | 531 | %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.*.xml |
961baf80 | 532 | %{_datadir}/dbus-1/interfaces/org.freedesktop.timedate1.xml |
1c239f8b | 533 | %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service |
6e34428f | 534 | %{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service |
961baf80 AF |
535 | %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service |
536 | %{_datadir}/dbus-1/system-services/org.freedesktop.login1.service | |
1c239f8b | 537 | %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service |
961baf80 | 538 | %{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service |
6e34428f | 539 | %{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy |
961baf80 AF |
540 | %{_datadir}/polkit-1/actions/org.freedesktop.locale1.policy |
541 | %{_datadir}/polkit-1/actions/org.freedesktop.login1.policy | |
542 | %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy | |
543 | %{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy | |
544 | %dir %{_datadir}/systemd | |
545 | %{_datadir}/systemd/kbd-model-map | |
7a76bc86 | 546 | %{_mandir}/man1/systemd.1* |
2a61be78 | 547 | %{_mandir}/man1/systemd-*.1* |
1c239f8b | 548 | %{_mandir}/man3/sd_booted.3* |
549 | %{_mandir}/man3/sd_is_fifo.3* | |
550 | %{_mandir}/man3/sd_is_socket.3 | |
551 | %{_mandir}/man3/sd_is_socket_inet.3 | |
552 | %{_mandir}/man3/sd_is_socket_unix.3 | |
553 | %{_mandir}/man3/sd_listen_fds.3* | |
554 | %{_mandir}/man3/sd_notify.3* | |
555 | %{_mandir}/man3/sd_notifyf.3 | |
556 | %{_mandir}/man3/sd_readahead.3* | |
6e34428f | 557 | %{_mandir}/man5/binfmt.d.5* |
1c239f8b | 558 | %{_mandir}/man5/hostname.5* |
559 | %{_mandir}/man5/locale.conf.5* | |
7a76bc86 | 560 | %{_mandir}/man5/machine-id.5* |
6e34428f | 561 | %{_mandir}/man5/machine-info.5* |
1c239f8b | 562 | %{_mandir}/man5/modules-load.d.5* |
563 | %{_mandir}/man5/os-release.5* | |
6e34428f | 564 | %{_mandir}/man5/sysctl.d.5* |
89d58574 | 565 | %{_mandir}/man5/systemd.*.5* |
961baf80 AF |
566 | %{_mandir}/man5/systemd-logind.conf.5* |
567 | %{_mandir}/man5/timezone.5* | |
23107006 | 568 | %{_mandir}/man5/vconsole.conf.5* |
1c239f8b | 569 | %{_mandir}/man7/daemon.7* |
570 | %{_mandir}/man7/sd-daemon.7* | |
c76a8951 | 571 | %{_mandir}/man7/sd-login.7* |
1c239f8b | 572 | %{_mandir}/man7/sd-readahead.7* |
573 | %{_mandir}/man7/systemd.special.7* | |
a761f93e TP |
574 | %attr(640,root,root) %ghost /var/log/btmp |
575 | %attr(664,root,utmp) %ghost /var/log/wtmp | |
c3037397 | 576 | |
6c89bbd4 | 577 | %if %{with pam} |
a86320a6 | 578 | %attr(755,root,root) /%{_lib}/security/pam_systemd.so |
6c89bbd4 ER |
579 | %{_mandir}/man8/pam_systemd.8* |
580 | %endif | |
581 | ||
c97dacdd | 582 | %files init |
5b9bde26 | 583 | %defattr(644,root,root,755) |
c97dacdd TP |
584 | %attr(755,root,root) /sbin/halt |
585 | %attr(755,root,root) /sbin/init | |
586 | %attr(755,root,root) /sbin/poweroff | |
587 | %attr(755,root,root) /sbin/reboot | |
588 | %attr(755,root,root) /sbin/runlevel | |
589 | %attr(755,root,root) /sbin/shutdown | |
590 | %attr(755,root,root) /sbin/telinit | |
591 | %{_mandir}/man1/init.1 | |
592 | %{_mandir}/man8/halt.8* | |
593 | %{_mandir}/man8/poweroff.8 | |
594 | %{_mandir}/man8/reboot.8 | |
595 | %{_mandir}/man8/runlevel.8* | |
596 | %{_mandir}/man8/shutdown.8* | |
597 | %{_mandir}/man8/telinit.8* | |
598 | ||
c3037397 ER |
599 | %files units |
600 | %defattr(644,root,root,755) | |
abd479ee MB |
601 | %dir %{_sysconfdir}/binfmt.d |
602 | %dir %{_sysconfdir}/modules-load.d | |
5d32f234 | 603 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/modules-load.d/modules.conf |
abd479ee | 604 | %dir %{_sysconfdir}/sysctl.d |
c3037397 ER |
605 | %dir %{_sysconfdir}/systemd |
606 | %dir %{_sysconfdir}/systemd/system | |
607 | %dir %{_sysconfdir}/tmpfiles.d | |
7cb5cfc8 | 608 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/tmpfiles.d/*.conf |
85879912 ER |
609 | %dir %{_libexecdir}/binfmt.d |
610 | %dir %{_libexecdir}/modules-load.d | |
611 | %dir %{_libexecdir}/sysctl.d | |
d374e721 | 612 | %{_libexecdir}/sysctl.d/coredump.conf |
c3037397 ER |
613 | %attr(755,root,root) /bin/systemctl |
614 | %attr(755,root,root) /bin/systemd-tmpfiles | |
b77423ae | 615 | %attr(755,root,root) /bin/systemd_booted |
c3037397 | 616 | %{_mandir}/man1/systemctl.1* |
89d58574 | 617 | %{_mandir}/man5/tmpfiles.d.5* |
c3037397 | 618 | %{_mandir}/man8/systemd-tmpfiles.8* |
961baf80 | 619 | %{_npkgconfigdir}/systemd.pc |
c3037397 | 620 | |
4cc1cb1d ER |
621 | %{systemdunitdir}/*.automount |
622 | %{systemdunitdir}/*.mount | |
623 | %{systemdunitdir}/*.path | |
624 | %{systemdunitdir}/*.service | |
625 | %{systemdunitdir}/*.socket | |
626 | %{systemdunitdir}/*.target | |
627 | %{systemdunitdir}/*.timer | |
628 | %dir %{systemdunitdir}/*.wants | |
629 | %config(noreplace,missingok) %{systemdunitdir}/*.wants/* | |
10ffdcd2 | 630 | |
c3037397 ER |
631 | %if %{with gtk} |
632 | %files gtk | |
633 | %defattr(644,root,root,755) | |
634 | %attr(755,root,root) %{_bindir}/systemadm | |
635 | %attr(755,root,root) %{_bindir}/systemd-gnome-ask-password-agent | |
c3037397 ER |
636 | %{_mandir}/man1/systemadm.1* |
637 | %endif | |
6c89bbd4 | 638 | |
5b9bde26 | 639 | %files libs |
6c89bbd4 | 640 | %defattr(644,root,root,755) |
6ba1f779 MB |
641 | %attr(755,root,root) /%{_lib}/libsystemd-daemon.so.*.*.* |
642 | %attr(755,root,root) %ghost /%{_lib}/libsystemd-daemon.so.0 | |
643 | %attr(755,root,root) /%{_lib}/libsystemd-id128.so.*.*.* | |
644 | %attr(755,root,root) %ghost /%{_lib}/libsystemd-id128.so.0 | |
645 | %attr(755,root,root) /%{_lib}/libsystemd-journal.so.*.*.* | |
646 | %attr(755,root,root) %ghost /%{_lib}/libsystemd-journal.so.0 | |
647 | %attr(755,root,root) /%{_lib}/libsystemd-login.so.*.*.* | |
648 | %attr(755,root,root) %ghost /%{_lib}/libsystemd-login.so.0 | |
961baf80 AF |
649 | |
650 | %files devel | |
651 | %defattr(644,root,root,755) | |
89d58574 | 652 | %attr(755,root,root) %{_libdir}/libsystemd-daemon.so |
c76a8951 BZ |
653 | %attr(755,root,root) %{_libdir}/libsystemd-id128.so |
654 | %attr(755,root,root) %{_libdir}/libsystemd-journal.so | |
89d58574 | 655 | %attr(755,root,root) %{_libdir}/libsystemd-login.so |
5b9bde26 | 656 | %{_includedir}/%{name} |
961baf80 | 657 | %{_pkgconfigdir}/libsystemd-daemon.pc |
c76a8951 BZ |
658 | %{_pkgconfigdir}/libsystemd-id128.pc |
659 | %{_pkgconfigdir}/libsystemd-journal.pc | |
961baf80 | 660 | %{_pkgconfigdir}/libsystemd-login.pc |
c76a8951 BZ |
661 | %{_mandir}/man3/sd_get_seats.3* |
662 | %{_mandir}/man3/sd_get_sessions.3* | |
663 | %{_mandir}/man3/sd_get_uids.3* | |
664 | %{_mandir}/man3/sd_is_mq.3* | |
665 | %{_mandir}/man3/sd_login_monitor_flush.3* | |
666 | %{_mandir}/man3/sd_login_monitor_get_fd.3* | |
667 | %{_mandir}/man3/sd_login_monitor_new.3* | |
668 | %{_mandir}/man3/sd_login_monitor_unref.3* | |
669 | %{_mandir}/man3/sd_pid_get_owner_uid.3* | |
670 | %{_mandir}/man3/sd_pid_get_session.3* | |
671 | %{_mandir}/man3/sd_pid_get_unit.3* | |
672 | %{_mandir}/man3/sd_seat_can_multi_session.3* | |
673 | %{_mandir}/man3/sd_seat_get_active.3* | |
674 | %{_mandir}/man3/sd_seat_get_sessions.3* | |
675 | %{_mandir}/man3/sd_session_get_seat.3* | |
676 | %{_mandir}/man3/sd_session_get_uid.3* | |
677 | %{_mandir}/man3/sd_session_is_active.3* | |
678 | %{_mandir}/man3/sd_uid_get_seats.3* | |
679 | %{_mandir}/man3/sd_uid_get_sessions.3* | |
680 | %{_mandir}/man3/sd_uid_get_state.3* | |
681 | %{_mandir}/man3/sd_uid_is_on_seat.3* | |
5b9bde26 JB |
682 | |
683 | %files -n bash-completion-systemd | |
684 | %defattr(644,root,root,755) | |
391eea76 | 685 | /etc/bash_completion.d/systemd-bash-completion.sh |
ae4d0acb JR |
686 | |
687 | %files no-compat-tmpfiles | |
688 | %defattr(644,root,root,755) | |
689 | # empty package |