all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/...
@ 2022-12-16  6:08 Rob Browning
  2022-12-17 12:08 ` Eli Zaretskii
  2022-12-17 15:58 ` Stefan Monnier
  0 siblings, 2 replies; 12+ messages in thread
From: Rob Browning @ 2022-12-16  6:08 UTC (permalink / raw)
  To: emacs-devel


We're still trying to resolve some native compilation related crashes in
Debian in the hope that we'll be able to have 28 in the next stable
release --with-native-compilation.  (Stage one of the freeze begins on
Jan 12.)

One remaining issue is that emacs crashes when HOME=/nope in some of our
test suites and perhapssome other packaging or install-related
activities.  For example: https://bugs.debian.org/1021842

(To refresh, Debian policies require packages not to write outside of a
 few specified locations in certain situations, e.g. package builds, and
 HOME is not one of the specified locations.)

I can't recall from previous discussions whether that crash would be
considered a bug, or whether emacs just requires a writable cache dir
now (which is fine if so).

But I have discovered that if we allow the redirection of the
native-compile-target-directory to XDG_CACHE_HOME via something like
this in comp.el:

  (defvar native-compile-target-directory (getenv "XDG_CACHE_HOME")
    "When non-nil force the target directory for the eln files being compiled.")

then we can resolve the issue:

  export HOME=/nope
  export XDG_CACHE_HOME="$(mktemp -d ...)"
  run-tests...

Of course, I assume the default above isn't quite right, i.e. if we were
to pursue this, I imagine we'd actually want to default
native-compile-target-directory to something more like
"$XDG_CACHE_HOME/emacs/eln-cache" when XDG_CACHE_DIR is set.

I also noticed that emacs already respects XDG_CONFIG_HOME, so I
imagined relying on XDG_CACHE_HOME might not be entirely suspect.

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-12-25  9:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-16  6:08 Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/ Rob Browning
2022-12-17 12:08 ` Eli Zaretskii
2022-12-17 17:42   ` Rob Browning
2022-12-17 18:04     ` Eli Zaretskii
2022-12-17 20:37       ` Rob Browning
2022-12-17 20:59         ` Rob Browning
2022-12-18  8:48         ` Eli Zaretskii
2022-12-24 23:03           ` Sean Whitton
2022-12-25  6:44             ` Eli Zaretskii
2022-12-25  9:22               ` Eli Zaretskii
2022-12-17 15:58 ` Stefan Monnier
2022-12-17 17:38   ` Rob Browning

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.