Some comments about /usr/bin/diff

Evilham contact at evilham.com
Sun Dec 22 20:09:12 UTC 2019


Hello Andrea,

On dg., des. 22 2019, Andrea Venturoli wrote:

> I recently upgraded a box from 11.3 to 12.1 and I see diff has 
> changed a
> lot: IIUIC on 11.3 I had GNU diff (possibly from
> /usr/src/contrib/diff?), while on 12.1 I have a different 
> version (I
> believe it's BSD diff, from /usr/src/usr.bin/diff).
> I don't believe this change comes from some local settings of 
> mine, but
> I didn't see it mentioned in the release notes (either for 12.0 
> or 12.1).
> I think I know the reasons behind this (licenses) and I 
> understand it:
> only, if I had known, I wouldn't have lost almost one day after 
> a script
> that used to work before.


This is directly from UPDATING:


20170420:
        GNU diff has been replaced by a BSD licensed diff. Some 
        features of GNU
        diff has not been implemented, if those are needed a newer 
        version of
        GNU diff is available via the diffutils package under the 
        gdiff name.


But to be fair I am unsure checking this file is recommended 
anywhere on the documentation for "normal" update flows; maybe it 
should be?

There is a note on the Release notes for 11.2:

    The BSD-licensed diff(1) utility has been imported from 
    OpenBSD, which is installed if WITHOUT_GNU_DIFF is set in 
    src.conf(5), and otherwise not installed by default. [r331465]

But I didn't see a note about the default changing on the release 
notes for 11.3, 12.0 or 12.1.

If that changed (and it looks like it did as I don't have GNU 
diff) maybe the man src.conf shouldn't be talking about 
WITHOUT_GNU_DIFF any longer as it does nothing?
Hopefully someone can confirm this.


Your other comments regarding diff should probably be documented 
in form of a feature request + bug respectively.
--
Evilham


More information about the freebsd-questions mailing list