Bug 1240914

Summary: Running licensecheck on tarball or image results in crash
Product: [Fedora] Fedora Reporter: Jan Sedlák <jsedlak>
Component: devscriptsAssignee: Sandro Mani <manisandro>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: manisandro
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: devscripts-2.15.5-6.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-23 08:55:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.