286 lines
9.6 KiB
RPMSpec
286 lines
9.6 KiB
RPMSpec
#
|
|
# spec file for package systemd
|
|
#
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
|
|
Name: systemd
|
|
Url: http://www.freedesktop.org/wiki/Software/systemd
|
|
Version: 26
|
|
Release: 1
|
|
License: GPLv2+
|
|
Group: System/Base
|
|
Summary: A System and Session Manager
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: libudev-devel udev
|
|
BuildRequires: dbus-1-devel
|
|
BuildRequires: audit-devel
|
|
BuildRequires: libcap-devel
|
|
BuildRequires: tcpd-devel
|
|
BuildRequires: pam-devel
|
|
BuildRequires: libcryptsetup-devel
|
|
BuildRequires: pkg-config
|
|
BuildRequires: gtk2-devel libnotify-devel libxslt-devel vala
|
|
BuildRequires: libselinux-devel libsepol-devel
|
|
Requires: udev >= 167
|
|
Requires: dbus-1 >= 1.4.0
|
|
Requires: kbd
|
|
Requires: util-linux >= 2.19
|
|
Conflicts: filesystem < 11.5
|
|
Conflicts: mkinitrd < 2.7.0
|
|
Source0: http://www.freedesktop.org/software/systemd/releases/%{name}-%{version}.tar.bz2
|
|
Source1: systemd-rpmlintrc
|
|
Patch1: 0001-Add-bootsplash-handling-for-password-dialogs.patch
|
|
|
|
# Upstream First - Policy:
|
|
# Never add any patches to this package without the upstream commit id
|
|
# in the patch. Any patches added here without a very good reason to make
|
|
# an exception will be silently removed with the next version update.
|
|
|
|
%description
|
|
Systemd is a system and service manager, compatible with SysV and LSB
|
|
init scripts for Linux. systemd provides aggressive parallelization
|
|
capabilities, uses socket and D-Bus activation for starting services,
|
|
offers on-demand starting of daemons, keeps track of processes using
|
|
Linux cgroups, supports snapshotting and restoring of the system state,
|
|
maintains mount and automount points and implements an elaborate
|
|
transactional dependency-based service control logic. It can work as a
|
|
drop-in replacement for sysvinit.
|
|
|
|
%package gtk
|
|
License: GPLv2+
|
|
Group: System/Base
|
|
Summary: Graphical front-end for systemd
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description gtk
|
|
Graphical front-end for systemd system and service manager.
|
|
|
|
%package sysvinit
|
|
License: GPLv2+
|
|
Group: System/Base
|
|
Summary: System V init tools
|
|
Requires: %{name} = %{version}-%{release}
|
|
Provides: sbin_init
|
|
Conflicts: sysvinit
|
|
Conflicts: upstart
|
|
|
|
%description sysvinit
|
|
Drop-in replacement of System V init tools.
|
|
|
|
#%package plymouth
|
|
#License: GPLv2+
|
|
#Group: System/Base
|
|
#Summary: Plymouth support for systemd
|
|
#Requires: %{name} = %{version}-%{release}
|
|
#Requires: plymouth
|
|
#
|
|
#%description plymouth
|
|
#Plymouth integration for systemd
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch1 -p1
|
|
|
|
%build
|
|
autoreconf -fiv
|
|
# prevent pre-generated and distributed files from re-building
|
|
find . -name "*.[1-8]" -exec touch '{}' \;
|
|
touch src/systemadm.c
|
|
export V=1
|
|
%configure \
|
|
--with-distro=suse \
|
|
--docdir=%{_docdir}/systemd \
|
|
--with-rootdir= \
|
|
CFLAGS="$RPM_OPT_FLAGS"
|
|
# rebuild due to libnotify 0.7 in factory
|
|
touch *.vala */*.vala
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
%makeinstall
|
|
find $RPM_BUILD_ROOT -type f -name '*.la' -exec rm -f {} ';'
|
|
mkdir -p $RPM_BUILD_ROOT/sbin
|
|
ln -s ../bin/systemd $RPM_BUILD_ROOT/sbin/init
|
|
ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/reboot
|
|
ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/halt
|
|
ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/shutdown
|
|
ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/poweroff
|
|
ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/telinit
|
|
ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/runlevel
|
|
rm -rf $RPM_BUILD_ROOT/etc/systemd/system/*.target.wants
|
|
rm -f $RPM_BUILD_ROOT/etc/systemd/system/default.target
|
|
rm -f $RPM_BUILD_ROOT/lib/systemd/system/plymouth-*.service
|
|
rm -f $RPM_BUILD_ROOT/lib/systemd/system/*.wants/plymouth-*.service
|
|
rm -f $RPM_BUILD_ROOT/lib/systemd/system/systemd-ask-password-plymouth.*
|
|
# alias for /etc/init.d/*
|
|
ln -s hwclock-load.service $RPM_BUILD_ROOT/lib/systemd/system/clock.service
|
|
ln -s systemd-random-seed-load.service $RPM_BUILD_ROOT/lib/systemd/system/random.service
|
|
ln -s systemd-tmpfiles-setup.service $RPM_BUILD_ROOT/lib/systemd/system/cleanup.service
|
|
ln -s fsck-root.service $RPM_BUILD_ROOT/lib/systemd/system/rootfsck.service
|
|
ln -s systemd-sysctl.service $RPM_BUILD_ROOT/lib/systemd/system/sysctl.service
|
|
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/earlysyslog.service
|
|
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/localfs.service
|
|
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/crypto-early.service
|
|
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/crypto.service
|
|
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/cgroup.service
|
|
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/klog.service
|
|
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/ldconfig.service
|
|
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/loadmodules.service
|
|
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/localnet.service
|
|
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/proc.service
|
|
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/swap.service
|
|
|
|
#(cd $RPM_BUILD_ROOT && find . -name '*plymouth*') > files.plymouth
|
|
|
|
%post
|
|
/bin/systemd-machine-id-setup >/dev/null 2>&1 || :
|
|
/bin/systemctl daemon-reexec >/dev/null 2>&1 || :
|
|
|
|
# Create default config in /etc at first install.
|
|
# Later package updates should not overwrite these settings.
|
|
if [ "$1" -eq 1 ]; then
|
|
# Try to read default runlevel from the old inittab if it exists
|
|
runlevel=$(awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
|
|
if [ -n "$runlevel" ] ; then
|
|
/bin/ln -sf /lib/systemd/system/runlevel$runlevel.target /etc/systemd/system/default.target 2>&1 || :
|
|
fi
|
|
# Enable these services by default.
|
|
/bin/systemctl enable \
|
|
getty@.service \
|
|
hwclock-load.service \
|
|
systemd-readahead-collect.service \
|
|
systemd-readahead-replay.service \
|
|
remote-fs.target >/dev/null 2>&1 || :
|
|
fi
|
|
|
|
%preun
|
|
if [ $1 -eq 0 ]; then
|
|
/bin/systemctl disable \
|
|
getty@.service \
|
|
hwclock-load.service \
|
|
systemd-readahead-collect.service \
|
|
systemd-readahead-replay.service \
|
|
remote-fs.target >/dev/null 2>&1 || :
|
|
rm -f /etc/systemd/system/default.target 2>&1 || :
|
|
fi
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
/bin/systemd
|
|
/bin/systemctl
|
|
/bin/systemd-notify
|
|
/bin/systemd-ask-password
|
|
/bin/systemd-tty-ask-password-agent
|
|
/bin/systemd-tmpfiles
|
|
/bin/systemd-machine-id-setup
|
|
/usr/bin/systemd-nspawn
|
|
/usr/bin/systemd-stdio-bridge
|
|
/usr/bin/systemd-analyze
|
|
%{_bindir}/systemd-cgls
|
|
/lib/systemd/systemd-*
|
|
%dir /lib/systemd/system-shutdown
|
|
/%{_lib}/security/pam_systemd.so
|
|
%dir %{_sysconfdir}/systemd/system
|
|
%dir %{_sysconfdir}/systemd/user
|
|
%dir %{_sysconfdir}/xdg/systemd
|
|
%dir %{_sysconfdir}/xdg/systemd/user
|
|
|
|
%dir /usr/lib/modules-load.d
|
|
%dir %{_sysconfdir}/modules-load.d
|
|
%dir /usr/lib/tmpfiles.d
|
|
%dir %{_sysconfdir}/tmpfiles.d
|
|
%dir /usr/lib/binfmt.d
|
|
%dir %{_sysconfdir}/binfmt.d
|
|
%dir /usr/lib/sysctl.d
|
|
%dir %{_sysconfdir}/sysctl.d
|
|
/usr/lib/tmpfiles.d/*.conf
|
|
%config(noreplace) %{_sysconfdir}/systemd/system.conf
|
|
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf
|
|
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf
|
|
%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.*.xml
|
|
%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
|
|
%{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
|
|
%{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
|
|
%{_datadir}/polkit-1
|
|
%{_datadir}/polkit-1/actions
|
|
%{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
|
|
%{_datadir}/pkgconfig/systemd.pc
|
|
# Packaged in plymouth subpackage
|
|
#%exclude /lib/systemd/system/plymouth-*.service
|
|
#%exclude /lib/systemd/system/*.wants/plymouth-*.service
|
|
#%exclude /lib/systemd/system/systemd-ask-password-plymouth.*
|
|
# Packaged in gtk subpackage
|
|
%exclude %{_mandir}/man1/systemadm.1*
|
|
# Packaged in sysvinit subpackage
|
|
%exclude %{_mandir}/man1/init.1*
|
|
%exclude %{_mandir}/man8/halt.8*
|
|
%exclude %{_mandir}/man8/reboot.8*
|
|
%exclude %{_mandir}/man8/shutdown.8*
|
|
%exclude %{_mandir}/man8/poweroff.8*
|
|
%exclude %{_mandir}/man8/telinit.8*
|
|
%exclude %{_mandir}/man8/runlevel.8*
|
|
%{_mandir}/man1/*.1*
|
|
%{_mandir}/man3/*.3*
|
|
%{_mandir}/man5/*.5*
|
|
%{_mandir}/man7/*.7*
|
|
%{_mandir}/man8/*.8*
|
|
%{_docdir}/systemd
|
|
/lib/udev/rules.d/*.rules
|
|
%dir /lib/systemd
|
|
/lib/systemd/system
|
|
/lib/systemd/system-generators
|
|
%dir /usr/lib/systemd
|
|
/usr/lib/systemd/user
|
|
%dir %{_sysconfdir}/systemd
|
|
%dir %{_sysconfdir}/bash_completion.d
|
|
/etc/bash_completion.d/systemctl-bash-completion.sh
|
|
|
|
%files gtk
|
|
%defattr(-,root,root,-)
|
|
%{_bindir}/systemadm
|
|
%{_bindir}/systemd-gnome-ask-password-agent
|
|
%{_mandir}/man1/systemadm.1*
|
|
|
|
#%files plymouth
|
|
#%defattr(-,root,root,-)
|
|
#/lib/systemd/system/plymouth-*.service
|
|
#/lib/systemd/system/*.wants/plymouth-*.service
|
|
#/lib/systemd/system/systemd-ask-password-plymouth.*
|
|
|
|
%files sysvinit
|
|
%defattr(-,root,root,-)
|
|
/sbin/init
|
|
/sbin/reboot
|
|
/sbin/halt
|
|
/sbin/shutdown
|
|
/sbin/poweroff
|
|
/sbin/telinit
|
|
/sbin/runlevel
|
|
%{_mandir}/man1/init.1*
|
|
%{_mandir}/man8/halt.8*
|
|
%{_mandir}/man8/reboot.8*
|
|
%{_mandir}/man8/shutdown.8*
|
|
%{_mandir}/man8/poweroff.8*
|
|
%{_mandir}/man8/telinit.8*
|
|
%{_mandir}/man8/runlevel.8*
|
|
|
|
%changelog
|