Your message dated Thu, 30 Nov 2023 15:51:56 -0800
with message-id <87msuudckj.fsf@contorta>
and subject line Re: Bug#990858: dask: reproducible builds: embeds build user 
home directory in html documentation
has caused the Debian Bug report #990858,
regarding dask: reproducible builds: embeds build user home directory in html 
documentation
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.)


-- 
990858: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990858
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dask
Severity: normal
Tags: patch
User: [email protected]
Usertags: environment
X-Debbugs-Cc: [email protected]

The home directory is embedded in html documentation:

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

  /usr/share/doc/python-dask-doc/html/configuration.html

  ... 
<span·class="default_value">['/etc/dask',·'/usr/etc/dask',·'/nonexistent/first-build/.config/dask',·'/nonexistent/first-build/.dask']</span>
 ...
vs.
  ... 
<span·class="default_value">['/etc/dask',·'/usr/etc/dask',·'/nonexistent/second-build/.config/dask',·'/nonexistent/second-build/.dask']</span>
 ...


The attached patch fixes this by modifying dask/config.py to not expand
the tilde to the user home dir.

While the patch does make the documentation reproducible, it needs some
run-time testing to ensure that dask works correctly with the patch
applied (e.g. the configuration is checked for in the user's
~/.config/dask and ~/.dask directories)! Someone familiar with dask
should test this before applying the patch!

If it causes issues, taking a deeper look into fixing this in the
documentation will be needed.


With this patch applied, dask should become reproducible in the
tests.reproducible-builds.org infrastructure.


Thanks for maintaining dask!


live well,
  vagrant
From ae0387f269e043a094938e4c71d56b3b03099085 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <[email protected]>
Date: Fri, 9 Jul 2021 13:40:56 +0000
Subject: [PATCH] dask/config.py: do not expand tilde with home directory

The home directories to search for should not be embedded when
generating the documentation, as it embeds the home directory of the
build user.

Ideally, this would be expanded at run-time, but not when building the
documentation.
---
 debian/patches/series                  |  1 +
 debian/patches/use-tilde-homedir.patch | 26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 debian/patches/use-tilde-homedir.patch

diff --git a/debian/patches/series b/debian/patches/series
index 9b7a15e..c6e478a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ use-local-intersphinx.patch
 use-local-reference-yaml.patch
 js-yaml.patch
 use-youtube-nocookie.patch
+use-tilde-homedir.patch
diff --git a/debian/patches/use-tilde-homedir.patch b/debian/patches/use-tilde-homedir.patch
new file mode 100644
index 0000000..6403e7c
--- /dev/null
+++ b/debian/patches/use-tilde-homedir.patch
@@ -0,0 +1,26 @@
+From: Vagrant Cascadian <[email protected]>
+Date: Fri Jul  9 05:22:39 UTC 2021
+Subject: do not expand tilde with home directory
+
+The home directories to search for should not be embedded when
+generating the documentation, as it embeds the home directory of the
+build user.
+
+Ideally, this would be expanded at run-time, but not when building the
+documentation.
+
+diff --git a/dask/config.py b/dask/config.py
+index 27d8492..8dbcfa7 100644
+--- a/dask/config.py
++++ b/dask/config.py
+@@ -15,8 +15,8 @@ no_default = "__no_default__"
+ paths = [
+     os.getenv("DASK_ROOT_CONFIG", "/etc/dask"),
+     os.path.join(sys.prefix, "etc", "dask"),
+-    os.path.join(os.path.expanduser("~"), ".config", "dask"),
+-    os.path.join(os.path.expanduser("~"), ".dask"),
++    os.path.join("~", ".config", "dask"),
++    os.path.join("~", ".dask"),
+ ]
+ 
+ if "DASK_CONFIG" in os.environ:
-- 
2.32.0

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Version: 2023.8.0-1

On 2021-08-29, Diane Trout wrote:
>    *Note: for historical reasons we also look in the ``~/.dask``
>    directory for config files.  This is deprecated and will soon be
>    removed.*
>    
> I think upstream just removed the block that was causing the
> unreproducible change you spotted.

I think you are correct, the code looks much better now! I think it only
expands the "~" at runtime, rather than at build time, which is all
around better!

Marking as done.

Reproducible builds test history looks pretty good:

  https://tests.reproducible-builds.org/debian/history/dask.html

I think the fluke unstable failures were from back when we were still
testing build paths, as python-versioneer derives the version from the
toplevel build directory. e.g. /build/path/xyz/dask-2023.8.0+dfsg/
... as opposed to /build/path/xyz/unexpected-directory-name/

I saw there used to be patches to just extract the version from
debian/changelog to avoid this; re-adding something similar would fix
this in environments that do vary the build path in unusual ways
(e.g. reprotest).

But that is a separate issue, really, and we are not testing it in the
tests.reproducible-builds.org infrastructure anymore anyways.


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply via email to