Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ovmf for openSUSE:Factory checked in 
at 2024-04-12 17:33:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ovmf (Old)
 and      /work/SRC/openSUSE:Factory/.ovmf.new.26366 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ovmf"

Fri Apr 12 17:33:54 2024 rev:100 rq:1166952 version:202308

Changes:
--------
--- /work/SRC/openSUSE:Factory/ovmf/ovmf.changes        2024-03-28 
14:01:30.265168783 +0100
+++ /work/SRC/openSUSE:Factory/.ovmf.new.26366/ovmf.changes     2024-04-12 
17:34:53.359982708 +0200
@@ -1,0 +2,7 @@
+Thu Apr 11 16:15:03 UTC 2024 - Joey Lee <j...@suse.com>
+
+- Add ovmf-EmbeddedPkg-Library-Support-SOURCE_DATE_EPOCH-in-Vir.patch
+  Support SOURCE_DATE_EPOCH in VirtualRealTimeClockLib for reproducible.
+  (bsc#1217704) 
+
+-------------------------------------------------------------------

New:
----
  ovmf-EmbeddedPkg-Library-Support-SOURCE_DATE_EPOCH-in-Vir.patch

BETA DEBUG BEGIN:
  New:
- Add ovmf-EmbeddedPkg-Library-Support-SOURCE_DATE_EPOCH-in-Vir.patch
  Support SOURCE_DATE_EPOCH in VirtualRealTimeClockLib for reproducible.
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ovmf.spec ++++++
--- /var/tmp/diff_new_pack.N6vjkX/_old  2024-04-12 17:34:54.520025430 +0200
+++ /var/tmp/diff_new_pack.N6vjkX/_new  2024-04-12 17:34:54.520025430 +0200
@@ -71,6 +71,8 @@
 Patch11:        
%{name}-UefiCpuPkg-BaseXApicX2ApicLib-fix-CPUID_V2_EXTENDED_.patch
 # Bug 1219024 - SVVP test Check SMBIOS Table Specific Requirements fails
 Patch12:        
%{name}-OvmfPkg-SmbiosPlatformDxe-tweak-fallback-release-dat.patch
+# Bug 1217704 - ovmf: reproducible builds problem in ovmf-riscv64-code.bin
+Patch13:        
%{name}-EmbeddedPkg-Library-Support-SOURCE_DATE_EPOCH-in-Vir.patch
 BuildRequires:  bc
 BuildRequires:  cross-arm-binutils
 BuildRequires:  cross-arm-gcc%{gcc_version}






++++++ ovmf-EmbeddedPkg-Library-Support-SOURCE_DATE_EPOCH-in-Vir.patch ++++++
>From 441bc6b75c8edcfa825b324e05f7cd838feac2bb Mon Sep 17 00:00:00 2001
From: "Lee, Chun-Yi" <j...@suse.com>
Date: Thu, 11 Apr 2024 19:36:30 +0800
Subject: [PATCH] EmbeddedPkg/Library: Support SOURCE_DATE_EPOCH in
 VirtualRealTimeClockLib for reproducible

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/
Signed-off-by: Lee, Chun-Yi <j...@suse.com>
---
 .../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 5d0f867eb6..0bd6bcee75 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.44.0

Reply via email to