summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2021-08-02 20:06:52 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2021-08-02 20:06:52 (GMT)
commit9be889ec7c3b9fcd5e5c3938de37f119e5269913 (patch)
tree64749f9086629c3dbaddef90a34eb3f32ca908d3
parent01dea5f5bcd6178ba53aba668ab94f6bef5cb969 (diff)
downloadSCons-9be889ec7c3b9fcd5e5c3938de37f119e5269913.zip
SCons-9be889ec7c3b9fcd5e5c3938de37f119e5269913.tar.gz
SCons-9be889ec7c3b9fcd5e5c3938de37f119e5269913.tar.bz2
Fix reproducible builds. Restore logic respecting SOURCE_DATE_EPOCH when set. Fix version tests to work with updated scons --version output. (Date format changed)
-rwxr-xr-xCHANGES.txt6
-rwxr-xr-xRELEASE.txt2
-rw-r--r--site_scons/BuildCommandLine.py2
-rw-r--r--test/Interactive/version.py8
-rw-r--r--test/option/option-v.py2
5 files changed, 11 insertions, 9 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index f0ecf76..7e44955 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -9,9 +9,9 @@ NOTE: The 4.2.0 Release of SCons will deprecate Python 3.5 Support. Python 3.5 s
RELEASE VERSION/DATE TO BE FILLED IN LATER
- From John Doe:
-
- - Whatever John Doe did.
+ From William Deegan:
+ - Fix reproducible builds. Restore logic respecting SOURCE_DATE_EPOCH when set.
+ - Fix version tests to work with updated scons --version output. (Date format changed)
RELEASE 4.2.0 - Sat, 31 Jul 2021 18:12:46 -0700
diff --git a/RELEASE.txt b/RELEASE.txt
index 89d634c..c42e735 100755
--- a/RELEASE.txt
+++ b/RELEASE.txt
@@ -25,7 +25,7 @@ CHANGED/ENHANCED EXISTING FUNCTIONALITY
FIXES
-----
-- List fixes of outright bugs
+ - Fix reproducible builds. Restore logic respecting SOURCE_DATE_EPOCH when set.
IMPROVEMENTS
------------
diff --git a/site_scons/BuildCommandLine.py b/site_scons/BuildCommandLine.py
index 3a3622e..14bc279 100644
--- a/site_scons/BuildCommandLine.py
+++ b/site_scons/BuildCommandLine.py
@@ -77,7 +77,7 @@ class BuildCommandLine:
min = (time.daylight and time.altzone or time.timezone) // 60
hr = min // 60
min = -(min % 60 + hr * 100)
- self.date = (time.strftime('%a, %d %b %Y %X', time.localtime())
+ self.date = (time.strftime('%a, %d %b %Y %X', time.localtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))))
+ ' %+.4d' % min)
def process_command_line_vars(self):
diff --git a/test/Interactive/version.py b/test/Interactive/version.py
index 76718c7..15daad7 100644
--- a/test/Interactive/version.py
+++ b/test/Interactive/version.py
@@ -1,6 +1,8 @@
#!/usr/bin/env python
#
-# __COPYRIGHT__
+# MIT License
+#
+# Copyright The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -20,12 +22,12 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
"""
Verify the behavior of the "version" subcommand.
"""
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import TestCmd
import TestSCons
@@ -56,7 +58,7 @@ test.run(arguments='-Q --interactive',
stdin="version\nexit\n")
expect2 = r"""scons>>> SCons by Steven Knight et al\.:
-\tSCons: v\S+, [^,]*, by \S+ on \S+
+\tSCons: v\S+, [^,]*,[^,]*, by \S+ on \S+
\tSCons path: \[.*\]
%(copyright_line)sscons>>>
""" % locals()
diff --git a/test/option/option-v.py b/test/option/option-v.py
index 49dd84d..3164027 100644
--- a/test/option/option-v.py
+++ b/test/option/option-v.py
@@ -38,7 +38,7 @@ copyright_line = """\
expect2 = r"""SCons by Steven Knight et al.:
-\tSCons: v\S+, [^,]*, by \S+ on \S+
+\tSCons: v\S+, [^,]*,[^,]*, by \S+ on \S+
\tSCons path: \[.*\]
""" + copyright_line