From becdc022eb5640e5b942b7680e5328ebeee5111a Mon Sep 17 00:00:00 2001 From: Xin Ouyang Date: Sat, 19 Jan 2013 16:06:12 +0800 Subject: packages: uprev bbappends to fit oe-core Signed-off-by: Xin Ouyang --- recipes-devtools/python/python_2.7.2.bbappend | 5 -- recipes-devtools/python/python_2.7.3.bbappend | 5 ++ recipes-extended/lsof/lsof_4.86.bbappend | 16 ----- recipes-extended/lsof/lsof_4.87.bbappend | 16 +++++ .../sed/sed-4.2.1/sed-selinux-fix.patch | 68 ---------------------- .../sed/sed-4.2.2/sed-selinux-fix.patch | 68 ++++++++++++++++++++++ recipes-extended/sed/sed_4.2.1.bbappend | 9 --- recipes-extended/sed/sed_4.2.2.bbappend | 9 +++ 8 files changed, 98 insertions(+), 98 deletions(-) delete mode 100644 recipes-devtools/python/python_2.7.2.bbappend create mode 100644 recipes-devtools/python/python_2.7.3.bbappend delete mode 100644 recipes-extended/lsof/lsof_4.86.bbappend create mode 100644 recipes-extended/lsof/lsof_4.87.bbappend delete mode 100644 recipes-extended/sed/sed-4.2.1/sed-selinux-fix.patch create mode 100644 recipes-extended/sed/sed-4.2.2/sed-selinux-fix.patch delete mode 100644 recipes-extended/sed/sed_4.2.1.bbappend create mode 100644 recipes-extended/sed/sed_4.2.2.bbappend diff --git a/recipes-devtools/python/python_2.7.2.bbappend b/recipes-devtools/python/python_2.7.2.bbappend deleted file mode 100644 index b8447e9..0000000 --- a/recipes-devtools/python/python_2.7.2.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -PR .= ".1" - -inherit selinux -# If selinux enabled, disable handlers to rw command history file -FILESEXTRAPATHS_prepend := "${@target_selinux(d, '${THISDIR}/${PN}:')}" diff --git a/recipes-devtools/python/python_2.7.3.bbappend b/recipes-devtools/python/python_2.7.3.bbappend new file mode 100644 index 0000000..b8447e9 --- /dev/null +++ b/recipes-devtools/python/python_2.7.3.bbappend @@ -0,0 +1,5 @@ +PR .= ".1" + +inherit selinux +# If selinux enabled, disable handlers to rw command history file +FILESEXTRAPATHS_prepend := "${@target_selinux(d, '${THISDIR}/${PN}:')}" diff --git a/recipes-extended/lsof/lsof_4.86.bbappend b/recipes-extended/lsof/lsof_4.86.bbappend deleted file mode 100644 index 793b13f..0000000 --- a/recipes-extended/lsof/lsof_4.86.bbappend +++ /dev/null @@ -1,16 +0,0 @@ -PR .= ".2" - -inherit selinux - -DEPENDS += "${LIBSELINUX}" - -do_configure_prepend () { - export LINUX_HASSELINUX="${@target_selinux(d, 'Y', 'N')}" - export LSOF_CFGF="${CFLAGS}" - export LSOF_CFGL="${LDFLAGS}" - export LSOF_CC="${BUILD_CC}" -} - -do_compile () { - oe_runmake 'CC=${CC}' 'DEBUG=' -} diff --git a/recipes-extended/lsof/lsof_4.87.bbappend b/recipes-extended/lsof/lsof_4.87.bbappend new file mode 100644 index 0000000..793b13f --- /dev/null +++ b/recipes-extended/lsof/lsof_4.87.bbappend @@ -0,0 +1,16 @@ +PR .= ".2" + +inherit selinux + +DEPENDS += "${LIBSELINUX}" + +do_configure_prepend () { + export LINUX_HASSELINUX="${@target_selinux(d, 'Y', 'N')}" + export LSOF_CFGF="${CFLAGS}" + export LSOF_CFGL="${LDFLAGS}" + export LSOF_CC="${BUILD_CC}" +} + +do_compile () { + oe_runmake 'CC=${CC}' 'DEBUG=' +} diff --git a/recipes-extended/sed/sed-4.2.1/sed-selinux-fix.patch b/recipes-extended/sed/sed-4.2.1/sed-selinux-fix.patch deleted file mode 100644 index 9b9fcb7..0000000 --- a/recipes-extended/sed/sed-4.2.1/sed-selinux-fix.patch +++ /dev/null @@ -1,68 +0,0 @@ -Subject: [PATCH] sed: enable selinux only when incs and libs exist. - -Upstream-Status: Pending - -Signed-off-by: Xin Ouyang ---- - m4/selinux-selinux-h.m4 | 4 ++++ - sed/execute.c | 8 ++++---- - 2 files changed, 8 insertions(+), 4 deletions(-) - -diff --git a/m4/selinux-selinux-h.m4 b/m4/selinux-selinux-h.m4 -index 20dc77c..542b4e6 100644 ---- a/m4/selinux-selinux-h.m4 -+++ b/m4/selinux-selinux-h.m4 -@@ -34,6 +34,10 @@ AC_DEFUN([gl_LIBSELINUX], - [test "$ac_cv_search_setfilecon" = "none required" || - LIB_SELINUX=$ac_cv_search_setfilecon]) - AC_SUBST([LIB_SELINUX]) -+ if test "$ac_cv_search_setfilecon" != no && -+ test "$ac_cv_header_selinux_selinux_h" != no ; then -+ AC_DEFINE(HAVE_LIBSELINUX, 1, [libselinux enabled]) -+ fi - LIBS=$gl_save_LIBS - - # Warn if SELinux is found but libselinux is absent; -diff --git a/sed/execute.c b/sed/execute.c -index 6fbfff6..7e55e18 100644 ---- a/sed/execute.c -+++ b/sed/execute.c -@@ -31,7 +31,7 @@ - extern int errno; - #endif - --#ifndef BOOTSTRAP -+#ifdef HAVE_LIBSELINUX - #include - #include - #endif -@@ -718,7 +718,7 @@ open_next_file(name, input) - { - int input_fd; - char *tmpdir, *p; --#ifndef BOOTSTRAP -+#ifdef HAVE_LIBSELINUX - security_context_t old_fscreatecon; - int reset_fscreatecon = 0; - memset (&old_fscreatecon, 0, sizeof (old_fscreatecon)); -@@ -744,7 +744,7 @@ open_next_file(name, input) - if (!S_ISREG (input->st.st_mode)) - panic(_("couldn't edit %s: not a regular file"), input->in_file_name); - --#ifndef BOOTSTRAP -+#ifdef HAVE_LIBSELINUX - if (is_selinux_enabled ()) - { - security_context_t con; -@@ -771,7 +771,7 @@ open_next_file(name, input) - output_file.missing_newline = false; - free (tmpdir); - --#ifndef BOOTSTRAP -+#ifdef HAVE_LIBSELINUX - if (reset_fscreatecon) - { - setfscreatecon (old_fscreatecon); --- -1.7.9.5 - diff --git a/recipes-extended/sed/sed-4.2.2/sed-selinux-fix.patch b/recipes-extended/sed/sed-4.2.2/sed-selinux-fix.patch new file mode 100644 index 0000000..9b9fcb7 --- /dev/null +++ b/recipes-extended/sed/sed-4.2.2/sed-selinux-fix.patch @@ -0,0 +1,68 @@ +Subject: [PATCH] sed: enable selinux only when incs and libs exist. + +Upstream-Status: Pending + +Signed-off-by: Xin Ouyang +--- + m4/selinux-selinux-h.m4 | 4 ++++ + sed/execute.c | 8 ++++---- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/m4/selinux-selinux-h.m4 b/m4/selinux-selinux-h.m4 +index 20dc77c..542b4e6 100644 +--- a/m4/selinux-selinux-h.m4 ++++ b/m4/selinux-selinux-h.m4 +@@ -34,6 +34,10 @@ AC_DEFUN([gl_LIBSELINUX], + [test "$ac_cv_search_setfilecon" = "none required" || + LIB_SELINUX=$ac_cv_search_setfilecon]) + AC_SUBST([LIB_SELINUX]) ++ if test "$ac_cv_search_setfilecon" != no && ++ test "$ac_cv_header_selinux_selinux_h" != no ; then ++ AC_DEFINE(HAVE_LIBSELINUX, 1, [libselinux enabled]) ++ fi + LIBS=$gl_save_LIBS + + # Warn if SELinux is found but libselinux is absent; +diff --git a/sed/execute.c b/sed/execute.c +index 6fbfff6..7e55e18 100644 +--- a/sed/execute.c ++++ b/sed/execute.c +@@ -31,7 +31,7 @@ + extern int errno; + #endif + +-#ifndef BOOTSTRAP ++#ifdef HAVE_LIBSELINUX + #include + #include + #endif +@@ -718,7 +718,7 @@ open_next_file(name, input) + { + int input_fd; + char *tmpdir, *p; +-#ifndef BOOTSTRAP ++#ifdef HAVE_LIBSELINUX + security_context_t old_fscreatecon; + int reset_fscreatecon = 0; + memset (&old_fscreatecon, 0, sizeof (old_fscreatecon)); +@@ -744,7 +744,7 @@ open_next_file(name, input) + if (!S_ISREG (input->st.st_mode)) + panic(_("couldn't edit %s: not a regular file"), input->in_file_name); + +-#ifndef BOOTSTRAP ++#ifdef HAVE_LIBSELINUX + if (is_selinux_enabled ()) + { + security_context_t con; +@@ -771,7 +771,7 @@ open_next_file(name, input) + output_file.missing_newline = false; + free (tmpdir); + +-#ifndef BOOTSTRAP ++#ifdef HAVE_LIBSELINUX + if (reset_fscreatecon) + { + setfscreatecon (old_fscreatecon); +-- +1.7.9.5 + diff --git a/recipes-extended/sed/sed_4.2.1.bbappend b/recipes-extended/sed/sed_4.2.1.bbappend deleted file mode 100644 index 0607d44..0000000 --- a/recipes-extended/sed/sed_4.2.1.bbappend +++ /dev/null @@ -1,9 +0,0 @@ -PR .= ".2" - -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" - -SRC_URI += "file://sed-selinux-fix.patch" - -inherit selinux - -DEPENDS += "${LIBSELINUX}" diff --git a/recipes-extended/sed/sed_4.2.2.bbappend b/recipes-extended/sed/sed_4.2.2.bbappend new file mode 100644 index 0000000..0607d44 --- /dev/null +++ b/recipes-extended/sed/sed_4.2.2.bbappend @@ -0,0 +1,9 @@ +PR .= ".2" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" + +SRC_URI += "file://sed-selinux-fix.patch" + +inherit selinux + +DEPENDS += "${LIBSELINUX}" -- cgit v1.2.3-54-g00ecf