From nobody Fri Oct 17 16:53:20 2025 X-Original-To: dev-commits-src-branches@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 4cp9r02qZbz6CLBh; Fri, 17 Oct 2025 16:53:20 +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 4cp9r02HmJz3Npk; Fri, 17 Oct 2025 16:53:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760720000; 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=EdH77Z/bcJ7/EH/xTf3EKX7EvypO/2pbvThR26e/x2M=; b=Z6IXeXQeHNZmUe5WvShnH5s0wwG7eo0eBkb2at01DYBG+rtYOOQMqFp6VTashL+2reptIl 42JIMeblU9gkabLBTdkXEWos5niCdEZM8/UYtj4SZXZdJxB0yeirg9WTygE8Hp6UHW3isx VJZK20dBOB+TIZVpdhGM62HRlxtJ1oVtp4TT7B5Rvj/RfESqkKa+yQeLzGDAA93AXAp/ke 8J7Z4yryET1EtVntropJgY1vl3gWEcmVbFNpflYTrKiCQlsJo4F9sSc+byWOyGogsA/sK5 gHFouPZK6YNjU6lV533+UbzmcxFFjxFl/xajuKw1MVc8CCfzJmC+gSPZNSRrVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760720000; 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=EdH77Z/bcJ7/EH/xTf3EKX7EvypO/2pbvThR26e/x2M=; b=XQ9C3XJX3GohGVajU/poD1ztY5UwR8WVcNHCCO+1mn2oYn4Hu3Xb04BU7aQe2z2kB8xSJF GDHjvZKDBUioePJ5HTD5FoTCwpdA14RVnKUT3lEz5f5bTxccZmvKGJWRb13uPp3Sk5bS2M rftLCCJkYpZ/bWMZiQwP3TRfrRZSLu0EUejbn6Reyj1GQYm0rZ+LMgMEF0sOWdwZ+e2XbY 1ORejeiFO2JK5nj8HMWsIVWk0+EiDDJqXqbYqteWgmkUN/VtEwl+OXlmsXpT1gu9OAjCZV sMboGQrpX7BUhBh3AnjbVHiHw9aBQ0kENSZPQN9x4tGVpdcjAPO2bdKmxeXkcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760720000; a=rsa-sha256; cv=none; b=i9lpuPQ751xhKeFvU7DM2C2OfaextNYe2JqnKLcdgA64AskhrLY77KEzPTi1N139SFR6sl qo4h6U84Z4GEpLdZ8le60DNYtCDikab3IPHn2rNAXO3nPzWu9LFjP4QDWR1g41xDWzoVKV itMk8gcMMFlUSazJ33u2Zlsm8JcrxwUX60Iubh6ZEGHB37BpSU62jfr3PaJOPNSEXzh8uE GRPzECWQiTvaii/E6/Eim772+xlDWbQaupb4A2WL7VYbZBQ1oaQDF+8o3Zpqa0cbjoaezp Y1VhPrkeYdaEHy6z0tnMPQz/W8q083lIH+FMVhgg6y+rQQqhW/RK7iCZgXgVxA== 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 4cp9r01kqxz13Sh; Fri, 17 Oct 2025 16:53:20 +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 59HGrKak070579; Fri, 17 Oct 2025 16:53:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HGrKeY070576; Fri, 17 Oct 2025 16:53:20 GMT (envelope-from git) Date: Fri, 17 Oct 2025 16:53:20 GMT Message-Id: <202510171653.59HGrKeY070576@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: 7ce5d908fd6b - stable/15 - vmimage.subr: Add missing directories to METALOG List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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: 7ce5d908fd6b51dc89d9b89f4c009e44cb932b55 Auto-Submitted: auto-generated The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=7ce5d908fd6b51dc89d9b89f4c009e44cb932b55 commit 7ce5d908fd6b51dc89d9b89f4c009e44cb932b55 Author: Colin Percival AuthorDate: 2025-10-17 07:01:33 +0000 Commit: Colin Percival CommitDate: 2025-10-17 16:53:11 +0000 vmimage.subr: Add missing directories to METALOG Theoretically METALOG should include everything which needs to go into disk images; unfortunately there are still a few bugs which are resulting in directories not being listed -- and if METALOG has files in unrecorded directories, the directories end up being created with 000 permissions. Oddly enough, systems where / has 000 permissions are not very usable. As a temporary hack, compare the staging tree against METALOG and add entries for any unrecorded directories. This will hopefully be reverted before 15.0-RELEASE. Reviewed by: bapt, emaste, ivy Sponsored by: https://www.patreon.com/cperciva MFC after: 5 minutes Differential Revision: https://reviews.freebsd.org/D53153 (cherry picked from commit 71b2f9853529b1d1a160eaaa202e93a14f91eed1) --- release/tools/vmimage.subr | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index c3c917dcd642..842a808c623e 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -290,6 +290,24 @@ buildfs() { cat ${DESTDIR}/METALOG.pkg >> ${DESTDIR}/METALOG fi + # Check for any directories in the staging tree which weren't + # recorded in METALOG, and record them now. This is a quick hack + # to avoid creating unusable VM images and should go away once + # the bugs which produce such unlogged directories are gone. + grep type=dir ${DESTDIR}/METALOG | + cut -f 1 -d ' ' | + sort -u > ${DESTDIR}/METALOG.dirs + ( cd ${DESTDIR} && find . -type d ) | + sort | + comm -23 - ${DESTDIR}/METALOG.dirs > ${DESTDIR}/METALOG.missingdirs + if [ -s ${DESTDIR}/METALOG.missingdirs ]; then + echo "WARNING: Directories exist but were not in METALOG" + cat ${DESTDIR}/METALOG.missingdirs + fi + while read DIR; do + metalog_add_data ${DIR} + done < ${DESTDIR}/METALOG.missingdirs + # Sort METALOG file; makefs produces directories with 000 permissions # if their contents are seen before the directories themselves. env -i LC_COLLATE=C sort -u ${DESTDIR}/METALOG > ${DESTDIR}/METALOG.sorted