From nobody Wed Oct 08 14:31:43 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 4chb6l5Bykz69c2Q; Wed, 08 Oct 2025 14:31:43 +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 4chb6l35ZNz4Fkn; Wed, 08 Oct 2025 14:31:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759933903; 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=bD+DA+XeVKou3hLWFTRVeNFh+2wqlhmy1OHKoqK2f+4=; b=kE52Rsoxq4cUc7JgrnMiLJl3hCO4wU+8JQycr1+/TT4tLGn/YMv0NQRMHz1en9iP9e2ILS +7yfzcaULgcmJx15bEPmT/3vPkvTn0rJ4SrE0ddLad4JgH8sFwUXAYlOBigA/1GipdW1hw UiR/jszw0MYoHgMnnXrKAAqzZ2jEsr9T5KKMls2iO8wkJClQxPvm0HmYklmcr4VvFQFeoJ t4i8TEhHBfOLt6O0aB24ttukCfsxtwK3Xzs2Rk0DYuJx1eXh/2DwoL/e7Ehh5Dq7XPpYnu Q2Hmy4jWRukhUHiIp5t1NjkTYkFHZrCPn2vsbXprPLi3AjA4Hmv79cE/IMVh9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759933903; 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=bD+DA+XeVKou3hLWFTRVeNFh+2wqlhmy1OHKoqK2f+4=; b=IVllv8M5kZyOzF/tSfdSVLTUrjkVcSfyUQJZQ9MOnQmisucyD4X9D62H9bi8zXkHBDeMkW ufSR4C+jtauuwpDUKRpjAN0VKlv0vNwwviKE1+LKGYnFTyfRGUXchDLXnGZnB5WnbXJOr4 5abs1onCHk14EibwElpTJSNTaphohu3YTPR9y598gHNU+qU33JrpZuBHui1pfRYc32YQay vztdA6bn+EtjE1SC4Wq+hq5/rsnwY0JyqGhvy9fcTAtB0/iI+hUBBI8u4OGsxGdiK/0R6x +5ONeafDCBid+OtSR2Fv+rUEAHqWfdv5AwGbw8Oo7xReJsHOsS5lYBKJdzCnvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759933903; a=rsa-sha256; cv=none; b=uORuGJ3aBydWAj0HNAsyv0YXr/rMlXAYvPPtL3ymXpAyuMBTjbpt2aZ2sl156yxcZylrHO Zo7dIzffi/yjGct+syxqQN2qKVDbZvybSRHmuQL+luNwkwkSOTu72TEt2cUKHjGk/c8i5l hRPgtRV3AzfzxjgXfN6TJfykyPVYi9hKIPMKRJx3qpIBDzAU8ByN+RgglbuOuyxXATKyCf Z9MU0+LpRoJWEEZ3BNlS9KpcpZtDjgQAhx9TzrBwXrjYDSS5fJXv7vQyu0SJdopsiwJVxv QhGAN/HiEm6M8Pls4RwCS/mCLiThaA8a8pJW0JGnMRLUwCS/TeqR6KW2xo2pwQ== 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 4chb6l2NlvzbXn; Wed, 08 Oct 2025 14:31:43 +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 598EVhUa079111; Wed, 8 Oct 2025 14:31:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 598EVhWF079108; Wed, 8 Oct 2025 14:31:43 GMT (envelope-from git) Date: Wed, 8 Oct 2025 14:31:43 GMT Message-Id: <202510081431.598EVhWF079108@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Rabson Subject: git: e21e6e96b662 - main - release: Avoid generating .pkgsave files in OCI images 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: dfr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e21e6e96b662dcbb2f0e37ab356c9dded62a586e Auto-Submitted: auto-generated The branch main has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=e21e6e96b662dcbb2f0e37ab356c9dded62a586e commit e21e6e96b662dcbb2f0e37ab356c9dded62a586e Author: Doug Rabson AuthorDate: 2025-05-28 13:32:36 +0000 Commit: Doug Rabson CommitDate: 2025-10-08 14:30:31 +0000 release: Avoid generating .pkgsave files in OCI images This also installs the pkg key from the current source tree instead of using the one currently installed on the host. Reviewed by: dch MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D52615 --- release/scripts/make-oci-image.sh | 10 +++++++++- release/tools/oci-image-runtime.conf | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/release/scripts/make-oci-image.sh b/release/scripts/make-oci-image.sh index 6e5ad69741f7..f8ea679bfd18 100644 --- a/release/scripts/make-oci-image.sh +++ b/release/scripts/make-oci-image.sh @@ -39,10 +39,18 @@ install_packages() { local abi=$1; shift local workdir=$1; shift local rootdir=${workdir}/rootfs + + # Make sure we have the keys needed for verifying package integrity if + # not already added by a parent image. if [ ! -d ${rootdir}/usr/share/keys/pkg/trusted ]; then mkdir -p ${rootdir}/usr/share/keys/pkg/trusted fi - cp /usr/share/keys/pkg/trusted/* ${rootdir}/usr/share/keys/pkg/trusted + for i in ${curdir}/../share/keys/pkg/trusted/pkg.*; do + if [ ! -f ${rootdir}/usr/share/keys/pkg/trusted/$(basename $i) ]; then + cp $i ${rootdir}/usr/share/keys/pkg/trusted + fi + done + # We install the packages and then remove repository metadata (keeping the # metadata for what was installed). This trims more than 40Mb from the # resulting image. diff --git a/release/tools/oci-image-runtime.conf b/release/tools/oci-image-runtime.conf index 93aad1e39250..db99e5640040 100644 --- a/release/tools/oci-image-runtime.conf +++ b/release/tools/oci-image-runtime.conf @@ -9,6 +9,10 @@ OCI_BASE_IMAGE=dynamic oci_image_build() { set_cmd ${workdir} /bin/sh + # The static image installed termcap.small into /usr/share/misc/termcap + # and we are replacing it with the full termcap file. We remove the + # small one first to avoid creating a .pkgsave file. + rm ${workdir}/rootfs/usr/share/misc/termcap install_packages ${abi} ${workdir} \ FreeBSD-runtime \ FreeBSD-certctl \