On 2020-11-22, Vagrant Cascadian wrote: > A date string that defaults to the current date is embedded in > /usr/share/metainfo/com.obsproject.Studio.appdata.xml, causing builds on > different days to not build reproducibly. > > https://tests.reproducible-builds.org/debian/rb-pkg/bullseye/amd64/diffoscope-results/obs-studio.html > 21 ····<release·version="26.0.2+dfsg1-1"·date="2021-12-18"/> 21 ····<release·version="26.0.2+dfsg1-1"·date="2020-11-15"/> > > This can be fixed by setting a value from the configure target that uses > SOURCE_DATE_EPOCH: > > https://reproducible-builds.org/docs/source-date-epoch/ > > The attached patch does this. > > > Alternately, it may be worth exploring patching > UI/xdg-data/CMakeLists.txt to support SOURCE_DATE_EPOCH and get the > support merged upstream. In case you prefer that approach, the attached patch implements it... though needs more work to be cross-platform as it relies on specific features of GNU date. The source-date-epoch link above documents some of that. live well, vagrant
From b18355ee4991bb1a1c1160f35d7abe2f18175cfc Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 23 Nov 2020 02:59:54 +0000
Subject: [PATCH 3/3] UI/xdg-data/CMakeLists.txt: Set APPDATA_RELEASE_DATE from
SOURCE_DATE_EPOCH environment variable to ensure reproducible builds.
https://reproducible-builds.org/docs/source-date-epoch/
---
UI/xdg-data/CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/UI/xdg-data/CMakeLists.txt b/UI/xdg-data/CMakeLists.txt
index 9acd14e..1883902 100644
--- a/UI/xdg-data/CMakeLists.txt
+++ b/UI/xdg-data/CMakeLists.txt
@@ -4,6 +4,9 @@ if(NOT DEFINED APPDATA_RELEASE_DATE)
OUTPUT_VARIABLE APPDATA_RELEASE_DATE
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_STRIP_TRAILING_WHITESPACE)
+ elseif(DEFINED SOURCE_DATE_EPOCH)
+ execute_process(COMMAND date --utc --date="@${SOURCE_DATE_EPOCH}" +"%Y-%m-%d"
+ OUTPUT_VARIABLE APPDATA_RELEASE_DATE)
else()
file(TIMESTAMP "${CMAKE_SOURCE_DIR}/CMakeLists.txt" APPDATA_RELEASE_DATE "%Y-%m-%d")
endif()
--
2.29.2
Attachment:
signature.asc
Description: PGP signature