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