[libcgroup] Split tools part from libcgroup package Resolves: #628622

Jan Šafránek jsafrane at fedoraproject.org
Wed May 25 11:19:46 UTC 2011


commit 73e4df31258f7a80338aebddd36744640b411acb
Author: Jan Safranek <jsafrane at redhat.com>
Date:   Wed May 25 13:03:22 2011 +0200

    Split tools part from libcgroup package
    Resolves: #628622

 libcgroup.spec |   50 ++++++++++++++++++++++++++++++++++----------------
 1 files changed, 34 insertions(+), 16 deletions(-)
---
diff --git a/libcgroup.spec b/libcgroup.spec
index 892ae90..09f35bd 100644
--- a/libcgroup.spec
+++ b/libcgroup.spec
@@ -2,10 +2,10 @@
 %define soversion_major 1
 
 Name: libcgroup
-Summary: Tools and libraries to control and monitor control groups
+Summary: Library to control and monitor control groups
 Group: Development/Libraries
 Version: 0.37.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: LGPLv2+
 URL: http://libcg.sourceforge.net/
 Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2
@@ -13,7 +13,7 @@ Source1: README.Fedora
 Patch1: fedora-config.patch
 Patch2: fedora-fix-initscripts.patch
 Patch3: libcgroup-0.36.2-systemd.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: pam-devel
 BuildRequires: byacc
 BuildRequires: flex
@@ -23,13 +23,22 @@ Requires(post): chkconfig, /sbin/service
 Requires(preun): /sbin/chkconfig
 
 %description
-Control groups infrastructure. The tools and library help manipulate, control,
+Control groups infrastructure. The library helps manipulate, control,
 administrate and monitor control groups and the associated controllers.
 
+%package tools
+Summary: Command-line utility programs, services and daemons for libcgroup
+Group: System Environment/Base
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description tools
+This package contains command-line programs, services and a daemon for
+manipulating control groups using the libcgroup library.
+
 %package pam
 Summary: A Pluggable Authentication Module for libcgroup
 Group: System Environment/Base
-Requires: libcgroup = %{version}-%{release}
+Requires: %{name}%{?_isa} = %{version}-%{release}
 
 %description pam
 Linux-PAM module, which allows administrators to classify the user's login
@@ -38,7 +47,7 @@ processes to pre-configured control group.
 %package devel
 Summary: Development libraries to develop applications that utilize control groups
 Group: Development/Libraries
-Requires: libcgroup = %{version}-%{release}
+Requires: %{name}%{?_isa} = %{version}-%{release}
 
 %description devel
 It provides API to create/delete and modify cgroup nodes. It will also in the
@@ -90,15 +99,18 @@ cp %SOURCE1 .
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%pre
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%pre tools
 getent group cgred >/dev/null || groupadd -r cgred
 
-%post 
-/sbin/ldconfig
+%post tools
 /sbin/chkconfig --add cgred
 /sbin/chkconfig --add cgconfig
 
-%preun
+%preun tools
 if [ $1 = 0 ]; then
     /sbin/service cgred stop > /dev/null 2>&1 || :
     /sbin/service cgconfig stop > /dev/null 2>&1 || :
@@ -106,17 +118,21 @@ if [ $1 = 0 ]; then
     /sbin/chkconfig --del cgred
 fi
 
-%postun -p /sbin/ldconfig
 
 %files 
 %defattr(-,root,root,-)
+/%{_lib}/libcgroup.so.*
+%doc COPYING INSTALL README.Fedora
+%attr(0755,root,root) %ghost %dir /cgroup
+
+%files tools
+%defattr(-,root,root,-)
+%doc README_daemon
 %config(noreplace) %{_sysconfdir}/sysconfig/cgred.conf
 %config(noreplace) %{_sysconfdir}/sysconfig/cgconfig
 %config(noreplace) %{_sysconfdir}/cgconfig.conf
 %config(noreplace) %{_sysconfdir}/cgrules.conf
 %config(noreplace) %{_sysconfdir}/cgsnapshot_blacklist.conf
-/%{_lib}/libcgroup.so.*
-%attr(2755, root, cgred) /bin/cgexec
 /bin/cgclassify
 /bin/cgcreate
 /bin/cgget
@@ -128,13 +144,12 @@ fi
 /sbin/cgrulesengd
 /sbin/cgclear
 /bin/cgsnapshot
+%attr(2755, root, cgred) /bin/cgexec
 %attr(0644, root, root) %{_mandir}/man1/*
 %attr(0644, root, root) %{_mandir}/man5/*
 %attr(0644, root, root) %{_mandir}/man8/*
 %attr(0755,root,root) %{_initrddir}/cgconfig
 %attr(0755,root,root) %{_initrddir}/cgred
-%doc COPYING INSTALL README_daemon README.Fedora
-%attr(0755,root,root) %ghost %dir /cgroup
 
 %files pam
 %defattr(-,root,root,-)
@@ -147,9 +162,12 @@ fi
 %{_includedir}/libcgroup/*.h
 %{_libdir}/libcgroup.*
 /%{_libdir}/pkgconfig/libcgroup.pc
-%doc COPYING INSTALL 
+%doc COPYING INSTALL
 
 %changelog
+* Wed May 25 2011 Ivana Hutarova Varekova <varekova at redhat.com> 0.37.1-3
+- split tools part from libcgroup package
+
 * Fri Apr  8 2011 Jan Safranek <jsafrane at redhat.com> 0.37.1-2
 - Remove /cgroup directory, groups are created in /sys/fs/cgroup
   (#694687)


More information about the scm-commits mailing list