From nobody Wed Sep 24 09:16:56 2025 X-Original-To: dev-commits-src-main@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 4cWrp10wJdz68mk4; Wed, 24 Sep 2025 09:16:57 +0000 (UTC) (envelope-from git@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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWrp02y0bz3wpf; Wed, 24 Sep 2025 09:16:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758705416; 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; bh=hfgPL9YHMpyDrLL0GianrBEmU+ZHsRn6XBTU40Mqbbs=; b=iR8ev6F2/RblnebHQsvsHhlxFV/PInOZRoh+GR9IBuZ0IBlOQdg+fQ/hqtM9lrvE25UzLk ePyULgQD19KtnSSNhY32zT18bhWArg+jmmToIt7DuFPF+ZOL2gTyGR5kNEIoVjjtkjmd3Z KKNBwXzVWc21NR5BolNeDw/xZe1nJA5cX4G+YXJu4MoeggLWz0QYKLHD+xc36VSubsZd87 7H6EDOJmMYzIT7v+3os4NvXODB7ofnw6ckEot+7FhJrns4GCMTsd8YVuiRf5SAJ9XyDQR2 CkXHwjULk7NnWC9EFrbdb5IPLNYwlmhH3nTLsESIc0ZZ/3DXSvJorhJ0VYsfLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758705416; 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; bh=hfgPL9YHMpyDrLL0GianrBEmU+ZHsRn6XBTU40Mqbbs=; b=yEJTGRr38bW9V7b5UkJqNogEAx/ZGLmvJIJU4CLHgzMXIELKUCqcvY0GaLsJRnbC01oPRa dXcBda5lJ72EYbXbiwy64uEXKZYdIQ0Hg9h9Q0Q+75pLibuqBHoSQVnSkJKDKqjwc66lF5 y83mB/sger1XYdKQV/MqOtEoQlYo5EmgCcbpkGM+R086FsWXdAtEo+WMDrF19G3aChcYNo IgZnLXmO7BtOeMKkV0i+Qz7nJKJvxhTgMp61821TEMbFgliDNP42MXmgqMJDrPU6hTvbwh /EutDM1jBZxdpZ0sUu6cN+Ff6BjcJE3bDvs4JgaK06I7BZdAJEHBnBtm/kLUbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758705416; a=rsa-sha256; cv=none; b=Rn3v6ls67S3UYgDmeKfePuY8T7cka4iIJZ30buAKoTPuXVqGzpKuWhdIcjVYZZy94GSv3a crl5CsON7ZPbBXVPXoLzY0lSw8QVRTNbP2Oj1tshzAAgZyJhqIgET0KKyTflmfJ4D5iny4 CtnlrKaxc25lyX0DFHUzsByZr1ZureVPHxTaEmlNKY+8MK/ZF1jDZYzEUn50QCd+NYNtOx kH1RD9pED1a7wUhm6nHQazqg2uqV1TNi91f8EOr/tp6v9Q8fRlJpQk3uM2xnESWMuNNGlz aHEJZr7Jq09Og2Etdrmwb1GY2QK1q40vbsn5G6rA2fNv1vzvXCTnKF+iBjfVKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4cWrp02J71z9ZV; Wed, 24 Sep 2025 09:16:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O9Gup7001773; Wed, 24 Sep 2025 09:16:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O9GuZt001770; Wed, 24 Sep 2025 09:16:56 GMT (envelope-from git) Date: Wed, 24 Sep 2025 09:16:56 GMT Message-Id: <202509240916.58O9GuZt001770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 4422265c67b8 - main - bsdinstall: Install pkg if it's available List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4422265c67b8a4e19da08fdf5504a7b5e278f815 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=4422265c67b8a4e19da08fdf5504a7b5e278f815 commit 4422265c67b8a4e19da08fdf5504a7b5e278f815 Author: Lexi Winter AuthorDate: 2025-09-24 00:10:02 +0000 Commit: Lexi Winter CommitDate: 2025-09-24 09:16:13 +0000 bsdinstall: Install pkg if it's available Now that the pkg package is shipped on the pkgbase release media, install it by default for a pkgbase install if it's present. If it's not available (e.g., when running bsdinstall from a repository built from src alone, without ports), skip it and assume the user will install it another way. MFC after: 1 day Reviewed by: ifreund_freebsdfoundation.org, cperciva Differential Revision: https://reviews.freebsd.org/D52639 --- usr.sbin/bsdinstall/scripts/pkgbase.in | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/pkgbase.in b/usr.sbin/bsdinstall/scripts/pkgbase.in index 3ba6a3474e0f..0b7554644028 100755 --- a/usr.sbin/bsdinstall/scripts/pkgbase.in +++ b/usr.sbin/bsdinstall/scripts/pkgbase.in @@ -103,7 +103,8 @@ local function select_components(components, options) for component, _ in pairs(components) do -- Decide which sets we want to offer to the user: -- - -- "minimal" is not offered since it's always included. + -- "minimal" is not offered since it's always included, as is + -- "pkg" if it's present. -- -- "-dbg" sets are never offered, because those are handled -- via the "debug" component. @@ -113,7 +114,8 @@ local function select_components(components, options) -- -- Sets whose name ends in "-jail" are intended for jails, and -- are only offered if no_kernel is set. - if not component:match("^minimal") and + if component ~= "pkg" and + not component:match("^minimal") and not component:match("%-dbg$") and not (component == "kernels") and not (not options.no_kernel and component:match("%-jail$")) then @@ -161,6 +163,13 @@ local function select_components(components, options) -- autoremove then trying to remove minimal. local selected = {"minimal"} + -- If pkg is available, always install it so the user can manage the + -- installed system. This is optional, because a repository built + -- from src alone won't have a pkg package. + if components["pkg"] then + table.insert(selected, "pkg") + end + if not options.no_kernel then table.insert(selected, "kernel") end @@ -203,6 +212,9 @@ local function select_packages(pkg, options) table.insert(components["kernel"], package) elseif kernel_packages[package:match("(.*)%-dbg$")] then table.insert(components["kernel-dbg"], package) + elseif package == "pkg" then + components["pkg"] = components["pkg"] or {} + table.insert(components["pkg"], package) end end