Author: baggins Date: Thu Feb 10 17:20:17 2011 GMT Module: packages Tag: HEAD ---- Log message: - some sane config defaults - verbose files - added cgred group
---- Files affected: packages/libcgroup: libcgroup.spec (1.18 -> 1.19) , libcgroup-conf.patch (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: packages/libcgroup/libcgroup.spec diff -u packages/libcgroup/libcgroup.spec:1.18 packages/libcgroup/libcgroup.spec:1.19 --- packages/libcgroup/libcgroup.spec:1.18 Wed Feb 9 18:17:40 2011 +++ packages/libcgroup/libcgroup.spec Thu Feb 10 18:20:12 2011 @@ -3,7 +3,7 @@ Summary(pl.UTF-8): Narzędzia i biblioteka do kontrolowania i monitorowania grup kontroli Name: libcgroup Version: 0.37 -Release: 2.2 +Release: 2.3 License: LGPL v2+ Group: Libraries Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2 @@ -12,6 +12,7 @@ Source2: cgred.init Patch0: %{name}-pam.patch Patch1: %{name}-group-write.patch +Patch2: %{name}-conf.patch URL: http://libcg.sourceforge.net/ BuildRequires: autoconf BuildRequires: automake @@ -22,8 +23,12 @@ BuildRequires: pam-devel Requires(post): /sbin/ldconfig Requires(post,preun): /sbin/chkconfig +Requires(postun): /usr/sbin/groupdel +Requires(pre): /usr/bin/getgid +Requires(pre): /usr/sbin/groupadd Requires: procps Requires: rc-scripts +Provides: group(cgred) BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _exec_prefix %{nil} @@ -73,6 +78,7 @@ %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build %{__libtoolize} @@ -109,8 +115,8 @@ %clean rm -rf $RPM_BUILD_ROOT -#%%pre -#getent group cgred >/dev/null || groupadd cgred +%pre +%groupadd -g 261 -r -f cgred %post /sbin/ldconfig @@ -125,23 +131,34 @@ /sbin/chkconfig --del cgred fi -%postun -p /sbin/ldconfig +%postun +/sbin/ldconfig +if [ "$1" = "0" ]; then + %groupremove cgred +fi %files %defattr(644,root,root,755) %doc README README_daemon -%attr(754,root,root) /etc/rc.d/init.d/cg* -%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cg* +%attr(754,root,root) /etc/rc.d/init.d/cgconfig +%attr(754,root,root) /etc/rc.d/init.d/cgred +%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cgconfig +%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cgred.conf %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cg*.conf - -%attr(755,root,root) /bin/cg* -%attr(755,root,root) /bin/lscgroup -%attr(755,root,root) /bin/lssubsys -%attr(755,root,root) /sbin/cg* - %attr(755,root,root) /%{_lib}/libcgroup.so.*.*.* %attr(755,root,root) %ghost /%{_lib}/libcgroup.so.1 - +%attr(755,root,root) /bin/cgclassify +%attr(755,root,root) /bin/cgcreate +%attr(755,root,root) /bin/cgdelete +%attr(2755,root,cgred) /bin/cgexec +%attr(755,root,root) /bin/cgget +%attr(755,root,root) /bin/cgset +%attr(755,root,root) /bin/cgsnapshot +%attr(755,root,root) /bin/lscgroup +%attr(755,root,root) /bin/lssubsys +%attr(755,root,root) /sbin/cgclear +%attr(755,root,root) /sbin/cgconfigparser +%attr(755,root,root) /sbin/cgrulesengd %{_mandir}/man1/ls*.1* %{_mandir}/man1/cg*.1* %{_mandir}/man5/cg*.5* @@ -164,6 +181,11 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.19 2011/02/10 17:20:12 baggins +- some sane config defaults +- verbose files +- added cgred group + Revision 1.18 2011/02/09 17:17:40 baggins - fix permissions so group also has write access as per documentation ================================================================ Index: packages/libcgroup/libcgroup-conf.patch diff -u /dev/null packages/libcgroup/libcgroup-conf.patch:1.1 --- /dev/null Thu Feb 10 18:20:17 2011 +++ packages/libcgroup/libcgroup-conf.patch Thu Feb 10 18:20:12 2011 @@ -0,0 +1,72 @@ +diff -ur libcgroup-0.37/samples/cgconfig.conf libcgroup-0.37-conf/samples/cgconfig.conf +--- libcgroup-0.37/samples/cgconfig.conf 2010-10-20 15:59:13.000000000 +0200 ++++ libcgroup-0.37-conf/samples/cgconfig.conf 2011-02-10 18:05:17.560363010 +0100 +@@ -10,39 +10,19 @@ + # WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + # +-#group daemons/www { +-# perm { +-# task { +-# uid = root; +-# gid = webmaster; +-# } +-# admin { +-# uid = root; +-# gid = root; +-# } +-# } +-# cpu { +-# cpu.shares = 1000; +-# } +-#} ++# See man cgconfig.conf for further details. + # +-#group daemons/ftp { +-# perm { +-# task { +-# uid = root; +-# gid = ftpmaster; +-# } +-# admin { +-# uid = root; +-# gid = root; +-# } +-# } +-# cpu { +-# cpu.shares = 500; +-# } +-#} +-# +-#mount { +-# cpu = /mnt/cgroups/cpu; +-# cpuacct = /mnt/cgroups/cpuacct; +-#} ++# By default, mount all controllers to /cgroup/<controller> ++ ++mount { ++ blkio = /dev/cgroup/blkio; ++ cpu = /dev/cgroup/cpu; ++ cpuacct = /dev/cgroup/cpuacct; ++ cpuset = /dev/cgroup/cpuset; ++ debug = /dev/cgroup/debug; ++ devices = /dev/cgroup/devices; ++ freezer = /dev/cgroup/freezer; ++ memory = /dev/cgroup/memory; ++ net_cls = /dev/cgroup/net_cls; ++} ++ +diff -ur libcgroup-0.37/samples/cgconfig.sysconfig libcgroup-0.37-conf/samples/cgconfig.sysconfig +--- libcgroup-0.37/samples/cgconfig.sysconfig 2010-10-20 15:59:13.000000000 +0200 ++++ libcgroup-0.37-conf/samples/cgconfig.sysconfig 2011-02-10 18:06:29.233508500 +0100 +@@ -5,8 +5,5 @@ + # 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 ++# Don't create default group on startup ++CREATE_DEFAULT=no ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/libcgroup/libcgroup.spec?r1=1.18&r2=1.19&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
