Bug 1240914 - Running licensecheck on tarball or image results in crash
Summary: Running licensecheck on tarball or image results in crash
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: devscripts
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sandro Mani
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-08 06:33 UTC by Jan Sedlák
Modified: 2015-07-23 08:56 UTC (History)
1 user (show)

Fixed In Version: devscripts-2.15.5-6.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-23 08:55:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Debian BTS 791756 0 None None None Never

Description Jan Sedlák 2015-07-08 06:33:26 UTC
Description of problem:
In fedora-review package, script /usr/bin/licensecheck is used - it's part of devscripts-minimal package. Running licensecheck on binary file (such as tarball, picture, etc.) results in crash with:

Unknown encoding 'binary' at /usr/bin/licensecheck line 338.

Problem is that licensecheck uses "file -bi" to determine file encoding and uses this value to decode. Running file -bi on image file returns:

image/jpeg; charset=binary

but Perl function decode() doesn't know "binary" encoding.

Version-Release number of selected component (if applicable):
2.15.5-5

Steps to Reproduce:
1. Download any image.
2. Run licensecheck image.jpeg

Actual results:
It shows: Unknown encoding 'binary' at /usr/bin/licensecheck line 338.

Expected results:
It should either print "*No copyright* UNKNOWN" or info that this script doesn't work on binary files.

Comment 1 Sandro Mani 2015-07-08 08:14:16 UTC
Reported upstream https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=791756.

I'm not familiar with perl, if you can provide a patch I can integrate it in the Fedora package.

Comment 2 Fedora Update System 2015-07-09 18:07:10 UTC
devscripts-2.15.5-6.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/devscripts-2.15.5-6.fc22

Comment 3 Fedora Update System 2015-07-09 18:08:20 UTC
devscripts-2.15.5-6.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/devscripts-2.15.5-6.fc21

Comment 4 Fedora Update System 2015-07-13 19:05:20 UTC
Package devscripts-2.15.5-6.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing devscripts-2.15.5-6.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-11362/devscripts-2.15.5-6.fc22
then log in and leave karma (feedback).

Comment 5 Jan Sedlák 2015-07-14 04:49:27 UTC
Tested on F22 and it works now.

Comment 6 Fedora Update System 2015-07-23 08:55:30 UTC
devscripts-2.15.5-6.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2015-07-23 08:56:53 UTC
devscripts-2.15.5-6.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


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