From nobody Thu Sep 25 01:01:45 2025 X-Original-To: dev-commits-src-all@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 4cXFmC01yWz68kD2; Thu, 25 Sep 2025 01:01:47 +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 4cXFmB1Q6bz3bdr; Thu, 25 Sep 2025 01:01:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758762106; 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=wTe7L4dBxO8qc5DnzDj24pZ/VF4wMz0RFBU/qi67lNc=; b=TvWh24CLDLSxBtdloaaObRN2j4utK+vHeUPEAkasvdRK1TVPAc5IcW+mfC6GG8CKgszAWa DTDiFerKi1Vy0XXLRwHEDCWZFbtl5O9TY/Uicc5AbCTN778E6X3D31YQcxFqKT+GCmaJNy pGgi/AJG3WXRXTYr6SdtwEzPZh62nh/PHojDvHLTPB9AklTAYFydJq7IMOI5uPA+2QxIir YmA3uAb7GpZIJI4dZrCzTuXUv8DcS1B1ubqh4F/+9msdADKlQ7q/8hnzBI/D+8gd+HR/Rt nskLmIVYaCeHGQ9LhbBBEokYorcj9qt3aS5vP/62p+EMbuHbI45aCx3wH6K7Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758762106; 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=wTe7L4dBxO8qc5DnzDj24pZ/VF4wMz0RFBU/qi67lNc=; b=bStSs38AdjF50/qfC9FmT7We8Z6I7C63kLa7vKG7JuwXj+X1YEAV9mD8MObs7FJVkHas5S uVgZHRZM9yLrHhuV7Kk/BiOkvFf2vJxmcjckEOcWQXhUnrfNJZid7P7QF4Acwswq1E69dR nKLeTrSC5Qnn2TefsczGNzcqcFcIGNHdOhUB26ZWgmrnnthOWfW8iatJJ7y3GI2u15jNTy 5sUSH7RCcy9rRcnUcRq8N9nilR3X+s1CRfgb6OeOAALypArvfw9+Un8x+0z8DfZxA6rJsX UCS84th+OUWNGlGQBVPokNiJ6riJSqo9uXfOj2g3dCXYLdWOjIfj+P40yWFAzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758762106; a=rsa-sha256; cv=none; b=IfCoMwbQrHABm4nY99zJmN+ErzE1B6PcgVYKorvphy+jujG/0Sf2ziw+2lFmEyPX4+N9L3 Mbn8ArhRA523b6wOvwblxjK1DS75P4pCykrGm33jq0Hp3RJvTR8QpMfqpRzh2L4191L1Ht 5/weR4I9azHKLPc0u/2q6WmTqFJ5nND3a6EcTCesMD7JgCXveqLMC2Q3DKmXxLDUhBEz12 30iaMgcVzc9f6D5xscr4ph5GY41jIPW7CJmrS5+72INlS05tZY23oS73DdKMOlhS6m7aWd Ug+McP+ABSMnV3NEo30tfOfMuxFzFE0L2BZv7fvf9vQ5GCl7fEClcsRtVHIw5g== 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 4cXFmB0dhnzvQQ; Thu, 25 Sep 2025 01:01:46 +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 58P11jxt087099; Thu, 25 Sep 2025 01:01:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P11jG9087096; Thu, 25 Sep 2025 01:01:45 GMT (envelope-from git) Date: Thu, 25 Sep 2025 01:01:45 GMT Message-Id: <202509250101.58P11jG9087096@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Lexi Winter Subject: git: 4bc068b0e20c - stable/15 - bsdinstall: Install pkg if it's available List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 4bc068b0e20cf5d98438a431f0a8299c941f7c0f Auto-Submitted: auto-generated The branch stable/15 has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=4bc068b0e20cf5d98438a431f0a8299c941f7c0f commit 4bc068b0e20cf5d98438a431f0a8299c941f7c0f Author: Lexi Winter AuthorDate: 2025-09-24 00:10:02 +0000 Commit: Lexi Winter CommitDate: 2025-09-25 01:00:41 +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 (cherry picked from commit 4422265c67b8a4e19da08fdf5504a7b5e278f815) --- 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