[yocto] [meta-security][PATCH 11/11] apparmor: backport a patch to fix tool paths instead of sedding
Ross Burton
ross.burton at intel.com
Mon Jan 14 06:42:08 PST 2019
Sedding is ugly, and as upstream have already fixed this cherry-pick the patch
instead.
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
recipes-security/AppArmor/apparmor_2.12.bb | 3 +-
recipes-security/AppArmor/files/tool-paths.patch | 37 ++++++++++++++++++++++++
2 files changed, 38 insertions(+), 2 deletions(-)
create mode 100644 recipes-security/AppArmor/files/tool-paths.patch
diff --git a/recipes-security/AppArmor/apparmor_2.12.bb b/recipes-security/AppArmor/apparmor_2.12.bb
index ac03a56..efa93e6 100644
--- a/recipes-security/AppArmor/apparmor_2.12.bb
+++ b/recipes-security/AppArmor/apparmor_2.12.bb
@@ -17,6 +17,7 @@ SRC_URI = " \
http://archive.ubuntu.com/ubuntu/pool/main/a/${BPN}/${BPN}_${PV}.orig.tar.gz \
file://disable_perl_h_check.patch \
file://crosscompile_perl_bindings.patch \
+ file://tool-paths.patch \
file://apparmor.rc \
file://functions \
file://apparmor \
@@ -56,8 +57,6 @@ do_configure() {
libtoolize --automake -c --force
automake -ac
./configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
- sed -i -e 's#^YACC.*#YACC := bison#' ${S}/parser/Makefile
- sed -i -e 's#^LEX.*#LEX := flex#' ${S}/parser/Makefile
}
do_compile () {
diff --git a/recipes-security/AppArmor/files/tool-paths.patch b/recipes-security/AppArmor/files/tool-paths.patch
new file mode 100644
index 0000000..aaf08da
--- /dev/null
+++ b/recipes-security/AppArmor/files/tool-paths.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton at intel.com>
+
+From e7edd937adcbf1b3c8d38a31de5bacb2029b1965 Mon Sep 17 00:00:00 2001
+From: John Johansen <john.johansen at canonical.com>
+Date: Thu, 4 Oct 2018 23:15:28 -0700
+Subject: [PATCH] parser: fix Makefile hardcoded paths to flex and bison
+
+The hardcoded paths for flex and python can break builds on systems
+where those tools are stored in an alternate location. Use which
+to lookup where flex and bison are available.
+
+This fixes issue #4
+
+Signed-off-by: John Johansen <john.johansen at canonical.com>
+---
+ parser/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/parser/Makefile b/parser/Makefile
+index 4d370c36..015c218d 100644
+--- a/parser/Makefile
++++ b/parser/Makefile
+@@ -27,9 +27,9 @@ INSTALL_CONFDIR=${DESTDIR}${CONFDIR}
+ LOCALEDIR=/usr/share/locale
+ MANPAGES=apparmor.d.5 apparmor.7 apparmor_parser.8 subdomain.conf.5
+
+-YACC := /usr/bin/bison
++YACC := bison
+ YFLAGS := -d
+-LEX := /usr/bin/flex
++LEX := flex
+ LEXFLAGS = -B -v
+ WARNINGS = -Wall
+ EXTRA_WARNINGS = -Wsign-compare -Wmissing-field-initializers -Wformat-security -Wunused-parameter
+--
+2.11.0
--
2.11.0
More information about the yocto
mailing list