From nobody Sat Oct 11 00:03:23 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 4ck3jR2rBDz6CDDN; Sat, 11 Oct 2025 00:03:23 +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 4ck3jR1cz7z3WDD; Sat, 11 Oct 2025 00:03:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760141003; 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=f/gikBBOMxPffWVzFZtYqdarFvfE9C4pYv2O8ilDBJ0=; b=bmMN8QY5HADA5PmAKrWJc4H5vxEMYZrALDllsc1nkVJHRsLI49OoWxCKnWlviW7/AEgXQI 1ZA8vcHwDU/lWwKZRR7TXSmWXH9Py3tb/1Tn9dz4d+MogLPYensn417Xc6p3HdS0Esncrj hj1jS3Lup5G6Hf8XrF5Z7DdZqxmNalKDO2bd3dQSBDWZ5HCoKh7lzat3OKZ8s/mrr5EShN jR0ay8uFYqhc8E9HL9LKSzX+2tPnGEbuBIISIfzkv2JLfgsDgSbwOMeDfOchvcOKEn8lR8 14dldGnN3uuKuvAmghoncZmkxnNy3lyGG1cqiKDetRyt3P70E8VMbdWx1VtPzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760141003; 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=f/gikBBOMxPffWVzFZtYqdarFvfE9C4pYv2O8ilDBJ0=; b=MrZKDPP8SY5KSEjOP7DqWC94RQkou2pmI+viBZiKYOjvRW+eDD8hcmbNKZSHBiHUZEGM7C H8pzRaBL6y+CyzxU5QfbOdiYjQF4d8kFgaXCae/Pmw4F42ltcGDGW3Zu7G9N5MZeH3Ebob 17Ubzwh5hQgSbnKACmTfurNnvzZocmD2MSlKiGPvxBxCKUhVPFqQmzbEZBDyaEsEtZ0P0X /DFGewPgI5kkp7gUfXbihfXME6aiZFibCCs9FUDC4Mh15ujJK32yEFeulvWjeooczYfID6 orOUC0d/rwjwktOC0q5yQDc9YJi8lhNSCm+LVTXZp/3p2FpZZKxQC5PWV+seDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760141003; a=rsa-sha256; cv=none; b=BVreNwDzX9/9z1bRQmQABZigTM6CRcKZ3nyIYchuPYFD9EI8Vo6fiUvKhAbncRPk+ep3n8 EtFrQZAjZX9TodozACWoOssDOEZ7c656d9cS2IxRtInd8sKgyAXze2AZ/JGHZCt5e/MQYg aEYX1icbHdpDNQ731fT3c8ekxvdIt61Z9jkINS3ne91vGBvvQPYQdROooDfpWquL2dwEwE 34Ld18sARc9WR7avlqCnkNUBDlldPu0IbDDrZHOwZ28PceWkP2RR6So/hh+asAN1MQapHj gG3p6Bx4pDX/uuxpDw9QQ1y0hXQhQwBnIg8rboBSu3aql1kio2mQwcfCVNQdSw== 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 4ck3jR1CZbz1NTh; Sat, 11 Oct 2025 00:03:23 +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 59B03NF1082382; Sat, 11 Oct 2025 00:03:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59B03N1X082379; Sat, 11 Oct 2025 00:03:23 GMT (envelope-from git) Date: Sat, 11 Oct 2025 00:03:23 GMT Message-Id: <202510110003.59B03N1X082379@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 6081365c27e6 - main - vmimage.subr: metalog_add generated databases 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6081365c27e68707ad25c98159e364ee90fcf5db Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=6081365c27e68707ad25c98159e364ee90fcf5db commit 6081365c27e68707ad25c98159e364ee90fcf5db Author: Colin Percival AuthorDate: 2025-10-10 22:01:38 +0000 Commit: Colin Percival CommitDate: 2025-10-11 00:02:34 +0000 vmimage.subr: metalog_add generated databases The files /etc/login.conf.db, /etc/passwd, /etc/pwd.db, /etc/spwd.db, and /var/db/services.db are generated at install time. When VM images are built using installworld, there is Makefile code which emits the necessary METALOG lines; but the pkgbase triggers do not do this. This resulted in VM images which lacked these essential database files. VM images are currently the only place where this matters, since this issue is specific to non-root image builds uusing pkgbase. (In some point in the future we will start building release ISO iamges from pkgbase, at which point it will be a problem there as well.) The long-term solution for this is probably to teach the relevant database-creating tools to emit METALOG lines; but for now, just log the necessary files from vmimage.subr. Reviewed by: dch MFC after: 5 minutes Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D53034 --- release/tools/vmimage.subr | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 067eb5ea48a8..15c4dd53e70b 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -213,6 +213,16 @@ vm_extra_install_packages() { install -y -r ${PKG_REPO_NAME} $pkg done metalog_add_data ./var/db/pkg/local.sqlite + + # Add some database files which are created by pkg triggers; + # at some point in the future the tools which create these + # files should probably learn how to record them in METALOG + # (which would simplify no-root installworld as well). + metalog_add_data ./etc/login.conf.db + metalog_add_data ./etc/passwd + metalog_add_data ./etc/pwd.db + metalog_add_data ./etc/spwd.db 600 + metalog_add_data ./var/db/services.db else if [ -n "${WITHOUT_QEMU}" ]; then return 0