<p>Bernhard M. has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/9387">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">asn1tostruct: allow to override build date<br><br>in order to make builds reproducible.<br>See https://reproducible-builds.org/ for why this is good<br>and https://reproducible-builds.org/specs/source-date-epoch/<br>for the definition of this variable.<br><br>Also do not record build user name to not have it vary.<br><br>Change-Id: I5cfa465cc82f009f28dd7f12ced0e72a05fda842<br>---<br>M asn1/utils/asn1tostruct.py<br>1 file changed, 3 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/87/9387/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/asn1/utils/asn1tostruct.py b/asn1/utils/asn1tostruct.py</span><br><span>index 0bba9dd..3c33980 100755</span><br><span>--- a/asn1/utils/asn1tostruct.py</span><br><span>+++ b/asn1/utils/asn1tostruct.py</span><br><span>@@ -4,6 +4,7 @@</span><br><span> import datetime</span><br><span> import getopt</span><br><span> import getpass</span><br><span style="color: hsl(120, 100%, 40%);">+import time</span><br><span> </span><br><span> version = "0.5osmo1"</span><br><span> </span><br><span>@@ -33,11 +34,11 @@</span><br><span>         print string</span><br><span> </span><br><span> def outputHeaderToFile(f, filename):</span><br><span style="color: hsl(0, 100%, 40%);">-    now = datetime.datetime.now()</span><br><span style="color: hsl(120, 100%, 40%);">+    now = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))</span><br><span>     f.write("/*******************************************************************************\n")</span><br><span>     f.write(" * This file had been created by asn1tostruct.py script v%s\n" % (version))</span><br><span>     f.write(" * Please do not modify this file but regenerate it via script.\n")</span><br><span style="color: hsl(0, 100%, 40%);">-    f.write(" * Created on: %s by %s\n * from %s\n" % (str(now), getpass.getuser(), filenames))</span><br><span style="color: hsl(120, 100%, 40%);">+    f.write(" * Created on: %s\n * from %s\n" % (str(now), filenames))</span><br><span>     f.write(" ******************************************************************************/\n")</span><br><span> </span><br><span> def lowerFirstCamelWord(word):</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/9387">change 9387</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/9387"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-iuh </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I5cfa465cc82f009f28dd7f12ced0e72a05fda842 </div>
<div style="display:none"> Gerrit-Change-Number: 9387 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Bernhard M. <bwiedemann@suse.de> </div>