2010-12-13 13:18:54 +00:00
|
|
|
%define soversion 1.0.37
|
2010-06-22 12:13:49 +00:00
|
|
|
%define soversion_major 1
|
2009-07-07 16:28:14 +00:00
|
|
|
|
2008-06-04 17:22:00 +00:00
|
|
|
Name: libcgroup
|
2011-05-25 11:03:22 +00:00
|
|
|
Summary: Library to control and monitor control groups
|
2008-06-04 17:22:00 +00:00
|
|
|
Group: Development/Libraries
|
2011-03-03 08:47:07 +00:00
|
|
|
Version: 0.37.1
|
2011-05-25 11:03:22 +00:00
|
|
|
Release: 3%{?dist}
|
2008-06-04 17:22:00 +00:00
|
|
|
License: LGPLv2+
|
|
|
|
URL: http://libcg.sourceforge.net/
|
|
|
|
Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2
|
2010-01-18 13:27:12 +00:00
|
|
|
Source1: README.Fedora
|
2010-03-09 15:52:22 +00:00
|
|
|
Patch1: fedora-config.patch
|
2010-06-22 12:27:28 +00:00
|
|
|
Patch2: fedora-fix-initscripts.patch
|
2010-12-13 13:18:54 +00:00
|
|
|
Patch3: libcgroup-0.36.2-systemd.patch
|
2011-05-25 11:03:22 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
2009-07-07 16:28:14 +00:00
|
|
|
BuildRequires: pam-devel
|
2008-06-04 17:22:00 +00:00
|
|
|
BuildRequires: byacc
|
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: coreutils
|
2010-12-13 13:18:54 +00:00
|
|
|
Requires(pre): shadow-utils
|
2009-07-07 16:28:14 +00:00
|
|
|
Requires(post): chkconfig, /sbin/service
|
|
|
|
Requires(preun): /sbin/chkconfig
|
2008-06-04 17:22:00 +00:00
|
|
|
|
|
|
|
%description
|
2011-05-25 11:03:22 +00:00
|
|
|
Control groups infrastructure. The library helps manipulate, control,
|
2008-06-04 17:22:00 +00:00
|
|
|
administrate and monitor control groups and the associated controllers.
|
|
|
|
|
2011-05-25 11:03:22 +00:00
|
|
|
%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.
|
|
|
|
|
2010-03-09 15:52:22 +00:00
|
|
|
%package pam
|
|
|
|
Summary: A Pluggable Authentication Module for libcgroup
|
|
|
|
Group: System Environment/Base
|
2011-05-25 11:03:22 +00:00
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
2010-03-09 15:52:22 +00:00
|
|
|
|
|
|
|
%description pam
|
|
|
|
Linux-PAM module, which allows administrators to classify the user's login
|
|
|
|
processes to pre-configured control group.
|
|
|
|
|
2008-06-04 17:22:00 +00:00
|
|
|
%package devel
|
|
|
|
Summary: Development libraries to develop applications that utilize control groups
|
|
|
|
Group: Development/Libraries
|
2011-05-25 11:03:22 +00:00
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
2008-06-04 17:22:00 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
It provides API to create/delete and modify cgroup nodes. It will also in the
|
|
|
|
future allow creation of persistent configuration for control groups and
|
|
|
|
provide scripts to manage that configuration.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2010-03-09 15:52:22 +00:00
|
|
|
%patch1 -p1 -b .config
|
2010-06-22 12:27:28 +00:00
|
|
|
%patch2 -p1 -b .lsb
|
2010-12-13 13:18:54 +00:00
|
|
|
%patch3 -p1 -b .systemd
|
2010-03-09 15:52:22 +00:00
|
|
|
|
2008-06-04 17:22:00 +00:00
|
|
|
%build
|
2010-06-22 12:13:49 +00:00
|
|
|
%configure --bindir=/bin --sbindir=/sbin --libdir=%{_libdir} --enable-initscript-install --enable-pam-module-dir=/%{_lib}/security
|
2009-03-09 12:30:29 +00:00
|
|
|
|
2008-06-04 17:22:00 +00:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
2009-07-07 16:28:14 +00:00
|
|
|
|
|
|
|
# install config files
|
2009-03-02 11:32:59 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
|
|
|
|
cp samples/cgred.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cgred.conf
|
2010-03-09 15:52:22 +00:00
|
|
|
cp samples/cgconfig.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cgconfig
|
2009-03-02 11:32:59 +00:00
|
|
|
cp samples/cgconfig.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgconfig.conf
|
|
|
|
cp samples/cgrules.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgrules.conf
|
2010-12-13 13:18:54 +00:00
|
|
|
cp samples/cgsnapshot_blacklist.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgsnapshot_blacklist.conf
|
2008-10-23 09:04:57 +00:00
|
|
|
|
2010-06-22 12:13:49 +00:00
|
|
|
# sanitize pam module, we need only pam_cgroup.so
|
|
|
|
mv -f $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so.*.*.* $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so
|
|
|
|
rm -f $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.la $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so.*
|
2009-07-07 16:28:14 +00:00
|
|
|
|
2010-06-22 12:13:49 +00:00
|
|
|
# move the libraries to /
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_lib}
|
|
|
|
mv -f $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_lib}
|
|
|
|
rm -f $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so.%{soversion_major}
|
|
|
|
ln -sf libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_lib}/libcgroup.so.%{soversion_major}
|
2009-07-07 16:28:14 +00:00
|
|
|
ln -sf ../../%{_lib}/libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so
|
2010-06-22 12:13:49 +00:00
|
|
|
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
|
2010-05-21 12:52:37 +00:00
|
|
|
|
2009-10-19 11:26:25 +00:00
|
|
|
# pre-create /cgroup directory
|
|
|
|
mkdir $RPM_BUILD_ROOT/cgroup
|
|
|
|
|
2010-01-18 13:34:56 +00:00
|
|
|
# install README.Fedora
|
|
|
|
cp %SOURCE1 .
|
|
|
|
|
2008-06-04 17:22:00 +00:00
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2011-05-25 11:03:22 +00:00
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%pre tools
|
2011-01-17 09:54:19 +00:00
|
|
|
getent group cgred >/dev/null || groupadd -r cgred
|
2010-01-18 13:34:56 +00:00
|
|
|
|
2011-05-25 11:03:22 +00:00
|
|
|
%post tools
|
2008-10-23 09:04:57 +00:00
|
|
|
/sbin/chkconfig --add cgred
|
|
|
|
/sbin/chkconfig --add cgconfig
|
|
|
|
|
2011-05-25 11:03:22 +00:00
|
|
|
%preun tools
|
2009-07-07 16:28:14 +00:00
|
|
|
if [ $1 = 0 ]; then
|
|
|
|
/sbin/service cgred stop > /dev/null 2>&1 || :
|
|
|
|
/sbin/service cgconfig stop > /dev/null 2>&1 || :
|
|
|
|
/sbin/chkconfig --del cgconfig
|
|
|
|
/sbin/chkconfig --del cgred
|
|
|
|
fi
|
2008-06-04 17:22:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2011-05-25 11:03:22 +00:00
|
|
|
/%{_lib}/libcgroup.so.*
|
|
|
|
%doc COPYING INSTALL README.Fedora
|
|
|
|
%attr(0755,root,root) %ghost %dir /cgroup
|
|
|
|
|
|
|
|
%files tools
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc README_daemon
|
2009-03-02 11:32:59 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/cgred.conf
|
2010-06-22 12:13:49 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/cgconfig
|
2009-03-02 11:32:59 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/cgconfig.conf
|
|
|
|
%config(noreplace) %{_sysconfdir}/cgrules.conf
|
2010-12-13 13:18:54 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/cgsnapshot_blacklist.conf
|
2009-03-09 12:30:29 +00:00
|
|
|
/bin/cgclassify
|
2009-07-07 16:28:14 +00:00
|
|
|
/bin/cgcreate
|
2010-03-09 15:52:22 +00:00
|
|
|
/bin/cgget
|
2009-07-07 16:28:14 +00:00
|
|
|
/bin/cgset
|
2010-03-09 15:52:22 +00:00
|
|
|
/bin/cgdelete
|
|
|
|
/bin/lscgroup
|
|
|
|
/bin/lssubsys
|
2009-03-09 12:30:29 +00:00
|
|
|
/sbin/cgconfigparser
|
2009-07-07 16:28:14 +00:00
|
|
|
/sbin/cgrulesengd
|
|
|
|
/sbin/cgclear
|
2010-12-13 13:18:54 +00:00
|
|
|
/bin/cgsnapshot
|
2011-05-25 11:03:22 +00:00
|
|
|
%attr(2755, root, cgred) /bin/cgexec
|
2009-03-02 11:32:59 +00:00
|
|
|
%attr(0644, root, root) %{_mandir}/man1/*
|
|
|
|
%attr(0644, root, root) %{_mandir}/man5/*
|
|
|
|
%attr(0644, root, root) %{_mandir}/man8/*
|
2008-10-23 09:04:57 +00:00
|
|
|
%attr(0755,root,root) %{_initrddir}/cgconfig
|
|
|
|
%attr(0755,root,root) %{_initrddir}/cgred
|
2008-06-04 17:22:00 +00:00
|
|
|
|
2010-03-09 15:52:22 +00:00
|
|
|
%files pam
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%attr(0755,root,root) /%{_lib}/security/pam_cgroup.so
|
2010-12-13 13:18:54 +00:00
|
|
|
%doc COPYING INSTALL
|
2010-03-09 15:52:22 +00:00
|
|
|
|
2008-06-04 17:22:00 +00:00
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_includedir}/libcgroup.h
|
2010-05-21 12:52:37 +00:00
|
|
|
%{_includedir}/libcgroup/*.h
|
2009-07-07 16:28:14 +00:00
|
|
|
%{_libdir}/libcgroup.*
|
2010-12-13 13:18:54 +00:00
|
|
|
/%{_libdir}/pkgconfig/libcgroup.pc
|
2011-05-25 11:03:22 +00:00
|
|
|
%doc COPYING INSTALL
|
2008-06-04 17:22:00 +00:00
|
|
|
|
|
|
|
%changelog
|
2011-05-25 11:03:22 +00:00
|
|
|
* Wed May 25 2011 Ivana Hutarova Varekova <varekova@redhat.com> 0.37.1-3
|
|
|
|
- split tools part from libcgroup package
|
|
|
|
|
2011-04-08 08:33:49 +00:00
|
|
|
* Fri Apr 8 2011 Jan Safranek <jsafrane@redhat.com> 0.37.1-2
|
|
|
|
- Remove /cgroup directory, groups are created in /sys/fs/cgroup
|
|
|
|
(#694687)
|
|
|
|
|
2011-03-03 08:47:07 +00:00
|
|
|
* Thu Mar 3 2011 Jan Safranek <jsafrane@redhat.com> 0.37.1-1
|
|
|
|
- Update to 0.37.1
|
|
|
|
|
2011-02-08 05:00:02 +00:00
|
|
|
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
|
|
2011-01-17 09:54:19 +00:00
|
|
|
* 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
|
2010-12-13 13:18:54 +00:00
|
|
|
- Update to 0.37
|
|
|
|
- use /sys/fs/cgroup as default directory to mount control groups (and rely on
|
|
|
|
systemd mounting tmpfs there)
|
|
|
|
|
2010-11-12 08:22:30 +00:00
|
|
|
* Fri Nov 12 2010 Jan Safranek <jsafrane@redhat.com> 0.36.2-3
|
|
|
|
- Ignore systemd hierarchy - it's now invisible to libcgroup (#627378)
|
|
|
|
|
2010-08-02 14:36:06 +00:00
|
|
|
* Mon Aug 2 2010 Jan Safranek <jsafrane@redhat.com> 0.36.2-2
|
|
|
|
- Fix initscripts to report stopped cgconfig service as not running
|
|
|
|
(#619091)
|
|
|
|
|
2010-06-22 12:13:49 +00:00
|
|
|
* Tue Jun 22 2010 Jan Safranek <jsafrane@redhat.com> 0.36.2-1
|
|
|
|
- Update to 0.36.2, fixing packaging the libraries (#605434)
|
2010-06-22 12:27:28 +00:00
|
|
|
- Remove the dependency on redhat-lsb (#603578)
|
2010-06-22 12:13:49 +00:00
|
|
|
|
2010-05-21 12:52:37 +00:00
|
|
|
* Fri May 21 2010 Jan Safranek <jsafrane@redhat.com> 0.36-1
|
|
|
|
- Update to 0.36.1
|
|
|
|
|
2010-03-09 15:52:22 +00:00
|
|
|
* Tue Mar 9 2010 Jan Safranek <jsafrane@redhat.com> 0.35-1
|
|
|
|
- Update to 0.35.1
|
|
|
|
- Separate pam module to its own subpackage
|
|
|
|
|
2010-01-18 13:27:12 +00:00
|
|
|
* Mon Jan 18 2010 Jan Safranek <jsafrane@redhat.com> 0.34-4
|
|
|
|
- Added README.Fedora to describe initscript integration
|
|
|
|
|
2009-10-19 11:26:25 +00:00
|
|
|
* Mon Oct 19 2009 Jan Safranek <jsafrane@redhat.com> 0.34-3
|
|
|
|
- Change the default configuration to mount everything to /cgroup
|
|
|
|
|
2009-07-25 05:26:05 +00:00
|
|
|
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.34-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
|
|
2009-07-07 16:28:14 +00:00
|
|
|
* Tue Jul 7 2009 Jan Safranek <jsafrane@redhat.com> 0.34-1
|
|
|
|
- Update to 0.34
|
2009-07-08 08:24:49 +00:00
|
|
|
* Mon Mar 09 2009 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.33-3
|
|
|
|
- Add a workaround for rt cgroup controller.
|
|
|
|
* Mon Mar 09 2009 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.33-2
|
|
|
|
- Change the cgconfig script to start earlier
|
|
|
|
- Move the binaries to /bin and /sbin
|
|
|
|
* Mon Mar 02 2009 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.33-1
|
|
|
|
- Update to latest upstream
|
|
|
|
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.32.2-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
|
|
|
|
|
* Mon Jan 05 2009 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32.2-3
|
|
|
|
- Fix redhat-lsb dependency
|
|
|
|
* Mon Dec 29 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32.2-2
|
|
|
|
- Fix build dependencies
|
|
|
|
* Mon Dec 29 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32.2-1
|
|
|
|
- Update to latest upstream
|
|
|
|
* Thu Oct 23 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32.1-1
|
2009-07-07 16:28:14 +00:00
|
|
|
* Tue Feb 24 2009 Balbir Singh <balbir@linux.vnet.ibm.com> 0.33-1
|
|
|
|
- Update to 0.33, spec file changes to add Makefiles and pam_cgroup module
|
|
|
|
* Fri Oct 10 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32-1
|
2008-10-23 09:04:57 +00:00
|
|
|
- Update to latest upstream
|
2008-09-11 15:21:37 +00:00
|
|
|
* Thu Sep 11 2008 Dhaval Giani <dhaval@linux-vnet.ibm.com> 0.31-1
|
|
|
|
- Update to latest upstream
|
2008-08-02 08:18:16 +00:00
|
|
|
* Sat Aug 2 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.1c-3
|
|
|
|
- Change release to fix broken upgrade path
|
2008-06-11 09:22:00 +00:00
|
|
|
* Wed Jun 11 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.1c-1
|
2009-07-07 16:28:14 +00:00
|
|
|
- Update to latest upstream version
|
2008-06-04 17:22:00 +00:00
|
|
|
* Tue Jun 3 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-3
|
|
|
|
- Add post and postun. Also fix Requires for devel to depend on base n-v-r
|
|
|
|
* Sat May 31 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-2
|
|
|
|
- Fix makeinstall, Source0 and URL (review comments from Tom)
|
|
|
|
* Mon May 26 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-1
|
|
|
|
- Add a generatable spec file
|
|
|
|
* Tue May 20 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1-1
|
|
|
|
- Get the spec file to work
|
|
|
|
* Tue May 20 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.01-1
|
|
|
|
- The first version of libcg
|