On Sat, Jul 17, 2021 at 10:42:03AM +0200, Stéphane Glondu wrote: > Package builds are not allowed to fiddle with $HOME like that, by > policy: what if the builder already has its own imagemagick policy? But > I think your idea can be used: create a temporary home directory (e.g. > in debian or /tmp), and set $HOME to that.
mlpost expresses "debhelper-compat (= 13)" in d/control. From the manpage: HOME, XDG_* In compat 13 and later, these environment variables are reset before invoking the upstream build system via the dh_auto_* helpers. The variables HOME (all dh_auto_* helpers) and XDG_RUNTIME_DIR (dh_auto_test only) will be set to a writable directory. All remaining variables and XDG_RUNTIME_DIR (except for during dh_auto_test) will be cleared. The HOME directory will be created as an empty directory but it will be reused between calls to dh_auto_*. Any content will persist until explicitly deleted or dh_clean. So there should be no problems. In my patches for other packages affected by this and not yet on 13 I used XDG_CONFIG_HOME and created/removed a tempdir under debian/tmp by hand. But relying on dh_clean is more consistent. Regards, Dennis.