Skip to content

Commit 7e3ff62

Browse files
lambyjcharaoui
authored andcommitted
(maint) Make builds reproducible
When the standard SOURCE_DATE_EPOCH environment variable is set, this patch causes the default certificate name and manpages to become deterministic, helping the reproducibility of Puppet builds. This patch has been in use in the Debian packaging of Puppet for some time, without issue.
1 parent ac45fe2 commit 7e3ff62

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tasks/manpages.rake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ task :gen_manpages do
1313

1414
ronn_args = '--manual="Puppet manual" --organization="Puppet, Inc." --roff'
1515

16+
unless ENV['SOURCE_DATE_EPOCH'].nil?
17+
source_date = Time.at(ENV['SOURCE_DATE_EPOCH'].to_i).strftime('%Y-%m-%d')
18+
ronn_args += " --date=#{source_date}"
19+
end
20+
1621
# Locate ronn
1722
begin
1823
require 'ronn'

0 commit comments

Comments
 (0)