From nobody Tue Sep 30 15:23:37 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 4cbhfK3Tgsz69Dx7; Tue, 30 Sep 2025 15:23:37 +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 4cbhfK1cztz3Lkq; Tue, 30 Sep 2025 15:23:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759245817; 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=4QBgE7J6pFP6aeUon7Rhr3G3e6PG5fDCPLo3h2UKVr0=; b=oD4lO7aL4E+iDRgch0YDDNqQ7CfXBWuQQBtaBgp9XaEldx6ocVle2UwcUPq7K4WarIp9Uh w5y2091a/SKSaKFF1d0eG+XupIw+jVLHHb15/6lDUWscZpLb92BW7cDS16CsyxbaSRSud6 x11Gnh7hEIwX5Hruk41TolbZv5AcJYD+ZVflB19lZu38HkXv73s5KQvJ/kGqLDF67bPMM6 rDljJfm2Dre0e5nqqIl+9ENew3zQF0v7UoeS29NQJX7qPBGufEjIJQjil6qexciExW4+hz 4a/sGgnRMvD2Jrlr1utPbO6b1CUSRWg42oc375nEwxGvPIzn5QUyythN0Bzlrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759245817; 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=4QBgE7J6pFP6aeUon7Rhr3G3e6PG5fDCPLo3h2UKVr0=; b=HTokrWzC98IJOTv4m229m82/zFSVTnTcgWCj7ONhKz1AoHkCGzDGyU0GEmPFv9azB8wClX 8Rg8RuqVCAx/LEXo1OKjDqkKbR52o2CL0b6GidTN0n7a7IiUaGbRVQKhJUk1FuG7TSAflC q7g+83VOkFjVfyXjwfxRU5NwDFSB4hjJjLvJw4J6t1Ds6VugEs4sQOZAU7+UIN2ra9IrgA kk/uGwbQkF6iSX3nLcXFJEPSo7kyLIzuXVloVtgMeHIKAzFYfocQyzVLczbrTRHIUNWtjA WHSvqmn/AykG3PM3ti4aU51Lthd/105S3eb6lLSBS21jtxUfYzYbPrMUsf25eQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759245817; a=rsa-sha256; cv=none; b=wzOoR4BXW0SoMY3ibQXM1OY8wB5p49c5i5iGNGC3v4HCsq3zYRTwslekrWl34ybqlY1WHz 14Ej0WiNZujPPSKbjY08O1PL9cj06obYDmtQXTVpujnX+ZTWUjtLSzs0qUG89XWbaZMED9 dMno9rm516MLqQKLDYyUMPv1wS0S7WXLEZOWo1xstzKGm8sXBoW5/xeCp4wmo5ycYXzCia kOWu+9DB/CK+OwBd0GBQcYrvvXy1YxqIygmHfj0mkxhsgdK1hQWRDiueCt89oU5jsWfgxU XzLj2p1DTod6htDZIU+ThSVSRnHPB91REF9fv8zh49/+tBkqF2Ovfn9ONuCbaQ== 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 4cbhfK0mTbzjQN; Tue, 30 Sep 2025 15:23:37 +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 58UFNb0Q045659; Tue, 30 Sep 2025 15:23:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UFNbDU045656; Tue, 30 Sep 2025 15:23:37 GMT (envelope-from git) Date: Tue, 30 Sep 2025 15:23:37 GMT Message-Id: <202509301523.58UFNbDU045656@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 96cd2eb699f7 - stable/15 - release: Prepare Vagrant cloudware images for building as non-root 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 96cd2eb699f70e729d81eb65baa5189b9134926d Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=96cd2eb699f70e729d81eb65baa5189b9134926d commit 96cd2eb699f70e729d81eb65baa5189b9134926d Author: Mark Johnston AuthorDate: 2025-09-16 16:54:25 +0000 Commit: Mark Johnston CommitDate: 2025-09-30 09:43:08 +0000 release: Prepare Vagrant cloudware images for building as non-root Add metalog entries for various files. This is a bit incomplete as pw(8) doesn't yet have support for emitting metalog entries, which we need since it's used here to create an interactive user. Reviewed by: emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D52456 (cherry picked from commit 135cb071e0683ea947c308a2de404d1185558ea6) --- release/tools/vagrant.conf | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/release/tools/vagrant.conf b/release/tools/vagrant.conf index 506174d0ea16..7ab0e1238693 100644 --- a/release/tools/vagrant.conf +++ b/release/tools/vagrant.conf @@ -47,19 +47,22 @@ vagrant_common () { -c 'Vagrant User' -d '/home/vagrant' -s '/bin/csh' # Change root's password to vagrant - echo 'vagrant' | /usr/sbin/pw -R ${DESTDIR} \ - usermod root -h 0 + echo 'vagrant' | /usr/sbin/pw -R ${DESTDIR} usermod root -h 0 # Configure sudo to allow the vagrant user echo 'vagrant ALL=(ALL:ALL) NOPASSWD: ALL' >> ${DESTDIR}/usr/local/etc/sudoers # Configure the vagrant ssh keys mkdir ${DESTDIR}/home/vagrant/.ssh - chmod 700 ${DESTDIR}/home/vagrant/.ssh + echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key" > ${DESTDIR}/home/vagrant/.ssh/authorized_keys echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN1YdxBpNlzxDqfJyw/QKow1F+wvG9hXGoqiysfJOn5Y vagrant insecure public key" >> ${DESTDIR}/home/vagrant/.ssh/authorized_keys - chown -R 1001 ${DESTDIR}/home/vagrant/.ssh chmod 600 ${DESTDIR}/home/vagrant/.ssh/authorized_keys + metalog_add_data ./home/vagrant/.ssh/authorized_keys 0600 + + chmod 700 ${DESTDIR}/home/vagrant/.ssh + chown -R 1001 ${DESTDIR}/home/vagrant/.ssh + echo "./home/vagrant/.ssh type=dir uid=1001 gid=1001 mode=0700" >> METALOG # Reboot quickly, Don't wait at the panic screen echo 'debug.trace_on_panic=1' >> ${DESTDIR}/etc/sysctl.conf @@ -68,6 +71,7 @@ vagrant_common () { # The console is not interactive, so we might as well boot quickly. echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf + metalog_add_data ./boot/loader.conf # The first time the VM boots, the installed "first boot" scripts # should be allowed to run: