From 2ec2fb493722d2fb274072dfcf0fc8a2a032617e Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Fri, 12 Nov 2010 09:22:30 +0100 Subject: [PATCH] Ignore systemd hierarchy - it's now invisible to libcgroup Resolves: #627378 --- libcgroup-0.36.2-systemd.patch | 24 ++++++++++++++++++++++++ libcgroup.spec | 7 ++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 libcgroup-0.36.2-systemd.patch diff --git a/libcgroup-0.36.2-systemd.patch b/libcgroup-0.36.2-systemd.patch new file mode 100644 index 0000000..e1cf0c5 --- /dev/null +++ b/libcgroup-0.36.2-systemd.patch @@ -0,0 +1,24 @@ +Ignore systemd hierarchy. Quick&dirity fix for bug #627378 + +Author: Dhaval Giani + +@@ -, +, @@ + src/api.c | 8 ++++++++ + 1 file changed, 8 insertions(+) +--- libcgroup-0.36.2/src/api.c ++++ libcgroup-0.36.2/src/api.c +@@ -772,6 +772,14 @@ int cgroup_init(void) + * Check if it is a duplicate + */ + duplicate = 0; ++ ++ /* ++ * Ignore anything to do with systemd ++ */ ++ if (strncmp(mntopt, "name=systemd", ++ strlen("name=systemd")) == 0) ++ continue; ++ + for (j = 0; j < found_mnt; j++) { + if (strncmp(mntopt, cg_mount_table[j].name, + FILENAME_MAX) == 0) { diff --git a/libcgroup.spec b/libcgroup.spec index 73a2538..a7cfb2d 100644 --- a/libcgroup.spec +++ b/libcgroup.spec @@ -5,7 +5,7 @@ Name: libcgroup Summary: Tools and libraries to control and monitor control groups Group: Development/Libraries Version: 0.36.2 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ URL: http://libcg.sourceforge.net/ Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2 @@ -13,6 +13,7 @@ Source1: README.Fedora Patch1: fedora-config.patch Patch2: fedora-fix-initscripts.patch Patch3: libcgroup-0.36.2-initscripts.patch +Patch4: libcgroup-0.36.2-systemd.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pam-devel BuildRequires: byacc @@ -49,6 +50,7 @@ provide scripts to manage that configuration. %patch1 -p1 -b .config %patch2 -p1 -b .lsb %patch3 -p1 -b .running +%patch4 -p1 -b .systemd %build %configure --bindir=/bin --sbindir=/sbin --libdir=%{_libdir} --enable-initscript-install --enable-pam-module-dir=/%{_lib}/security @@ -143,6 +145,9 @@ fi %doc COPYING INSTALL %changelog +* Fri Nov 12 2010 Jan Safranek 0.36.2-3 +- Ignore systemd hierarchy - it's now invisible to libcgroup (#627378) + * Mon Aug 2 2010 Jan Safranek 0.36.2-2 - Fix initscripts to report stopped cgconfig service as not running (#619091)