#47 [WIP] Set SOURCE_DATE_EPOCH to make the build reproducible.
Closed a year ago by vondruch. Opened a year ago by vondruch.
rpms/ vondruch/ruby reproducible-builds  into  master

file modified
+1

@@ -21,6 +21,7 @@ 

  %gem_install(d:n:) \

  mkdir -p %{-d*}%{!?-d:.%{gem_dir}} \

  \

+ SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{SOURCE0}) \\\

  CONFIGURE_ARGS="--with-cflags='%{optflags}' --with-cxxflags='%{optflags}' $CONFIGURE_ARGS" \\\

  gem install \\\

          -V \\\

The timestamp of generated documentation changes from build to build.
This makes the builds not reproducible, because the timestamp changes.
RDoc has allows to override the timestamps via SOURCE_DATE_EPOCH
environment variable, which was intdouced by following PRs:

https://github.com/ruby/rdoc/pull/569/
https://github.com/ruby/rdoc/pull/570

This is related to rhbz#1719647. Nevertheless, that specific issue is
for plaid ruby- packages, so these macros cannot help with that specific
case.

In ruby-sig ML discussion [1], there was pointed out that RPM already supports this env variable, but it is not enable yet. So lets wait a bit and see if the defaults are going to be changed.

Pull-Request has been closed by vondruch

a year ago