git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] apply: don't use core.sharedRepository to create working tree files

From
Adam Dinwoodie <adam@dinwoodie.org>
Date
Dec 19, 2020, 19:57 UTC
Message-ID
<CA+kUOam3h859kK76QuS9OFojeavXO15JNpinUQ0vPrAXrcsCoA@mail.gmail.com>
In-Reply-To
<87y2ht4pfr.fsf@Rainer.invalid>
On Sat, 19 Dec 2020 at 18:34, Achim Gratz <Stromeko@nexgo.de> wrote:
Show 26 quoted lines
>
> Adam Dinwoodie writes:
> > To my surprise, the test fails if the worktree is under "/cygdrive",
>
> /cygdrive is normally mounted with "posix=0", which only affects case
> sensitivity, so that isn't the reason for this particular fail.  You
> should anyway not build a Cygwin package with that option in effect,
> instead create your own mount point for that directory (with
> "binary,user" options).
>
> > +++ diff -u f1_mode.expected f1_mode.actual
> > --- f1_mode.expected    2020-12-19 16:50:20.169378700 +0000
> > +++ f1_mode.actual      2020-12-19 16:50:20.249126000 +0000
> > @@ -1 +1 @@
> > --rw-------
> > +-rw-rw-r--
>
> You seemingly can't change the ACL and/or several mode bits and see the
> effective access that your euid / egid has instead.  It is possible to
> set up the (default) ACL in a way that removes the permission to change
> them while otherwise still giving you what is effectively full access,
> in which case the test fail is the result of an inability to remove the
> default ACL from the directory.  I suspect your build directory is owned
> by a different user than the one you're building with and/or has been
> moved or re-used from another Windows installation that has different
> SID.

Having done a bit more digging, you're (unsurprisingly) right that this seems to be about permissions rather than mount points per se. I see the same failure with a build in /cygdrive/c/Users/Adam/Documents/git, though, where that directory was created solely using Git commands with the installed version of Cygwin Git (v2.29.2-1). I'm using a test VM here that was created from scratch solely to run these tests, and where there has only ever been a single login user account, so the permissions setup should be about as straightforward as they possibly could be.

This seems like a scenario that Cygwin should be able to handle, but I don't have a clear enough grasp of how Windows ACLs work in normal circumstances, let alone when Cygwin is handling them in its non-standard ways, to know what an appropriate solution here is. "Only ever build things within the Cygwin home directory" seems like a decidedly suboptimal workaround, though.

Previous: Achim GratzNext: Achim Gratz
Message 9 of 17 in “Is git-am expected to honor core.sharedRepository?”
  1. Matheus Tavares BernardinoDec 1, 2020
  2. Junio C HamanoDec 1, 2020
  3. apply: don't use core.sharedRepository to create working tree filesMatheus Tavares, Dec 1, 2020
  4. Junio C HamanoDec 2, 2020
  5. Adam DinwoodieDec 19, 2020
  6. Junio C HamanoDec 19, 2020
  7. Adam DinwoodieDec 19, 2020
  8. Achim GratzDec 19, 2020
  9. Adam DinwoodieDec 19, 2020
  10. Achim GratzDec 19, 2020
  11. Adam DinwoodieDec 22, 2020
  12. Matheus Tavares BernardinoDec 22, 2020
  13. t4129: fix setfacl-related permissions failureAdam Dinwoodie, Dec 23, 2020
  14. Matheus Tavares BernardinoJan 9, 2021
  15. Junio C HamanoJan 9, 2021
  16. Junio C HamanoDec 2, 2020
  17. Matheus Tavares BernardinoDec 3, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.