Guillem Jover: > Control: reassign -1 dpkg-dev,debhelper > > Hi! > > On Thu, 2019-10-10 at 14:58:11 +0100, Simon McVittie wrote: >> Package: dpkg,debhelper >> Severity: wishlist > >> [...] >> Proposed solution >> ----------------- >> >> Either dpkg-buildpackage should: >> >> - create a fake home directory, perhaps debian/.temp-home/home, and set >> $HOME to point to it >> - create a fake XDG_RUNTIME_DIR, perhaps debian/.temp-home/run, and set >> $XDG_RUNTIME_DIR to point to it >> - delete those directories during cleaning >> - either unset the other XDG_* so that their hard-coded defaults are used, >> or set them to known-good values, using the fake $HOME where applicable: >> - XDG_CACHE_HOME: $HOME/.cache or unset >> - XDG_CONFIG_HOME: $HOME/.config or unset >> - XDG_CONFIG_DIRS: /etc/xdg or unset >> - XDG_DATA_HOME: $HOME/.local/share or unset >> - XDG_DATA_DIRS: /usr/local/share:/usr/share or /usr/share or unset > > Right, there are a few problems with this though. The first is the > directory use, which might stomp over local packaging stuff. Then the > cleanup, which needs to be delegated to debian/rules, although I've > discussed with Niels to add a new dpkg-buildclean command or similar. > > I've got a pending proposal to solve problems such as this, but I've > found no motivation the last several months to bring this up on > debian-devel. I'll try to find some, and sent it, but meh. The draft > is at: > > <https://www.hadrons.org/~guillem/tmp/draft.build-path> >
Note: Compat for this draft could also be handled via https://wiki.debian.org/Teams/Dpkg/Spec/DpkgDevCompatLevel if relevant. (As I recall, the build-path draft was written prior to the DpkgDevCompatLevel draft) > The other main problem is yet again with dpkg-buildpackage not being > (still) the main and only canonical interface to build packages, so > debian/rules must keep working as before, per policy w/o externally > defined variables. :/ > >> or dh should do all of those in dh(1), and optionally in other dh_* >> commands for the benefit of packages that do not use dh. > > As it is now, while I think that would be just suboptimal, and would > not cover non-dh debhelper packaging, that might be better than > nothing. :/ > Ok. I am considering to do it as a part of a new compat level. That way, there will be no surprises to people, who already setup their packaging to fiddle with HOME to something expected. Do we need a switch/toggle for disabling this behaviour? A la: DEB_(MAINT_)BUILD_OPTIONS=homedir=(managed|as-provided) Or is a new temporary writable homedir universally always what we want? Thanks, ~Niels

