Debian Bug report logs - #912299
blender: make the build reproducible

version graph

Package: src:blender; Maintainer for src:blender is Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>;

Reported by: Nicholas M Gregory <ngregory@nyu.edu>

Date: Mon, 29 Oct 2018 23:03:02 UTC

Severity: wishlist

Tags: patch

Found in version blender/2.79.b+dfsg0-4

Fixed in version blender/2.81.a+dfsg-4

Done: Mathieu Malaterre <malat@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, reproducible-builds@lists.alioth.debian.org, Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>:
Bug#912299; Package src:blender. (Mon, 29 Oct 2018 23:03:04 GMT) (full text, mbox, link).


Acknowledgement sent to Nicholas M Gregory <ngregory@nyu.edu>:
New Bug report received and forwarded. Copy sent to reproducible-builds@lists.alioth.debian.org, Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>. (Mon, 29 Oct 2018 23:03:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Nicholas M Gregory <ngregory@nyu.edu>
To: submit@bugs.debian.org
Subject: blender: make the build reproducible
Date: Mon, 29 Oct 2018 18:40:36 -0400
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)



Message sent on to Nicholas M Gregory <ngregory@nyu.edu>:
Bug#912299. (Mon, 14 Sep 2020 08:03:05 GMT) (full text, mbox, link).


Message #8 received at 912299-submitter@bugs.debian.org (full text, mbox, reply):

From: Mathieu Malaterre <malat@debian.org>
To: 912299-submitter@bugs.debian.org
Cc: reproducible-builds@lists.alioth.debian.org
Subject: blender: make the build reproducible
Date: Mon, 14 Sep 2020 09:59:46 +0200
Dear Submitter,

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.

Thanks,



Message sent on to Nicholas M Gregory <ngregory@nyu.edu>:
Bug#912299. (Mon, 14 Sep 2020 10:09:06 GMT) (full text, mbox, link).


Message #11 received at 912299-submitter@bugs.debian.org (full text, mbox, reply):

From: "Chris Lamb" <lamby@debian.org>
To: "Mathieu Malaterre" <malat@debian.org>, 912299-submitter@bugs.debian.org
Cc: "Reproducible builds folks" <reproducible-builds@lists.alioth.debian.org>
Subject: Re: blender: make the build reproducible
Date: Mon, 14 Sep 2020 10:57:49 +0100
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.


Regards,

--
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org 🍥 chris-lamb.co.uk
       `-



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>:
Bug#912299; Package src:blender. (Mon, 14 Sep 2020 13:09:03 GMT) (full text, mbox, link).


Acknowledgement sent to Mathieu Malaterre <malat@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>. (Mon, 14 Sep 2020 13:09:03 GMT) (full text, mbox, link).


Message #16 received at 912299@bugs.debian.org (full text, mbox, reply):

From: Mathieu Malaterre <malat@debian.org>
To: 912299@bugs.debian.org
Cc: 912299-done@bugs.debian.org, Chris Lamb <lamby@debian.org>
Subject: Re: blender: make the build reproducible
Date: Mon, 14 Sep 2020 15:06:14 +0200
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 !



Marked as fixed in versions blender/2.81.a+dfsg-4. Request was from Mathieu Malaterre <malat@debian.org> to 912299-submit@bugs.debian.org. (Mon, 14 Sep 2020 13:09:03 GMT) (full text, mbox, link).


Reply sent to Mathieu Malaterre <malat@debian.org>:
You have taken responsibility. (Mon, 14 Sep 2020 13:09:06 GMT) (full text, mbox, link).


Notification sent to Nicholas M Gregory <ngregory@nyu.edu>:
Bug acknowledged by developer. (Mon, 14 Sep 2020 13:09:06 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 03 Nov 2020 07:27:52 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed May 17 10:45:52 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.