# Conditional build:
%bcond_without audit # without audit support
%bcond_without cryptsetup # without cryptsetup support
-%bcond_without gtk # build gtk tools
%bcond_without pam # PAM authentication support
-%bcond_with plymouth # plymouth support
+%bcond_without plymouth # do not install plymouth units
%bcond_without selinux # without SELinux support
%bcond_without tcpd # libwrap (tcp_wrappers) support
Summary(pl.UTF-8): systemd - zarządca systemu i usług dla Linuksa
Name: systemd
Version: 44
-Release: 3
+Release: 8
License: GPL v2+
Group: Base
Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.xz
Source11: pld-storage-init.service
Source12: pld-wait-storage.service
Source13: pld-storage-init.sh
+Source14: pld-clean-tmp.service
+Source15: pld-clean-tmp.sh
Patch0: target-pld.patch
Patch1: config-pld.patch
Patch2: shut-sysv-up.patch
Patch3: pld-sysv-network.patch
Patch4: tmpfiles-not-fatal.patch
Patch5: CVE-2012-1174.patch
+Patch6: dont-trash-X-sessions.patch
URL: http://www.freedesktop.org/wiki/Software/systemd
BuildRequires: acl-devel
%{?with_audit:BuildRequires: audit-libs-devel}
BuildRequires: pkgconfig >= 0.9.0
BuildRequires: rpmbuild(macros) >= 1.627
BuildRequires: udev-devel >= 1:172
-# not required for building from release (which contains *.c for *.vala)
-#BuildRequires: vala >= 0.10.0
BuildRequires: xz-devel
-%if %{with gtk}
-BuildRequires: glib2-devel >= 1:2.26.1
-BuildRequires: gtk+2-devel >= 2:2.24.0
-BuildRequires: libgee-devel
-BuildRequires: libnotify-devel >= 0.7.0
-%endif
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-units = %{version}-%{release}
Requires: /etc/os-release
Requires: dbus >= 1.4.16-6
Requires: filesystem >= 4.0-2
Requires: libutempter
-Requires: rc-scripts >= 0.4.5.1-7
+Requires: rc-scripts >= 0.4.5.3-7
Requires: setup >= 2.8.0-2
Requires: udev-core >= 1:175-5
Requires: udev-libs >= 1:172
Summary(pl.UTF-8): Jednostki wspierające Plymouth dla systemd
Group: Base
Requires: %{name}-units = %{version}-%{release}
+Requires: plymouth
%description plymouth
Plymouth (graphical boot) support units for systemd.
%description plymouth -l pl.UTF-8
Jednostki wspierające Plymouth (graficzny start systemu) dla systemd.
-%package gtk
-Summary: Graphical frontend for systemd
-Summary(pl.UTF-8): Graficzny interfejs do systemd
-Group: Base
-Requires: %{name} = %{version}-%{release}
-Requires: polkit
-
-%description gtk
-Graphical front-end for systemd.
-
-%description gtk -l pl.UTF-8
-Graficzny interfejs do systemd.
-
%package analyze
Summary: Tool for processing systemd profiling information
Group: Base
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
cp -p %{SOURCE2} src/systemd_booted.c
%build
%configure \
%{__enable_disable audit} \
%{__enable_disable cryptsetup libcryptsetup} \
- %{__enable_disable gtk} \
+ --disable-gtk \
%{__enable_disable pam} \
%{__enable_disable plymouth} \
%{__enable_disable selinux} \
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-./libtool --mode=install install -m755 systemd_booted $RPM_BUILD_ROOT/bin/systemd_booted
+./libtool --mode=install install -p -m755 systemd_booted $RPM_BUILD_ROOT/bin/systemd_booted
# Main binary has been moved, but we don't want to break existing installs
ln -s ../lib/systemd/systemd $RPM_BUILD_ROOT/bin/systemd
ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/random.service
# add static (non-NetworkManager) networking
-install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/network.service
+cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/network.service
# install compatibility tmpfiles configs
-install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/compat-pld-media.conf
-install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/compat-pld-var-run.conf
+cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/compat-pld-media.conf
+cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/compat-pld-var-run.conf
# Install and enable storage subsystems support services (RAID, LVM, etc.)
-install %{SOURCE10} $RPM_BUILD_ROOT%{systemdunitdir}/pld-storage-init-late.service
-install %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}/pld-storage-init.service
-install %{SOURCE12} $RPM_BUILD_ROOT%{systemdunitdir}/pld-wait-storage.service
-install %{SOURCE13} $RPM_BUILD_ROOT/lib/systemd/pld-storage-init
+cp -p %{SOURCE10} $RPM_BUILD_ROOT%{systemdunitdir}/pld-storage-init-late.service
+cp -p %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}/pld-storage-init.service
+cp -p %{SOURCE12} $RPM_BUILD_ROOT%{systemdunitdir}/pld-wait-storage.service
+cp -p %{SOURCE14} $RPM_BUILD_ROOT%{systemdunitdir}/pld-clean-tmp.service
+install -p %{SOURCE13} $RPM_BUILD_ROOT/lib/systemd/pld-storage-init
+install -p %{SOURCE15} $RPM_BUILD_ROOT/lib/systemd/pld-clean-tmp
+
+ln -s ../pld-storage-init-late.service $RPM_BUILD_ROOT%{systemdunitdir}/local-fs.target.wants
+ln -s ../pld-storage-init.service $RPM_BUILD_ROOT%{systemdunitdir}/local-fs.target.wants
+ln -s ../pld-clean-tmp.service $RPM_BUILD_ROOT%{systemdunitdir}/local-fs.target.wants
-ln -s ../pld-storage-init-late.service $RPM_BUILD_ROOT%{systemdunitdir}/local-fs.target.wants/pld-storage-init-late.service
-ln -s ../pld-storage-init.service $RPM_BUILD_ROOT%{systemdunitdir}/local-fs.target.wants/pld-storage-init.service
+# handled by rc-local sysv service, no need for generator
+%{__rm} $RPM_BUILD_ROOT/lib/systemd/system-generators/systemd-rc-local-generator
# Make sure these directories are properly owned:
# - halt,kexec,poweroff,reboot: generic ones used by ConsoleKit-systemd,
:> $RPM_BUILD_ROOT/var/log/btmp
:> $RPM_BUILD_ROOT/var/log/wtmp
-%if %{without gtk}
%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/systemadm.1*
-%endif
%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
%{__rm} $RPM_BUILD_ROOT/%{_lib}/security/pam_systemd.la
%post no-compat-tmpfiles
%{__sed} -i -e '/^#/!s/^/# /g' %{_sysconfdir}/tmpfiles.d/compat-pld-var-run.conf
+%post plymouth
+%systemd_reload
+
+%postun plymouth
+%systemd_reload
+
%files
%defattr(644,root,root,755)
%doc DISTRO_PORTING README TODO
%config(noreplace,missingok) %{systemdunitdir}/sysinit.target.wants/plymouth-start.service
%endif
-%if %{with gtk}
-%files gtk
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/systemadm
-%attr(755,root,root) %{_bindir}/systemd-gnome-ask-password-agent
-%{_mandir}/man1/systemadm.1*
-%endif
-
%files analyze
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/systemd-analyze