Your message dated Wed, 28 Oct 2020 01:21:39 -0400
with message-id 
<cab4xwxy0sjl9wp+_4f1_zfj1extcsscdfc56jjnoag3c1vb...@mail.gmail.com>
and subject line Re: Bug#965256: logilab-common: please make the build 
reproducible
has caused the Debian Bug report #965256,
regarding logilab-common: please make the build 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.)


-- 
965256: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=965256
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: logilab-common
Version: 1.7.2-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: randomness filesystem
X-Debbugs-Cc: [email protected]

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
logilab-common could not be built reproducibly.

This is because it embedded the build system's process ID and absolute
build directory in the generated documentation encoded via default
Python keyword arguments.

Patch attached that generates these at runtime instead.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
--- a/debian/patches/reproducible-build.patch   1970-01-01 01:00:00.000000000 
+0100
--- b/debian/patches/reproducible-build.patch   2020-07-18 10:54:52.109133762 
+0100
@@ -0,0 +1,36 @@
+Description: Make the build reproducible
+Author: Chris Lamb <[email protected]>
+Last-Update: 2020-07-18
+
+--- logilab-common-1.7.2.orig/logilab/common/proc.py
++++ logilab-common-1.7.2/logilab/common/proc.py
+@@ -171,12 +171,14 @@ class MemorySentinel(Thread):
+     daemonic thread
+     """
+ 
+-    def __init__(self, interval, memory_limit, gpid=os.getpid()):
++    def __init__(self, interval, memory_limit, gpid=None):
+         Thread.__init__(self, target=self._run, name="Test.Sentinel")
+         self.memory_limit = memory_limit
+         self._stop = Event()
+         self.interval = interval
+         self.setDaemon(True)
++        if gpid is None:
++            gpid = os.getpid()
+         self.gpid = gpid
+ 
+     def stop(self):
+--- logilab-common-1.7.2.orig/logilab/common/pytest.py
++++ logilab-common-1.7.2/logilab/common/pytest.py
+@@ -209,8 +209,10 @@ def load_pytest_conf(path, parser):
+     return namespace.get("CustomPyTester", PyTester)
+ 
+ 
+-def project_root(parser, projdir=os.getcwd()):
++def project_root(parser, projdir=None):
+     """try to find project's root and add it to sys.path"""
++    if projdir is None:
++        projdir = os.getcwd()
+     previousdir = curdir = osp.abspath(projdir)
+     testercls = PyTester
+     conf_file_path = osp.join(curdir, CONF_FILE)
--- a/debian/patches/reproducible-build.patch~  1970-01-01 01:00:00.000000000 
+0100
--- b/debian/patches/reproducible-build.patch~  2020-07-18 10:52:56.886826995 
+0100
@@ -0,0 +1,22 @@
+Description: Make the build reproducible
+Author: Chris Lamb <[email protected]>
+Last-Update: 2020-07-18
+
+--- logilab-common-1.7.2.orig/logilab/common/proc.py
++++ logilab-common-1.7.2/logilab/common/proc.py
+@@ -171,12 +171,14 @@ class MemorySentinel(Thread):
+     daemonic thread
+     """
+ 
+-    def __init__(self, interval, memory_limit, gpid=os.getpid()):
++    def __init__(self, interval, memory_limit, gpid=None):
+         Thread.__init__(self, target=self._run, name="Test.Sentinel")
+         self.memory_limit = memory_limit
+         self._stop = Event()
+         self.interval = interval
+         self.setDaemon(True)
++        if gpid is None:
++            gpid = os.getpid()
+         self.gpid = gpid
+ 
+     def stop(self):
--- a/debian/patches/series     1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/series     2020-07-18 10:52:54.078770568 +0100
@@ -0,0 +1 @@
+reproducible-build.patch
--- a/logilab/common/proc.py    2020-07-18 10:42:16.017506293 +0100
--- b/logilab/common/proc.py    2020-07-18 10:54:01.744127425 +0100
@@ -171,12 +171,14 @@
     daemonic thread
     """
 
-    def __init__(self, interval, memory_limit, gpid=os.getpid()):
+    def __init__(self, interval, memory_limit, gpid=None):
         Thread.__init__(self, target=self._run, name="Test.Sentinel")
         self.memory_limit = memory_limit
         self._stop = Event()
         self.interval = interval
         self.setDaemon(True)
+        if gpid is None:
+            gpid = os.getpid()
         self.gpid = gpid
 
     def stop(self):
--- a/logilab/common/pytest.py  2020-07-18 10:42:16.017506293 +0100
--- b/logilab/common/pytest.py  2020-07-18 10:54:48.529062323 +0100
@@ -209,8 +209,10 @@
     return namespace.get("CustomPyTester", PyTester)
 
 
-def project_root(parser, projdir=os.getcwd()):
+def project_root(parser, projdir=None):
     """try to find project's root and add it to sys.path"""
+    if projdir is None:
+        projdir = os.getcwd()
     previousdir = curdir = osp.abspath(projdir)
     testercls = PyTester
     conf_file_path = osp.join(curdir, CONF_FILE)

--- End Message ---
--- Begin Message ---
Version: 1.7.3-1

On Mon, Oct 19, 2020 at 1:03 PM Chris Lamb <[email protected]> wrote:
>
> Chris Lamb wrote:
>
> > [..]
>
> Friendly ping on this? Looks like it was merged upstream.

this was already released as part of version 1.7.3-1 but it was not
properly acknowledged in the upstream changelog until they released
1.8.0; closing as it's available in Debian's archive already


-- 
Sandro "morph" Tosi
My website: http://sandrotosi.me/
Me at Debian: http://wiki.debian.org/SandroTosi
Twitter: https://twitter.com/sandrotosi

-- 
Sandro "morph" Tosi
My website: http://sandrotosi.me/
Me at Debian: http://wiki.debian.org/SandroTosi
Twitter: https://twitter.com/sandrotosi

--- End Message ---

Reply via email to