Bug 1193603 - rpmbuild ignores corrupt compressed patches
Summary: rpmbuild ignores corrupt compressed patches
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: All
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-17 17:00 UTC by Pádraig Brady
Modified: 2016-01-04 14:43 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-03-18 12:33:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
improve detection of bzip2 format patches (1.06 KB, patch)
2015-02-17 17:01 UTC, Pádraig Brady
no flags Details | Diff
fail with corrupt compressed patches (1.16 KB, application/mbox)
2015-02-17 17:02 UTC, Pádraig Brady
no flags Details

Description Pádraig Brady 2015-02-17 17:00:24 UTC
There were two issues identified with the latest glibc build for f22,
where a patch was silently dropped with an easy to miss warning:

  Patch #1000 (glibc-swbz17949.patch):
  + /usr/bin/bzip2 -dc /home/carlos/fedsrc/glibc-f22/glibc-swbz17949.patch
  + /usr/bin/patch -p1 --fuzz=0
  bzip2: /home/carlos/fedsrc/glibc-f22/glibc-swbz17949.patch is not a bzip2 file.

The reason the patch was "corrupt" was due to invalid detection of bzip2 format.

The reason the failure was ignored was due to the pipe having the status
of the last patch command, which read nothing.

Comment 1 Pádraig Brady 2015-02-17 17:01:20 UTC
Created attachment 992809 [details]
improve detection of bzip2 format patches

Comment 2 Pádraig Brady 2015-02-17 17:02:27 UTC
Created attachment 992814 [details]
fail with corrupt compressed patches

Comment 3 Carlos O'Donell 2015-02-17 22:05:14 UTC
For the record the patch on the glibc side is a simple text file that happened to cotnain "BZ #XXXX" in the start of the patch file, and that triggered a heuristic to detect it as a bzip2 file. The heuristic needs expanding. It should take into account the encoding of the file and subsequent content.

Comment 4 Florian Festi 2015-03-18 12:33:57 UTC
Committed upstream as f793add4ae429e11664b403df4c32a73bc31a6e8 and d9f673bf2841bb8c854e6676871078ab563a51c9.

Thanks for spotting and the patches!

Closing this here as it is probably not urgent enough to issue an Fedora update.


Note You need to log in before you can comment on or make changes to this bug.