[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#912299: marked as done (blender: make the build reproducible)



Your message dated Mon, 14 Sep 2020 15:06:14 +0200
with message-id <[🔎] CA+7wUsxu3Okzv9gi5X-KRQV=+HM=7YShpVyWrV2KOJVYoV=9KA@mail.gmail.com>
and subject line Re: blender: make the build reproducible
has caused the Debian Bug report #912299,
regarding blender: make the build reproducible
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
912299: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=912299
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: blender
Version: 2.79.b+dfsg0-4
Severity: wishlist
Tags: patch
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi there,

While working on the reproducible builds project
(https://wiki.debian.org/ReproducibleBuilds), we noticed that blender
could not be built reproducibly.

The attached patch changes the build system to use the
SOURCE_DATE_EPOCH envvar (if set) in place of the current build
date/time to make blender build reproducibly.

Best,
-Nick Gregory

================ begin patch ================
diff --git a/build_files/cmake/buildinfo.cmake
b/build_files/cmake/buildinfo.cmake
index a43b99f..ab7d3e3 100644
--- a/build_files/cmake/buildinfo.cmake
+++ b/build_files/cmake/buildinfo.cmake
@@ -148,12 +148,21 @@ endif()
 # BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake
 # but BUILD_DATE and BUILD_TIME are platform dependent
 if(UNIX)
-       if(NOT BUILD_DATE)
-               execute_process(COMMAND date "+%Y-%m-%d"
OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
-       endif()
-       if(NOT BUILD_TIME)
-               execute_process(COMMAND date "+%H:%M:%S"
OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
-       endif()
+    if(DEFINED ENV{SOURCE_DATE_EPOCH})
+        execute_process(COMMAND "date" "-u" "-d"
"@$ENV{SOURCE_DATE_EPOCH}" "+%Y-%m-%d"
+                        OUTPUT_VARIABLE BUILD_DATE
+                        OUTPUT_STRIP_TRAILING_WHITESPACE)
+        execute_process(COMMAND "date" "-u" "-d"
"@$ENV{SOURCE_DATE_EPOCH}" "+%H:%M:%S"
+                        OUTPUT_VARIABLE BUILD_TIME
+                        OUTPUT_STRIP_TRAILING_WHITESPACE)
+    else()
+        if(NOT BUILD_DATE)
+            execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE
BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
+        endif()
+        if(NOT BUILD_TIME)
+            execute_process(COMMAND date "+%H:%M:%S" OUTPUT_VARIABLE
BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
+        endif()
+    endif()
 elseif(WIN32)
        if(NOT BUILD_DATE)
                execute_process(COMMAND cmd /c date /t OUTPUT_VARIABLE
BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)

--- End Message ---
--- Begin Message ---
Control: fixed -1  2.81.a+dfsg-4

On Mon, Sep 14, 2020 at 12:06 PM Chris Lamb <lamby@debian.org> wrote:
>
> Hi Mathieu,
>
> > The original text pasted patch does not apply anymore in the current
> > blender/sid version.
> >
> > Could you confirm the bug is fixed ? If not please provide an
> > updated patch.
>
> I glanced at this patch/bug (from 2018), but it seems like blender
> became reproducible in Debian/amd64/sid around version 2.81.a+dfsg-4.

ACK. Thanks !

--- End Message ---

Reply to: