Update to 0.35.1
This commit is contained in:
parent
f7e8942758
commit
2484c683a6
@ -1 +1 @@
|
||||
libcgroup-0.34.tar.bz2
|
||||
libcgroup-0.35.1.tar.bz2
|
||||
|
@ -56,15 +56,18 @@ diff -up libcgroup-0.34/samples/cgconfig.conf.orig libcgroup-0.34/samples/cgconf
|
||||
+ net_cls = /cgroup/net_cls;
|
||||
+}
|
||||
+
|
||||
diff -up libcgroup-0.34/samples/cgrules.conf.orig libcgroup-0.34/samples/cgrules.conf
|
||||
--- libcgroup-0.34/samples/cgrules.conf.orig 2009-06-29 13:21:11.000000000 +0200
|
||||
+++ libcgroup-0.34/samples/cgrules.conf 2009-10-19 10:14:00.000000000 +0200
|
||||
@@ -47,5 +47,7 @@
|
||||
#peter cpu test1/
|
||||
#% memory test2/
|
||||
#@root * admingroup/
|
||||
-#* * default/
|
||||
+
|
||||
+# As default rule, all processes belong to root group:
|
||||
+* * /
|
||||
# End of file
|
||||
diff -up libcgroup-0.35.1/samples/cgconfig.sysconfig.orig libcgroup-0.35.1/samples/cgconfig.sysconfig
|
||||
--- libcgroup-0.35.1/samples/cgconfig.sysconfig.orig 2010-03-09 14:56:34.000000000 +0100
|
||||
+++ libcgroup-0.35.1/samples/cgconfig.sysconfig 2010-03-09 16:30:12.000000000 +0100
|
||||
@@ -5,8 +5,6 @@
|
||||
# controller to limit cpu.shares of this default group and allowing some more
|
||||
# important group take most of the CPU.
|
||||
#
|
||||
-# By default, create these groups:
|
||||
-CREATE_DEFAULT=yes
|
||||
-
|
||||
-# Uncomment following line to disable creation of the default group on startup:
|
||||
-# CREATE_DEFAULT=no
|
||||
+# By default, do not create these groups:
|
||||
+# CREATE_DEFAULT=yes
|
||||
+CREATE_DEFAULT=no
|
||||
|
@ -1,55 +0,0 @@
|
||||
Remove depencency on LSB. The redhat-lsb package pulls lot of dependencies
|
||||
we do not care about (like X11, QT, ...). We want libcgroup to be able to
|
||||
run without this bloat.
|
||||
|
||||
From: Jan Safranek <jsafrane@redhat.com>
|
||||
---
|
||||
|
||||
scripts/init.d/cgconfig.in | 11 ++++++++++-
|
||||
scripts/init.d/cgred.in | 10 +++++++++-
|
||||
2 files changed, 19 insertions(+), 2 deletions(-)
|
||||
|
||||
|
||||
diff --git a/scripts/init.d/cgconfig.in b/scripts/init.d/cgconfig.in
|
||||
index 543cb9f..80df311 100644
|
||||
--- a/scripts/init.d/cgconfig.in
|
||||
+++ b/scripts/init.d/cgconfig.in
|
||||
@@ -46,7 +46,16 @@ servicename=cgconfig
|
||||
#
|
||||
# Source LSB routines
|
||||
#
|
||||
-. /lib/lsb/init-functions
|
||||
+. /etc/rc.d/init.d/functions
|
||||
+log_success_msg () {
|
||||
+ echo -n $*; success "$*"; echo
|
||||
+}
|
||||
+log_failure_msg () {
|
||||
+ echo -n $*; failure "$*"; echo
|
||||
+}
|
||||
+log_warning_msg () {
|
||||
+ echo -n $*; warning "$*"; echo
|
||||
+}
|
||||
|
||||
parse_mounts() {
|
||||
while read name mountpt fs opts other
|
||||
diff --git a/scripts/init.d/cgred.in b/scripts/init.d/cgred.in
|
||||
index db9c2ac..e810d5b 100644
|
||||
--- a/scripts/init.d/cgred.in
|
||||
+++ b/scripts/init.d/cgred.in
|
||||
@@ -40,7 +40,15 @@ CGRED_BIN=$sbindir/cgrulesengd
|
||||
|
||||
# Source function library & LSB routines
|
||||
. /etc/rc.d/init.d/functions
|
||||
-. /lib/lsb/init-functions
|
||||
+log_success_msg () {
|
||||
+ echo -n $*; success "$*"; echo
|
||||
+}
|
||||
+log_failure_msg () {
|
||||
+ echo -n $*; failure "$*"; echo
|
||||
+}
|
||||
+log_warning_msg () {
|
||||
+ echo -n $*; warning "$*"; echo
|
||||
+}
|
||||
|
||||
# Read in configuration options.
|
||||
if [ -f "/etc/sysconfig/cgred.conf" ] ; then
|
@ -1,20 +0,0 @@
|
||||
diff --git a/scripts/init.d/cgconfig b/scripts/init.d/cgconfig
|
||||
index 1c60b86..fe3ff65 100644
|
||||
--- a/scripts/init.d/cgconfig.in
|
||||
+++ b/scripts/init.d/cgconfig.in
|
||||
@@ -122,6 +122,15 @@ start() {
|
||||
${MOUNTPOINT[$i]}/$defaultcgroup/cpuset.mems
|
||||
fi
|
||||
#
|
||||
+ # special rule for cpu
|
||||
+ #
|
||||
+ echo ${MOUNTOPTS[$i]} | grep -q -w cpu
|
||||
+ if [ $? -eq 0 ]
|
||||
+ then
|
||||
+ cat ${MOUNTPOINT[$i]}/cpu.rt_runtime_us > \
|
||||
+ ${MOUNTPOINT[$i]}/$defaultcgroup/cpu.rt_runtime_us
|
||||
+ fi
|
||||
+ #
|
||||
# classify everything to default cgroup
|
||||
#
|
||||
for j in `ps --no-headers -eL o tid`
|
@ -1,17 +1,15 @@
|
||||
%define soversion 1.0.34
|
||||
%define soversion 1.0.35
|
||||
|
||||
Name: libcgroup
|
||||
Summary: Tools and libraries to control and monitor control groups
|
||||
Group: Development/Libraries
|
||||
Version: 0.34
|
||||
Release: 4%{?dist}
|
||||
Version: 0.35.1
|
||||
Release: 1%{?dist}
|
||||
License: LGPLv2+
|
||||
URL: http://libcg.sourceforge.net/
|
||||
Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2
|
||||
Source1: README.Fedora
|
||||
Patch0: fedora-fix-initscripts.patch
|
||||
Patch1: fedora-workaround-for-sysdefault.patch
|
||||
Patch2: fedora-config.patch
|
||||
Patch1: fedora-config.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: byacc
|
||||
@ -19,11 +17,21 @@ BuildRequires: flex
|
||||
BuildRequires: coreutils
|
||||
Requires(post): chkconfig, /sbin/service
|
||||
Requires(preun): /sbin/chkconfig
|
||||
Requires: redhat-lsb
|
||||
|
||||
%description
|
||||
Control groups infrastructure. The tools and library help manipulate, control,
|
||||
administrate and monitor control groups and the associated controllers.
|
||||
|
||||
%package pam
|
||||
Summary: A Pluggable Authentication Module for libcgroup
|
||||
Group: System Environment/Base
|
||||
Requires: libcgroup = %{version}-%{release}
|
||||
|
||||
%description pam
|
||||
Linux-PAM module, which allows administrators to classify the user's login
|
||||
processes to pre-configured control group.
|
||||
|
||||
%package devel
|
||||
Summary: Development libraries to develop applications that utilize control groups
|
||||
Group: Development/Libraries
|
||||
@ -36,9 +44,8 @@ provide scripts to manage that configuration.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .fedora
|
||||
%patch1 -p1 -b .sysdefault
|
||||
%patch2 -p1 -b .config
|
||||
%patch1 -p1 -b .config
|
||||
|
||||
%build
|
||||
%configure --bindir=/bin --sbindir=/sbin --libdir=/%{_lib}
|
||||
|
||||
@ -49,14 +56,10 @@ make %{?_smp_mflags}
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
# install init scripts
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_initrddir}
|
||||
cp scripts/init.d/cgconfig $RPM_BUILD_ROOT/%{_initrddir}/cgconfig
|
||||
cp scripts/init.d/cgred $RPM_BUILD_ROOT/%{_initrddir}/cgred
|
||||
|
||||
# install config files
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
|
||||
cp samples/cgred.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cgred.conf
|
||||
cp samples/cgconfig.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cgconfig
|
||||
cp samples/cgconfig.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgconfig.conf
|
||||
cp samples/cgrules.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgrules.conf
|
||||
|
||||
@ -98,6 +101,7 @@ fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/cgconfig
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/cgred.conf
|
||||
%config(noreplace) %{_sysconfdir}/cgconfig.conf
|
||||
%config(noreplace) %{_sysconfdir}/cgrules.conf
|
||||
@ -105,7 +109,11 @@ fi
|
||||
/bin/cgexec
|
||||
/bin/cgclassify
|
||||
/bin/cgcreate
|
||||
/bin/cgget
|
||||
/bin/cgset
|
||||
/bin/cgdelete
|
||||
/bin/lscgroup
|
||||
/bin/lssubsys
|
||||
/sbin/cgconfigparser
|
||||
/sbin/cgrulesengd
|
||||
/sbin/cgclear
|
||||
@ -114,10 +122,13 @@ fi
|
||||
%attr(0644, root, root) %{_mandir}/man8/*
|
||||
%attr(0755,root,root) %{_initrddir}/cgconfig
|
||||
%attr(0755,root,root) %{_initrddir}/cgred
|
||||
%attr(0755,root,root) /%{_lib}/security/pam_cgroup.so
|
||||
%doc COPYING INSTALL README_daemon README.Fedora
|
||||
%attr(0755,root,root) %dir /cgroup
|
||||
|
||||
%files pam
|
||||
%defattr(-,root,root,-)
|
||||
%attr(0755,root,root) /%{_lib}/security/pam_cgroup.so
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_includedir}/libcgroup.h
|
||||
@ -126,6 +137,10 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Mar 9 2010 Jan Safranek <jsafrane@redhat.com> 0.35-1
|
||||
- Update to 0.35.1
|
||||
- Separate pam module to its own subpackage
|
||||
|
||||
* Mon Jan 18 2010 Jan Safranek <jsafrane@redhat.com> 0.34-4
|
||||
- Added README.Fedora to describe initscript integration
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user