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