From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Wilhelm Kirschbaum Newsgroups: gmane.emacs.bugs Subject: bug#49864: 28.0.50; Fails to start after "make install" Date: Thu, 5 Aug 2021 20:27:06 +0200 Message-ID: References: <83r1f9l8xu.fsf@gnu.org> <83pmusjsfg.fsf@gnu.org> <83o8acjrky.fsf@gnu.org> <83mtpwjpa7.fsf@gnu.org> <83im0kj9ry.fsf@gnu.org> <83h7g4j8dj.fsf@gnu.org> <83a6lvkg7q.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000a87b9005c8d4113f" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4126"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49864@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 05 20:28:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBi6F-0000pz-0v for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Aug 2021 20:28:11 +0200 Original-Received: from localhost ([::1]:57512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBi6E-0007LN-0L for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Aug 2021 14:28:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBi66-0007LF-8W for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 14:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36891) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBi66-00058g-2H for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 14:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBi65-0001O4-Qc for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 14:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Wilhelm Kirschbaum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Aug 2021 18:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49864 X-GNU-PR-Package: emacs Original-Received: via spool by 49864-submit@debbugs.gnu.org id=B49864.16281880465272 (code B ref 49864); Thu, 05 Aug 2021 18:28:01 +0000 Original-Received: (at 49864) by debbugs.gnu.org; 5 Aug 2021 18:27:26 +0000 Original-Received: from localhost ([127.0.0.1]:48437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBi5W-0001Mx-8S for submit@debbugs.gnu.org; Thu, 05 Aug 2021 14:27:26 -0400 Original-Received: from mail-lf1-f53.google.com ([209.85.167.53]:46643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBi5U-0001Mg-KY for 49864@debbugs.gnu.org; Thu, 05 Aug 2021 14:27:25 -0400 Original-Received: by mail-lf1-f53.google.com with SMTP id n17so10217719lft.13 for <49864@debbugs.gnu.org>; Thu, 05 Aug 2021 11:27:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=j3Oo9t6n4T9N2dmIviyxlYkhPYdwtrGnagcGCh16B9k=; b=LOCEnWhRPxdlOn00o7v5MMtIBbwexxsm82v+ksFvQ0/x2DNLa5Zo0BwnXOsGeNTW8u pf7APtyTkPTHkB82KL+tfgdUFDv3tghajmTUAvdZ4sarWLQg9fiilENkda1TVcXsON3L dJXR4FwbNh6W+u/LEBztzkYSg3gmjmTJq0/8bKavH3WYSdoBt5gILlNjI7/PLNTbmv38 H3EqECGCB7yqOtWeKs42X0YQ0P7mhuLiNti//Mg1I/HepuEA/TafcIkNljcKos4VrHGV CQhklsn5Rd+I7eUEirrEcvTSjc54hZqGcKr0qEkkl9PN5y3VJWllvW4jcYhtZZYNFwnv aCDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=j3Oo9t6n4T9N2dmIviyxlYkhPYdwtrGnagcGCh16B9k=; b=IffJaFORy0ENPXrIcuHmMXhLn2V3rQZEPw4PZ02Q7SZY0sz2qWCCz0MqooUu74QgAa rUbig/vyDjcqBdtmoNJsSgwmLimxFlxVSAs6o+xGtwavXUGsrB+CvlrMhaDXxfrFyjfC s6madE+IGhLGtsqQucl466P/X0pGvckwvfFdXGdodt6IjNvzfjybWE6YJxLScGSXqzs4 8/Ze9r/PRkyrHCl3/K28wHTw5j9uyYJIpqepFn7lm8xS3nIveuQOww4InPKxxwT1kRji x5trDClI3N6eRKHzmbeb59kPiE2bPfSktI/J+PuHjmCyM6tPsahLy+LlcZmTxq0tSE3D jqug== X-Gm-Message-State: AOAM531zsYVt2Y0SOxumDnKKM6DX0WcTSuKZ4qLbRjqlHOac4eXKANTp 0FHQMNweBC4vHr2LP7uIqKvMz2e1IEijjHouXC8= X-Google-Smtp-Source: ABdhPJxbqkvD9R6sEXKtHdY92SKeVAknMqnvZuxKYY/bYQwv5dhsXMm9fIG4O7y136qAeUYNyn8fHdL/GX1mXCbIHSo= X-Received: by 2002:ac2:5e6f:: with SMTP id a15mr4567454lfr.234.1628188038408; Thu, 05 Aug 2021 11:27:18 -0700 (PDT) In-Reply-To: <83a6lvkg7q.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:211264 Archived-At: --000000000000a87b9005c8d4113f Content-Type: multipart/alternative; boundary="000000000000a87b8e05c8d4113d" --000000000000a87b8e05c8d4113d Content-Type: text/plain; charset="UTF-8" The patch I attached fixes the install issue for me without any other modification. This patch also seems to be consistent with other MKDIR_P commands in the Makefile. ### Install native compiled Lisp files. install-eln: lisp ifeq ($(HAVE_NATIVE_COMP),yes) - find native-lisp -type d -exec $(MKDIR_P) "$(ELN_DESTDIR){}" \; ; \ + umask 022; find native-lisp -type d -exec $(MKDIR_P) "$(ELN_DESTDIR){}" \; ; \ find native-lisp -type f -exec ${INSTALL_DATA} "{}" "$(ELN_DESTDIR){}" \; On Thu, Aug 5, 2021 at 6:29 PM Eli Zaretskii wrote: > > From: Wilhelm Kirschbaum > > Date: Thu, 5 Aug 2021 17:21:36 +0200 > > Cc: 49864@debbugs.gnu.org > > > > 162 if (faccessat (AT_FDCWD, file, amode, AT_EACCESS) == 0) > > (gdb) next > > dump_do_dump_relocation (dump_base=, reloc=...) at > pdumper.c:5325 > > 5325 eln_fname = make_uninit_string (execdir_len + fn2_len); > > (gdb) p (int)errno > > $1 = 13 > > > > I can indeed access > > > /usr/local/libexec/emacs/28.0.50/x86_64-pc-linux-gnu/../../../../bin/../lib/emacs/28.0.50/native-lisp/28.0.50-864bf4e5/preloaded/window-0d1b8b93-dcb2375f.eln > > but only as root. Which seems wrong. I can start emacs as sudo ( have > not even checked this before ) > > > > Which is then probably a umask issue as this folder's permission seems > wrong: > > /usr/local/lib $ sudo ls -lah emacs > > total 12K > > drwx------ 3 root root 4.0K Aug 3 23:00 . > > drwxr-xr-x 4 root root 4.0K Aug 3 23:00 .. > > drwx------ 3 root root 4.0K Aug 3 23:00 28.0.50 > > > > sudo ls -lah emacs/28.0.50 > > total 12K > > drwx------ 3 root root 4.0K Aug 3 23:00 . > > drwx------ 3 root root 4.0K Aug 3 23:00 .. > > drwx------ 3 root root 4.0K Aug 3 23:00 native-lisp > > > > Yes the file exists, but I cannot access it as a non-root ( should have > checked before ). I can remove the > > folder and re-install and the permission is the same as above. > > So this sounds like some problem with how "make install" sets > permissions on directories on your system: it ends up disallowing your > user access to those files. Or maybe you should follow "make install" > by a suitable chmod command, to make those files accessible? > > I don't know enough about sudo to help you more, but maybe someone > else here does? The main question to answer, from my POV, is whether > this is something we could address in our "make install", or something > only you can fix on your system. > > Thanks. > --000000000000a87b8e05c8d4113d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The patch I attached fixes the install issue for me w= ithout any other modification. This patch also seems to be consistent with = other MKDIR_P commands in the Makefile.

=C2=A0### = Install native compiled Lisp files.
=C2=A0install-eln: lisp
=C2=A0ife= q ($(HAVE_NATIVE_COMP),yes)
- find native-lisp -type d -exec $(MKDIR_P) = "$(ELN_DESTDIR){}" \; ; \
+ umask 022; find native-lisp -type = d -exec $(MKDIR_P) "$(ELN_DESTDIR){}" \; ; \
=C2=A0 find nativ= e-lisp -type f -exec ${INSTALL_DATA} "{}" "$(ELN_DESTDIR){}&= quot; \;




On Thu, Aug 5, 2021 = at 6:29 PM Eli Zaretskii <eliz@gnu.org> wrote:
&g= t; From: Wilhelm Kirschbaum <wkirschbaum@gmail.com>
> Date: Thu, 5 Aug 2021 17:21:36 +0200
> Cc: 49864@d= ebbugs.gnu.org
>
> 162=C2=A0 if (faccessat (AT_FDCWD, file, amode, AT_EACCESS) =3D=3D 0)<= br> > (gdb) next
> dump_do_dump_relocation (dump_base=3D<optimized out>, reloc=3D..= .) at pdumper.c:5325
> 5325 eln_fname =3D make_uninit_string (execdir_len + fn2_len);
> (gdb) p (int)errno
> $1 =3D 13
>
> I can indeed access
> /usr/local/libexec/emacs/28.0.50/x86_64-pc-linux-gnu/../../../../bin/.= ./lib/emacs/28.0.50/native-lisp/28.0.50-864bf4e5/preloaded/window-0d1b8b93-= dcb2375f.eln
> but only as root. Which seems wrong. I can start emacs as sudo ( have = not even checked this before )
>
> Which is then probably a umask issue as this folder's permission s= eems wrong:
>=C2=A0 /usr/local/lib $ sudo ls -lah emacs
> total 12K
> drwx------ 3 root root 4.0K Aug=C2=A0 3 23:00 .
> drwxr-xr-x 4 root root 4.0K Aug=C2=A0 3 23:00 ..
> drwx------ 3 root root 4.0K Aug=C2=A0 3 23:00 28.0.50
>
> sudo ls -lah emacs/28.0.50
> total 12K
> drwx------ 3 root root 4.0K Aug=C2=A0 3 23:00 .
> drwx------ 3 root root 4.0K Aug=C2=A0 3 23:00 ..
> drwx------ 3 root root 4.0K Aug=C2=A0 3 23:00 native-lisp
>
> Yes the file exists, but I cannot access it as a non-root ( should hav= e checked before ). I can remove the
> folder and re-install and the permission is the same as above.

So this sounds like some problem with how "make install" sets
permissions on directories on your system: it ends up disallowing your
user access to those files.=C2=A0 Or maybe you should follow "make ins= tall"
by a suitable chmod command, to make those files accessible?

I don't know enough about sudo to help you more, but maybe someone
else here does?=C2=A0 The main question to answer, from my POV, is whether<= br> this is something we could address in our "make install", or some= thing
only you can fix on your system.

Thanks.
--000000000000a87b8e05c8d4113d-- --000000000000a87b9005c8d4113f Content-Type: text/x-patch; charset="US-ASCII"; name="specify-native-lisp-create-dir-umask.patch" Content-Disposition: attachment; filename="specify-native-lisp-create-dir-umask.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_krz922x10 ZGlmZiAtLWdpdCBhL01ha2VmaWxlLmluIGIvTWFrZWZpbGUuaW4KaW5kZXggOTdkOTU0Yi4uMzk4 MDhkZiAxMDA2NDQKLS0tIGEvTWFrZWZpbGUuaW4KKysrIGIvTWFrZWZpbGUuaW4KQEAgLTc4OSw3 ICs3ODksNyBAQCBpbnN0YWxsLWV0YzoKICMjIyBJbnN0YWxsIG5hdGl2ZSBjb21waWxlZCBMaXNw IGZpbGVzLgogaW5zdGFsbC1lbG46IGxpc3AKIGlmZXEgKCQoSEFWRV9OQVRJVkVfQ09NUCkseWVz KQotCWZpbmQgbmF0aXZlLWxpc3AgLXR5cGUgZCAtZXhlYyAkKE1LRElSX1ApICIkKEVMTl9ERVNU RElSKXt9IiBcOyA7IFwKKwl1bWFzayAwMjI7IGZpbmQgbmF0aXZlLWxpc3AgLXR5cGUgZCAtZXhl YyAkKE1LRElSX1ApICIkKEVMTl9ERVNURElSKXt9IiBcOyA7IFwKIAlmaW5kIG5hdGl2ZS1saXNw IC10eXBlIGYgLWV4ZWMgJHtJTlNUQUxMX0RBVEF9ICJ7fSIgIiQoRUxOX0RFU1RESVIpe30iIFw7 CiBlbmRpZgogCg== --000000000000a87b9005c8d4113f--