From bd9a915ea0ea1fb85158197a2be6e06ff72bd534 Mon Sep 17 00:00:00 2001 From: Vít Ondruch Date: Jun 19 2019 13:44:47 +0000 Subject: Set SOURCE_DATE_EPOCH to make the build reproducible. 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. --- diff --git a/macros.rubygems b/macros.rubygems index 532ea6c..19567f6 100644 --- a/macros.rubygems +++ b/macros.rubygems @@ -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 \\\