diff options
author | Xin Ouyang <Xin.Ouyang@windriver.com> | 2012-11-01 10:43:45 +0800 |
---|---|---|
committer | Xin Ouyang <Xin.Ouyang@windriver.com> | 2012-11-07 10:12:25 +0800 |
commit | 130f05b4e59b6019b340f1b36483ed189a9ffe82 (patch) | |
tree | 902307648ed34a3f6e618feaea67e68e9674b574 | |
parent | 086f7391b43b42b948c59b918429cdc1210d7c2e (diff) | |
download | meta-selinux-130f05b4e59b6019b340f1b36483ed189a9ffe82.tar.gz |
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 <Xin.Ouyang@windriver.com>
-rw-r--r-- | recipes-core/libcgroup/libcgroup/fix-LSB-routines.patch | 129 | ||||
-rw-r--r-- | recipes-core/libcgroup/libcgroup_0.37.1.bbappend | 14 | ||||
-rw-r--r-- | recipes-core/libcgroup/libcgroup_0.38.bb | 60 |
3 files changed, 14 insertions, 189 deletions
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 @@ | |||
1 | From 15db1ef0f561309e2b475df3993c8f185d19a7eb Mon Sep 17 00:00:00 2001 | ||
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
3 | Date: Wed, 29 Feb 2012 17:42:57 +0800 | ||
4 | Subject: [PATCH] Fix LSB routines for non-LSB releases. | ||
5 | |||
6 | --- | ||
7 | scripts/init.d/cgconfig.in | 49 ++++++++++++++++++++++++++++++++++++++++--- | ||
8 | scripts/init.d/cgred.in | 45 +++++++++++++++++++++++++++++++++++++++- | ||
9 | 2 files changed, 89 insertions(+), 5 deletions(-) | ||
10 | |||
11 | diff --git a/scripts/init.d/cgconfig.in b/scripts/init.d/cgconfig.in | ||
12 | index 14aa2e3..6ca9ecf 100644 | ||
13 | --- a/scripts/init.d/cgconfig.in | ||
14 | +++ b/scripts/init.d/cgconfig.in | ||
15 | @@ -36,10 +36,51 @@ CONFIG_FILE=/etc/cgconfig.conf | ||
16 | servicename=cgconfig | ||
17 | lockfile=/var/lock/subsys/$servicename | ||
18 | |||
19 | -# | ||
20 | -# Source LSB routines | ||
21 | -# | ||
22 | -. /lib/lsb/init-functions | ||
23 | +# for log_success_msg and friends | ||
24 | +if [ -r /lib/lsb/init-functions ]; then | ||
25 | +# LSB, SLES, ... | ||
26 | + . /lib/lsb/init-functions | ||
27 | +elif [ -r /etc/init.d/functions ]; then | ||
28 | +# Red Hat / VMware | ||
29 | + . /etc/init.d/functions | ||
30 | + my_log_message() | ||
31 | + { | ||
32 | + ACTION=$1 | ||
33 | + shift | ||
34 | + | ||
35 | + case "$ACTION" in | ||
36 | + success) | ||
37 | + echo -n $* | ||
38 | + success "$*" | ||
39 | + echo | ||
40 | + ;; | ||
41 | + failure) | ||
42 | + echo -n $* | ||
43 | + failure "$*" | ||
44 | + echo | ||
45 | + ;; | ||
46 | + warning) | ||
47 | + echo -n $* | ||
48 | + warning "$*" | ||
49 | + echo | ||
50 | + ;; | ||
51 | + *) | ||
52 | + ;; | ||
53 | + esac | ||
54 | + } | ||
55 | + log_success_msg() | ||
56 | + { | ||
57 | + my_log_message success "$*" | ||
58 | + } | ||
59 | + log_failure_msg() | ||
60 | + { | ||
61 | + my_log_message failure "$*" | ||
62 | + } | ||
63 | + log_warning_msg() | ||
64 | + { | ||
65 | + my_log_message warning "$*" | ||
66 | + } | ||
67 | +fi | ||
68 | |||
69 | # read the config | ||
70 | CREATE_DEFAULT=yes | ||
71 | diff --git a/scripts/init.d/cgred.in b/scripts/init.d/cgred.in | ||
72 | index 9ff2d9b..4b02536 100644 | ||
73 | --- a/scripts/init.d/cgred.in | ||
74 | +++ b/scripts/init.d/cgred.in | ||
75 | @@ -41,7 +41,50 @@ CGRED_CONF=/etc/cgrules.conf | ||
76 | |||
77 | # Source function library & LSB routines | ||
78 | . /etc/rc.d/init.d/functions | ||
79 | -. /lib/lsb/init-functions | ||
80 | +# for log_success_msg and friends | ||
81 | +if [ -r /lib/lsb/init-functions ]; then | ||
82 | +# LSB, SLES, ... | ||
83 | + . /lib/lsb/init-functions | ||
84 | +elif [ -r /etc/init.d/functions ]; then | ||
85 | +# Red Hat / VMware | ||
86 | + my_log_message() | ||
87 | + { | ||
88 | + ACTION=$1 | ||
89 | + shift | ||
90 | + | ||
91 | + case "$ACTION" in | ||
92 | + success) | ||
93 | + echo -n $* | ||
94 | + success "$*" | ||
95 | + echo | ||
96 | + ;; | ||
97 | + failure) | ||
98 | + echo -n $* | ||
99 | + failure "$*" | ||
100 | + echo | ||
101 | + ;; | ||
102 | + warning) | ||
103 | + echo -n $* | ||
104 | + warning "$*" | ||
105 | + echo | ||
106 | + ;; | ||
107 | + *) | ||
108 | + ;; | ||
109 | + esac | ||
110 | + } | ||
111 | + log_success_msg() | ||
112 | + { | ||
113 | + my_log_message success "$*" | ||
114 | + } | ||
115 | + log_failure_msg() | ||
116 | + { | ||
117 | + my_log_message failure "$*" | ||
118 | + } | ||
119 | + log_warning_msg() | ||
120 | + { | ||
121 | + my_log_message warning "$*" | ||
122 | + } | ||
123 | +fi | ||
124 | |||
125 | # Read in configuration options. | ||
126 | if [ -f "/etc/sysconfig/cgred.conf" ] ; then | ||
127 | -- | ||
128 | 1.7.5.4 | ||
129 | |||
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 @@ | |||
1 | PR .= ".1" | ||
2 | |||
3 | SRC_URI = "${SOURCEFORGE_MIRROR}/project/libcg/${BPN}/v${PV}/${BPN}-${PV}.tar.bz2" | ||
4 | |||
5 | EXTRA_OECONF_virtclass-native = "--enable-pam=no" | ||
6 | |||
7 | do_install_append() { | ||
8 | test ! -f ${D}/lib/security/pam_cgroup.so.0.0.0 || { | ||
9 | mv -f ${D}/lib/security/pam_cgroup.so.0.0.0 ${D}/lib/security/pam_cgroup.so | ||
10 | rm -f ${D}/lib/security/pam_cgroup.so.* | ||
11 | } | ||
12 | } | ||
13 | |||
14 | 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 @@ | |||
1 | SUMMARY = "Library to control and monitor control groups" | ||
2 | DESCRIPTION = "\ | ||
3 | Control Groups provide a mechanism for aggregating/partitioning sets of \ | ||
4 | tasks, and all their future children, into hierarchical groups with \ | ||
5 | specialized behaviour. \n\ | ||
6 | This package contains tools and a library to allow users and applications \ | ||
7 | to manipulate, control, administrate and monitor control groups and the \ | ||
8 | associated controllers. \ | ||
9 | " | ||
10 | SECTION = "libs" | ||
11 | LICENSE = "LGPLv2.1" | ||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1" | ||
13 | |||
14 | inherit autotools pkgconfig | ||
15 | |||
16 | DEPENDS = "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
17 | |||
18 | SRC_URI = "${SOURCEFORGE_MIRROR}/project/libcg/libcgroup/v.038/libcgroup-${PV}.tar.bz2" | ||
19 | SRC_URI[md5sum] = "f0f7d4060bf36ccc19d75dbf4f1695db" | ||
20 | SRC_URI[sha256sum] = "5d36d1a48b95f62fe9fcdf74a5a4089512e5e43e6011aa1504fd6f2a0909867f" | ||
21 | |||
22 | SRC_URI += "file://fix-LSB-routines.patch" | ||
23 | |||
24 | EXTRA_OECONF = "${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes', '--enable-pam=no', d)}" | ||
25 | EXTRA_OECONF += "--enable-initscript-install" | ||
26 | |||
27 | EXTRA_OECONF_virtclass-native = "--enable-pam=no" | ||
28 | |||
29 | # http://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg21444.html | ||
30 | PARALLEL_MAKE = "" | ||
31 | |||
32 | PACKAGES =+ "cgroups-pam-plugin" | ||
33 | FILES_cgroups-pam-plugin = "${base_libdir}/security/pam_cgroup.so*" | ||
34 | FILES_${PN}-dbg += "${base_libdir}/security/.debug" | ||
35 | FILES_${PN}-dev += "${base_libdir}/security/*.la" | ||
36 | |||
37 | # We really need the symlink so :( | ||
38 | ERROR_QA = "debug-deps dev-deps debug-files arch la2 pkgconfig la perms" | ||
39 | |||
40 | do_install_append() { | ||
41 | install -d ${D}${sysconfdir} | ||
42 | install -m 644 samples/cgconfig.conf ${D}/${sysconfdir}/cgconfig.conf | ||
43 | install -m 644 samples/cgrules.conf ${D}/${sysconfdir}/cgrules.conf | ||
44 | install -m 644 samples/cgsnapshot_blacklist.conf ${D}/${sysconfdir}/cgsnapshot_blacklist.conf | ||
45 | install -d ${D}${sysconfdir}/sysconfig/ | ||
46 | head -7 samples/cgconfig.sysconfig > samples/cgconfig.sysconfig.new | ||
47 | echo "# By default, do not create these groups:" >> samples/cgconfig.sysconfig.new | ||
48 | echo "CREATE_DEFAULT=no" >> samples/cgconfig.sysconfig.new | ||
49 | install -m 644 samples/cgconfig.sysconfig.new ${D}${sysconfdir}/sysconfig/cgconfig | ||
50 | |||
51 | # sanitize pam module, we need only pam_cgroup.so | ||
52 | if [ -f ${D}/${base_libdir}/security/pam_cgroup.so.*.*.* ]; then | ||
53 | mv -f ${D}/${base_libdir}/security/pam_cgroup.so.*.*.* ${D}/${base_libdir}/security/pam_cgroup.so | ||
54 | rm -f ${D}/${base_libdir}/security/pam_cgroup.la ${D}/${base_libdir}/security/pam_cgroup.so.* | ||
55 | fi | ||
56 | |||
57 | rm -f ${D}/${libdir}/*.la | ||
58 | } | ||
59 | |||
60 | BBCLASSEXTEND = "native" | ||