diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-oe/recipes-extended/p7zip | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-extended/p7zip')
4 files changed, 151 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-extended/p7zip/files/0001-Fix-narrowing-errors-Wc-11-narrowing.patch b/meta-openembedded/meta-oe/recipes-extended/p7zip/files/0001-Fix-narrowing-errors-Wc-11-narrowing.patch new file mode 100644 index 0000000000..ae27517458 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/p7zip/files/0001-Fix-narrowing-errors-Wc-11-narrowing.patch @@ -0,0 +1,48 @@ +From b6b1782af4aa7f9084d32e4144738dc2535c8d6f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 23 Apr 2018 23:07:21 -0700 +Subject: [PATCH] Fix narrowing errors -Wc++11-narrowing + +Clang 6.x finds these errors + + ../../../../CPP/Windows/ErrorMsg.cpp:24:10: error: case value evaluates to -2147024809, which cannot be narrowed to type 'DWORD' (aka 'unsigned int') [-Wc++11-narrowing] + case E_INVALIDARG : txt = "E_INVALIDARG"; break ; + ^ + +HRESULT causes the macro to be parsed as a signed long, so we need to force it +to be checked as an unsigned long instead. + +also reported here https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224930 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + CPP/Windows/ErrorMsg.cpp | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/CPP/Windows/ErrorMsg.cpp b/CPP/Windows/ErrorMsg.cpp +index 99684ae..78a64ba 100644 +--- a/CPP/Windows/ErrorMsg.cpp ++++ b/CPP/Windows/ErrorMsg.cpp +@@ -15,13 +15,13 @@ UString MyFormatMessage(DWORD errorCode) + + switch(errorCode) { + case ERROR_NO_MORE_FILES : txt = "No more files"; break ; +- case E_NOTIMPL : txt = "E_NOTIMPL"; break ; +- case E_NOINTERFACE : txt = "E_NOINTERFACE"; break ; +- case E_ABORT : txt = "E_ABORT"; break ; +- case E_FAIL : txt = "E_FAIL"; break ; +- case STG_E_INVALIDFUNCTION : txt = "STG_E_INVALIDFUNCTION"; break ; +- case E_OUTOFMEMORY : txt = "E_OUTOFMEMORY"; break ; +- case E_INVALIDARG : txt = "E_INVALIDARG"; break ; ++ case (DWORD) E_NOTIMPL : txt = "E_NOTIMPL"; break ; ++ case (DWORD) E_NOINTERFACE : txt = "E_NOINTERFACE"; break ; ++ case (DWORD) E_ABORT : txt = "E_ABORT"; break ; ++ case (DWORD) E_FAIL : txt = "E_FAIL"; break ; ++ case (DWORD) STG_E_INVALIDFUNCTION : txt = "STG_E_INVALIDFUNCTION"; break ; ++ case (DWORD) E_OUTOFMEMORY : txt = "E_OUTOFMEMORY"; break ; ++ case (DWORD) E_INVALIDARG : txt = "E_INVALIDARG"; break ; + case ERROR_DIRECTORY : txt = "Error Directory"; break ; + default: + txt = strerror(errorCode); diff --git a/meta-openembedded/meta-oe/recipes-extended/p7zip/files/CVE-2017-17969.patch b/meta-openembedded/meta-oe/recipes-extended/p7zip/files/CVE-2017-17969.patch new file mode 100644 index 0000000000..177d1455f8 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/p7zip/files/CVE-2017-17969.patch @@ -0,0 +1,31 @@ +p7zip: Fix CVE-2017-17969 + +[No upstream tracking] -- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888297 + +Heap-based buffer overflow in 7zip + +Compress/ShrinkDecoder.cpp: Heap-based buffer overflow +in the NCompress::NShrink::CDecoder::CodeReal method +in 7-Zip before 18.00 and p7zip allows remote attackers +to cause a denial of service (out-of-bounds write) +or potentially execute arbitrary code via a crafted ZIP archive. + +Upstream-Status: Backport [https://sourceforge.net/p/p7zip/bugs/_discuss/thread/0920f369/8316/attachment/CVE-2017-17969.patch] +CVE: CVE-2017-17969 +Signed-off-by: Radovan Scasny <radovan.scasny@siemens.com> + +--- a/CPP/7zip/Compress/ShrinkDecoder.cpp ++++ b/CPP/7zip/Compress/ShrinkDecoder.cpp +@@ -121,7 +121,12 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream * + { + _stack[i++] = _suffixes[cur]; + cur = _parents[cur]; ++ if (cur >= kNumItems || i >= kNumItems) ++ break; + } ++ ++ if (cur >= kNumItems || i >= kNumItems) ++ break; + + _stack[i++] = (Byte)cur; + lastChar2 = (Byte)cur; diff --git a/meta-openembedded/meta-oe/recipes-extended/p7zip/files/do_not_override_compiler_and_do_not_strip.patch b/meta-openembedded/meta-oe/recipes-extended/p7zip/files/do_not_override_compiler_and_do_not_strip.patch new file mode 100644 index 0000000000..b0a560fe98 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/p7zip/files/do_not_override_compiler_and_do_not_strip.patch @@ -0,0 +1,30 @@ +do not override compiler and do not strip + +The default makefile sets the compiler to g++ or gcc. This leads to a wrong architecture when cross-compiling. +Remove the hardcoded compiler and just append the flags to CXX and CC. + +Upstream-Status: Pending +Signed-off-by: Raphael Freudiger <raphael.freudiger@siemens.com> +Reviewed-By: Pascal Bach <pascal.bach@siemens.com> + +diff -Nurp p7zip_15.14.1_orig/makefile.machine p7zip_15.14.1/makefile.machine +--- p7zip_15.14.1_orig/makefile.machine 2016-03-23 20:37:47.000000000 +0100 ++++ p7zip_15.14.1/makefile.machine 2016-06-17 15:33:39.720454477 +0200 +@@ -2,7 +2,7 @@ + # makefile for Linux (x86, PPC, alpha ...) + # + +-OPTFLAGS=-O -s ++OPTFLAGS=-O + + ALLFLAGS=${OPTFLAGS} -pipe \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ +@@ -10,8 +10,6 @@ ALLFLAGS=${OPTFLAGS} -pipe \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +-CXX=g++ +-CC=gcc + CC_SHARED=-fPIC + LINK_SHARED=-fPIC -shared + diff --git a/meta-openembedded/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb b/meta-openembedded/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb new file mode 100644 index 0000000000..d986da9043 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb @@ -0,0 +1,42 @@ +SUMMARY = "7-zip is a commandline utility handling 7z archives." +HOMEPAGE = "http://www.7-zip.org/" +LICENSE = "LGPL-2.1+ & unRAR" +LIC_FILES_CHKSUM = "file://DOC/copying.txt;md5=4fbd65380cdd255951079008b364516c \ + file://DOC/unRarLicense.txt;md5=9c87ddde469ef94aed153b0951d088de \ + file://DOC/License.txt;md5=879598edf1f54dddb6930d7581357f8b" + +SRC_URI = "http://downloads.sourceforge.net/p7zip/p7zip/${PV}/p7zip_${PV}_src_all.tar.bz2 \ + file://do_not_override_compiler_and_do_not_strip.patch \ + file://CVE-2017-17969.patch \ + file://0001-Fix-narrowing-errors-Wc-11-narrowing.patch \ + " + +SRC_URI[md5sum] = "a0128d661cfe7cc8c121e73519c54fbf" +SRC_URI[sha256sum] = "5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f" + +S = "${WORKDIR}/${BPN}_${PV}" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${S}/bin/* ${D}${bindir} +} + +# all3: to build bin/7za, bin/7z (with its plugins), bin/7zr and bin/7zCon.sfx +EXTRA_OEMAKE_class-native = "all3" + +do_install_class-native() { + install -d ${D}${bindir} + install -d ${D}${bindir}/Codecs + install -m 0755 ${S}/bin/7* ${D}${bindir} + install -m 0755 ${S}/bin/Codecs/* ${D}${bindir}/Codecs + + # Create a shell script wrapper to execute next to 7z.so + mv ${D}${bindir}/7z ${D}${bindir}/7z.bin + cat > ${D}${bindir}/7z << 'EOF' +#!/bin/sh +exec "$(dirname "$0")"/7z.bin "$@" +EOF + chmod 0755 ${D}${bindir}/7z +} + +BBCLASSEXTEND = "native" |