summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2019-01-14 14:42:08 +0000
committerArmin Kuster <akuster808@gmail.com>2019-01-17 15:53:25 -0800
commit48ccc9a08dd85163f9c907c79dd38f0808f6f967 (patch)
treed41368a9c5d1dc186fdf3f0088c5800b7fe97f1d
parent4918d0b0252f2dae59d5d59d54101d385002c129 (diff)
downloadmeta-security-48ccc9a08dd85163f9c907c79dd38f0808f6f967.tar.gz
apparmor: backport a patch to fix tool paths instead of sedding
Sedding is ugly, and as upstream have already fixed this cherry-pick the patch instead. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--recipes-security/AppArmor/apparmor_2.12.bb3
-rw-r--r--recipes-security/AppArmor/files/tool-paths.patch37
2 files changed, 38 insertions, 2 deletions
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 = " \
17 http://archive.ubuntu.com/ubuntu/pool/main/a/${BPN}/${BPN}_${PV}.orig.tar.gz \ 17 http://archive.ubuntu.com/ubuntu/pool/main/a/${BPN}/${BPN}_${PV}.orig.tar.gz \
18 file://disable_perl_h_check.patch \ 18 file://disable_perl_h_check.patch \
19 file://crosscompile_perl_bindings.patch \ 19 file://crosscompile_perl_bindings.patch \
20 file://tool-paths.patch \
20 file://apparmor.rc \ 21 file://apparmor.rc \
21 file://functions \ 22 file://functions \
22 file://apparmor \ 23 file://apparmor \
@@ -56,8 +57,6 @@ do_configure() {
56 libtoolize --automake -c --force 57 libtoolize --automake -c --force
57 automake -ac 58 automake -ac
58 ./configure ${CONFIGUREOPTS} ${EXTRA_OECONF} 59 ./configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
59 sed -i -e 's#^YACC.*#YACC := bison#' ${S}/parser/Makefile
60 sed -i -e 's#^LEX.*#LEX := flex#' ${S}/parser/Makefile
61} 60}
62 61
63do_compile () { 62do_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 @@
1Upstream-Status: Backport
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From e7edd937adcbf1b3c8d38a31de5bacb2029b1965 Mon Sep 17 00:00:00 2001
5From: John Johansen <john.johansen@canonical.com>
6Date: Thu, 4 Oct 2018 23:15:28 -0700
7Subject: [PATCH] parser: fix Makefile hardcoded paths to flex and bison
8
9The hardcoded paths for flex and python can break builds on systems
10where those tools are stored in an alternate location. Use which
11to lookup where flex and bison are available.
12
13This fixes issue #4
14
15Signed-off-by: John Johansen <john.johansen@canonical.com>
16---
17 parser/Makefile | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/parser/Makefile b/parser/Makefile
21index 4d370c36..015c218d 100644
22--- a/parser/Makefile
23+++ b/parser/Makefile
24@@ -27,9 +27,9 @@ INSTALL_CONFDIR=${DESTDIR}${CONFDIR}
25 LOCALEDIR=/usr/share/locale
26 MANPAGES=apparmor.d.5 apparmor.7 apparmor_parser.8 subdomain.conf.5
27
28-YACC := /usr/bin/bison
29+YACC := bison
30 YFLAGS := -d
31-LEX := /usr/bin/flex
32+LEX := flex
33 LEXFLAGS = -B -v
34 WARNINGS = -Wall
35 EXTRA_WARNINGS = -Wsign-compare -Wmissing-field-initializers -Wformat-security -Wunused-parameter
36--
372.11.0