running git as root

7 messages, 4 authors, 2016-06-15 · open the first message on its own page

running git as root

From: Marco Nelissen <hidden>
Date: 2016-06-15 22:46:56

When running as root, git fails a number of test cases that expect it
to fail on read-only repositories (for example 't0004-unwritable.sh').
I was thinking of either changing the code so that it checks
permissions itself when opening files as root, or add a prerequisite
to those test cases so that they are skipped when running as root.
What would be the preferred way?

Re: running git as root

From: Michael J Gruber <hidden>
Date: 2016-06-15 22:46:56

Marco Nelissen venit, vidit, dixit 13.06.2009 17:25:
When running as root, git fails a number of test cases that expect it
to fail on read-only repositories (for example 't0004-unwritable.sh').
I was thinking of either changing the code so that it checks
permissions itself when opening files as root, or add a prerequisite
to those test cases so that they are skipped when running as root.
What would be the preferred way?
The preferred ways is to build git as non-root user. This is true even
more so for running the test suite.

Michael

Re: running git as root

From: Alex Riesen <hidden>
Date: 2016-06-15 22:46:57

2009/6/13 Marco Nelissen [off-list ref]:
When running as root, git fails a number of test cases that expect it
to fail on read-only repositories (for example 't0004-unwritable.sh').
I was thinking of either changing the code so that it checks
permissions itself when opening files as root, or add a prerequisite
to those test cases so that they are skipped when running as root.
There is such a prerequisite already (POSIXPERM), but what caused
you to run the _tests_ as root?
What would be the preferred way?
Use the prerequisite would sound right when not the
strangeness of the idea.

Re: running git as root

From: Marco Nelissen <hidden>
Date: 2016-06-15 22:46:57

On Sat, Jun 13, 2009 at 10:49 AM, Alex Riesen[off-list ref] wrote:
2009/6/13 Marco Nelissen [off-list ref]:
quoted
When running as root, git fails a number of test cases that expect it
to fail on read-only repositories (for example 't0004-unwritable.sh').
I was thinking of either changing the code so that it checks
permissions itself when opening files as root, or add a prerequisite
to those test cases so that they are skipped when running as root.
There is such a prerequisite already (POSIXPERM), but what caused
you to run the _tests_ as root?
POSIXPERM doesn't appear to be quite right for this. For example, the
't1301-shared-repo.sh' test has the POSIXPERM prereq, but it runs fine
as root, because it merely validates that permissions are preserved.

Re: running git as root

From: Marco Nelissen <hidden>
Date: 2016-06-15 22:46:57

On Sat, Jun 13, 2009 at 8:42 AM, Michael J
Gruber[off-list ref] wrote:
Marco Nelissen venit, vidit, dixit 13.06.2009 17:25:
quoted
When running as root, git fails a number of test cases that expect it
to fail on read-only repositories (for example 't0004-unwritable.sh').
I was thinking of either changing the code so that it checks
permissions itself when opening files as root, or add a prerequisite
to those test cases so that they are skipped when running as root.
What would be the preferred way?
The preferred ways is to build git as non-root user. This is true even
more so for running the test suite.
This is not possible on BeOS, where there is only one user, and it is
the super user.

Re: running git as root

From: Nanako Shiraishi <hidden>
Date: 2016-06-15 22:46:57

Quoting Alex Riesen [off-list ref]:
2009/6/13 Marco Nelissen [off-list ref]:
quoted
When running as root, git fails a number of test cases that expect it
to fail on read-only repositories (for example 't0004-unwritable.sh').
I was thinking of either changing the code so that it checks
permissions itself when opening files as root, or add a prerequisite
to those test cases so that they are skipped when running as root.
There is such a prerequisite already (POSIXPERM), but what caused
you to run the _tests_ as root?
quoted
What would be the preferred way?
Use the prerequisite would sound right when not the
strangeness of the idea.
I think somebody needs to repost an old patch from the archive.

    http://thread.gmane.org/gmane.comp.version-control.git/116729/focus=118385

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/

Re: running git as root

From: Marco Nelissen <hidden>
Date: 2016-06-15 22:46:57

On Sat, Jun 13, 2009 at 11:08 PM, Nanako Shiraishi[off-list ref] wrote:
Quoting Alex Riesen [off-list ref]:
quoted
2009/6/13 Marco Nelissen [off-list ref]:
quoted
When running as root, git fails a number of test cases that expect it
to fail on read-only repositories (for example 't0004-unwritable.sh').
I was thinking of either changing the code so that it checks
permissions itself when opening files as root, or add a prerequisite
to those test cases so that they are skipped when running as root.
There is such a prerequisite already (POSIXPERM), but what caused
you to run the _tests_ as root?
quoted
What would be the preferred way?
Use the prerequisite would sound right when not the
strangeness of the idea.
I think somebody needs to repost an old patch from the archive.

   http://thread.gmane.org/gmane.comp.version-control.git/116729/focus=118385
That's almost identical to the patch I wanted to submit, except for
the name 'SANITY', which doesn't make much sense I think.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help