NetBSD Problem Report #59798
From www@netbsd.org Thu Nov 27 16:30:17 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 0566E1A923A
for <gnats-bugs@gnats.NetBSD.org>; Thu, 27 Nov 2025 16:30:17 +0000 (UTC)
Message-Id: <20251127163015.B0BFE1A923C@mollari.NetBSD.org>
Date: Thu, 27 Nov 2025 16:30:15 +0000 (UTC)
From: nia@pkgsrc.org
Reply-To: nia@pkgsrc.org
To: gnats-bugs@NetBSD.org
Subject: We are still using GNU diffutils
X-Send-Pr-Version: www-1.0
>Number: 59798
>Category: bin
>Synopsis: We are still using GNU diffutils
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 27 16:35:00 +0000 2025
>Last-Modified: Fri Jan 02 17:30:02 +0000 2026
>Originator: nia
>Release: netbsd-11, netbsd-10, netbsd-9...
>Organization:
The NetBSDiff Foundation
>Environment:
>Description:
NetBSD is still using an old GPLv2 version of diff. In the meantime,
the other BSDs have developed BSD-licensed replacements and switched
to them. We should investigate porting their code.
>How-To-Repeat:
Type "$ man diff", get directed to info page.
>Fix:
Import diff from FreeBSD/OpenBSD.
>Audit-Trail:
From: nia <nia@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: bin/59798: We are still using GNU diffutils
Date: Fri, 28 Nov 2025 00:21:05 +0000
FreeBSD seems the way to go - the functionality of their diff is much
closer to our GPLv2 diffutils. There's some FreeBSD-specific stuff to
strip out or fix, and some code problems to fix so that it compiles
under our WARNS standards.
Making a little progress here. https://github.com/alarixnia/diff
From: "Nia Alarie" <nia@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59798 CVS commit: src/tests/usr.bin/diff
Date: Fri, 28 Nov 2025 23:01:28 +0000
Module Name: src
Committed By: nia
Date: Fri Nov 28 23:01:28 UTC 2025
Modified Files:
src/tests/usr.bin/diff: t_diff.sh
Added Files:
src/tests/usr.bin/diff: functionname.in functionname_c.in
functionname_c.out header.out header_ns.out input1.in input2.in
input_c1.in input_c2.in simple.out simple_b.out simple_e.out
simple_i.out simple_n.out simple_p.out simple_u.out simple_w.out
unified_9999.out unified_p.out
Log Message:
Import some of the diff tests from FreeBSD that cover features either
specified by POSIX or commonly used for NetBSD development.
PR bin/59798 We are still using GNU diffutils
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/diff/functionname.in \
src/tests/usr.bin/diff/functionname_c.in \
src/tests/usr.bin/diff/functionname_c.out \
src/tests/usr.bin/diff/header.out src/tests/usr.bin/diff/header_ns.out \
src/tests/usr.bin/diff/input1.in src/tests/usr.bin/diff/input2.in \
src/tests/usr.bin/diff/input_c1.in src/tests/usr.bin/diff/input_c2.in \
src/tests/usr.bin/diff/simple.out src/tests/usr.bin/diff/simple_b.out \
src/tests/usr.bin/diff/simple_e.out src/tests/usr.bin/diff/simple_i.out \
src/tests/usr.bin/diff/simple_n.out src/tests/usr.bin/diff/simple_p.out \
src/tests/usr.bin/diff/simple_u.out src/tests/usr.bin/diff/simple_w.out \
src/tests/usr.bin/diff/unified_9999.out \
src/tests/usr.bin/diff/unified_p.out
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/diff/t_diff.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Nia Alarie" <nia@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59798 CVS commit: src/tests/usr.bin/diff
Date: Fri, 28 Nov 2025 23:50:33 +0000
Module Name: src
Committed By: nia
Date: Fri Nov 28 23:50:33 UTC 2025
Modified Files:
src/tests/usr.bin/diff: Makefile
Log Message:
Add new test files to FILES.
PR bin/59798 We are still using GNU diffutils
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/diff/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Nia Alarie" <nia@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59798 CVS commit: src/tests/usr.bin
Date: Fri, 28 Nov 2025 23:58:48 +0000
Module Name: src
Committed By: nia
Date: Fri Nov 28 23:58:48 UTC 2025
Modified Files:
src/tests/usr.bin: Makefile
Added Files:
src/tests/usr.bin/diff3: 1.out 1.txt 1t.out 2.out 2.txt 3.txt 5.out
6.out 7.out 8.out 9.out Makefile long-A.out long-ed.out long-m.txt
long-merge.out long-o.txt long-y.txt t_diff3.sh
Log Message:
Import diff3 test cases from FreeBSD.
PR bin/59798 We are still using GNU diffutils
To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/tests/usr.bin/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/diff3/1.out \
src/tests/usr.bin/diff3/1.txt src/tests/usr.bin/diff3/1t.out \
src/tests/usr.bin/diff3/2.out src/tests/usr.bin/diff3/2.txt \
src/tests/usr.bin/diff3/3.txt src/tests/usr.bin/diff3/5.out \
src/tests/usr.bin/diff3/6.out src/tests/usr.bin/diff3/7.out \
src/tests/usr.bin/diff3/8.out src/tests/usr.bin/diff3/9.out \
src/tests/usr.bin/diff3/Makefile src/tests/usr.bin/diff3/long-A.out \
src/tests/usr.bin/diff3/long-ed.out src/tests/usr.bin/diff3/long-m.txt \
src/tests/usr.bin/diff3/long-merge.out src/tests/usr.bin/diff3/long-o.txt \
src/tests/usr.bin/diff3/long-y.txt src/tests/usr.bin/diff3/t_diff3.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Nia Alarie" <nia@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59798 CVS commit: src/tests/usr.bin/diff3
Date: Sat, 29 Nov 2025 00:07:26 +0000
Module Name: src
Committed By: nia
Date: Sat Nov 29 00:07:26 UTC 2025
Modified Files:
src/tests/usr.bin/diff3: Makefile
Log Message:
Add new test files to FILES.
PR bin/59798 We are still using GNU diffutils
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/diff3/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Nia Alarie" <nia@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59798 CVS commit: src
Date: Thu, 4 Dec 2025 18:22:17 +0000
Module Name: src
Committed By: nia
Date: Thu Dec 4 18:22:17 UTC 2025
Modified Files:
src: BUILDING
src/distrib/sets/lists/man: mi
src/doc: BUILDING.mdoc
src/external/gpl2: Makefile
src/share/man/man5: mk.conf.5
src/share/mk: bsd.own.mk
src/usr.bin: Makefile
Added Files:
src/usr.bin/diff: Makefile diff.1 diff.c diff.h diffdir.c diffdir.h
diffreg.c pr.c pr.h xmalloc.c xmalloc.h
src/usr.bin/diff3: Makefile diff3.1 diff3.c
Log Message:
Import BSD-licensed diff from FreeBSD to replace GNU diffutils
Ported to NetBSD, compiler warnings fixed, and some unnecessary
features (for the purpose of replacing our GPLv2 diff) have been
stripped out.
Non-default at the moment, requires building with MKBSDDIFF=yes.
PR bin/59798 We are still using GNU diffutils
To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/BUILDING
cvs rdiff -u -r1.1812 -r1.1813 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.150 -r1.151 src/doc/BUILDING.mdoc
cvs rdiff -u -r1.14 -r1.15 src/external/gpl2/Makefile
cvs rdiff -u -r1.114 -r1.115 src/share/man/man5/mk.conf.5
cvs rdiff -u -r1.1444 -r1.1445 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.242 -r1.243 src/usr.bin/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.bin/diff/Makefile src/usr.bin/diff/diff.1 \
src/usr.bin/diff/diff.c src/usr.bin/diff/diff.h \
src/usr.bin/diff/diffdir.c src/usr.bin/diff/diffdir.h \
src/usr.bin/diff/diffreg.c src/usr.bin/diff/pr.c src/usr.bin/diff/pr.h \
src/usr.bin/diff/xmalloc.c src/usr.bin/diff/xmalloc.h
cvs rdiff -u -r0 -r1.1 src/usr.bin/diff3/Makefile src/usr.bin/diff3/diff3.1 \
src/usr.bin/diff3/diff3.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Nia Alarie" <nia@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59798 CVS commit: src/share/mk
Date: Fri, 2 Jan 2026 17:26:50 +0000
Module Name: src
Committed By: nia
Date: Fri Jan 2 17:26:50 UTC 2026
Modified Files:
src/share/mk: bsd.own.mk
Log Message:
mk: Switch the default to MKBSDDIFF=yes.
PR bin/59798 We are still using GNU diffutils
To generate a diff of this commit:
cvs rdiff -u -r1.1460 -r1.1461 src/share/mk/bsd.own.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.