All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bzip2: fix bunzip2 -qt returns 0 for corrupt archives
@ 2015-10-12  9:35 wenzong.fan
  2015-10-12 12:54 ` Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: wenzong.fan @ 2015-10-12  9:35 UTC (permalink / raw)
  To: openembedded-core

From: Wenzong Fan <wenzong.fan@windriver.com>

"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":

* Fixed "bunzip2 -qt returns 0 for corrupt archives" (Closes: #279025).

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
---
 ...bunzip2-qt-returns-0-for-corrupt-archives.patch | 49 ++++++++++++++++++++++
 meta/recipes-extended/bzip2/bzip2_1.0.6.bb         |  1 +
 2 files changed, 50 insertions(+)
 create mode 100644 meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch

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 0000000..63d705d
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch
@@ -0,0 +1,49 @@
+From 8068659388127e8e63f2d2297ba2348c72b20705 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Mon, 12 Oct 2015 03:19:51 -0400
+Subject: [PATCH] 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":
+
+* Fixed "bunzip2 -qt returns 0 for corrupt archives" (Closes: #279025).
+
+Upstream-Status: Backport [Debian]
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ bzip2.c | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/bzip2.c b/bzip2.c
+index 6de9d1d..f2ce668 100644
+--- a/bzip2.c
++++ b/bzip2.c
+@@ -2003,12 +2003,14 @@ IntNative main ( IntNative argc, Char *argv[] )
+             testf ( aa->name );
+ 	 }
+       }
+-      if (testFailsExist && noisy) {
+-         fprintf ( stderr,
+-           "\n"
+-           "You can use the `bzip2recover' program to attempt to recover\n"
+-           "data from undamaged sections of corrupted files.\n\n"
+-         );
++      if (testFailsExist) {
++         if (noisy) {
++            fprintf ( stderr,
++              "\n"
++              "You can use the `bzip2recover' program to attempt to recover\n"
++              "data from undamaged sections of corrupted files.\n\n"
++            );
++         }
+          setExit(2);
+          exit(exitValue);
+       }
+-- 
+1.9.1
+
diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
index 233fe4c..d7b8c06 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
 PR = "r5"
 
 SRC_URI = "http://www.bzip.org/${PV}/${BP}.tar.gz \
+           file://fix-bunzip2-qt-returns-0-for-corrupt-archives.patch \
            file://configure.ac;subdir=${BP} \
            file://Makefile.am;subdir=${BP} \
            file://run-ptest"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] bzip2: fix bunzip2 -qt returns 0 for corrupt archives
  2015-10-12  9:35 [PATCH] bzip2: fix bunzip2 -qt returns 0 for corrupt archives wenzong.fan
@ 2015-10-12 12:54 ` Richard Purdie
  2015-10-13  2:04   ` Robert Yang
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2015-10-12 12:54 UTC (permalink / raw)
  To: wenzong.fan; +Cc: openembedded-core

On Mon, 2015-10-12 at 05:35 -0400, wenzong.fan@windriver.com wrote:
> From: Wenzong Fan <wenzong.fan@windriver.com>
> 
> "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":
> 
> * Fixed "bunzip2 -qt returns 0 for corrupt archives" (Closes: #279025).
> 
> Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
> ---
>  ...bunzip2-qt-returns-0-for-corrupt-archives.patch | 49 ++++++++++++++++++++++
>  meta/recipes-extended/bzip2/bzip2_1.0.6.bb         |  1 +
>  2 files changed, 50 insertions(+)
>  create mode 100644 meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch
> 
> 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 0000000..63d705d
> --- /dev/null
> +++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch
> @@ -0,0 +1,49 @@
> +From 8068659388127e8e63f2d2297ba2348c72b20705 Mon Sep 17 00:00:00 2001
> +From: Wenzong Fan <wenzong.fan@windriver.com>
> +Date: Mon, 12 Oct 2015 03:19:51 -0400
> +Subject: [PATCH] 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":
> +
> +* Fixed "bunzip2 -qt returns 0 for corrupt archives" (Closes: #279025).
> +
> +Upstream-Status: Backport [Debian]
> +

What is the upstream position on this issue? That they won't fix it? I'm
not sure Backport is right for a debian patch since debian is not the
bzip2 upstream.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bzip2: fix bunzip2 -qt returns 0 for corrupt archives
  2015-10-12 12:54 ` Richard Purdie
@ 2015-10-13  2:04   ` Robert Yang
  2015-10-13 12:48     ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Yang @ 2015-10-13  2:04 UTC (permalink / raw)
  To: Richard Purdie, wenzong.fan; +Cc: openembedded-core



On 10/12/2015 08:54 PM, Richard Purdie wrote:
> On Mon, 2015-10-12 at 05:35 -0400, wenzong.fan@windriver.com wrote:
>> From: Wenzong Fan <wenzong.fan@windriver.com>
>>
>> "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":
>>
>> * Fixed "bunzip2 -qt returns 0 for corrupt archives" (Closes: #279025).
>>
>> Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
>> ---
>>   ...bunzip2-qt-returns-0-for-corrupt-archives.patch | 49 ++++++++++++++++++++++
>>   meta/recipes-extended/bzip2/bzip2_1.0.6.bb         |  1 +
>>   2 files changed, 50 insertions(+)
>>   create mode 100644 meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch
>>
>> 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 0000000..63d705d
>> --- /dev/null
>> +++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch
>> @@ -0,0 +1,49 @@
>> +From 8068659388127e8e63f2d2297ba2348c72b20705 Mon Sep 17 00:00:00 2001
>> +From: Wenzong Fan <wenzong.fan@windriver.com>
>> +Date: Mon, 12 Oct 2015 03:19:51 -0400
>> +Subject: [PATCH] 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":
>> +
>> +* Fixed "bunzip2 -qt returns 0 for corrupt archives" (Closes: #279025).
>> +
>> +Upstream-Status: Backport [Debian]
>> +
>
> What is the upstream position on this issue? That they won't fix it? I'm
> not sure Backport is right for a debian patch since debian is not the
> bzip2 upstream.

I wrongly thought that it was right, and we did have several "Backport [Debian]"
in oe-core/meta, should it be a Pending or Pending [Debian], please ?

// Robert

>
> Cheers,
>
> Richard
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bzip2: fix bunzip2 -qt returns 0 for corrupt archives
  2015-10-13  2:04   ` Robert Yang
@ 2015-10-13 12:48     ` Burton, Ross
  2015-10-14  2:28       ` wenzong fan
  0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2015-10-13 12:48 UTC (permalink / raw)
  To: Robert Yang; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

On 13 October 2015 at 03:04, Robert Yang <liezhi.yang@windriver.com> wrote:

> I wrongly thought that it was right, and we did have several "Backport
> [Debian]"
> in oe-core/meta, should it be a Pending or Pending [Debian], please ?
>

If the Debian bug/patch doesn't refer to an upstream bug, I'd suggest
Pending with a link to the debian bug# if there is one.

Ross

[-- Attachment #2: Type: text/html, Size: 794 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bzip2: fix bunzip2 -qt returns 0 for corrupt archives
  2015-10-13 12:48     ` Burton, Ross
@ 2015-10-14  2:28       ` wenzong fan
  0 siblings, 0 replies; 5+ messages in thread
From: wenzong fan @ 2015-10-14  2:28 UTC (permalink / raw)
  To: Burton, Ross, Robert Yang; +Cc: OE-core

On 10/13/2015 08:48 PM, Burton, Ross wrote:
>
> On 13 October 2015 at 03:04, Robert Yang <liezhi.yang@windriver.com
> <mailto:liezhi.yang@windriver.com>> wrote:
>
>     I wrongly thought that it was right, and we did have several
>     "Backport [Debian]"
>     in oe-core/meta, should it be a Pending or Pending [Debian], please ?
>
>
> If the Debian bug/patch doesn't refer to an upstream bug, I'd suggest
> Pending with a link to the debian bug# if there is one.

Ok, I'll send V2 with the updates.

Thanks
Wenzong

>
> Ross
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-14  2:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-12  9:35 [PATCH] bzip2: fix bunzip2 -qt returns 0 for corrupt archives wenzong.fan
2015-10-12 12:54 ` Richard Purdie
2015-10-13  2:04   ` Robert Yang
2015-10-13 12:48     ` Burton, Ross
2015-10-14  2:28       ` wenzong fan

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.