From 130f05b4e59b6019b340f1b36483ed189a9ffe82 Mon Sep 17 00:00:00 2001 From: Xin Ouyang Date: Thu, 1 Nov 2012 10:43:45 +0800 Subject: libcgroup: add bbappend and remove bb files libcgroup is placed in oe-core now. http://git.openembedded.org/openembedded-core/commit/?id=6ef8e6f2f9b0583fa0881e0dfc52462405b21ede So remove bb files from meta-selinux and add bbappend. Signed-off-by: Xin Ouyang --- .../libcgroup/libcgroup/fix-LSB-routines.patch | 129 --------------------- recipes-core/libcgroup/libcgroup_0.37.1.bbappend | 14 +++ recipes-core/libcgroup/libcgroup_0.38.bb | 60 ---------- 3 files changed, 14 insertions(+), 189 deletions(-) delete mode 100644 recipes-core/libcgroup/libcgroup/fix-LSB-routines.patch create mode 100644 recipes-core/libcgroup/libcgroup_0.37.1.bbappend delete mode 100644 recipes-core/libcgroup/libcgroup_0.38.bb diff --git a/recipes-core/libcgroup/libcgroup/fix-LSB-routines.patch b/recipes-core/libcgroup/libcgroup/fix-LSB-routines.patch deleted file mode 100644 index 88e5621..0000000 --- a/recipes-core/libcgroup/libcgroup/fix-LSB-routines.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 15db1ef0f561309e2b475df3993c8f185d19a7eb Mon Sep 17 00:00:00 2001 -From: Xin Ouyang -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 - diff --git a/recipes-core/libcgroup/libcgroup_0.37.1.bbappend b/recipes-core/libcgroup/libcgroup_0.37.1.bbappend new file mode 100644 index 0000000..e22868b --- /dev/null +++ b/recipes-core/libcgroup/libcgroup_0.37.1.bbappend @@ -0,0 +1,14 @@ +PR .= ".1" + +SRC_URI = "${SOURCEFORGE_MIRROR}/project/libcg/${BPN}/v${PV}/${BPN}-${PV}.tar.bz2" + +EXTRA_OECONF_virtclass-native = "--enable-pam=no" + +do_install_append() { + test ! -f ${D}/lib/security/pam_cgroup.so.0.0.0 || { + mv -f ${D}/lib/security/pam_cgroup.so.0.0.0 ${D}/lib/security/pam_cgroup.so + rm -f ${D}/lib/security/pam_cgroup.so.* + } +} + +BBCLASSEXTEND = "native" diff --git a/recipes-core/libcgroup/libcgroup_0.38.bb b/recipes-core/libcgroup/libcgroup_0.38.bb deleted file mode 100644 index 2040bb1..0000000 --- a/recipes-core/libcgroup/libcgroup_0.38.bb +++ /dev/null @@ -1,60 +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" - -EXTRA_OECONF_virtclass-native = "--enable-pam=no" - -# 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*" -FILES_${PN}-dbg += "${base_libdir}/security/.debug" -FILES_${PN}-dev += "${base_libdir}/security/*.la" - -# 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" -- cgit v1.2.3-54-g00ecf