[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Where should dynamic modules be installed?
From: |
Ulrich Mueller |
Subject: |
Re: Where should dynamic modules be installed? |
Date: |
Thu, 24 Oct 2019 17:39:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
>>>>> On Thu, 24 Oct 2019, Paul Eggert wrote:
> On 10/21/19 3:45 AM, Ulrich Mueller wrote:
>> We are going to include the first package with a dynamically loaded
>> module (emacs-libvterm) in Gentoo. The question arose where the .so
>> file should be installed? Since it is a system dependent binary,
>> installing it under /usr/share/emacs/ looks wrong. I cannot find
>> anything about a recommended install location in the documentation.
> There isn't one. We haven't thought through the issues here. Thanks
> for bringing up the topic.
>> Would /usr/lib{,64}/emacs/site-modules/ be a reasonable place for
>> this?
> Where do you put executables like hexl, movemail, and profile? I
> suggest puting .so files near there.
The FHS says that /usr/libexec/ is for "binaries that are not intended
to be executed directly by users or shell scripts".
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s07.html
IMHO shared objects don't belong there, but in /usr/lib/.
> In Fedora 30, this directory is
> /usr/libexec/emacs/26.2/x86_64-redhat-linux-gnu (which is the value of
> the exec-directory variable). Since modules can be version-specific,
> it makes sense to have the Emacs version number somewhere in the
> directory name. Do you do that with other Emacs directories?
Layout of the relevant directories in Gentoo is as follows (using 26.3
as example):
GNU Emacs proper:
/usr/libexec/emacs/26.3/x86_64-pc-linux-gnu/ - aux executables
/usr/share/emacs/26.3/lisp/ - *.el *.elc
/usr/share/emacs/26.3/etc/ - misc files
Add-on packages (Gentoo app-emacs category):
/usr/share/emacs/site-lisp/<package_name>/ - *.el *.elc
/usr/share/emacs/etc/<package_name>/ - misc files
> Also, why have "site-" in the name? Do you have "site-" in other
> Emacs-related directory names?
It would follow the precedent of "site-lisp". I don't have a strong
opinion about it though, either of "site-modules" or "modules" would be
fine.
>> Also, wouldn't it be cleaner if Emacs had a separate variable (analog
>> to image-load-path, custom-theme-load-path, etc.) for loading of
>> dynamic modules, instead of reusing load-path?
> Emacs should do that, yes. How about if we use a variable named
> 'module-directory' for that? It would work like exec-directory, except
> for modules.
> I expect that the main reason Emacs doesn't have a variable like
> module-directory now, is that packagers haven't yet encountered the
> Emacs module system (it has been off by default, though that will
> change in Emacs 27) and so haven't run into problems like the one you
> mention.
If we (Gentoo) follow the same scheme as we do for elisp-files, then we
would keep modules of different packages in separate directories (and
also separate from any modules installed by Emacs proper). So it should
be a path variable (similar to load-path), rather than a single
directory.