Bug 219740 - dos2unix should only handle 'text' files.
Summary: dos2unix should only handle 'text' files.
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-02 22:49 UTC by Tobias C. Berner
Modified: 2017-06-02 23:49 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.