From 393e22b3c923f69e893bb02b117b83862eebe689 Mon Sep 17 00:00:00 2001 From: Xin Ouyang Date: Sat, 19 Jan 2013 16:07:58 +0800 Subject: sed: inherit with-selinux for new version sed-4.2.2 now has new configure option --with-selinux, so inherit with-selinux bbclass. Also, remove the patch since new version fix the issue. Signed-off-by: Xin Ouyang --- .../sed/sed-4.2.2/sed-selinux-fix.patch | 68 ---------------------- recipes-extended/sed/sed_4.2.2.bbappend | 10 +--- 2 files changed, 2 insertions(+), 76 deletions(-) delete mode 100644 recipes-extended/sed/sed-4.2.2/sed-selinux-fix.patch 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 deleted file mode 100644 index 9b9fcb7..0000000 --- a/recipes-extended/sed/sed-4.2.2/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.bbappend b/recipes-extended/sed/sed_4.2.2.bbappend index 0607d44..7695b77 100644 --- a/recipes-extended/sed/sed_4.2.2.bbappend +++ b/recipes-extended/sed/sed_4.2.2.bbappend @@ -1,9 +1,3 @@ -PR .= ".2" +PR .= ".3" -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" - -SRC_URI += "file://sed-selinux-fix.patch" - -inherit selinux - -DEPENDS += "${LIBSELINUX}" +inherit with-selinux -- cgit v1.2.3-54-g00ecf