NetBSD Problem Report #59863

From www@netbsd.org  Wed Dec 24 19:56:53 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 B00B01A9239
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 24 Dec 2025 19:56:53 +0000 (UTC)
Message-Id: <20251224195652.0AD341A923C@mollari.NetBSD.org>
Date: Wed, 24 Dec 2025 19:56:51 +0000 (UTC)
From: adrian@freebsd.org
Reply-To: adrian@freebsd.org
To: gnats-bugs@NetBSD.org
Subject: dhcpd / updating resolv.conf requires /usr mounted for basename, but it's too early
X-Send-Pr-Version: www-1.0

>Number:         59863
>Category:       bin
>Synopsis:       dhcpd / updating resolv.conf requires /usr mounted for basename, but it's too early
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    roy
>State:          analyzed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 24 20:00:01 +0000 2025
>Closed-Date:    
>Last-Modified:  Thu Dec 25 11:40:01 +0000 2025
>Originator:     adrian chadd
>Release:        11.99.14
>Organization:
>Environment:
NetBSD sgimips-o2-r5000.home.cacheboy.io 11.99.4 NetBSD 11.99.4 (GENERIC32_IP3x) #0: Sun Dec 14 05:25:02 UTC 2025  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/sgimips/compile/GENERIC32_IP3x sgimips

>Description:
post install the device is still configured to use dhcp for its IP, not static assignment.

This means that it runs the dhcp client and updates resolv.conf from it, however that requires 'basename' in /usr/bin, but on this particular install, i have / and /usr separate.

The boot messages in question, so the sequencing is more obvious:

===
[  18.6827641] root on sd0a dumps on sd0b
[  18.7321008] root file system type: ffs
[  18.7843625] kern.module.path=/stand/sgimips/11.99.4/modules
[  19.5714040] entropy: best effort
Wed Dec 24 19:48:09 -00 2025
Starting root file system check:
/dev/rsd0a: file system is clean; not checking
Setting sysctl variables:
ddb.onpanic: 1 -> 0
swapctl: setting dump device to /dev/sd0b
swapctl: adding /dev/sd0b as swap device at priority 0
Starting file system checks:
/dev/rsd0g: file system is clean; not checking
/dev/rsd0e: file system is clean; not checking
/dev/rsd0f: file system is clean; not checking
[  27.9892342] entropy: ready
Loaded entropy from /etc/entropy-file.
Waiting for entropy...done
Setting tty flags.
Starting network.
Hostname: sgimips-o2-r5000.home.cacheboy.io
IPv6 mode: host
Configuring network interfaces: mec0.
Adding interface aliases:.
Waiting for duplicate address detection to finish...
Starting dhcpcd.
/libexec/resolvconf/libc: warn: basename: not found
: signature mismatch: /etc/resolv.conf
/libexec/resolvconf/libc: warn: basename: not found
: run `resolvconf -u` to update
/libexec/resolvconf/libc: warn: basename: not found
: signature mismatch: /etc/resolv.conf
/libexec/resolvconf/libc: warn: basename: not found
: run `resolvconf -u` to update
/libexec/resolvconf/libc: warn: basename: not found
: signature mismatch: /etc/resolv.conf
/libexec/resolvconf/libc: warn: basename: not found
: run `resolvconf -u` to update
Building databases: dev, utmp, utmpx.
Starting syslogd.
Setting date via ntp.
Mounting all file systems...
Clearing temporary files.
Checking quotas: done.
===
>How-To-Repeat:
Filesystems;

sgimips-o2-r5000# cat /etc/fstab 
# NetBSD /etc/fstab
# See /usr/share/examples/fstab/ for more examples.
/dev/sd0a               /       ffs     rw               1 1
/dev/sd0g               /home   ffs     rw               1 2
/dev/sd0e               /usr    ffs     rw               1 2
/dev/sd0f               /var    ffs     rw               1 2
/dev/sd0b               none    swap    sw,dp            0 0
kernfs          /kern   kernfs  rw
ptyfs           /dev/pts        ptyfs   rw
procfs          /proc   procfs  rw
/dev/cd0a               /cdrom  cd9660  ro,noauto
tmpfs           /var/shm        tmpfs   rw,-m1777,-sram%25


>Fix:
Likely need to implement basename in sh script and use that in /libexec/resolvconf/libc ?

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: bin-bug-people->roy
Responsible-Changed-By: riastradh@NetBSD.org
Responsible-Changed-When: Wed, 24 Dec 2025 20:18:09 +0000
Responsible-Changed-Why:
over to resolvconf maintainer


State-Changed-From-To: open->analyzed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Wed, 24 Dec 2025 20:18:09 +0000
State-Changed-Why:
openresolv-3.17.1 update brought in `basename' for warn function,
can probably just change it to ${0##*/}


From: "Roy Marples" <roy@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/59863 CVS commit: src/external/bsd/openresolv/dist
Date: Wed, 24 Dec 2025 22:50:11 +0000

 Module Name:	src
 Committed By:	roy
 Date:		Wed Dec 24 22:50:11 UTC 2025

 Update of /cvsroot/src/external/bsd/openresolv/dist
 In directory ivanova.netbsd.org:/tmp/cvs-serv5630

 Log Message:
 Import openresolv-3.17.4 with the following changes:

 * libc: Don't use basename as it could be in /usr/bin which breaks early boot.
 * resolvconf: Fix key name limitations

 Fixes PR bin/59863


 Status:

 Vendor Tag:	ROY
 Release Tags:	openresolv-3_17_4

 U src/external/bsd/openresolv/dist/resolvconf.conf.5.in
 U src/external/bsd/openresolv/dist/mdnsd.in
 U src/external/bsd/openresolv/dist/named.in
 U src/external/bsd/openresolv/dist/avahi-daemon.in
 C src/external/bsd/openresolv/dist/libc.in
 U src/external/bsd/openresolv/dist/resolvconf.conf
 U src/external/bsd/openresolv/dist/README.md
 U src/external/bsd/openresolv/dist/pdnsd.in
 U src/external/bsd/openresolv/dist/pdns_recursor.in
 U src/external/bsd/openresolv/dist/resolvectl.in
 U src/external/bsd/openresolv/dist/unbound.in
 U src/external/bsd/openresolv/dist/resolvconf.8.in
 C src/external/bsd/openresolv/dist/resolvconf.in
 U src/external/bsd/openresolv/dist/dnsmasq.in
 U src/external/bsd/openresolv/dist/LICENSE
 U src/external/bsd/openresolv/dist/systemd-resolved.in

 2 conflicts created by this import.
 Use the following command to help the merge:

 	cvs checkout -jROY:yesterday -jROY src/external/bsd/openresolv/dist

From: Leonardo Taccari <leot@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/59863: dhcpd / updating resolv.conf requires /usr mounted for basename, but it's too early
Date: Thu, 25 Dec 2025 12:35:38 +0100

 Hello Adrian,

 adrian@freebsd.org writes:
 > >Number:         59863
 > >Category:       bin
 > >Synopsis:       dhcpd / updating resolv.conf requires /usr mounted for basename, but it's too early
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       medium
 > >Responsible:    bin-bug-people
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Wed Dec 24 20:00:01 +0000 2025
 > >Originator:     adrian chadd
 > >Release:        11.99.14
 > >Organization:
 > >Environment:
 > NetBSD sgimips-o2-r5000.home.cacheboy.io 11.99.4 NetBSD 11.99.4 (GENERIC32_IP3x) #0: Sun Dec 14 05:25:02 UTC 2025  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/sgimips/compile/GENERIC32_IP3x sgimips
 >
 > >Description:
 > post install the device is still configured to use dhcp for its IP, not static assignment.
 >
 > This means that it runs the dhcp client and updates resolv.conf from it, however that requires 'basename' in /usr/bin, but on this particular install, i have / and /usr separate.
 >
 > The boot messages in question, so the sequencing is more obvious:
 >
 > ===
 > [  18.6827641] root on sd0a dumps on sd0b
 > [  18.7321008] root file system type: ffs
 > [  18.7843625] kern.module.path=/stand/sgimips/11.99.4/modules
 > [  19.5714040] entropy: best effort
 > Wed Dec 24 19:48:09 -00 2025
 > Starting root file system check:
 > /dev/rsd0a: file system is clean; not checking
 > Setting sysctl variables:
 > ddb.onpanic: 1 -> 0
 > swapctl: setting dump device to /dev/sd0b
 > swapctl: adding /dev/sd0b as swap device at priority 0
 > Starting file system checks:
 > /dev/rsd0g: file system is clean; not checking
 > /dev/rsd0e: file system is clean; not checking
 > /dev/rsd0f: file system is clean; not checking
 > [  27.9892342] entropy: ready
 > Loaded entropy from /etc/entropy-file.
 > Waiting for entropy...done
 > Setting tty flags.
 > Starting network.
 > Hostname: sgimips-o2-r5000.home.cacheboy.io
 > IPv6 mode: host
 > Configuring network interfaces: mec0.
 > Adding interface aliases:.
 > Waiting for duplicate address detection to finish...
 > Starting dhcpcd.
 > /libexec/resolvconf/libc: warn: basename: not found
 > : signature mismatch: /etc/resolv.conf
 > /libexec/resolvconf/libc: warn: basename: not found
 > : run `resolvconf -u` to update
 > /libexec/resolvconf/libc: warn: basename: not found
 > : signature mismatch: /etc/resolv.conf
 > /libexec/resolvconf/libc: warn: basename: not found
 > : run `resolvconf -u` to update
 > /libexec/resolvconf/libc: warn: basename: not found
 > : signature mismatch: /etc/resolv.conf
 > /libexec/resolvconf/libc: warn: basename: not found
 > : run `resolvconf -u` to update
 > Building databases: dev, utmp, utmpx.
 > Starting syslogd.
 > Setting date via ntp.
 > Mounting all file systems...
 > Clearing temporary files.
 > Checking quotas: done.
 > ===
 > >How-To-Repeat:
 > Filesystems;
 >
 > sgimips-o2-r5000# cat /etc/fstab 
 > # NetBSD /etc/fstab
 > # See /usr/share/examples/fstab/ for more examples.
 > /dev/sd0a               /       ffs     rw               1 1
 > /dev/sd0g               /home   ffs     rw               1 2
 > /dev/sd0e               /usr    ffs     rw               1 2
 > /dev/sd0f               /var    ffs     rw               1 2
 > /dev/sd0b               none    swap    sw,dp            0 0
 > kernfs          /kern   kernfs  rw
 > ptyfs           /dev/pts        ptyfs   rw
 > procfs          /proc   procfs  rw
 > /dev/cd0a               /cdrom  cd9660  ro,noauto
 > tmpfs           /var/shm        tmpfs   rw,-m1777,-sram%25
 >
 >
 > >Fix:
 > Likely need to implement basename in sh script and use that in /libexec/resolvconf/libc ?
 >

 Probably the proposed fix is the way to go but as a possible
 workaround...

 Does adding:

  critical_filesystems_local="/usr"

 To /etc/rc.conf avoid that?

>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.