summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Draszik <adraszik@tycoint.com>2017-06-19 11:28:17 +0100
committerRoss Burton <ross.burton@intel.com>2017-06-22 13:39:16 +0100
commit6bdb814f247b826dc2eebc13517831a05e0e5e71 (patch)
tree3daa20ab65e6e3bce2dcba5cd5a4791bb47bdffb
parente42ded0ee35d0aab0de8fa090eda9f1c08bcbb4c (diff)
downloadmeta-gplv2-6bdb814f247b826dc2eebc13517831a05e0e5e71.tar.gz
m4: fix security & musl issues
As per the patches. Signed-off-by: André Draszik <adraszik@tycoint.com> Acked-by: Sylvain Lemieux <slemieux@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--recipes-devtools/m4/m4-1.4.9.inc5
-rw-r--r--recipes-devtools/m4/m4/0001-freeze-fix-compilation-error-with-security-flags-ena.patch35
-rw-r--r--recipes-devtools/m4/m4/0002-build-don-t-need-charset.alias-when-building-for-mus.patch44
3 files changed, 84 insertions, 0 deletions
diff --git a/recipes-devtools/m4/m4-1.4.9.inc b/recipes-devtools/m4/m4-1.4.9.inc
index aab2c1e..8c75dab 100644
--- a/recipes-devtools/m4/m4-1.4.9.inc
+++ b/recipes-devtools/m4/m4-1.4.9.inc
@@ -8,6 +8,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe\
8PR = "r2" 8PR = "r2"
9SRC_URI += "file://fix_for_circular_dependency.patch" 9SRC_URI += "file://fix_for_circular_dependency.patch"
10 10
11SRC_URI_append_class-target = "\
12 file://0001-freeze-fix-compilation-error-with-security-flags-ena.patch \
13 file://0002-build-don-t-need-charset.alias-when-building-for-mus.patch \
14"
15
11SRC_URI[md5sum] = "1ba8e147aff5e79bd2bfb983d86b53d5" 16SRC_URI[md5sum] = "1ba8e147aff5e79bd2bfb983d86b53d5"
12SRC_URI[sha256sum] = "815ce53853fbf6493617f467389b799208b1ec98296b95be44a683f8bcfd7c47" 17SRC_URI[sha256sum] = "815ce53853fbf6493617f467389b799208b1ec98296b95be44a683f8bcfd7c47"
13 18
diff --git a/recipes-devtools/m4/m4/0001-freeze-fix-compilation-error-with-security-flags-ena.patch b/recipes-devtools/m4/m4/0001-freeze-fix-compilation-error-with-security-flags-ena.patch
new file mode 100644
index 0000000..b5a6413
--- /dev/null
+++ b/recipes-devtools/m4/m4/0001-freeze-fix-compilation-error-with-security-flags-ena.patch
@@ -0,0 +1,35 @@
1From 5f07971ef7f087500f19beb778ff1c8fb176d76d Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
3Date: Thu, 23 Mar 2017 12:23:24 +0000
4Subject: [PATCH 1/2] freeze: fix compilation error with security flags enabled
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9| ../../m4-1.4.9/src/freeze.c: In function 'produce_frozen_state':
10| ../../m4-1.4.9/src/freeze.c:61:7: error: format not a string literal and no format arguments [-Werror=format-security]
11| M4ERROR ((warning_status, errno, name));
12| ^~~~~~~
13
14Upstream-Status: Inappropriate [required for m4 1.4.9 (GPLv2) recipe only]
15Signed-off-by: André Draszik <adraszik@tycoint.com>
16---
17 src/freeze.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/src/freeze.c b/src/freeze.c
21index 7b8a7bc..eebcc59 100644
22--- a/src/freeze.c
23+++ b/src/freeze.c
24@@ -58,7 +58,7 @@ produce_frozen_state (const char *name)
25
26 if (file = fopen (name, O_BINARY ? "wb" : "w"), !file)
27 {
28- M4ERROR ((warning_status, errno, name));
29+ M4ERROR ((warning_status, errno, "fopen failed: %s", name));
30 return;
31 }
32
33--
342.11.0
35
diff --git a/recipes-devtools/m4/m4/0002-build-don-t-need-charset.alias-when-building-for-mus.patch b/recipes-devtools/m4/m4/0002-build-don-t-need-charset.alias-when-building-for-mus.patch
new file mode 100644
index 0000000..4cd4889
--- /dev/null
+++ b/recipes-devtools/m4/m4/0002-build-don-t-need-charset.alias-when-building-for-mus.patch
@@ -0,0 +1,44 @@
1From c7fa0a47956570682e289937bf6f2d0516f491c6 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
3Date: Thu, 23 Mar 2017 12:24:02 +0000
4Subject: [PATCH 2/2] build: don't need charset.alias when building for musl
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Upstream-Status: Inappropriate [required for m4 1.4.9 (GPLv2) recipe only]
10Signed-off-by: André Draszik <adraszik@tycoint.com>
11---
12 lib/Makefile.am | 9 +++++++--
13 1 file changed, 7 insertions(+), 2 deletions(-)
14
15diff --git a/lib/Makefile.am b/lib/Makefile.am
16index 2575743..4dc17fe 100644
17--- a/lib/Makefile.am
18+++ b/lib/Makefile.am
19@@ -290,7 +290,11 @@ all-local: charset.alias ref-add.sed ref-del.sed
20 charset_alias = $(DESTDIR)$(libdir)/charset.alias
21 charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
22 install-exec-local: all-local
23- test $(GLIBC21) != no || $(mkinstalldirs) $(DESTDIR)$(libdir)
24+ case '$(host_os)' in \
25+ linux-musl*) \
26+ : ;;\
27+ *) \
28+ test $(GLIBC21) != no || $(mkinstalldirs) $(DESTDIR)$(libdir) ;\
29 if test -f $(charset_alias); then \
30 sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
31 $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
32@@ -301,7 +305,8 @@ install-exec-local: all-local
33 $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
34 rm -f $(charset_tmp) ; \
35 fi ; \
36- fi
37+ fi ;\
38+ esac
39
40 uninstall-local: all-local
41 if test -f $(charset_alias); then \
42--
432.11.0
44