From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 80A85D801D3 for ; Tue, 30 Apr 2024 15:17:46 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Z0t+CHcPRisT5WQmN2awbBigOhXZmjELJskH372HqgU=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:User-Agent:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20240206; t=1714490265; v=1; b=CRIBd/5d0uTfPexHXumIvL8wRwoXYlGvsqh1tr67nF9sr4beVK2eQLIIn7ZKcqbbtPrv/U9F Hw4Op2hsY7yL3EslhFhzO+/4BuUDsheUit8kYZ3v6OPirVxN3Enw29BPYlStbNsURG82ALGz55o otW8fcYmX4yJLoFU0JdsFm7hh+d9SdBuYMlbsM1gk4HTK6okg1ztpzls4I8WRUvEOuE6ijvClTO mlzA4r1ODx39Mvso+Yj5xPz62gbC1tL7oprZWvn9v08daVJNzA/SU8OhspxUvrFDTeklqIgVDAk /ON+CPtU0S9s8qp7dkfiT4+I9rpYCqox8CWCttWbuRo9w== X-Received: by 127.0.0.2 with SMTP id LGdEYY7687511xJlrZoncUu2; Tue, 30 Apr 2024 08:17:45 -0700 X-Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) by mx.groups.io with SMTP id smtpd.web11.18314.1714490263803201365 for ; Tue, 30 Apr 2024 08:17:44 -0700 X-Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2db17e8767cso68857121fa.3 for ; Tue, 30 Apr 2024 08:17:43 -0700 (PDT) X-Gm-Message-State: AJi4Pj2jkoA64W2v1i1tSNLwx7686176AA= X-Google-Smtp-Source: AGHT+IHJV6K4VQf29l53iNFSt0YRD0Rflr7F/8ajWc5Onk9pixbnUUYigv/EDXIBpOoiAULlmnc1Rg== X-Received: by 2002:a2e:9102:0:b0:2df:c6bc:fb0a with SMTP id m2-20020a2e9102000000b002dfc6bcfb0amr1967139ljg.45.1714490261894; Tue, 30 Apr 2024 08:17:41 -0700 (PDT) X-Received: from linux-l9pv.suse ([124.11.22.254]) by smtp.gmail.com with ESMTPSA id x13-20020a170902ec8d00b001e9684b0e07sm17336501plg.173.2024.04.30.08.17.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Apr 2024 08:17:40 -0700 (PDT) Date: Tue, 30 Apr 2024 23:17:35 +0800 From: "joeyli via groups.io" To: devel@edk2.groups.io Cc: "Lee, Chun-Yi" , Ard Biesheuvel , Pete Batard Subject: Re: [edk2-devel] [PATCH] EmbeddedPkg/VirtualRealTimeClockLib: Support SOURCE_DATE_EPOCH Message-ID: <20240430151735.GN26307@linux-l9pv.suse> References: <20240412072556.30677-1-jlee@suse.com> <17C5803AB4523E0C.19773@groups.io> MIME-Version: 1.0 In-Reply-To: <17C5803AB4523E0C.19773@groups.io> User-Agent: Mutt/1.11.4 (2019-03-13) Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Tue, 30 Apr 2024 08:17:44 -0700 Resent-From: jlee@suse.com Reply-To: devel@edk2.groups.io,jlee@suse.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b="CRIBd/5d"; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=pass (policy=none) header.from=groups.io Hi all, On Fri, Apr 12, 2024 at 06:03:35PM +0800, joeyli via groups.io wrote: > Hi experts, > > On Fri, Apr 12, 2024 at 03:25:56PM +0800, Lee, Chun-Yi wrote: > > From: Chun-Yi Lee > > > > RISC-V ovmf used VirtualRealTimeClockLib but the default epoch is a > > compilation time. It causes that the RISC-V ovmf binary image is NOT > > reproducible. > > > > This patch added the support of SOURCE_DATE_EPOCH by printenv command. > > If SOURCE_DATE_EPOCH be found then we use it as BUILD_EPOCH. Otherwise > > we run date command for setting BUILD_EPOCH. > > > > For distributions want a reproducible RISC-V ovmf image, they should > > export SOURCE_DATE_EPOCH environment variable before building ovmf. > > > > References: https://reproducible-builds.org/docs/source-date-epoch/ > > Cc: Pete Batard > > Cc: Ard Biesheuvel > > Signed-off-by: Chun-Yi Lee > > I have filed pull request: > > https://github.com/tianocore/edk2/pull/5550 > Does anyone have suggestion against this patch. Or I missed anything for the submit request? Thanks! Joey Lee > > > --- > > .../Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.inf | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.inf b/EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.inf > > index 5d0f867..285e880 100644 > > --- a/EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.inf > > +++ b/EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.inf > > @@ -34,4 +34,4 @@ > > > > # Current usage of this library expects GCC in a UNIX-like shell environment with the date command > > [BuildOptions] > > - GCC:*_*_*_CC_FLAGS = -DBUILD_EPOCH=`date +%s` > > + GCC:*_*_*_CC_FLAGS = -DBUILD_EPOCH=`printenv SOURCE_DATE_EPOCH || date +%s` > > -- > > 2.35.3 > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118444): https://edk2.groups.io/g/devel/message/118444 Mute This Topic: https://groups.io/mt/105479031/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-