GNU bug report logs - #58080
29.0.50; Don't hard-code path to pwd

Previous Next

Package: emacs;

Reported by: Jonas Bernoulli <jonas <at> bernoul.li>

Date: Sun, 25 Sep 2022 19:10:01 UTC

Severity: normal

Found in version 29.0.50

Done: Gregory Heytings <gregory <at> heytings.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 58080 in the body.
You can then email your comments to 58080 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#58080; Package emacs. (Sun, 25 Sep 2022 19:10:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonas Bernoulli <jonas <at> bernoul.li>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 25 Sep 2022 19:10:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jonas Bernoulli <jonas <at> bernoul.li>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Don't hard-code path to pwd
Date: Sun, 25 Sep 2022 21:09:41 +0200
On Guix pwd isn't located at /bin/pwd, but that path is hard-coded in
various Makefile.in.  They deal with that by patching these files when
building the emacs package, but when building emacs manually, that isn't
convenient, as doing so would leave the working tree dirty, which makes
it harder to pull whenever one of these files changes.

Please consider making this customizable so one could use, for example:

  make PWDCMD=pwd install

I assume there is a reason why the PWD variable isn't being used and
that /bin/pwd is used because on some other OS using pwd would cause
issues.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58080; Package emacs. (Mon, 26 Sep 2022 08:02:02 GMT) Full text and rfc822 format available.

Message #8 received at 58080 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jonas Bernoulli <jonas <at> bernoul.li>
Cc: 58080 <at> debbugs.gnu.org
Subject: Re: bug#58080: 29.0.50; Don't hard-code path to pwd
Date: Mon, 26 Sep 2022 11:01:28 +0300
> From: Jonas Bernoulli <jonas <at> bernoul.li>
> Date: Sun, 25 Sep 2022 21:09:41 +0200
> 
> On Guix pwd isn't located at /bin/pwd, but that path is hard-coded in
> various Makefile.in.  They deal with that by patching these files when
> building the emacs package, but when building emacs manually, that isn't
> convenient, as doing so would leave the working tree dirty, which makes
> it harder to pull whenever one of these files changes.
> 
> Please consider making this customizable so one could use, for example:
> 
>   make PWDCMD=pwd install
> 
> I assume there is a reason why the PWD variable isn't being used and
> that /bin/pwd is used because on some other OS using pwd would cause
> issues.

I don't see anything like PWDCMD in any of the GNU projects I have
here, but they do use just "pwd", not "/bin/pwd".  So maybe so should
we, and that would solve this particular problem as well?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58080; Package emacs. (Mon, 26 Sep 2022 08:20:01 GMT) Full text and rfc822 format available.

Message #11 received at 58080 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 58080 <at> debbugs.gnu.org, Jonas Bernoulli <jonas <at> bernoul.li>
Subject: Re: bug#58080: 29.0.50; Don't hard-code path to pwd
Date: Mon, 26 Sep 2022 08:19:52 +0000
>
> I don't see anything like PWDCMD in any of the GNU projects I have here, 
> but they do use just "pwd", not "/bin/pwd".  So maybe so should we, and 
> that would solve this particular problem as well?
>

The difference is that /bin/pwd gives, unlike pwd, the "true" path 
(without symlinks).  Not sure if it's important enough to justify the use 
of /bin/pwd, though.  The use of /bin/pwd instead of pwd dates from 
8672a560f6 by RMS in 1994.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58080; Package emacs. (Mon, 26 Sep 2022 08:35:02 GMT) Full text and rfc822 format available.

Message #14 received at 58080 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> suse.de>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Jonas Bernoulli <jonas <at> bernoul.li>,
 58080 <at> debbugs.gnu.org
Subject: Re: bug#58080: 29.0.50; Don't hard-code path to pwd
Date: Mon, 26 Sep 2022 10:34:40 +0200
On Sep 26 2022, Gregory Heytings wrote:

> The difference is that /bin/pwd gives, unlike pwd, the "true" path
> (without symlinks).

Like pwd -P.  Though if $PWD is no longer accurate, pwd works like pwd -P.

> Not sure if it's important enough to justify the use of /bin/pwd,
> though.  The use of /bin/pwd instead of pwd dates from 8672a560f6 by
> RMS in 1994.

pwd -P didn't yet exist back then.

-- 
Andreas Schwab, SUSE Labs, schwab <at> suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58080; Package emacs. (Mon, 26 Sep 2022 11:00:02 GMT) Full text and rfc822 format available.

Message #17 received at 58080 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Andreas Schwab <schwab <at> suse.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Jonas Bernoulli <jonas <at> bernoul.li>,
 58080 <at> debbugs.gnu.org
Subject: Re: bug#58080: 29.0.50; Don't hard-code path to pwd
Date: Mon, 26 Sep 2022 10:59:29 +0000
>> The difference is that /bin/pwd gives, unlike pwd, the "true" path 
>> (without symlinks).
>
> Like pwd -P.  Though if $PWD is no longer accurate, pwd works like pwd 
> -P.
>

Yes, bash's built-in pwd assumes -L by default (which is what POSIX 
mandates), and coreutils' pwd assumes -P by default.  POSIX requires 
support for both -L and -P, so the safe fix here is to replace /bin/pwd by 
pwd -P.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58080; Package emacs. (Mon, 26 Sep 2022 13:03:01 GMT) Full text and rfc822 format available.

Message #20 received at 58080 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Andreas Schwab <schwab <at> suse.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Jonas Bernoulli <jonas <at> bernoul.li>,
 58080 <at> debbugs.gnu.org
Subject: Re: bug#58080: 29.0.50; Don't hard-code path to pwd
Date: Mon, 26 Sep 2022 13:02:09 +0000
[Message part 1 (text/plain, inline)]
Jonas, can you try the attached patch and tell us if it solves your 
problem?
[Remove-hard-coded-path-to-pwd-in-Makefiles.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58080; Package emacs. (Mon, 26 Sep 2022 20:12:01 GMT) Full text and rfc822 format available.

Message #23 received at 58080 <at> debbugs.gnu.org (full text, mbox):

From: Jonas Bernoulli <jonas <at> bernoul.li>
To: Gregory Heytings <gregory <at> heytings.org>, Andreas Schwab <schwab <at> suse.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 58080 <at> debbugs.gnu.org
Subject: Re: bug#58080: 29.0.50; Don't hard-code path to pwd
Date: Mon, 26 Sep 2022 22:10:48 +0200
Gregory Heytings <gregory <at> heytings.org> writes:

> Jonas, can you try the attached patch and tell us if it solves your 
> problem?
> From c1b85e6f9bc319353d86ceb5f6b7ec4de20f1eeb Mon Sep 17 00:00:00 2001
> From: Gregory Heytings <gregory <at> heytings.org>
> Date: Mon, 26 Sep 2022 12:58:07 +0000
> Subject: [PATCH] Remove hard-coded path to pwd in Makefiles.

That works on my end.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58080; Package emacs. (Mon, 26 Sep 2022 20:34:02 GMT) Full text and rfc822 format available.

Message #26 received at 58080 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Jonas Bernoulli <jonas <at> bernoul.li>
Cc: Andreas Schwab <schwab <at> suse.de>, Eli Zaretskii <eliz <at> gnu.org>,
 58080 <at> debbugs.gnu.org
Subject: Re: bug#58080: 29.0.50; Don't hard-code path to pwd
Date: Mon, 26 Sep 2022 20:33:30 +0000
>
> That works on my end.
>

Great, thanks!  I'll push it if nobody objects in the next couple of days.




Reply sent to Gregory Heytings <gregory <at> heytings.org>:
You have taken responsibility. (Wed, 28 Sep 2022 14:32:01 GMT) Full text and rfc822 format available.

Notification sent to Jonas Bernoulli <jonas <at> bernoul.li>:
bug acknowledged by developer. (Wed, 28 Sep 2022 14:32:02 GMT) Full text and rfc822 format available.

Message #31 received at 58080-done <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Jonas Bernoulli <jonas <at> bernoul.li>
Cc: Andreas Schwab <schwab <at> suse.de>, Eli Zaretskii <eliz <at> gnu.org>,
 58080-done <at> debbugs.gnu.org
Subject: Re: bug#58080: 29.0.50; Don't hard-code path to pwd
Date: Wed, 28 Sep 2022 14:31:34 +0000
>> That works on my end.
>
> Great, thanks!  I'll push it if nobody objects in the next couple of 
> days.
>

No further comments.  Pushed, and closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 27 Oct 2022 11:24:20 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 153 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.