all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs-repository-{version|branch} on Windows
@ 2022-11-04 18:24 Juanma Barranquero
  2022-11-04 18:36 ` Juanma Barranquero
  2022-11-04 18:51 ` Eli Zaretskii
  0 siblings, 2 replies; 17+ messages in thread
From: Juanma Barranquero @ 2022-11-04 18:24 UTC (permalink / raw)
  To: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 805 bytes --]

I've been struggling with these two variables being nil on my build, and
finally I modified emacs-repository-version-git to write a log file and see
what was happening:

fatal: detected dubious ownership in repository at
'D:/Devel/emacs/repo/trunk'
'D:/Devel/emacs/repo/trunk/.git' is owned by:
        'S-1-5-32-544'
but the current user is:
        'S-1-5-21-...' [my account's SID]
To add an exception for this directory, call:

        git config --global --add safe.directory D:/Devel/emacs/repo/trunk

One of these cases where there's a directory whose owner is the
Administrators group. Changing the ownership of .git/ to the current user
fixed the problem.

BTW, the git config line didn't help.

Is this usual? Should it be mentioned on some README? (Or perhaps it is
already and I did miss it.)

[-- Attachment #2: Type: text/html, Size: 1121 bytes --]

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

* Re: emacs-repository-{version|branch} on Windows
  2022-11-04 18:24 emacs-repository-{version|branch} on Windows Juanma Barranquero
@ 2022-11-04 18:36 ` Juanma Barranquero
  2022-11-04 18:51 ` Eli Zaretskii
  1 sibling, 0 replies; 17+ messages in thread
From: Juanma Barranquero @ 2022-11-04 18:36 UTC (permalink / raw)
  To: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 182 bytes --]

BTW: that happened when git was called during the build. But git on my
command line (4NT), or even in the MSYS2 shell, works just fine and has no
trouble with permissions/ownership.

[-- Attachment #2: Type: text/html, Size: 267 bytes --]

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

* Re: emacs-repository-{version|branch} on Windows
  2022-11-04 18:24 emacs-repository-{version|branch} on Windows Juanma Barranquero
  2022-11-04 18:36 ` Juanma Barranquero
@ 2022-11-04 18:51 ` Eli Zaretskii
  2022-11-04 18:58   ` Juanma Barranquero
  2022-11-04 19:28   ` Stefan Monnier
  1 sibling, 2 replies; 17+ messages in thread
From: Eli Zaretskii @ 2022-11-04 18:51 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: emacs-devel

> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Fri, 4 Nov 2022 19:24:11 +0100
> 
> I've been struggling with these two variables being nil on my build, and finally I modified
> emacs-repository-version-git to write a log file and see what was happening:
> 
> fatal: detected dubious ownership in repository at 'D:/Devel/emacs/repo/trunk'
> 'D:/Devel/emacs/repo/trunk/.git' is owned by:
>         'S-1-5-32-544'
> but the current user is:
>         'S-1-5-21-...' [my account's SID]
> To add an exception for this directory, call:
> 
>         git config --global --add safe.directory D:/Devel/emacs/repo/trunk

Why is this an Emacs problem?  It's a typical Windows messup, whereby
some directories are "owned" by the Administrators _group_ instead of
by your user.  Just fire up the File Explorer, and make it change the
owner of wherever you keep your Git repository to your user,
recursively.

> One of these cases where there's a directory whose owner is the Administrators group. Changing the
> ownership of .git/ to the current user fixed the problem.

Which is what you should do.  In general, make every directory where
you or your applications create files to be owned by your user, and
make sure they will inherit the ownership to any subdirectories.

> Is this usual? Should it be mentioned on some README? (Or perhaps it is already and I did miss it.)

I see no reason to decide that this has anything to do with Emacs.
That's a slippery slope, especially given that no one is lately
interested in maintaining the Windows port of Emacs.



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

* Re: emacs-repository-{version|branch} on Windows
  2022-11-04 18:51 ` Eli Zaretskii
@ 2022-11-04 18:58   ` Juanma Barranquero
  2022-11-04 19:28   ` Stefan Monnier
  1 sibling, 0 replies; 17+ messages in thread
From: Juanma Barranquero @ 2022-11-04 18:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 275 bytes --]

I wasn't implying that it was an Emacs problem. I was saying that's a
pitfall that some people will be unaware of, especially because it
causes trouble during the build, not when using git from the command line.
But if you think it's not worth mentioning in some README, ok.

[-- Attachment #2: Type: text/html, Size: 374 bytes --]

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

* Re: emacs-repository-{version|branch} on Windows
  2022-11-04 18:51 ` Eli Zaretskii
  2022-11-04 18:58   ` Juanma Barranquero
@ 2022-11-04 19:28   ` Stefan Monnier
  2022-11-04 20:08     ` Juanma Barranquero
  1 sibling, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2022-11-04 19:28 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Juanma Barranquero, emacs-devel

Eli Zaretskii [2022-11-04 20:51:33] wrote:
>> Is this usual? Should it be mentioned on some README? (Or perhaps it is
>> already and I did miss it.)
>
> I see no reason to decide that this has anything to do with Emacs.
> That's a slippery slope, especially given that no one is lately
> interested in maintaining the Windows port of Emacs.

If this is an instance of a more general problem that were able to
describe in a meaningful way, I guess it could be added in
`etc/PROBLEMS`, assuming it's a problem that can be common among Windows
users, some of whom might have no other exposure to Unix-style
applications other than via Emacs.

Obviously if it's just for `emacs-repository-{version|branch}` it's not
worth the trouble.


        Stefan




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

* Re: emacs-repository-{version|branch} on Windows
  2022-11-04 19:28   ` Stefan Monnier
@ 2022-11-04 20:08     ` Juanma Barranquero
  2022-11-04 20:29       ` Eli Zaretskii
  0 siblings, 1 reply; 17+ messages in thread
From: Juanma Barranquero @ 2022-11-04 20:08 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Eli Zaretskii, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

In the past it happened with directories created inside .emacs.d/, though I
don't remember the specifics.

As for the one I reported, the lisp code silences the error, which makes
realizing the problem a bit harder.

[-- Attachment #2: Type: text/html, Size: 407 bytes --]

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

* Re: emacs-repository-{version|branch} on Windows
  2022-11-04 20:08     ` Juanma Barranquero
@ 2022-11-04 20:29       ` Eli Zaretskii
  2022-11-04 20:42         ` Juanma Barranquero
  0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2022-11-04 20:29 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: monnier, emacs-devel

> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Fri, 4 Nov 2022 21:08:34 +0100
> Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
> 
> In the past it happened with directories created inside .emacs.d/, though I don't remember the specifics.

Is your ~/.emacs.d directory on the same drive as the system, i.e. on
drive C:\?  If so, you will have to take ownership by your user on all
of drive C:\, because these problems will keep happening.  Most
probably your user is either a local Administrator or a member of the
Administrators group.  In both cases, you will bump into these
problems, until you take ownership of every directory you can.

My best advice is to have your HOME directory and everything else GNU
on a drive different from the system drive -- if you can.  Then taking
ownership is easier, because there aren't any protected directories,
and the level of paranoia of Windows itself about non-system drives is
lower.

This is basic Windows system setup, nothing to do with Emacs per se.



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

* Re: emacs-repository-{version|branch} on Windows
  2022-11-04 20:29       ` Eli Zaretskii
@ 2022-11-04 20:42         ` Juanma Barranquero
  2022-11-04 20:47           ` Stefan Monnier
  0 siblings, 1 reply; 17+ messages in thread
From: Juanma Barranquero @ 2022-11-04 20:42 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: monnier, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 769 bytes --]

On Fri, Nov 4, 2022 at 9:29 PM Eli Zaretskii <eliz@gnu.org> wrote:

> Is your ~/.emacs.d directory on the same drive as the system, i.e. on drive
C:\?

No. C: is the system drive, but I have all development tools (and most
other things) in D:
> Then taking ownership is easier, because there aren't any protected
directories,
> This is basic Windows system setup, nothing to do with Emacs per se.

I did so in the past. Then I had to replace that hard disk and couldn't
clone it, had to copy things. But that disk also contains the \User
directories, so it wasn't trivial. Things got messy and I suppose I forgot.

Anyway, yeah, I agree, it's something the user has to take care of...
As long as they know, or remember. And the git error being silenced
didn't help ;-)

[-- Attachment #2: Type: text/html, Size: 2239 bytes --]

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

* Re: emacs-repository-{version|branch} on Windows
  2022-11-04 20:42         ` Juanma Barranquero
@ 2022-11-04 20:47           ` Stefan Monnier
  2022-11-04 20:56             ` Eli Zaretskii
  0 siblings, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2022-11-04 20:47 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Eli Zaretskii, emacs-devel

> Anyway, yeah, I agree, it's something the user has to take care of...
> As long as they know, or remember. And the git error being silenced
> didn't help ;-)

Maybe the better way forward is to tweak the code so it doesn't silence
this kind of error.


        Stefan




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

* Re: emacs-repository-{version|branch} on Windows
  2022-11-04 20:47           ` Stefan Monnier
@ 2022-11-04 20:56             ` Eli Zaretskii
  2022-11-04 21:09               ` Juanma Barranquero
  2022-11-04 21:20               ` Stefan Monnier
  0 siblings, 2 replies; 17+ messages in thread
From: Eli Zaretskii @ 2022-11-04 20:56 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: lekktu, emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org
> Date: Fri, 04 Nov 2022 16:47:18 -0400
> 
> > Anyway, yeah, I agree, it's something the user has to take care of...
> > As long as they know, or remember. And the git error being silenced
> > didn't help ;-)
> 
> Maybe the better way forward is to tweak the code so it doesn't silence
> this kind of error.

Then you'd hit a much worse extremity: that the user is annoyed by
problems most of them don't understand and don't want to know about.



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

* Re: emacs-repository-{version|branch} on Windows
  2022-11-04 20:56             ` Eli Zaretskii
@ 2022-11-04 21:09               ` Juanma Barranquero
  2022-11-04 21:20               ` Stefan Monnier
  1 sibling, 0 replies; 17+ messages in thread
From: Juanma Barranquero @ 2022-11-04 21:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stefan Monnier, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 300 bytes --]

On Fri, Nov 4, 2022 at 9:56 PM Eli Zaretskii <eliz@gnu.org> wrote:

> Then you'd hit a much worse extremity: that the user is annoyed by
> problems most of them don't understand and don't want to know about.

Generally speaking, yeah. But, while building Emacs, I'd rather get annoyed
than clueless.

[-- Attachment #2: Type: text/html, Size: 485 bytes --]

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

* Re: emacs-repository-{version|branch} on Windows
  2022-11-04 20:56             ` Eli Zaretskii
  2022-11-04 21:09               ` Juanma Barranquero
@ 2022-11-04 21:20               ` Stefan Monnier
  2022-11-05  6:24                 ` Eli Zaretskii
  1 sibling, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2022-11-04 21:20 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: lekktu, emacs-devel

>> Maybe the better way forward is to tweak the code so it doesn't silence
>> this kind of error.
> Then you'd hit a much worse extremity: that the user is annoyed by
> problems most of them don't understand and don't want to know about.

Not necessarily, depends when/where we show the error.  AFAIK this code
is run while building Emacs, so emitting an error during compilation
wouldn't be too intrusive (as long as it doesn't prevent the build from
succeeding).
Or we could put the error message into those vars.


        Stefan




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

* Re: emacs-repository-{version|branch} on Windows
  2022-11-04 21:20               ` Stefan Monnier
@ 2022-11-05  6:24                 ` Eli Zaretskii
  2022-11-05 11:43                   ` Juanma Barranquero
  0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2022-11-05  6:24 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: lekktu, emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: lekktu@gmail.com,  emacs-devel@gnu.org
> Date: Fri, 04 Nov 2022 17:20:31 -0400
> 
> >> Maybe the better way forward is to tweak the code so it doesn't silence
> >> this kind of error.
> > Then you'd hit a much worse extremity: that the user is annoyed by
> > problems most of them don't understand and don't want to know about.
> 
> Not necessarily, depends when/where we show the error.  AFAIK this code
> is run while building Emacs, so emitting an error during compilation
> wouldn't be too intrusive (as long as it doesn't prevent the build from
> succeeding).
> Or we could put the error message into those vars.

Those errors show in each and every file-related operation.



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

* Re: emacs-repository-{version|branch} on Windows
  2022-11-05  6:24                 ` Eli Zaretskii
@ 2022-11-05 11:43                   ` Juanma Barranquero
  2022-11-05 12:36                     ` Eli Zaretskii
  2022-11-05 15:19                     ` Stefan Monnier
  0 siblings, 2 replies; 17+ messages in thread
From: Juanma Barranquero @ 2022-11-05 11:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stefan Monnier, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]

On Sat, Nov 5, 2022 at 7:25 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> Those errors show in each and every file-related operation.

I'm not sure what does "those errors" refers to.

AFAICS, emacs-repository-{brach|version}-git use `with-demoted-errors' to
catch git
errors and make them into messages, but these messages do not show in the
output
when compiling or bootstrapping:

Loading tooltip...
Loading international/iso-transl...
Loading leim/leim-list.el (source)...
Loading emacs-lisp/rmc...
Waiting for git...
Waiting for git...
Finding pointers to doc strings...
Finding pointers to doc strings...done
Growing hash table to: 120000
Pure-hashed: 18444 strings, 5733 vectors, 51813 conses, 5185 bytecodes, 341
others
Dumping under the name emacs.pdmp
Dumping fingerprint:
c7027ccc5a785a5e006e026f442c029d10eb642c13dd475b88c5946e2e0c349e
Dump complete

There's only "Waiting for git" (in the above log, both git calls failed
because of
the same "admins vs current user" issue than my original report).

[-- Attachment #2: Type: text/html, Size: 1627 bytes --]

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

* Re: emacs-repository-{version|branch} on Windows
  2022-11-05 11:43                   ` Juanma Barranquero
@ 2022-11-05 12:36                     ` Eli Zaretskii
  2022-11-05 13:20                       ` Juanma Barranquero
  2022-11-05 15:19                     ` Stefan Monnier
  1 sibling, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2022-11-05 12:36 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: monnier, emacs-devel

> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Sat, 5 Nov 2022 12:43:09 +0100
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
> 
> AFAICS, emacs-repository-{brach|version}-git use `with-demoted-errors' to catch git
> errors and make them into messages, but these messages do not show in the output
> when compiling or bootstrapping:
> 
> Loading tooltip...
> Loading international/iso-transl...
> Loading leim/leim-list.el (source)...
> Loading emacs-lisp/rmc...
> Waiting for git...
> Waiting for git...
> Finding pointers to doc strings...
> Finding pointers to doc strings...done
> Growing hash table to: 120000
> Pure-hashed: 18444 strings, 5733 vectors, 51813 conses, 5185 bytecodes, 341 others
> Dumping under the name emacs.pdmp
> Dumping fingerprint: c7027ccc5a785a5e006e026f442c029d10eb642c13dd475b88c5946e2e0c349e
> Dump complete
> 
> There's only "Waiting for git" (in the above log, both git calls failed because of
> the same "admins vs current user" issue than my original report).

I don't think we want to break the build because Git doesn't like
something.  We only need it here to record the revision in the build,
for future references.



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

* Re: emacs-repository-{version|branch} on Windows
  2022-11-05 12:36                     ` Eli Zaretskii
@ 2022-11-05 13:20                       ` Juanma Barranquero
  0 siblings, 0 replies; 17+ messages in thread
From: Juanma Barranquero @ 2022-11-05 13:20 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: monnier, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 308 bytes --]

I don't want the git problem to break the build, I just think it would be
helpful
to have the error message in the log.

My problem was fixed in less than five minutes, *once* I understood it was a
permission mishap. Before that I spent a while going nowhere because I
thought
it was a PATH problem somehow.

[-- Attachment #2: Type: text/html, Size: 595 bytes --]

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

* Re: emacs-repository-{version|branch} on Windows
  2022-11-05 11:43                   ` Juanma Barranquero
  2022-11-05 12:36                     ` Eli Zaretskii
@ 2022-11-05 15:19                     ` Stefan Monnier
  1 sibling, 0 replies; 17+ messages in thread
From: Stefan Monnier @ 2022-11-05 15:19 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Eli Zaretskii, emacs-devel

> AFAICS, emacs-repository-{brach|version}-git use `with-demoted-errors' to
> catch git
> errors and make them into messages, but these messages do not show in the
> output
> when compiling or bootstrapping:

I think there are two places where the error is lost:

- in `loadup` we wrap the call in an `ignore-errors`.
- in `emacs-repository-version-git` we don't fetch the stdout/stderr
  output when there's an error.


        Stefan




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

end of thread, other threads:[~2022-11-05 15:19 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-04 18:24 emacs-repository-{version|branch} on Windows Juanma Barranquero
2022-11-04 18:36 ` Juanma Barranquero
2022-11-04 18:51 ` Eli Zaretskii
2022-11-04 18:58   ` Juanma Barranquero
2022-11-04 19:28   ` Stefan Monnier
2022-11-04 20:08     ` Juanma Barranquero
2022-11-04 20:29       ` Eli Zaretskii
2022-11-04 20:42         ` Juanma Barranquero
2022-11-04 20:47           ` Stefan Monnier
2022-11-04 20:56             ` Eli Zaretskii
2022-11-04 21:09               ` Juanma Barranquero
2022-11-04 21:20               ` Stefan Monnier
2022-11-05  6:24                 ` Eli Zaretskii
2022-11-05 11:43                   ` Juanma Barranquero
2022-11-05 12:36                     ` Eli Zaretskii
2022-11-05 13:20                       ` Juanma Barranquero
2022-11-05 15:19                     ` Stefan Monnier

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.