summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWenzong Fan <wenzong.fan@windriver.com>2015-10-13 22:55:17 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-27 07:24:27 +0000
commitdc8495fd1c1d73791619541a75cfc4ca2572e678 (patch)
tree55441f5888cc7ee6984a4bd816a25398658f858d
parent5bf1430276c96c767364807f490e2a7f12823cc1 (diff)
downloadpoky-dc8495fd1c1d73791619541a75cfc4ca2572e678.tar.gz
bzip2: fix bunzip2 -qt returns 0 for corrupt archives
"bzip2 -t FILE" returns 2 if FILE exists, but is not a valid bzip2 file. "bzip2 -qt FILE" returns 0 when this happens, although it does print out an error message as is does so. This has been fix by Debian, just port changes from Debian patch file "20-legacy.patch". Debian defect: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=279025 Fix item from changelog: http://archive.debian.net/changelogs/pool/main/b/bzip2/bzip2_1.0.2-7/changelog * Fixed "bunzip2 -qt returns 0 for corrupt archives" (Closes: #279025). (From OE-Core rev: b983822b57f60c5c210c9f23b3541f450d04ae3d) Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch55
-rw-r--r--meta/recipes-extended/bzip2/bzip2_1.0.6.bb1
2 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch b/meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch
new file mode 100644
index 0000000000..ece90d94e6
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch
@@ -0,0 +1,55 @@
1From 8068659388127e8e63f2d2297ba2348c72b20705 Mon Sep 17 00:00:00 2001
2From: Wenzong Fan <wenzong.fan@windriver.com>
3Date: Mon, 12 Oct 2015 03:19:51 -0400
4Subject: [PATCH] bzip2: fix bunzip2 -qt returns 0 for corrupt archives
5
6"bzip2 -t FILE" returns 2 if FILE exists, but is not a valid bzip2 file.
7"bzip2 -qt FILE" returns 0 when this happens, although it does print out
8an error message as is does so.
9
10This has been fix by Debian, just port changes from Debian patch file
11"20-legacy.patch".
12
13Debian defect:
14https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=279025
15
16Fix item from changelog:
17http://archive.debian.net/changelogs/pool/main/b/bzip2/bzip2_1.0.2-7/changelog
18
19 * Fixed "bunzip2 -qt returns 0 for corrupt archives" (Closes: #279025).
20
21Upstream-Status: Pending
22
23Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
24---
25 bzip2.c | 14 ++++++++------
26 1 file changed, 8 insertions(+), 6 deletions(-)
27
28diff --git a/bzip2.c b/bzip2.c
29index 6de9d1d..f2ce668 100644
30--- a/bzip2.c
31+++ b/bzip2.c
32@@ -2003,12 +2003,14 @@ IntNative main ( IntNative argc, Char *argv[] )
33 testf ( aa->name );
34 }
35 }
36- if (testFailsExist && noisy) {
37- fprintf ( stderr,
38- "\n"
39- "You can use the `bzip2recover' program to attempt to recover\n"
40- "data from undamaged sections of corrupted files.\n\n"
41- );
42+ if (testFailsExist) {
43+ if (noisy) {
44+ fprintf ( stderr,
45+ "\n"
46+ "You can use the `bzip2recover' program to attempt to recover\n"
47+ "data from undamaged sections of corrupted files.\n\n"
48+ );
49+ }
50 setExit(2);
51 exit(exitValue);
52 }
53--
541.9.1
55
diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
index 233fe4c33b..d7b8c0655a 100644
--- a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
+++ b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;beginline=8;endline=37;md5=40d9d1eb05736d1bfc
9PR = "r5" 9PR = "r5"
10 10
11SRC_URI = "http://www.bzip.org/${PV}/${BP}.tar.gz \ 11SRC_URI = "http://www.bzip.org/${PV}/${BP}.tar.gz \
12 file://fix-bunzip2-qt-returns-0-for-corrupt-archives.patch \
12 file://configure.ac;subdir=${BP} \ 13 file://configure.ac;subdir=${BP} \
13 file://Makefile.am;subdir=${BP} \ 14 file://Makefile.am;subdir=${BP} \
14 file://run-ptest" 15 file://run-ptest"