From nobody Sat Apr 26 19:50:07 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 4ZlL0H5dVLz5tgkH; Sat, 26 Apr 2025 19:50:07 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZlL0H3wfnz3JD9; Sat, 26 Apr 2025 19:50:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745697007; 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=QDASsMYY5XO84olxz6h9gJn7M43nk1kMoOIY5BxwGQc=; b=in8YAVQWq2smZ6hgsyYYI5BEdKJ7r/lzwQyU/eG1hF2seR3Rpdgs0tKv8yAjo6IWVim5IM eckl04SDhWt/u5hx+4YvPdbmwZF30extZQCTeAp2a5+jGvSIqcMFfw96qQ0PgeGKGo/EwG QRo60btYmjovpYtED1/Uls0lhOFshd5y50k9xY5ZvlqzvEDuPwq1MrPDECugfVdat4vMCo zgRtUANDVzn0ffG2RSm5v42MSIs4DIwIqEjuKlrE+nPeTy9VXuR68dwI60ljWnoXdOlZdp tRAdhrl3SZhMmFbkEzvrb676excBnGtla9M+FuGhuzfEIx3c/0Xq/TxS1WgVgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745697007; a=rsa-sha256; cv=none; b=CoSbHGOGm7U+vUDPdRXBzSh7uJYO1pWFp2zCi5RZr1Ex/S8lzCvPP4x2Gp0xXN3cIcNHfX X5pY3q8Lb+wv7Izn6hWFRbs3cKDBRNK//eKeWRRfmIBbb1iup+rj/RrbSrGmRAhu1KXXlL uZtnu9ZN9y4W04H3c/jDIwA3pidseIWjhCOkptBPOyjvWbX6f00fuAZaeDSTRdv7IFMNWy e8cxnGaBIjPr4RwCxm9pWYCDpINTY2xCKwe09FCtPP747KGGzxwtNEAtDIf9JTbYOHiWJs MY0Ov601+zE86lTR7bse0KZYJJLBny6WrU7gi44EBdvcO5nUbS0sgGBuSvRA9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745697007; 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=QDASsMYY5XO84olxz6h9gJn7M43nk1kMoOIY5BxwGQc=; b=yY1oXEYBQnAlsmCOCq+sXKqWNI2JAFT20kElhi+Tne8giFINsxBllt85lGzJBdUcsOPblO lVPlvwtkqcanZ5PSCe84PSw8M7FgonkyAB23JAxA5t3sSXNOoYxa8CfbpwcStJBEQof8AT K5Deq4pSVo+s6hyxm9GV4nTratQdiwT04sbrMfFK/cEXQSzQ17XPyAt6fBQcrTmJdZO4Vi UvjnufkqQXp4RUpVgd+sbNvsBhAZRE/J/f0BUlMbNtnAsiDxArTIbzD+4Xz1N7KxpTqGNi ufpv1BoC8oZKit4ckkjHDbtIRNtRgb7lpNhfaW0pmgG5U3yWvTQF4IhZHzNgDQ== 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 4ZlL0H3DHyzbKB; Sat, 26 Apr 2025 19:50:07 +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 53QJo7ju056694; Sat, 26 Apr 2025 19:50:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53QJo71n056688; Sat, 26 Apr 2025 19:50:07 GMT (envelope-from git) Date: Sat, 26 Apr 2025 19:50:07 GMT Message-Id: <202504261950.53QJo71n056688@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: d434f9f58d88 - stable/13 - release: Pass PKG_INSTALL_EPOCH to vmimage.subr 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/13 X-Git-Reftype: branch X-Git-Commit: d434f9f58d88ff5157387610b23ae6d7d58ef630 Auto-Submitted: auto-generated The branch stable/13 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=d434f9f58d88ff5157387610b23ae6d7d58ef630 commit d434f9f58d88ff5157387610b23ae6d7d58ef630 Author: Colin Percival AuthorDate: 2025-04-10 06:05:55 +0000 Commit: Colin Percival CommitDate: 2025-04-26 19:49:09 +0000 release: Pass PKG_INSTALL_EPOCH to vmimage.subr This value, if not already set, comes from the timestamp of the most recent git commit (which is now also available in src/release code as GITEPOCH) or 0 if git is not installed. This should allow /var/db/pkg/local.sqlite to be reproducible in VM images which have packages installed (e.g. cloudware). Reviewed by: emaste, bapt MFC after: 5 days Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D49760 (cherry picked from commit 81ca663642ef1ed5111a88d2e9102f6788fab407) --- release/Makefile.inc1 | 9 ++++++--- release/Makefile.vm | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/release/Makefile.inc1 b/release/Makefile.inc1 index 552b6cb60f3c..569b72df5106 100644 --- a/release/Makefile.inc1 +++ b/release/Makefile.inc1 @@ -1,6 +1,3 @@ -# -# - # Figure out where the git binary is. .for _P in /usr/bin /usr/local/bin . if !defined(GIT_CMD) || empty(GIT_CMD) @@ -24,13 +21,19 @@ GITREV!= ${GIT_CMD} -C ${.CURDIR} rev-parse --verify --short HEAD 2>/dev/null || GITCOUNT!= ${GIT_CMD} -C ${.CURDIR} rev-list --first-parent --count HEAD 2>/dev/null || true . export GITCOUNT . endif +. if !defined(GITEPOCH) || empty(GITEPOCH) +GITEPOCH!= ${GIT_CMD} -C ${.CURDIR} show -s --format=%ct HEAD 2>/dev/null || true +. export GITEPOCH +. endif .else GITBRANCH= nullbranch GITREV= nullhash GITCOUNT= nullcount +GITEPOCH= 0 . export GITBRANCH . export GITREV . export GITCOUNT +. export GITEPOCH .endif # Set the build date, primarily for snapshot builds. diff --git a/release/Makefile.vm b/release/Makefile.vm index 4fc8f8f75acf..7fd02abf7dc0 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -132,6 +132,7 @@ vm-image: . for FORMAT in ${VMFORMATS} mkdir -p ${.OBJDIR}/${.TARGET}-${FORMAT} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ + PKG_INSTALL_EPOCH=${PKG_INSTALL_EPOCH:U${GITEPOCH}} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr \ -d ${.OBJDIR}/${.TARGET}-${FORMAT} \