[yocto] [meta-security][PATCH] apparmor: suppress appending of installation to perllocal.pod

Naveen Saini naveen.kumar.saini at intel.com
Sun Sep 22 19:17:16 PDT 2019


perl modules when gets installed can produce a perllocal.pod
file for documenting a list of locally installed perl modules.
This can conflict if multiple packages generate the file.

Hits the conflict with apparmor & rrdtool packages.
Error: Transaction check error:
  file /usr/lib/perl5/5.30.0/x86_64-linux/perllocal.pod conflicts between attempted installs of rrdtool-1.7.2-r0.corei7_64 and apparmor-2.13.3-r0.corei7_64

perllocal.pod files are for documentation purpose, so
disabling does not harm. Generating perllocal.pod for perl
module is disabled by passing NO_PERLLOCAL=1
with ExtUtils::MakeMaker utility.

https://perldoc.perl.org/5.30.0/ExtUtils/MakeMaker.html#Using-Attributes-and-Parameters

[YOCTO #13491]

Signed-off-by: Naveen Saini <naveen.kumar.saini at intel.com>
---
 recipes-mac/AppArmor/apparmor_2.13.3.bb       |  1 +
 ...1-Makefile.am-suppress-perllocal.pod.patch | 28 +++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 recipes-mac/AppArmor/files/0001-Makefile.am-suppress-perllocal.pod.patch

diff --git a/recipes-mac/AppArmor/apparmor_2.13.3.bb b/recipes-mac/AppArmor/apparmor_2.13.3.bb
index 8484404..2e5d221 100644
--- a/recipes-mac/AppArmor/apparmor_2.13.3.bb
+++ b/recipes-mac/AppArmor/apparmor_2.13.3.bb
@@ -21,6 +21,7 @@ SRC_URI = " \
 	file://functions \
 	file://apparmor \
 	file://apparmor.service \
+	file://0001-Makefile.am-suppress-perllocal.pod.patch \
 	file://run-ptest \
 	"
 
diff --git a/recipes-mac/AppArmor/files/0001-Makefile.am-suppress-perllocal.pod.patch b/recipes-mac/AppArmor/files/0001-Makefile.am-suppress-perllocal.pod.patch
new file mode 100644
index 0000000..9807be1
--- /dev/null
+++ b/recipes-mac/AppArmor/files/0001-Makefile.am-suppress-perllocal.pod.patch
@@ -0,0 +1,28 @@
+From 9f9cfbf07214ac68a55372a3c2777192765cbeb9 Mon Sep 17 00:00:00 2001
+From: Naveen Saini <naveen.kumar.saini at intel.com>
+Date: Fri, 20 Sep 2019 18:53:53 +0800
+Subject: [PATCH] Makefile.am: suppress perllocal.pod
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Naveen Saini <naveen.kumar.saini at intel.com>
+---
+ libraries/libapparmor/swig/perl/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libraries/libapparmor/swig/perl/Makefile.am b/libraries/libapparmor/swig/perl/Makefile.am
+index 6ae4e30c..be00dc7f 100644
+--- a/libraries/libapparmor/swig/perl/Makefile.am
++++ b/libraries/libapparmor/swig/perl/Makefile.am
+@@ -11,7 +11,7 @@ MOSTLYCLEANFILES=libapparmor_wrap.c LibAppArmor.pm
+ LibAppArmor.pm: libapparmor_wrap.c
+ 
+ Makefile.perl: Makefile.PL LibAppArmor.pm
+-	$(PERL) $< PREFIX=$(prefix) MAKEFILE=$@
++	$(PERL) $< PREFIX=$(prefix) MAKEFILE=$@ NO_PERLLOCAL=1
+ 	sed -ie 's/LD_RUN_PATH="\x24(LD_RUN_PATH)"//g' Makefile.perl
+ 	sed -ie 's/^LD_RUN_PATH.*//g' Makefile.perl
+ 
+-- 
+2.17.1
+
-- 
2.17.1



More information about the yocto mailing list