From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail03.groups.io (mail03.groups.io [45.79.227.220]) by spool.mail.gandi.net (Postfix) with ESMTPS id DBA6078044E for ; Fri, 12 Apr 2024 10:03:44 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=9cS0GtMpTXOe68ZilOtfEk2mYqLgrT5kMU/+rwvs5Ps=; 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=1712916223; v=1; b=ZXAeqXNUeCQUoYL1BTv6ori53aD4cnq5wrzL2NAYLHn6aI/7zMj4Mt/W9qf/wV4tVAXfvXa5 BlpsZpZZnhnKBMslkxd0bflymRdJrEBBxeZa0Y77eM7AJrvJo/1LI8/vpX4ol8eZM59GBXUrlKj 11rRmDHnPUZXu+iBIBVV4sY+TTrluHAud5NaMANdNHeMtNZGDZuVaecbNXaNfmxsgiZ8CB9lWY8 am2QD+MxSVK6tsbHJWMwvsENnNmDhvmGDEeNRwH7sHv6EtcQ92nL0V62TLtv/hApoWGFZQLBSf3 E5O4DdFkzp/bGDyQ4XbLjIrT+uetxIL8qCZQYZ7ekc1Ng== X-Received: by 127.0.0.2 with SMTP id s7AhYY7687511xm3YrnttY5j; Fri, 12 Apr 2024 03:03:43 -0700 X-Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by mx.groups.io with SMTP id smtpd.web11.42859.1712916222165099408 for ; Fri, 12 Apr 2024 03:03:42 -0700 X-Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2d9fe2b37acso7115581fa.2 for ; Fri, 12 Apr 2024 03:03:41 -0700 (PDT) X-Gm-Message-State: qAgxEIY90aDNVImmQf5Bl7Lfx7686176AA= X-Google-Smtp-Source: AGHT+IHjCsuBL9etjA7qOhuoNzjI4dPHOrg2nXA7seAbwboIj2SxBGmXHFrj9gUIOZFduNO4PJO9OA== X-Received: by 2002:a05:651c:1254:b0:2d4:77c0:d61c with SMTP id h20-20020a05651c125400b002d477c0d61cmr1175596ljh.35.1712916220221; Fri, 12 Apr 2024 03:03:40 -0700 (PDT) X-Received: from linux-l9pv.suse ([124.11.22.254]) by smtp.gmail.com with ESMTPSA id c18-20020a170902d49200b001db8145a1a2sm2600122plg.274.2024.04.12.03.03.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Apr 2024 03:03:39 -0700 (PDT) Date: Fri, 12 Apr 2024 18:03:35 +0800 From: "joeyli via groups.io" To: "Lee, Chun-Yi" Cc: devel@edk2.groups.io, Ard Biesheuvel , Pete Batard Subject: Re: [edk2-devel] [PATCH] EmbeddedPkg/VirtualRealTimeClockLib: Support SOURCE_DATE_EPOCH Message-ID: <20240412100335.GF3533@linux-l9pv.suse> References: <20240412072556.30677-1-jlee@suse.com> MIME-Version: 1.0 In-Reply-To: <20240412072556.30677-1-jlee@suse.com> 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: Fri, 12 Apr 2024 03:03:42 -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=ZXAeqXNU; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.227.220 as permitted sender) smtp.mailfrom=bounce@groups.io 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 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 (#117665): https://edk2.groups.io/g/devel/message/117665 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] -=-=-=-=-=-=-=-=-=-=-=-