diff --git a/fedora-fix-initscripts.patch b/fedora-fix-initscripts.patch new file mode 100644 index 0000000..6812405 --- /dev/null +++ b/fedora-fix-initscripts.patch @@ -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 +--- + + 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 diff --git a/libcgroup.spec b/libcgroup.spec index cc4e786..068b47e 100644 --- a/libcgroup.spec +++ b/libcgroup.spec @@ -11,6 +11,7 @@ URL: http://libcg.sourceforge.net/ Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2 Source1: README.Fedora Patch1: fedora-config.patch +Patch2: fedora-fix-initscripts.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pam-devel BuildRequires: byacc @@ -18,7 +19,6 @@ 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, @@ -46,6 +46,7 @@ provide scripts to manage that configuration. %prep %setup -q %patch1 -p1 -b .config +%patch2 -p1 -b .lsb %build %configure --bindir=/bin --sbindir=/sbin --libdir=%{_libdir} --enable-initscript-install --enable-pam-module-dir=/%{_lib}/security @@ -142,6 +143,7 @@ fi %changelog * Tue Jun 22 2010 Jan Safranek 0.36.2-1 - Update to 0.36.2, fixing packaging the libraries (#605434) +- Remove the dependency on redhat-lsb (#603578) * Fri May 21 2010 Jan Safranek 0.36-1 - Update to 0.36.1