From nobody Fri Oct 10 04:46:53 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 4cjZ316h2nz6BGlX; Fri, 10 Oct 2025 04:46:53 +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 4cjZ315F6Wz3D6k; Fri, 10 Oct 2025 04:46:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760071613; 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=Vn0lZ5i5FYXhKk6Y13MqXVC4KdFOUCPkIV5TQsYfwAo=; b=aOyhR5eUWvkvX3kakf0yWB4L/Sd13vSjsrtyqKCLQbJOhJsNJYgBa0bRRDS91WnKUo93X7 km0fBpjGOpQgfED+4+7de/tGKQct+QqG3/ElXbHEKmdMQHh6nldmgF6/D3XRjay/kw7fln j/viXDUNDXwJt5r6QD8QdSff2KyKDaDAE1l+FSQaHuZiwKVt3oQGLI5KfTy2ADScGGtUJJ LJgD4907hpWj0oLCqxE4KLKjYbztRbMkTkaHP6fBN8orQM0akpGmN1KJGqGJYgZC5iMPbY Z0mM0ooguFMMe19WzkKfr9g8lU+doKMdeIpzJTu8ZoWKOBPH8w5q6swmuALo7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760071613; 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=Vn0lZ5i5FYXhKk6Y13MqXVC4KdFOUCPkIV5TQsYfwAo=; b=DLNBtqhqDaKvNLrx60hDlNk7txtiZppT4/rnpPgXyR+X5bNua1jT1V1k1BtqaGRfmSdaHH /keCLLYriUOLwAdRAUgY6mNadWnnV/8JvAEkqm7LfdBoVVdonOX2nvhawxGZx/YCNOYdM3 gGjqDNkQP5hjjYXV9zHED6dXWOnAa9TPMdsScGiQvJneQe5URd0lUx+1kMhDMPkIAS+7sU 0nwJ3JCIzbsskG/S84A7VvqogEBN1Fu1z6j5lv2HQesPu7mt+1UctocU+G3bf7OmdZ/Ca4 ACiP5nNEDigfXr4vnG0HffyOAP5IVWIUya354xB6ZbHwYTKTX+d5BgcGWnkGNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760071613; a=rsa-sha256; cv=none; b=u0sda12KrrYS91bhEoxvwI0a8mvGjMqqvy7Nocw3f3rnNt4mlQ+GjshVnJZQDxbIdJjF/t EtCKtcNOSzYTHH49e5/f/YktR+bXy7w/hVrDWs8VTORReuVS8HYm/wk/OArSplwuG3A2TO RT1klMqOAgA8SByu+ahZmVxi/xBdv1V1jXhK6P3pOTnuxCh+fvejBjL1H/Iq2vcXYPbwdl SIiD7MArOUeIVLqnGmP+RIuQmkrm0mltUIU642QJH7Aer9eU4JpFVmayXzt/SQlxMa2S0b z6hhFY2D7AKjksoRnI68zLl+S4B0x1pKWAD3hW3y+gGPb8mvDJs22uxMCQh2/Q== 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 4cjZ314rXbznnq; Fri, 10 Oct 2025 04:46:53 +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 59A4krW2098195; Fri, 10 Oct 2025 04:46:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59A4krPI098192; Fri, 10 Oct 2025 04:46:53 GMT (envelope-from git) Date: Fri, 10 Oct 2025 04:46:53 GMT Message-Id: <202510100446.59A4krPI098192@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 2b4630e43f0a - stable/15 - release: Rework VM package selection using sets 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2b4630e43f0ae4e39fd2b499a94f945f07c1ac0c Auto-Submitted: auto-generated The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=2b4630e43f0ae4e39fd2b499a94f945f07c1ac0c commit 2b4630e43f0ae4e39fd2b499a94f945f07c1ac0c Author: Colin Percival AuthorDate: 2025-10-06 05:25:08 +0000 Commit: Colin Percival CommitDate: 2025-10-10 04:46:43 +0000 release: Rework VM package selection using sets Filtering the list of packages broke with the introduction of package sets, since we excluded FreeBSD-src.* but still included FreeBSD-set-src, which transitively included the FreeBSD-src and FreeBSD-src-sys packages. This could be fixed by excluding package sets, but that would be fragile, potentially breaking upgrades if new packages are introduced. Instead, start with an explicit set of package sets: base, base-dbg lib32, lib32-dbg kernels, kernels-dbg tests and filter the package sets; the EC2 "small" and "builder" AMIs filter out everything except "base" and "kernels". Note that using FreeBSD-set-kernels may pose a problem in the future if we start shipping packages for multiple differently-configured kernels. That will be addressed if and when that problem arises. Reviewed by: ivy MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D52922 (cherry picked from commit 2d184465e8bb77d4620f509b04f19ea22656f28e) --- release/tools/ec2-builder.conf | 2 +- release/tools/ec2-small.conf | 2 +- release/tools/vmimage.subr | 21 ++++++++++----------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/release/tools/ec2-builder.conf b/release/tools/ec2-builder.conf index 36837fd86f9c..a55485fec0cd 100644 --- a/release/tools/ec2-builder.conf +++ b/release/tools/ec2-builder.conf @@ -16,7 +16,7 @@ vm_extra_filter_base_packages() { grep -v \ -e '.*-dbg$' \ -e '.*-lib32$' \ - -e '^FreeBSD-tests.*' + -e '^FreeBSD-set-tests' } # Packages to install into the image we're creating. In addition to packages diff --git a/release/tools/ec2-small.conf b/release/tools/ec2-small.conf index 9b64c215d8a5..acaffbbc0c42 100644 --- a/release/tools/ec2-small.conf +++ b/release/tools/ec2-small.conf @@ -19,7 +19,7 @@ vm_extra_filter_base_packages() { grep -v \ -e '.*-dbg$' \ -e '.*-lib32$' \ - -e '^FreeBSD-tests.*' + -e '^FreeBSD-set-tests' } # Packages to install into the image we're creating. In addition to packages diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index cae8a113871e..131ebe37db6c 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -70,15 +70,15 @@ vm_copy_base() { return 0 } -vm_filter_base_packages() { - # Reads a list of all base system packages from stdin. - # Writes a list of base system packages to install to stdout. - grep -v -e '^FreeBSD-src.*' -e '^FreeBSD-kernel.*' - # There are several kernel variants available in separate packages. - # For VMs it is sufficient to install only the generic kernel. - echo "FreeBSD-kernel-man" - echo "FreeBSD-kernel-generic" - echo "FreeBSD-kernel-generic-dbg" +vm_base_packages_list() { + # Output a list of package sets equivalent to what we get from + # "installworld installkernel distribution", aka. the full base + # system. + for S in base lib32 kernels; do + echo FreeBSD-set-$S + echo FreeBSD-set-$S-dbg + done + echo FreeBSD-set-tests } vm_extra_filter_base_packages() { @@ -99,8 +99,7 @@ vm_install_base() { pkg_cmd="$pkg_cmd -o METALOG=METALOG" fi $pkg_cmd update - selected=$($pkg_cmd rquery -U -r FreeBSD-base %n | \ - vm_filter_base_packages | vm_extra_filter_base_packages) + selected=$(vm_base_packages_list | vm_extra_filter_base_packages) $pkg_cmd install -U -r FreeBSD-base $selected else cd ${WORLDDIR} && \