Your message dated Tue, 06 Aug 2024 14:42:19 +0000
with message-id <[email protected]>
and subject line Bug#1076507: fixed in mccode 
0.0~git20240801183257.cdaa431+ds5-2
has caused the Debian Bug report #1076507,
regarding mccode: please make the build (mostly) reproducible
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1076507: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076507
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: mccode
Version: 0.0~git20240714172335.05614ae+ds5-2
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timestamps filesystem
X-Debbugs-Cc: [email protected]

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed that
mccode could not be built reproducibly.

This is because it embeds the current time (via the documentation)
and filesystem path in the mccode_config.json.

A patch attached that normalises the filesystem paths in .json files
and uses SOURCE_DATE_EPOCH to seed the date in the documentation.

This does not make the build entirely reproducible, however.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
--- a/debian/patches/0009-Reproducible-builds.patch     1970-01-01 
01:00:00.000000000 +0100
--- b/debian/patches/0009-Reproducible-builds.patch     2024-07-17 
12:42:10.359758705 +0100
@@ -0,0 +1,54 @@
+Description: Make the build reproducible
+Author: Chris Lamb <[email protected]>
+Last-Update: 2024-07-17
+
+--- mccode-0.0~git20240714172335.05614ae+ds5.orig/tools/Python/mcdoc/mcdoc.py
++++ mccode-0.0~git20240714172335.05614ae+ds5/tools/Python/mcdoc/mcdoc.py
+@@ -15,7 +15,8 @@ import sys
+ import os
+ import re
+ import subprocess
+-from datetime import datetime
++import datetime
++import time
+ from os.path import join, basename
+ 
+ sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
+@@ -34,6 +35,10 @@ class OverviewDocWriter:
+         self.instr_info_local_lst = instr_info_local_lst
+         self.mccode_libdir = mccode_libdir
+         self.text = ''
++        self.gendate = datetime.datetime.fromtimestamp(
++            int(os.environ.get('SOURCE_DATE_EPOCH', time.time())),
++            tz=datetime.timezone.utc,
++        )
+     
+     def create(self):
+         ''' action code for create overview page! '''
+@@ -148,7 +153,7 @@ class OverviewDocWriter:
+         text = text.replace('%TAB_LINES_INSTR_LOCAL%', local_instr_tab)
+         text = text.replace('%LINK_FILECOLON_DATA%', 'file://%s/data' % 
self.mccode_libdir)
+         text = text.replace('%LINK_FILECOLON_SHARE%', 'file://%s/share' % 
self.mccode_libdir)
+-        text = text.replace('%GENDATE%', '{0:%Y-%m-%d 
%H:%M:%S}'.format(datetime.now()))
++        text = text.replace('%GENDATE%', '{0:%Y-%m-%d 
%H:%M:%S}'.format(self.gendate))
+ 
+         #some McXtrace specific edits
+         if (mccode_config.get_mccode_prefix() == 'mx'):
+@@ -452,7 +457,7 @@ class InstrDocWriter:
+             lstr = lstr + self.lnk_str % l + '\n'
+         h = h.replace(t[12], lstr)
+         
+-        h = h.replace(t[13], '{0:%Y-%m-%d %H:%M:%S}'.format(datetime.now()))
++        h = h.replace(t[13], '{0:%Y-%m-%d %H:%M:%S}'.format(self.gendate))
+ 
+         self.text = h
+         return self.text
+@@ -625,7 +630,7 @@ class CompDocWriter:
+             lstr = lstr + self.lnk_str % l + '\n'
+         h = h.replace(t[12], lstr)
+ 
+-        h = h.replace(t[13], '{0:%Y-%m-%d %H:%M:%S}'.format(datetime.now()))
++        h = h.replace(t[13], '{0:%Y-%m-%d %H:%M:%S}'.format(self.gendate))
+ 
+         self.text = h
+         return self.text
--- a/debian/patches/series     2024-07-17 10:23:51.185028817 +0100
--- b/debian/patches/series     2024-07-17 11:57:58.764503421 +0100
@@ -5,3 +5,4 @@
 0005-Include-debian.cmake.patch
 0006-Stop-installing-postinst-and-errmsg-files.patch
 0007-Fix-installation-path-for-a-few-scripts.patch
+0009-Reproducible-builds.patch
--- a/debian/rules      2024-07-17 10:23:51.185028817 +0100
--- b/debian/rules      2024-07-17 11:13:38.741568507 +0100
@@ -159,6 +159,9 @@
        mv debian/mcstas/usr/share/mcstas/mcstas-module       
debian/mcxtrace/etc/modulefiles/
        chmod -x debian/mcxtrace/etc/modulefiles/* 
debian/mcxtrace/etc/modulefiles/*
 
+       # reproducible build
+       find debian -name mccode_config.json -print0 | xargs -0rt sed -i -e 
"s@$(CURDIR)@/builddir@g"
+
        # add editor highlight syntaxing
        mkdir -p debian/mcstas-comps/usr/share/gtksourceview-4/language-specs/
        mkdir -p debian/mcxtrace-comps/usr/share/gtksourceview-4/language-specs/

--- End Message ---
--- Begin Message ---
Source: mccode
Source-Version: 0.0~git20240801183257.cdaa431+ds5-2
Done: Roland Mas <[email protected]>

We believe that the bug you reported is fixed in the latest version of
mccode, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Roland Mas <[email protected]> (supplier of updated mccode package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 06 Aug 2024 16:08:22 +0200
Source: mccode
Architecture: source
Version: 0.0~git20240801183257.cdaa431+ds5-2
Distribution: unstable
Urgency: medium
Maintainer: Debian PaN Maintainers 
<[email protected]>
Changed-By: Roland Mas <[email protected]>
Closes: 1076507
Changes:
 mccode (0.0~git20240801183257.cdaa431+ds5-2) unstable; urgency=medium
 .
   * Bug fix: "please make the build (mostly) reproducible", thanks to
     Chris Lamb (Closes: #1076507) (part of the patch was not needed due to
     upstream changes).
Checksums-Sha1:
 93776b90e1e68baa46bb94aab390f3ce127af1fc 4986 
mccode_0.0~git20240801183257.cdaa431+ds5-2.dsc
 d515da3720c93481622425814e189d2146484557 22716 
mccode_0.0~git20240801183257.cdaa431+ds5-2.debian.tar.xz
 61e9a215b6829d0110020d880493ba7cb6470392 23319 
mccode_0.0~git20240801183257.cdaa431+ds5-2_amd64.buildinfo
Checksums-Sha256:
 0402210fe7899ea7d37a6a5874404dfb664b9b95b61a536acec5c78322632c16 4986 
mccode_0.0~git20240801183257.cdaa431+ds5-2.dsc
 9b3272e6c0fdecc289d82cd4fdf7a05cb80ecc68e0d4e2330314243e22d9e77a 22716 
mccode_0.0~git20240801183257.cdaa431+ds5-2.debian.tar.xz
 ecc48472e8c41b00df3811d7402e53e0aa874f68df50e65c5db6b44f3dc52406 23319 
mccode_0.0~git20240801183257.cdaa431+ds5-2_amd64.buildinfo
Files:
 4acefc8267d67719692c7a90bc7ce650 4986 science optional 
mccode_0.0~git20240801183257.cdaa431+ds5-2.dsc
 676c64ac5c84f7349bdec7a2fb7ee9e4 22716 science optional 
mccode_0.0~git20240801183257.cdaa431+ds5-2.debian.tar.xz
 8a795ff0edbb684c6dcc8444f75a1083 23319 science optional 
mccode_0.0~git20240801183257.cdaa431+ds5-2_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEtBU2D1kett1zr/uD0w3s0lmTIvwFAmayMd8ACgkQ0w3s0lmT
IvzFpQ//Z44lrV+8t1P2G3qU2SzGt/XUUXgceOAqpYIBIradxsuDT8xaq+/nQJJ3
jejU26GR6mohG2KVwfOFj0ptA02AaUTCQ61QEunR8sItlSaFhS7iKDmpB6V3IpiC
6pMZyIZAHvB7yIid2JRuxUaJv3HPojwguhB6Z/uaoMFcbbQOUQiLD1bBU1wdmx5y
GOOuRSv/LkSNYbObaTVHuKriII0VqccTMiYIQnNJ2Es3SH83ghzx4LtN9LJs6+cs
vcI9I8tgY7YvJykwVFgheeiPXoDkGstfoh8B5D9ysnA2RptDoMA5kB81GsT5JZUL
d3zzvaj6eBcub2QLp5rscxTmy75agjBLu6yGE9PhmwNJRBMu21Y40/PCp3+OrvDl
PvMOR6I9el5ayKTcGwumF2YGAIIqyJ5wnramSbZrVJw+K6eHtAGP2eN6jefF942W
cfGKF4lslKzFVKIexTgWd87YeOmKltrYuhL0wfu+qqFkKHOn76N6ZShvvmFuifB+
G1+M1rsy86JOnaVUx1rN6RkGl1bux41Z77dvZfRGKejsiXZkKvWJWKsOKLD7fRO+
VJqz5LNeDaMujZLbyeBY6ufSsl3S++LUBmNkVPYpbcf63y4Xo672scI0I7ilkVzX
MBwB28M9/+rM82adx6F06n72YcuOsdKgB7CRpUw7d9pYp6+kePE=
=x0Jb
-----END PGP SIGNATURE-----

Attachment: pgpFjlS_3pR00.pgp
Description: PGP signature


--- End Message ---

Reply via email to