NetBSD Problem Report #59574

From www@netbsd.org  Tue Aug  5 15:13:28 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) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 84F0A1A923A
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  5 Aug 2025 15:13:28 +0000 (UTC)
Message-Id: <20250805151327.6D6081A923C@mollari.NetBSD.org>
Date: Tue,  5 Aug 2025 15:13:27 +0000 (UTC)
From: logix@foobar.franken.de
Reply-To: logix@foobar.franken.de
To: gnats-bugs@NetBSD.org
Subject: running etcupdate -s $SRC generates cruft unter $SRC
X-Send-Pr-Version: www-1.0

>Number:         59574
>Notify-List:    uwe@NetBSD.org
>Category:       bin
>Synopsis:       running etcupdate -s $SRC generates cruft unter $SRC
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 05 15:15:00 +0000 2025
>Last-Modified:  Tue Aug 05 17:35:01 +0000 2025
>Originator:     Harold Gutch
>Release:        current
>Organization:
The NetcupdateBSD Foundation
>Environment:
NetBSD dogfood 11.99.1 NetBSD 11.99.1 (GENERIC) #0: Tue Aug  5 04:03:05 CEST 2025  h@dogfood:/home/h/netbsd/git/obj-amd64/sys/arch/amd64/compile/GENERIC amd64
>Description:
Running etcupdate -s $SRCDIR wants to create a number of cat
directories under /usr/share/man/ (and presumably will later try to
populate them - I said "no" to all the questions here).  More
worryingly, it creates a number of files in $SRCDIR:

  etc/MAKEDEV
  etc/defaults/rc_conf
  etc/motd
  etc/mtree/NetBSD.dist
  etc/mtree/NetBSD.dist.compat
  etc/mtree/NetBSD.dist.machine
  etc/mtree/NetBSD.dist.tmp
  etc/pam.d/display_manager
  etc/pam.d/ftpd
  etc/pam.d/sshd
  etc/pam.d/su
  etc/pam.d/system
  usr.sbin/certctl/etc-certs.conf


>How-To-Repeat:
On a current system with a checked out source tree under $SRCDIR, run

  etcupdate -s $SRCDIR
>Fix:
Fix?  Yes, please.

In the meanwhile, as a workaround, run

  etcupdate -s $OBJDIR/destdir.$ARCH

after having run "build.sh distribution".

>Release-Note:

>Audit-Trail:

From: Valery Ushakov <uwe@stderr.spb.ru>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/59574: running etcupdate -s $SRC generates cruft unter $SRC
Date: Tue, 5 Aug 2025 20:17:13 +0300

 I don't think srcdir mode has been used much or tested recently.  I'm
 not sure it makes sense to fix that, as it was supposed to be used
 along with make installworld (if i remember the target name right),
 and I'm not sure we still meaningfully support in-situ updates.

 You can/should use "build.sh ... distribution sets" and then

     etcupdate ... -s .../etc.tgz -s .../xetc.tgz

 -uwe

From: Harold Gutch <logix@foobar.franken.de>
To: gnats-bugs@netbsd.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: bin/59574: running etcupdate -s $SRC generates cruft unter $SRC
Date: Tue, 5 Aug 2025 19:31:15 +0200

 On Tue, Aug 05, 2025 at 05:20:01PM +0000, Valery Ushakov via gnats wrote:
 >  I don't think srcdir mode has been used much or tested recently.  I'm
 >  not sure it makes sense to fix that, as it was supposed to be used
 >  along with make installworld (if i remember the target name right),
 >  and I'm not sure we still meaningfully support in-situ updates.
 >  
 >  You can/should use "build.sh ... distribution sets" and then
 >  
 >      etcupdate ... -s .../etc.tgz -s .../xetc.tgz

 Hm, I thought I had used it a number of times in srcdir mode in the
 past, but perhaps I am wrong.  It is documented on
 https://www.netbsd.org/docs/guide/en/chap-updating.html#updating-configfiles .

 If it's not working and should not be used, then we probably should
 remove it entirely (or at the very minimum change the documentation
 there).

 Looking at the small number of files that have issues, I am wondering
 if this broke only somewhat recently.  For example, the files under
 pam.d .d are exactly the ones generated from ".in" files, this got
 added in December It doesn't seem far fetched that this was working
 until (for example) a year ago.


   Harold

>Unformatted:

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.