[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debhelper-compat 13 now have a writable "$HOME"



Manphiz <manphiz@gmail.com> writes:

> Sean Whitton <spwhitton@spwhitton.name> writes:
>
>> Hello,
>>
>> On Wed 09 Aug 2023 at 02:23pm -07, Manphiz wrote:
>>
>>> While practicing some Emacsen packaging and getting assistance from
>>> #debian-mentors, I noticed that with "debhelper-compat (=13)" it now
>>> sets up a writable $HOME[1].  With this, Emacs with native compilation
>>> doesn't need any specially handling during build or test anymore, at
>>> least in dh_auto_*.  However, currently dh-elpa doesn't use the same set
>>> up as dh_auto_*[2] yet, so currently it will still cause failure in
>>> targets like dh_elpa_test.  Will the team consider to follow the same
>>> convention so that $HOME becomes writable?  I assume this will also make
>>> it possible to drop the EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILATION
>>> related patches.
>>
>> Debian Policy requires that package builds don't attempt to write into HOME.
>
> Indeed, found the item in section 4.9[1].  Though I do wonder what is
> the reason that compat 13 starts to provide a writeable $HOME?
>
> [1] https://www.debian.org/doc/debian-policy/ch-source.html#error-trapping-in-makefiles

And I forgot to provide more context on having dh-elpa provide a "$HOME"
(not necessarily writable), so here it is: while practicing elpa-ifying
auctex, I found that it tried to access "$HOME" even though native
compilation was turned off by default in dh-elpa.  Turns out it sets the
"default-directory" to "$HOME" to cope with an evince issue[1].  So
during byte-compiling it will try to set $CWD to $HOME, but it will not
actually write anything (so no Debian Policy violation).  With compat 13
it passes the dh_auto_build phase but fails in dh_elpa_test as the
latter doesn't set up $HOME in the same way.

Though not a common practice (yet), it seems having a usable $HOME is
expected for some field usage, and providing a similar set up in dh-elpa
may help in such cases.

[1] https://git.savannah.gnu.org/cgit/auctex.git/commit/?id=fa309c9559f0a6dc3428daca6896f615e7030521

-- 
Manphiz

Attachment: signature.asc
Description: PGP signature


Reply to: