NetBSD Problem Report #59610

From www@netbsd.org  Wed Aug 27 15:47:02 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 BC8A51A923A
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 27 Aug 2025 15:47:02 +0000 (UTC)
Message-Id: <20250827154701.62C621A923E@mollari.NetBSD.org>
Date: Wed, 27 Aug 2025 15:47:01 +0000 (UTC)
From: thorpej@me.com
Reply-To: thorpej@me.com
To: gnats-bugs@NetBSD.org
Subject: obsolete file check during release build blows up on case-insensitive host file systems
X-Send-Pr-Version: www-1.0

>Number:         59610
>Category:       toolchain
>Synopsis:       obsolete file check during release build blows up on case-insensitive host file systems
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 27 15:50:00 +0000 2025
>Last-Modified:  Mon Nov 24 10:30:02 +0000 2025
>Originator:     Jason Thorpe
>Release:        NetBSD 11.99.1
>Organization:
CISCy Business
>Environment:
Building NetBSD 11.99.1 as of "Wed Aug 27 08:42:01 PDT 2025" on macOS 15.4.1 host.
>Description:
At some point, some DES man pages were renamed, and the change varies only by case.  On a fresh "release" build from a host with a case-insensitive/case-preserving file system (e.g. macOS APFS), this causes the obsolete file check to remove the freshly-installed-with-new-name man pages, but subsequently blow up in the "checkflist" stage.

   === Removing obsolete files ===
Source directory: /Users/thorpej/NetBSD/current/src
Target directory: /opt/nbsd/current/destdir/virt68k/
obsolete fix:
	Removed obsolete file /opt/nbsd/current/destdir/virt68k//usr/share/man/man3/DES_random_key.3
	Removed obsolete file /opt/nbsd/current/destdir/virt68k//usr/share/man/html3/DES_random_key.html
postinstall fixes passed: obsolete
postinstall fixes failed:
   ===============================
.
.
.
   ===============================
checkflist ===> distrib/sets
    execute  checkflist

======  2 missing files in DESTDIR  ========
Files in flist but missing from DESTDIR.
File wasn't installed ?
------------------------------------------
./usr/share/man/html3/des_random_key.html
./usr/share/man/man3/des_random_key.3
========  end of 2 missing files  ==========

>How-To-Repeat:
Attempt to build a release (virt68k, in this case) on a macOS host.
>Fix:
The obsolete check probably should be smarter about deleting items.  A basic lookup of the file is insufficient -- the directory entry for the file should probably be examined and a case-sensitive verification of the file name performed.

>Audit-Trail:
From: Luke Mewburn <luke@mewburn.net>
To: gnats-bugs@netbsd.org
Cc: toolchain-manager@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: toolchain/59610: obsolete file check during release build blows
 up on case-insensitive host file systems
Date: Mon, 24 Nov 2025 17:20:03 +1100

 On 25-08-27 15:50, thorpej@me.com wrote:
   | >Number:         59610
   | >Category:       toolchain
   | >Synopsis:       obsolete file check during release build blows up on case-insensitive host file systems
   | >Confidential:   no
   | >Severity:       serious
   | >Priority:       medium
   | >Responsible:    toolchain-manager
   | >State:          open
   | >Class:          sw-bug
   | >Submitter-Id:   net
   | >Arrival-Date:   Wed Aug 27 15:50:00 +0000 2025
   | >Originator:     Jason Thorpe
   | >Release:        NetBSD 11.99.1
   | >Organization:
   | CISCy Business
   | >Environment:
   | Building NetBSD 11.99.1 as of "Wed Aug 27 08:42:01 PDT 2025" on macOS 15.4.1 host.
   | >Description:
   | At some point, some DES man pages were renamed, and the change varies only by case.  On a fresh "release" build from a host with a case-insensitive/case-preserving file system (e.g. macOS APFS), this causes the obsolete file check to remove the freshly-installed-with-new-name man pages, but subsequently blow up in the "checkflist" stage.
   | 
   |    === Removing obsolete files ===
   | Source directory: /Users/thorpej/NetBSD/current/src
   | Target directory: /opt/nbsd/current/destdir/virt68k/
   | obsolete fix:
   | 	Removed obsolete file /opt/nbsd/current/destdir/virt68k//usr/share/man/man3/DES_random_key.3
   | 	Removed obsolete file /opt/nbsd/current/destdir/virt68k//usr/share/man/html3/DES_random_key.html
   | postinstall fixes passed: obsolete
   | postinstall fixes failed:
   |    ===============================
   | .
   | .
   | .
   |    ===============================
   | checkflist ===> distrib/sets
   |     execute  checkflist
   | 
   | ======  2 missing files in DESTDIR  ========
   | Files in flist but missing from DESTDIR.
   | File wasn't installed ?
   | ------------------------------------------
   | ./usr/share/man/html3/des_random_key.html
   | ./usr/share/man/man3/des_random_key.3
   | ========  end of 2 missing files  ==========
   | 
   | >How-To-Repeat:
   | Attempt to build a release (virt68k, in this case) on a macOS host.
   | >Fix:
   | The obsolete check probably should be smarter about deleting items.  A basic lookup of the file is insufficient -- the directory entry for the file should probably be examined and a case-sensitive verification of the file name performed.
   | 


 This is a subset of the issue I reported in toolchain/57463.

 I've not thought of a good workaround for "DESTDIR on a case insenstive"
 filesystem yet :|

From: Valery Ushakov <uwe@stderr.spb.ru>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: toolchain/59610: obsolete file check during release build blows
 up on case-insensitive host file systems
Date: Mon, 24 Nov 2025 13:27:46 +0300

 Might not be immediately obvious from cvs log b/c postinstall was
 renamed to postinstall.in, so just a heads up that this commit (to the
 old "postinstall") might be relevant here:

   revision 1.210
   date: 2017-02-11 22:35:45 +0300;  author: uwe;  state: Exp;  lines: +14 -2;  commitid: kjrpHgvxhAbwnzFz;
   Don't use slow file_exists_exact if we don't have to.

   file_exists_exact function was introduced in 1.26 for the benefit of
   cross-building on OS X case-insensitive file system.  It is extremely
   slow on diskless machines.  That becomes especially noticeable when
   you upgrade a system that has a lot of obsolete files, it can take
   literally hours.

 though I tried to be careful not to change the way the checks are
 done, only when/if the checks are done.

 -uwe

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.