Bug 219740

Summary: dos2unix should only handle 'text' files.
Product: Ports & Packages Reporter: Tobias C. Berner <tcberner>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: Closed Not A Bug    
Severity: Affects Only Me CC: ports-bugs
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Tobias C. Berner freebsd_committer freebsd_triage 2017-06-02 22:49:56 UTC
Hi

Mk/Uses/dos2unix also seems to 'fix' png-images and such, leading to the error in pr 219090 with deskutils/kchmviewer:

The port has USES=dos2unix, without restricting the files:

> make extract ; file ${WRKSRC}/src/resources/closetab.png
src/resources/closetab.png: PNG image data, 16 x 16, 8-bit colormap, non-interlaced

> make patch ; file ${WRKSRC}/src/resources/closetab.png
src/resources/closetab.png: data

This seems rather unexpected -- shouldn't only 'text' files be touched by it?



mfg Tobias
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-06-02 23:05:07 UTC
A commit references this bug:

Author: tcberner
Date: Fri Jun  2 23:04:25 UTC 2017
New revision: 442464
URL: https://svnweb.freebsd.org/changeset/ports/442464

Log:
  Fix icons related crashes

  dos2unix was unexpectedly also 'fixing' the png icons for the Qt resources.
  This made the application not display any of its own icons, and crashing when
  trying to display a chm file.

  Define DOS2UNIX_GLOB so that only source files are patched.

  PR:		219740

Changes:
  head/deskutils/kchmviewer/Makefile
Comment 2 Tobias C. Berner freebsd_committer freebsd_triage 2017-06-02 23:49:02 UTC
https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/uses-dos2unix.html
Ok, never mind, it's documented that it goes for *all* including binaries.