All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-gplv2][PATCH] m4: fix security & musl issues
@ 2017-06-19 10:28 André Draszik
  0 siblings, 0 replies; only message in thread
From: André Draszik @ 2017-06-19 10:28 UTC (permalink / raw)
  To: yocto

From: André Draszik <adraszik@tycoint.com>

As per the patches.

Signed-off-by: André Draszik <adraszik@tycoint.com>
Acked-by: Sylvain Lemieux <slemieux@tycoint.com>
---
 recipes-devtools/m4/m4-1.4.9.inc                   |  5 +++
 ...compilation-error-with-security-flags-ena.patch | 35 +++++++++++++++++
 ...-need-charset.alias-when-building-for-mus.patch | 44 ++++++++++++++++++++++
 3 files changed, 84 insertions(+)
 create mode 100644 recipes-devtools/m4/m4/0001-freeze-fix-compilation-error-with-security-flags-ena.patch
 create mode 100644 recipes-devtools/m4/m4/0002-build-don-t-need-charset.alias-when-building-for-mus.patch

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\
 PR = "r2"
 SRC_URI += "file://fix_for_circular_dependency.patch"
 
+SRC_URI_append_class-target = "\
+    file://0001-freeze-fix-compilation-error-with-security-flags-ena.patch \
+    file://0002-build-don-t-need-charset.alias-when-building-for-mus.patch \
+"
+
 SRC_URI[md5sum] = "1ba8e147aff5e79bd2bfb983d86b53d5"
 SRC_URI[sha256sum] = "815ce53853fbf6493617f467389b799208b1ec98296b95be44a683f8bcfd7c47"
 
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 @@
+From 5f07971ef7f087500f19beb778ff1c8fb176d76d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
+Date: Thu, 23 Mar 2017 12:23:24 +0000
+Subject: [PATCH 1/2] freeze: fix compilation error with security flags enabled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+| ../../m4-1.4.9/src/freeze.c: In function 'produce_frozen_state':
+| ../../m4-1.4.9/src/freeze.c:61:7: error: format not a string literal and no format arguments [-Werror=format-security]
+|        M4ERROR ((warning_status, errno, name));
+|        ^~~~~~~
+
+Upstream-Status: Inappropriate [required for m4 1.4.9 (GPLv2) recipe only]
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+---
+ src/freeze.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/freeze.c b/src/freeze.c
+index 7b8a7bc..eebcc59 100644
+--- a/src/freeze.c
++++ b/src/freeze.c
+@@ -58,7 +58,7 @@ produce_frozen_state (const char *name)
+ 
+   if (file = fopen (name, O_BINARY ? "wb" : "w"), !file)
+     {
+-      M4ERROR ((warning_status, errno, name));
++      M4ERROR ((warning_status, errno, "fopen failed: %s", name));
+       return;
+     }
+ 
+-- 
+2.11.0
+
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 @@
+From c7fa0a47956570682e289937bf6f2d0516f491c6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
+Date: Thu, 23 Mar 2017 12:24:02 +0000
+Subject: [PATCH 2/2] build: don't need charset.alias when building for musl
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Inappropriate [required for m4 1.4.9 (GPLv2) recipe only]
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+---
+ lib/Makefile.am | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index 2575743..4dc17fe 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -290,7 +290,11 @@ all-local: charset.alias ref-add.sed ref-del.sed
+ charset_alias = $(DESTDIR)$(libdir)/charset.alias
+ charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
+ install-exec-local: all-local
+-	test $(GLIBC21) != no || $(mkinstalldirs) $(DESTDIR)$(libdir)
++	case '$(host_os)' in \
++	    linux-musl*) \
++	      : ;;\
++	    *) \
++	test $(GLIBC21) != no || $(mkinstalldirs) $(DESTDIR)$(libdir) ;\
+ 	if test -f $(charset_alias); then \
+ 	  sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
+ 	  $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+@@ -301,7 +305,8 @@ install-exec-local: all-local
+ 	    $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ 	    rm -f $(charset_tmp) ; \
+ 	  fi ; \
+-	fi
++	fi ;\
++	esac
+ 
+ uninstall-local: all-local
+ 	if test -f $(charset_alias); then \
+-- 
+2.11.0
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-19 10:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-19 10:28 [meta-gplv2][PATCH] m4: fix security & musl issues André Draszik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.