]> code.ossystems Code Review - openembedded-core.git/commitdiff
file: enable all built-in compression checkers
authorAlexander Kanavin <alex.kanavin@gmail.com>
Wed, 28 Oct 2020 21:05:35 +0000 (22:05 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 30 Oct 2020 12:37:54 +0000 (12:37 +0000)
This allows re-enabling parallel file classification in rpm
in particular, as otherwise libmagic calls out to external
executables, which isn't implemented in a thread-safe way.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/file/file_5.39.bb
meta/recipes-devtools/file/files/0001-src-compress.c-correct-header-define-for-xz-lzma.patch [new file with mode: 0644]

index 0dcc90548a013ebb5868c2b1ba528cda0930c519..abaa8149a31ae11e6e2ad27608a7c3bb3a39f6ed 100644 (file)
@@ -11,14 +11,15 @@ LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=0251eaec1188b20d9a72c502ecfdd
 DEPENDS = "file-replacement-native"
 DEPENDS_class-native = "bzip2-replacement-native"
 
-SRC_URI = "git://github.com/file/file.git"
+SRC_URI = "git://github.com/file/file.git \
+           file://0001-src-compress.c-correct-header-define-for-xz-lzma.patch"
 
 SRCREV = "87731415de945660b00f02207d8e9d986ef9b82e"
 S = "${WORKDIR}/git"
 
 inherit autotools update-alternatives
 
-PACKAGECONFIG ??= "zlib"
+PACKAGECONFIG ??= "bz2 lzma zlib"
 PACKAGECONFIG[bz2] = "--enable-bzlib, --disable-bzlib, bzip2"
 PACKAGECONFIG[lzma] = "--enable-xzlib, --disable-xzlib, xz"
 PACKAGECONFIG[zlib] = "--enable-zlib, --disable-zlib, zlib"
diff --git a/meta/recipes-devtools/file/files/0001-src-compress.c-correct-header-define-for-xz-lzma.patch b/meta/recipes-devtools/file/files/0001-src-compress.c-correct-header-define-for-xz-lzma.patch
new file mode 100644 (file)
index 0000000..f8ba2f6
--- /dev/null
@@ -0,0 +1,27 @@
+From ffb6ebdb42590cb9f7d3f5177b7b820a9edc4c81 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Sun, 18 Oct 2020 23:40:42 +0200
+Subject: [PATCH] src/compress.c: correct header define for xz/lzma
+
+Upstream-Status: Submitted [https://github.com/file/file/pull/98]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/compress.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/compress.c b/src/compress.c
+index 67f21583..9670b72c 100644
+--- a/src/compress.c
++++ b/src/compress.c
+@@ -71,7 +71,7 @@ typedef void (*sig_t)(int);
+ #include <bzlib.h>
+ #endif
+-#if defined(HAVE_XZLIB_H) && defined(XZLIBSUPPORT)
++#if defined(HAVE_LZMA_H) && defined(XZLIBSUPPORT)
+ #define BUILTIN_XZLIB
+ #include <lzma.h>
+ #endif
+-- 
+2.28.0
+