mirror of
git://git.yoctoproject.org/meta-selinux
synced 2026-01-01 13:58:04 +00:00
Revert libcgroup additions and patches
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
This commit is contained in:
parent
a435febae2
commit
48a55735f2
|
|
@ -1,129 +0,0 @@
|
|||
From 15db1ef0f561309e2b475df3993c8f185d19a7eb Mon Sep 17 00:00:00 2001
|
||||
From: Xin Ouyang <Xin.Ouyang@windriver.com>
|
||||
Date: Wed, 29 Feb 2012 17:42:57 +0800
|
||||
Subject: [PATCH] Fix LSB routines for non-LSB releases.
|
||||
|
||||
---
|
||||
scripts/init.d/cgconfig.in | 49 ++++++++++++++++++++++++++++++++++++++++---
|
||||
scripts/init.d/cgred.in | 45 +++++++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 89 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/scripts/init.d/cgconfig.in b/scripts/init.d/cgconfig.in
|
||||
index 14aa2e3..6ca9ecf 100644
|
||||
--- a/scripts/init.d/cgconfig.in
|
||||
+++ b/scripts/init.d/cgconfig.in
|
||||
@@ -36,10 +36,51 @@ CONFIG_FILE=/etc/cgconfig.conf
|
||||
servicename=cgconfig
|
||||
lockfile=/var/lock/subsys/$servicename
|
||||
|
||||
-#
|
||||
-# Source LSB routines
|
||||
-#
|
||||
-. /lib/lsb/init-functions
|
||||
+# for log_success_msg and friends
|
||||
+if [ -r /lib/lsb/init-functions ]; then
|
||||
+# LSB, SLES, ...
|
||||
+ . /lib/lsb/init-functions
|
||||
+elif [ -r /etc/init.d/functions ]; then
|
||||
+# Red Hat / VMware
|
||||
+ . /etc/init.d/functions
|
||||
+ my_log_message()
|
||||
+ {
|
||||
+ ACTION=$1
|
||||
+ shift
|
||||
+
|
||||
+ case "$ACTION" in
|
||||
+ success)
|
||||
+ echo -n $*
|
||||
+ success "$*"
|
||||
+ echo
|
||||
+ ;;
|
||||
+ failure)
|
||||
+ echo -n $*
|
||||
+ failure "$*"
|
||||
+ echo
|
||||
+ ;;
|
||||
+ warning)
|
||||
+ echo -n $*
|
||||
+ warning "$*"
|
||||
+ echo
|
||||
+ ;;
|
||||
+ *)
|
||||
+ ;;
|
||||
+ esac
|
||||
+ }
|
||||
+ log_success_msg()
|
||||
+ {
|
||||
+ my_log_message success "$*"
|
||||
+ }
|
||||
+ log_failure_msg()
|
||||
+ {
|
||||
+ my_log_message failure "$*"
|
||||
+ }
|
||||
+ log_warning_msg()
|
||||
+ {
|
||||
+ my_log_message warning "$*"
|
||||
+ }
|
||||
+fi
|
||||
|
||||
# read the config
|
||||
CREATE_DEFAULT=yes
|
||||
diff --git a/scripts/init.d/cgred.in b/scripts/init.d/cgred.in
|
||||
index 9ff2d9b..4b02536 100644
|
||||
--- a/scripts/init.d/cgred.in
|
||||
+++ b/scripts/init.d/cgred.in
|
||||
@@ -41,7 +41,50 @@ CGRED_CONF=/etc/cgrules.conf
|
||||
|
||||
# Source function library & LSB routines
|
||||
. /etc/rc.d/init.d/functions
|
||||
-. /lib/lsb/init-functions
|
||||
+# for log_success_msg and friends
|
||||
+if [ -r /lib/lsb/init-functions ]; then
|
||||
+# LSB, SLES, ...
|
||||
+ . /lib/lsb/init-functions
|
||||
+elif [ -r /etc/init.d/functions ]; then
|
||||
+# Red Hat / VMware
|
||||
+ my_log_message()
|
||||
+ {
|
||||
+ ACTION=$1
|
||||
+ shift
|
||||
+
|
||||
+ case "$ACTION" in
|
||||
+ success)
|
||||
+ echo -n $*
|
||||
+ success "$*"
|
||||
+ echo
|
||||
+ ;;
|
||||
+ failure)
|
||||
+ echo -n $*
|
||||
+ failure "$*"
|
||||
+ echo
|
||||
+ ;;
|
||||
+ warning)
|
||||
+ echo -n $*
|
||||
+ warning "$*"
|
||||
+ echo
|
||||
+ ;;
|
||||
+ *)
|
||||
+ ;;
|
||||
+ esac
|
||||
+ }
|
||||
+ log_success_msg()
|
||||
+ {
|
||||
+ my_log_message success "$*"
|
||||
+ }
|
||||
+ log_failure_msg()
|
||||
+ {
|
||||
+ my_log_message failure "$*"
|
||||
+ }
|
||||
+ log_warning_msg()
|
||||
+ {
|
||||
+ my_log_message warning "$*"
|
||||
+ }
|
||||
+fi
|
||||
|
||||
# Read in configuration options.
|
||||
if [ -f "/etc/sysconfig/cgred.conf" ] ; then
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
SUMMARY = "Library to control and monitor control groups"
|
||||
DESCRIPTION = "\
|
||||
Control Groups provide a mechanism for aggregating/partitioning sets of \
|
||||
tasks, and all their future children, into hierarchical groups with \
|
||||
specialized behaviour. \n\
|
||||
This package contains tools and a library to allow users and applications \
|
||||
to manipulate, control, administrate and monitor control groups and the \
|
||||
associated controllers. \
|
||||
"
|
||||
SECTION = "libs"
|
||||
LICENSE = "LGPLv2.1"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
DEPENDS = "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
|
||||
|
||||
SRC_URI = "${SOURCEFORGE_MIRROR}/project/libcg/libcgroup/v${PV}/libcgroup-${PV}.tar.bz2"
|
||||
SRC_URI[md5sum] = "24a41b18de112e8d085bb1f7d9e82af7"
|
||||
SRC_URI[sha256sum] = "0b08632de5d3641aa554b422d02a77d9367e57933328a8765204ad9588cd5c0d"
|
||||
|
||||
EXTRA_OECONF = "${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes', '--enable-pam=no', d)}"
|
||||
|
||||
# http://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg21444.html
|
||||
PARALLEL_MAKE = ""
|
||||
|
||||
PACKAGES =+ "cgroups-pam-plugin"
|
||||
FILES_cgroups-pam-plugin = "${base_libdir}/security/pam_cgroup.so*"
|
||||
|
||||
# We really need the symlink so :(
|
||||
ERROR_QA = "debug-deps dev-deps debug-files arch la2 pkgconfig la perms"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
SUMMARY = "Library to control and monitor control groups"
|
||||
DESCRIPTION = "\
|
||||
Control Groups provide a mechanism for aggregating/partitioning sets of \
|
||||
tasks, and all their future children, into hierarchical groups with \
|
||||
specialized behaviour. \n\
|
||||
This package contains tools and a library to allow users and applications \
|
||||
to manipulate, control, administrate and monitor control groups and the \
|
||||
associated controllers. \
|
||||
"
|
||||
SECTION = "libs"
|
||||
LICENSE = "LGPLv2.1"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
DEPENDS = "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
|
||||
|
||||
SRC_URI = "${SOURCEFORGE_MIRROR}/project/libcg/libcgroup/v.038/libcgroup-${PV}.tar.bz2"
|
||||
SRC_URI[md5sum] = "f0f7d4060bf36ccc19d75dbf4f1695db"
|
||||
SRC_URI[sha256sum] = "5d36d1a48b95f62fe9fcdf74a5a4089512e5e43e6011aa1504fd6f2a0909867f"
|
||||
|
||||
SRC_URI += "file://fix-LSB-routines.patch"
|
||||
|
||||
EXTRA_OECONF = "${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes', '--enable-pam=no', d)}"
|
||||
EXTRA_OECONF += "--enable-initscript-install"
|
||||
|
||||
# http://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg21444.html
|
||||
PARALLEL_MAKE = ""
|
||||
|
||||
PACKAGES =+ "cgroups-pam-plugin"
|
||||
FILES_cgroups-pam-plugin = "${base_libdir}/security/pam_cgroup.so*"
|
||||
|
||||
# We really need the symlink so :(
|
||||
ERROR_QA = "debug-deps dev-deps debug-files arch la2 pkgconfig la perms"
|
||||
|
||||
do_install_append() {
|
||||
install -d ${D}${sysconfdir}
|
||||
install -m 644 samples/cgconfig.conf ${D}/${sysconfdir}/cgconfig.conf
|
||||
install -m 644 samples/cgrules.conf ${D}/${sysconfdir}/cgrules.conf
|
||||
install -m 644 samples/cgsnapshot_blacklist.conf ${D}/${sysconfdir}/cgsnapshot_blacklist.conf
|
||||
install -d ${D}${sysconfdir}/sysconfig/
|
||||
head -7 samples/cgconfig.sysconfig > samples/cgconfig.sysconfig.new
|
||||
echo "# By default, do not create these groups:" >> samples/cgconfig.sysconfig.new
|
||||
echo "CREATE_DEFAULT=no" >> samples/cgconfig.sysconfig.new
|
||||
install -m 644 samples/cgconfig.sysconfig.new ${D}${sysconfdir}/sysconfig/cgconfig
|
||||
|
||||
# sanitize pam module, we need only pam_cgroup.so
|
||||
if [ -f ${D}/${base_libdir}/security/pam_cgroup.so.*.*.* ]; then
|
||||
mv -f ${D}/${base_libdir}/security/pam_cgroup.so.*.*.* ${D}/${base_libdir}/security/pam_cgroup.so
|
||||
rm -f ${D}/${base_libdir}/security/pam_cgroup.la ${D}/${base_libdir}/security/pam_cgroup.so.*
|
||||
fi
|
||||
|
||||
rm -f ${D}/${libdir}/*.la
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
Loading…
Reference in New Issue
Block a user