From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.devel Subject: Re: Where should dynamic modules be installed? Date: Thu, 24 Oct 2019 17:39:25 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="8384"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: gnu-emacs@gentoo.org, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 24 18:30:37 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iNg0S-00020h-1H for ged-emacs-devel@m.gmane.org; Thu, 24 Oct 2019 18:30:36 +0200 Original-Received: from localhost ([::1]:47206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNg0P-0003ZC-35 for ged-emacs-devel@m.gmane.org; Thu, 24 Oct 2019 12:30:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49349) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNfD9-0006Ye-Fq for emacs-devel@gnu.org; Thu, 24 Oct 2019 11:39:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNfD4-0000Wk-8b for emacs-devel@gnu.org; Thu, 24 Oct 2019 11:39:36 -0400 Original-Received: from smtp.gentoo.org ([140.211.166.183]:56580) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNfD4-0000W5-34 for emacs-devel@gnu.org; Thu, 24 Oct 2019 11:39:34 -0400 Original-Received: from a1i15 (host2092.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id A397234C2D1; Thu, 24 Oct 2019 15:39:29 +0000 (UTC) In-Reply-To: (Paul Eggert's message of "Wed, 23 Oct 2019 17:31:30 -0700") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 140.211.166.183 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241391 Archived-At: >>>>> 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// - *.el *.elc /usr/share/emacs/etc// - 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.