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

file modified
@@ -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:


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

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

3 years ago