Create the 'cgred' group as system group, not as user
Fix cgclassify exit code
This commit is contained in:
parent
3d3b0e4c27
commit
423018f381
27
libcgrouop-0.37-cgclassify.patch
Normal file
27
libcgrouop-0.37-cgclassify.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
commit 1d7bbecfea73bd0b21c457c240e9049f8a5c40cc
|
||||||
|
Author: Jan Safranek <jsafrane@redhat.com>
|
||||||
|
Date: Fri Jan 7 13:29:04 2011 +0100
|
||||||
|
|
||||||
|
BUGFIX: add missing braces
|
||||||
|
|
||||||
|
Fix cgclassify to return zero exit code when it succeeds.
|
||||||
|
|
||||||
|
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
|
||||||
|
|
||||||
|
diff --git a/src/tools/cgclassify.c b/src/tools/cgclassify.c
|
||||||
|
index 3181105..fcad4b2 100644
|
||||||
|
--- a/src/tools/cgclassify.c
|
||||||
|
+++ b/src/tools/cgclassify.c
|
||||||
|
@@ -45,10 +45,11 @@ static int change_group_path(pid_t pid, struct cgroup_group_spec *cgroup_list[])
|
||||||
|
|
||||||
|
ret = cgroup_change_cgroup_path(cgroup_list[i]->path, pid,
|
||||||
|
(const char*const*) cgroup_list[i]->controllers);
|
||||||
|
- if (ret)
|
||||||
|
+ if (ret) {
|
||||||
|
fprintf(stderr, "Error changing group of pid %d: %s\n",
|
||||||
|
pid, cgroup_strerror(ret));
|
||||||
|
return -1;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
@ -5,7 +5,7 @@ Name: libcgroup
|
|||||||
Summary: Tools and libraries to control and monitor control groups
|
Summary: Tools and libraries to control and monitor control groups
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Version: 0.37
|
Version: 0.37
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://libcg.sourceforge.net/
|
URL: http://libcg.sourceforge.net/
|
||||||
Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2
|
Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2
|
||||||
@ -13,6 +13,7 @@ Source1: README.Fedora
|
|||||||
Patch1: fedora-config.patch
|
Patch1: fedora-config.patch
|
||||||
Patch2: fedora-fix-initscripts.patch
|
Patch2: fedora-fix-initscripts.patch
|
||||||
Patch3: libcgroup-0.36.2-systemd.patch
|
Patch3: libcgroup-0.36.2-systemd.patch
|
||||||
|
Patch4: libcgrouop-0.37-cgclassify.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
BuildRequires: byacc
|
BuildRequires: byacc
|
||||||
@ -50,6 +51,7 @@ provide scripts to manage that configuration.
|
|||||||
%patch1 -p1 -b .config
|
%patch1 -p1 -b .config
|
||||||
%patch2 -p1 -b .lsb
|
%patch2 -p1 -b .lsb
|
||||||
%patch3 -p1 -b .systemd
|
%patch3 -p1 -b .systemd
|
||||||
|
%patch4 -p1 -b .cgclassify
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --bindir=/bin --sbindir=/sbin --libdir=%{_libdir} --enable-initscript-install --enable-pam-module-dir=/%{_lib}/security
|
%configure --bindir=/bin --sbindir=/sbin --libdir=%{_libdir} --enable-initscript-install --enable-pam-module-dir=/%{_lib}/security
|
||||||
@ -91,7 +93,7 @@ cp %SOURCE1 .
|
|||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
getent group cgred >/dev/null || groupadd cgred
|
getent group cgred >/dev/null || groupadd -r cgred
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
@ -150,7 +152,11 @@ fi
|
|||||||
%doc COPYING INSTALL
|
%doc COPYING INSTALL
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Dec 13 2010 Jan Safranek <jsafrane@redhat.com>
|
* Mon Jan 17 2011 Jan Safranek <jsafrane@redhat.com> 0.37-2
|
||||||
|
- Create the 'cgred' group as system group, not as user
|
||||||
|
- Fix cgclassify exit code
|
||||||
|
|
||||||
|
* Mon Dec 13 2010 Jan Safranek <jsafrane@redhat.com> 0.37-1
|
||||||
- Update to 0.37
|
- Update to 0.37
|
||||||
- use /sys/fs/cgroup as default directory to mount control groups (and rely on
|
- use /sys/fs/cgroup as default directory to mount control groups (and rely on
|
||||||
systemd mounting tmpfs there)
|
systemd mounting tmpfs there)
|
||||||
|
Loading…
Reference in New Issue
Block a user