- Add sysv chkconfig patch to be able to enable / disable sysv

initscripts with systemctl.
- Ensure plymouth support is buildable conditionnally.

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=152
This commit is contained in:
Kay Sievers 2011-06-14 12:55:02 +00:00 committed by Git OBS Bridge
parent 0675ce9c00
commit 1d126eceda
3 changed files with 63 additions and 18 deletions

View File

@ -0,0 +1,25 @@
From ea4192a54fdbfebdec80f445d702625bc3412d7e Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Wed, 8 Jun 2011 15:30:55 +0200
Subject: [PATCH] systemctl: enable sysv chkconfig handling for openSUSE.
---
src/systemctl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/systemctl.c b/src/systemctl.c
index a82cce4..faca797 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -4089,7 +4089,7 @@ static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo
}
if (!f) {
-#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)) || defined(TARGET_MEEGO) && defined (HAVE_SYSV_COMPAT)
+#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_SUSE)) || defined(TARGET_MEEGO) && defined (HAVE_SYSV_COMPAT)
if (endswith(i->name, ".service")) {
char *sysv;
--
1.7.3.4

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Jun 14 12:39:25 UTC 2011 - fcrozat@novell.com
- Add sysv chkconfig patch to be able to enable / disable sysv
initscripts with systemctl.
- Ensure plymouth support is buildable conditionnally.
-------------------------------------------------------------------
Thu May 26 21:16:06 CEST 2011 - kay.sievers@novell.com

View File

@ -17,6 +17,7 @@
# norootforbuild
%define build_plymouth 0
Name: systemd
Url: http://www.freedesktop.org/wiki/Software/systemd
@ -45,6 +46,7 @@ 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
Patch2: 0001-systemctl-enable-sysv-chkconfig-handling-for-openSUS.patch
# Upstream First - Policy:
# Never add any patches to this package without the upstream commit id
@ -82,19 +84,22 @@ 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
%if %{build_plymouth}
%package plymouth
License: GPLv2+
Group: System/Base
Summary: Plymouth support for systemd
Requires: %{name} = %{version}-%{release}
Requires: plymouth
%description plymouth
Plymouth integration for systemd
%endif
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%build
autoreconf -fiv
@ -124,9 +129,11 @@ 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
%if !%{build_plymouth}
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.*
%endif
# aliases for /etc/init.d/*
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/cgroup.service
ln -s systemd-tmpfiles-setup.service $RPM_BUILD_ROOT/lib/systemd/system/cleanup.service
@ -144,7 +151,9 @@ ln -s fsck-root.service $RPM_BUILD_ROOT/lib/systemd/system/rootfsck.service
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/swap.service
ln -s systemd-sysctl.service $RPM_BUILD_ROOT/lib/systemd/system/sysctl.service
ln -s systemd-random-seed-load.service $RPM_BUILD_ROOT/lib/systemd/system/random.service
#(cd $RPM_BUILD_ROOT && find . -name '*plymouth*') > files.plymouth
%if %{build_plymouth}
(cd $RPM_BUILD_ROOT && find . -name '*plymouth*') > files.plymouth
%endif
%post
/bin/systemd-machine-id-setup >/dev/null 2>&1 || :
@ -220,10 +229,12 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/polkit-1/actions
%{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
%{_datadir}/pkgconfig/systemd.pc
%if %{build_plymouth}
# 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.*
%exclude /lib/systemd/system/plymouth-*.service
%exclude /lib/systemd/system/*.wants/plymouth-*.service
%exclude /lib/systemd/system/systemd-ask-password-plymouth.*
%endif
# Packaged in gtk subpackage
%exclude %{_mandir}/man1/systemadm.1*
# Packaged in sysvinit subpackage
@ -256,11 +267,13 @@ rm -rf $RPM_BUILD_ROOT
%{_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.*
%if %{build_plymouth}
%files plymouth
%defattr(-,root,root,-)
/lib/systemd/system/plymouth-*.service
/lib/systemd/system/*.wants/plymouth-*.service
/lib/systemd/system/systemd-ask-password-plymouth.*
%endif
%files sysvinit
%defattr(-,root,root,-)