Source: puppet
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: hostname
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

The domainname of the system is embeded in the puppet.conf.5 man page:

  
https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/diffoscope-results/puppet.html

  \fIDefault\fR:·debian\.net
vs.
  \fIDefault\fR:

The attached patch is an update to the previous reproducible builds
patch, fixing a new occurance of the domain name. It checks if
SOURCE_DATE_EPOCH is set, and displays a fixed string instead of the
running system's domain name.


This patch appears to apply to puppet from experimental too, although I
was unable to get that to build to confirm the fix.


With this patch applied, puppet should build reproducibly on
tests.reproducible-builds.org!


Thanks for maintaining puppet!


live well,
  vagrant
From f2fbbd0b92ac3fdd5647c59802680da91814d91c Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Mon, 18 Apr 2022 02:47:05 +0000
Subject: [PATCH] lib/puppet/defaults.rb: Patch "srv_domain" to generate
 puppet.conf.5 manpage reproducibly.

Similar to how this was handled with "certname", when
SOURCE_DATE_EPOCH is set, print a descriptive string rather than the
system's domain name.
---
 lib/puppet/defaults.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index 404c02e939..96e6d6fdf6 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -1587,7 +1587,7 @@ EOT
       :desc       => "Whether the server will search for SRV records in DNS for the current domain.",
     },
     :srv_domain => {
-      :default    => lambda { Puppet::Settings.domain_fact },
+      :default    => lambda { ENV.has_key?('SOURCE_DATE_EPOCH') ? '(node\'s fully qualified domain name)' : Puppet::Settings.domain_fact },
       :desc       => "The domain which will be queried to find the SRV records of servers to use.",
     },
     :ignoreschedules => {
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature

Reply via email to