Update to 0.34 Also rename the patches, sequence of patches can change

often
This commit is contained in:
Jan Šafránek 2009-07-07 16:28:14 +00:00
parent 41434f7895
commit de7532b098
10 changed files with 102 additions and 179 deletions

View File

@ -1 +1 @@
libcgroup-0.33.tar.bz2
libcgroup-0.34.tar.bz2

View File

@ -1,16 +0,0 @@
---
Makefile.in | 1 +
1 file changed, 1 insertion(+)
Index: v0.33/Makefile.in
===================================================================
--- v0.33.orig/Makefile.in
+++ v0.33/Makefile.in
@@ -26,6 +26,7 @@ datarootdir=@datarootdir@
mandir=@mandir@
INSTALL=install
INSTALL_DATA=install -m 644
+PACKAGE_VERSION=@PACKAGE_VERSION@
CFLAGS=@CFLAGS@ $(INC)
VERSION=1

View File

@ -1,30 +0,0 @@
---
scripts/init.d/cgconfig | 2 +-
scripts/init.d/cgred | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
Index: v0.33/scripts/init.d/cgconfig
===================================================================
--- v0.33.orig/scripts/init.d/cgconfig
+++ v0.33/scripts/init.d/cgconfig
@@ -44,7 +44,7 @@ servicename=cgconfig
#
# Source LSB routines
#
-. /lib/lsb/init-functions
+. /etc/rc.d/init.d/functions
parse_mounts() {
while read name mountpt fs opts other
Index: v0.33/scripts/init.d/cgred
===================================================================
--- v0.33.orig/scripts/init.d/cgred
+++ v0.33/scripts/init.d/cgred
@@ -43,7 +43,6 @@ CGRED_BIN=${exec_prefix}/${bindir}/cgrul
# Source function library & LSB routines
. /etc/rc.d/init.d/functions
-. /lib/lsb/init-functions
# Read in configuration options.
if [ -f "/etc/sysconfig/cgred.conf" ] ; then

View File

@ -1,30 +0,0 @@
libcgroup: Start the config earlier
From: Jan Safranek <jsafrane@redhat.com>
For Fedora, we want to start the cgconfig as soon as possible,
i.e. when /usr might not be mounted. We don't need syslog, time nor
$local_fs (see bug #309001).
diff -up libcgroup-0.33/scripts/init.d/cgconfig.orig libcgroup-0.33/scripts/init.d/cgconfig
--- libcgroup-0.33/scripts/init.d/cgconfig.orig 2009-03-08 20:46:12.000000000 +0100
+++ libcgroup-0.33/scripts/init.d/cgconfig 2009-03-08 20:45:01.000000000 +0100
@@ -14,15 +14,15 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# cgconfig Control Groups Configuration Startup
-# chkconfig: - 13 87
+# chkconfig: - 5 95
# description: This script runs the cgconfigparser utility to parse and setup
# the control group filesystem. It uses /etc/cgconfig.conf
# and parses the configuration specified in there.
### BEGIN INIT INFO
# Provides: cgconfig
-# Required-Start: $local_fs $syslog $time
-# Required-Stop: $local_fs $syslog
+# Required-Start:
+# Required-Stop:
# Should-Start:
# Should-Stop:
# Short-Description: start and stop the WLM configuration

View File

@ -0,0 +1,55 @@
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

View File

@ -1,7 +1,7 @@
diff --git a/scripts/init.d/cgconfig b/scripts/init.d/cgconfig
index 1c60b86..fe3ff65 100644
--- a/scripts/init.d/cgconfig
+++ b/scripts/init.d/cgconfig
--- a/scripts/init.d/cgconfig.in
+++ b/scripts/init.d/cgconfig.in
@@ -122,6 +122,15 @@ start() {
${MOUNTPOINT[$i]}/$defaultcgroup/cpuset.mems
fi

View File

@ -1,41 +0,0 @@
Index: v0.31/Makefile.in
===================================================================
--- v0.31.orig/Makefile.in 2008-09-05 19:52:44.000000000 +0530
+++ v0.31/Makefile.in 2008-09-05 20:33:01.000000000 +0530
@@ -14,7 +14,7 @@ YACC_DEBUG=-t
DEBUG=-DDEBUG
INC=-I.
LIBS= -lcgroup -lpthread
-LDFLAGS=@LDFLAGS@ -L .
+LDFLAGS=@LDFLAGS@ -L . -L $(RPM_BUILD_ROOT)
YACC=@YACC@
LEX=@LEX@
bindir=@bindir@
@@ -38,7 +38,7 @@ cgconfigparser: libcgroup.so config.c y.
cgexec: libcgroup.so cgexec.c libcgroup.h
$(CC) $(CFLAGS) -Wall -o $@ cgexec.c $(LDFLAGS) $(LIBS)
-cgclassify: cgclassify.c
+cgclassify: libcgroup.so cgclassify.c
$(CC) $(CFLAGS) -Wall -o $@ cgclassify.c $(LDFLAGS) $(LIBS)
y.tab.c: parse.y lex.yy.c
@@ -59,14 +59,14 @@ pam_cgroup.so: pam_cgroup.c
$(CC) $(CFLAGS) -shared -fPIC -Wall -o $@ pam_cgroup.c $(LDFLAGS) \
$(LIBS) -lpam
-install: libcgroup.so cgexec cgclassify
+install: libcgroup.so cgexec cgclassify cgconfigparser
$(INSTALL_DATA) -D libcgroup.h $(DESTDIR)$(includedir)/libcgroup.h
$(INSTALL) -D libcgroup.so $(DESTDIR)$(libdir)/libcgroup-$(PACKAGE_VERSION).so
ln -sf libcgroup-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libcgroup.so.$(VERSION)
ln -sf libcgroup.so.$(VERSION) $(DESTDIR)$(libdir)/libcgroup.so
- $(INSTALL) -D cgconfigparser $(DESTDIR)$(sbindir)
- $(INSTALL) cgexec $(DESTDIR)$(bindir)/cgexec
- $(INSTALL) cgclassify $(DESTDIR)$(bindir)/cgclassify
+ $(INSTALL) -D cgconfigparser $(DESTDIR)$(sbindir)/cgconfigparser
+ $(INSTALL) -D cgexec $(DESTDIR)$(bindir)/cgexec
+ $(INSTALL) -D cgclassify $(DESTDIR)$(bindir)/cgclassify
uninstall: libcgroup.so
rm -f $(DESTDIR)$(includedir)/libcgroup.h

View File

@ -1,13 +0,0 @@
Index: v0.31/api.c
===================================================================
--- v0.31.orig/api.c 2008-09-05 19:52:44.000000000 +0530
+++ v0.31/api.c 2008-09-05 20:06:53.000000000 +0530
@@ -1041,7 +1041,7 @@ struct cgroup *cgroup_get_cgroup(struct
cg_mount_table[i].name))
continue;
- strncat(path, cgroup->name, sizeof(path));
+ strncat(path, cgroup->name, sizeof(path) - strlen(path));
if (access(path, F_OK))
continue;

View File

@ -1,24 +1,22 @@
%define soversion 1.0.34
Name: libcgroup
Summary: Tools and libraries to control and monitor control groups
Group: Development/Libraries
Version: 0.33
Release: 3%{?dist}
Version: 0.34
Release: 1%{?dist}
License: LGPLv2+
URL: http://libcg.sourceforge.net/
Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2
Patch0: http://downloads.sourceforge.net/libcg/01-fedora-fix-build.patch
Patch1: http://downloads.sourceforge.net/libcg/02-fedora-fix-initscripts.patch
Patch2: http://downloads.sourceforge.net/libcg/03-fedora-adjust-initscript-priority.patch
Patch3: http://downloads.sourceforge.net/libcg/04-fedora-workaround-for-sysdefault.patch
Patch0: fedora-fix-initscripts.patch
Patch1: fedora-workaround-for-sysdefault.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pam-devel
BuildRequires: byacc
BuildRequires: flex
BuildRequires: coreutils
BuildRequires: pam-devel
Requires(post): chkconfig
Requires(post): initscripts
Requires(preun): initscripts
Requires(preun): chkconfig
Requires(post): chkconfig, /sbin/service
Requires(preun): /sbin/chkconfig
%description
Control groups infrastructure. The tools and library help manipulate, control,
@ -36,11 +34,8 @@ provide scripts to manage that configuration.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch0 -p1 -b .fedora
%patch1 -p1 -b .sysdefault
%build
%configure --bindir=/bin --sbindir=/sbin --libdir=/%{_lib}
@ -50,31 +45,44 @@ make %{?_smp_mflags}
%install
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.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgconfig.conf
cp samples/cgrules.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgrules.conf
# sanitize pam module, we need only pam_cgroup.so in the right directory
mkdir -p $RPM_BUILD_ROOT/%{_lib}/security
mv -f $RPM_BUILD_ROOT/%{_lib}/pam_cgroup.so.*.*.* $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so
rm -f $RPM_BUILD_ROOT/%{_lib}/pam_cgroup*
# move the devel stuff to /usr
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
mv -f $RPM_BUILD_ROOT/%{_lib}/libcgroup.la $RPM_BUILD_ROOT/%{_libdir}
rm -f $RPM_BUILD_ROOT/%{_lib}/libcgroup.so
ln -sf ../../%{_lib}/libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/ldconfig
#
# Do this later if required
#
/sbin/chkconfig --add cgred
/sbin/chkconfig --add cgconfig
%preun
/sbin/service cgred stop > /dev/null 2>&1 || :
/sbin/service cgconfig stop > /dev/null 2>&1 || :
/sbin/chkconfig --del cgconfig
/sbin/chkconfig --del cgred
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
%postun -p /sbin/ldconfig
@ -83,12 +91,14 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) %{_sysconfdir}/sysconfig/cgred.conf
%config(noreplace) %{_sysconfdir}/cgconfig.conf
%config(noreplace) %{_sysconfdir}/cgrules.conf
/%{_lib}/libcgroup-%{version}.so
/%{_lib}/libcgroup.so.*
/bin/cgexec
/bin/cgclassify
/bin/cgcreate
/bin/cgset
/sbin/cgconfigparser
/bin/cgrulesengd
/sbin/cgrulesengd
/sbin/cgclear
%attr(0644, root, root) %{_mandir}/man1/*
%attr(0644, root, root) %{_mandir}/man5/*
%attr(0644, root, root) %{_mandir}/man8/*
@ -101,35 +111,23 @@ rm -rf $RPM_BUILD_ROOT
%files devel
%defattr(-,root,root,-)
%{_includedir}/libcgroup.h
/%{_lib}/libcgroup.so
%doc COPYING INSTALL
%{_libdir}/libcgroup.*
%doc COPYING INSTALL
%changelog
* 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
* Tue Jul 7 2009 Jan Safranek <jsafrane@redhat.com> 0.34-1
- Update to 0.34
* 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
- Update to latest upstream
* Thu Sep 11 2008 Dhaval Giani <dhaval@linux-vnet.ibm.com> 0.31-1
- Update to latest upstream
* Sat Aug 2 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.1c-3
- Change release to fix broken upgrade path
* Wed Jun 11 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.1c-1
- Update to latest upstream
- Update to latest upstream version
* 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

View File

@ -1 +1 @@
d67de6001bff6c6d086d6ccb7757a5dc libcgroup-0.33.tar.bz2
681c751d1a1ea78615094007d39db6cb libcgroup-0.34.tar.bz2