From nobody Sat Apr 4 21:10:41 2026 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fp7Xx3jFgz6WcKW for ; Sat, 04 Apr 2026 21:10:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fp7Xx21zDz3jlJ for ; Sat, 04 Apr 2026 21:10:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775337041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dHco5xtrOAN/6OYHCLM1TYmFN2zymqgr7VG5+1lc4co=; b=W0BbdfO9Eb3LLdMWxjQ5P+if5jWNOQH+pVsZ2w6dECVZjbGIFu743+pso3WIPd+57GZYc9 562wnXdPCnt1D0JCDQsbaTDiH+Pv0wqrIIVt2EocZIAOYGiozhvass8zhINqxyPO4N6dPR Un96W7CZtQk71go2IBei43doTxftwkBA8A9iYGis8EXrsJzRlaGkaoSvnCyul2xUFQ5X3f mbdmyMp3ZLx+yARYfeNGfNB5U+DJkI19w5duowlGsAdan7TPEwoXZzTfdkdJZ2Qu/THW6n b7ZA850VloZiVcE5zIc/oFZ+Niwo4ruSIQTIA/9NvripaRX1+eZF4zrlLvyzWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775337041; a=rsa-sha256; cv=none; b=gxkQyJxRuEeUioqDoU2jdahhGXqHlHb+NrJBQWhxeS1sA3iZoEjXpBHoS398LdprghBdBp MJ5yc+6j96IGH+tNcnS3sHOUVrI8b38qXskqd13+9VmcuAlrd7EJx2+7gyZjxWB5uSTQWQ chB0wTyvniP816oFcSn8L0KCrIS4ujuFhJDJIH6/D5y1x6GZ1N1XBUhVawbi1W0pRQY70g cZAIrmjhOqTo3VLfvjvu+s1VO39PNvjCynmW7zbreAU9DPCDy3vpddN+Ql2mmdVgK6av0o g5eDaSnyYhYgU5KLSQpJ21pBOCOVgEMKgOJFmNH+fHjqvA5xl8x49isBoaRNIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775337041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dHco5xtrOAN/6OYHCLM1TYmFN2zymqgr7VG5+1lc4co=; b=ILuLJC34Xx++ycPsfj9x4jS0L7Is8t+HUdON4eEs0yJev7c8YKx1OlzOg6V3bJa4U/Xu58 xv+4ftFvYNXrw9d9B7YDxzsrwhb95vZqDc9lk7eCAmBRswHFf0ECdzQuoLe2aZ+DqihOVe eonbJ+uHinWOWx5Glr9y+TU23YuOMrWoVGlWEFZI++50o0r4QHgVoxTjNOC++VjmVjNIKN /0Wgns9aHqKqD1VRR2s5SizcHe7MVJNIMWBoajxvYNPvLLJYb6jECUbD1It6ikKIXAJ0Bx 4xvyqyHZhoCF8zZRGoReV7nmfSN+WfdrPijyIKNFI6KGcPIilcnIbUbiANNuLg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4fp7Xx1Ycfzc1L for ; Sat, 04 Apr 2026 21:10:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 634LAfvn059672 for ; Sat, 4 Apr 2026 21:10:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 634LAfuk059671 for bugs@FreeBSD.org; Sat, 4 Apr 2026 21:10:41 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 293516] freebsd-update without pkg(8) is largely unusable in FreeBSD 14.4-RELEASE Date: Sat, 04 Apr 2026 21:10:41 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.4-RELEASE X-Bugzilla-Keywords: needs-qa, regression X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: wiml@hhhh.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D293516 Wim Lewis changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wiml@hhhh.org --- Comment #18 from Wim Lewis --- I think this is a bug in freebsd-update *and* another bug in the /usr/sbin/pkg(7) command. When 'freebsd-update' is hanging, it's running 'p= kg -r / -N', which has prompted for user input but the prompt has been sent to /dev/null. If you press enter, freebsd-update will continue with the reques= ted operation. I haven't tested the bug on FreeBSD-15.x, but I don't see a fix in Git, so = it might occur there also. The freebsd-update bug is that it's passing '-r ${BASEDIR}' to pkg, but thi= s is wrong in a number of ways: * pkg(7) doesn't have an -r flag to the left of the command. There's some discussion of this flag in the commit [1], the review D47341, and review D51770, but no one noticed that -r isn't a replacement for -c (the -c option doesn't exist in 14.4's /usr/sbin/pkg either). * some invocations of pkg(7) take an -r flag to the right of the command, = but (a) the -r flag takes a reponame, not a base path, and does something total= ly different; and (b) the "-N" pseudo-command doesn't take a -r flag anyway. Presumably freebsd-update needs to implement its -b/-j functionality direct= ly using some combination of $LOCALBASE/chroot(8)/jexec(8) in check_pkgbase(). (pkg(7) uses getlocalbase(3) so it'll respond to setting $LOCALBASE.) Alternately, since the only thing that "pkg -N" does is check whether localbase/sbin/pkg is there, I'm not sure that freebsd-update needs to invo= ke pkg(7) at all... it could just stat the file. You can see the pkg misbehavior(?) by running pkg directly: $ pkg -N pkg: pkg is not installed $ pkg -r / -N The package management tool is not yet installed on your system. Do you want to fetch and install it now? [y/N]: I say "(?)" because the pkg(7) manpage doesn't say you can mix -N with any other options, but in my opinion pkg should fail if given a nonsensical set= of options, rather than doing something unexpected. The underlying cause here = is that the call to getopts_long() on line 1113 [2] stops when it sees the arg= of the '-r' flag, so it never sees the -N flag. [1] https://cgit.freebsd.org/src/commit/usr.sbin/freebsd-update/freebsd-update.= sh?h=3Dstable/14&id=3Dc9467d0b562c03a10ae358922eec6427bf250d03 [2] https://cgit.freebsd.org/src/tree/usr.sbin/pkg/pkg.c?h=3Dreleng/14.4&id=3Dc= 9467d0b562c03a10ae358922eec6427bf250d03#n1113 --=20 You are receiving this mail because: You are the assignee for the bug.=