Bug 220061

Summary: should not report wrong-file-end-of-line-encoding on PDF files
Product: [Fedora] Fedora Reporter: Remi Collet <fedora>
Component: rpmlintAssignee: Ville Skyttä <ville.skytta>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: chris.stone, extras-qa, fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.79-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-02-02 16:06:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Remi Collet 2006-12-18 18:37:45 UTC
Description of problem:


Version-Release number of selected component (if applicable):
rpmlint-0.78-2.fc6

How reproducible:
Always

Steps to Reproduce:
1. add a PDF ini %doc
2. run rpmlint
3.
  
Actual results:
For example
W: pdflib-lite wrong-file-end-of-line-encoding
/usr/share/doc/pdflib-lite-7.0.0p3/PDFlib-Lite-license.pdf


Expected results:
no warning

Additional info:
PDF example :
http://www.pdflib.com/fileadmin/pdflib/pdf/license/PDFlib-Lite-license.pdf

Comment 1 Ville Skyttä 2006-12-18 19:43:26 UTC
Special case hack added upstream, will be in the next release:
http://rpmlint.zarb.org/cgi-bin/trac.cgi/changeset/1302

Comment 2 Martin Ebourne 2006-12-29 14:30:50 UTC
Might be a good idea to make this more generic. eg. .rtf files exhibit exactly
the same problem.

Comment 3 Ville Skyttä 2006-12-29 14:59:58 UTC
There is already a generic check (roughly "read first 512 bytes of a file, check
if it contains any null chars or more than 30% non-text chars; if yes, it's
binary") - the problem is that it fails to identify PDF files as binary and thus
proceeds to do end-of-line checks on them. 
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/173220

Comment 4 Martin Ebourne 2006-12-29 21:57:30 UTC
Ok, but .rtf files still give the same error from rpmlint, so they obviously
need some kind of special handling as well then.

An example rtf which fails this check can be found in the package at
http://www2.zoneminder.com/downloads/ZoneMinder-1.22.3.tar.gz.

Comment 5 Ville Skyttä 2007-01-02 02:21:49 UTC
Special handling for RTFs added upstream:
http://rpmlint.zarb.org/cgi-bin/trac.cgi/changeset/1304

There's probably a whole bunch of others that should be added too, eg. HTML.

Comment 6 Ville Skyttä 2007-02-02 16:06:32 UTC
Done in upcoming 0.79-1.