[Slackbuilds-users] Dos line endings in patch file

B. Watson urchlay at slackware.uk
Sat Dec 23 04:31:39 UTC 2023



On Fri, 22 Dec 2023, B. Watson wrote:

> This is an ongoing issue. The best way we've found to handle it, is
> to gzip the patch, then use "zcat $CWD/whatever.diff.gz | patch -p1"
> or similar. For examples, see games/oblige and system/unage.
>
> If you're wondering, the problem is caused by git. It tries to
> "correct" the line endings for whatever system it's running on.

Now that I think of it. This might be a good check to add to sbolint.
If it finds a *.diff or *.patch file with \r\n or mixed line endings,
it could warn you that you should gzip it.


More information about the SlackBuilds-users mailing list