{"thread":{"id":"19802","subject":"running git as root","startedAt":"2009-06-13T15:25:47Z","lastAt":"2009-06-14T21:40:19Z","messageCount":7,"participants":["Marco Nelissen","Michael J Gruber","Alex Riesen","Nanako Shiraishi"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"116233","messageId":"3a3d9e520906130825k25815c9atafde301d9fbc1da2@mail.gmail.com","threadId":"19802","inReplyTo":null,"subject":"running git as root","fromName":"Marco Nelissen","fromEmail":"marcone@xs4all.nl","sentAt":"2009-06-13T15:25:47Z","receivedAt":"2009-06-13T15:25:47Z","isPatch":false,"sender":{"key":"marcone@xs4all.nl","avatar":null},"body":"When running as root, git fails a number of test cases that expect it\nto fail on read-only repositories (for example 't0004-unwritable.sh').\nI was thinking of either changing the code so that it checks\npermissions itself when opening files as root, or add a prerequisite\nto those test cases so that they are skipped when running as root.\nWhat would be the preferred way?\n"},{"id":"116235","messageId":"4A33C8D2.5080808@drmicha.warpmail.net","threadId":"19802","inReplyTo":"3a3d9e520906130825k25815c9atafde301d9fbc1da2@mail.gmail.com","subject":"Re: running git as root","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-06-13T15:42:10Z","receivedAt":"2009-06-13T15:42:10Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Marco Nelissen venit, vidit, dixit 13.06.2009 17:25:\n> When running as root, git fails a number of test cases that expect it\n> to fail on read-only repositories (for example 't0004-unwritable.sh').\n> I was thinking of either changing the code so that it checks\n> permissions itself when opening files as root, or add a prerequisite\n> to those test cases so that they are skipped when running as root.\n> What would be the preferred way?\n\nThe preferred ways is to build git as non-root user. This is true even\nmore so for running the test suite.\n\nMichael\n"},{"id":"116243","messageId":"81b0412b0906131049v60cfbc9bm3fd26cc25acc2cd4@mail.gmail.com","threadId":"19802","inReplyTo":"3a3d9e520906130825k25815c9atafde301d9fbc1da2@mail.gmail.com","subject":"Re: running git as root","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2009-06-13T17:49:07Z","receivedAt":"2009-06-13T17:49:07Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"2009/6/13 Marco Nelissen <marcone@xs4all.nl>:\n> When running as root, git fails a number of test cases that expect it\n> to fail on read-only repositories (for example 't0004-unwritable.sh').\n> I was thinking of either changing the code so that it checks\n> permissions itself when opening files as root, or add a prerequisite\n> to those test cases so that they are skipped when running as root.\n\nThere is such a prerequisite already (POSIXPERM), but what caused\nyou to run the _tests_ as root?\n\n> What would be the preferred way?\n\nUse the prerequisite would sound right when not the\nstrangeness of the idea.\n"},{"id":"116262","messageId":"3a3d9e520906131841i2e67994fqf323140f95c37d5e@mail.gmail.com","threadId":"19802","inReplyTo":"81b0412b0906131049v60cfbc9bm3fd26cc25acc2cd4@mail.gmail.com","subject":"Re: running git as root","fromName":"Marco Nelissen","fromEmail":"marcone@xs4all.nl","sentAt":"2009-06-14T01:41:51Z","receivedAt":"2009-06-14T01:41:51Z","isPatch":false,"sender":{"key":"marcone@xs4all.nl","avatar":null},"body":"On Sat, Jun 13, 2009 at 10:49 AM, Alex Riesen<raa.lkml@gmail.com> wrote:\n> 2009/6/13 Marco Nelissen <marcone@xs4all.nl>:\n>> When running as root, git fails a number of test cases that expect it\n>> to fail on read-only repositories (for example 't0004-unwritable.sh').\n>> I was thinking of either changing the code so that it checks\n>> permissions itself when opening files as root, or add a prerequisite\n>> to those test cases so that they are skipped when running as root.\n>\n> There is such a prerequisite already (POSIXPERM), but what caused\n> you to run the _tests_ as root?\n\nPOSIXPERM doesn't appear to be quite right for this. For example, the\n't1301-shared-repo.sh' test has the POSIXPERM prereq, but it runs fine\nas root, because it merely validates that permissions are preserved.\n"},{"id":"116263","messageId":"3a3d9e520906131842j6754bda1yaf6ecb2b24320260@mail.gmail.com","threadId":"19802","inReplyTo":"4A33C8D2.5080808@drmicha.warpmail.net","subject":"Re: running git as root","fromName":"Marco Nelissen","fromEmail":"marcone@xs4all.nl","sentAt":"2009-06-14T01:42:44Z","receivedAt":"2009-06-14T01:42:44Z","isPatch":false,"sender":{"key":"marcone@xs4all.nl","avatar":null},"body":"On Sat, Jun 13, 2009 at 8:42 AM, Michael J\nGruber<git@drmicha.warpmail.net> wrote:\n> Marco Nelissen venit, vidit, dixit 13.06.2009 17:25:\n>> When running as root, git fails a number of test cases that expect it\n>> to fail on read-only repositories (for example 't0004-unwritable.sh').\n>> I was thinking of either changing the code so that it checks\n>> permissions itself when opening files as root, or add a prerequisite\n>> to those test cases so that they are skipped when running as root.\n>> What would be the preferred way?\n>\n> The preferred ways is to build git as non-root user. This is true even\n> more so for running the test suite.\n\nThis is not possible on BeOS, where there is only one user, and it is\nthe super user.\n"},{"id":"116267","messageId":"20090614150851.6117@nanako3.lavabit.com","threadId":"19802","inReplyTo":"81b0412b0906131049v60cfbc9bm3fd26cc25acc2cd4@mail.gmail.com","subject":"Re: running git as root","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2009-06-14T06:08:51Z","receivedAt":"2009-06-14T06:08:51Z","isPatch":false,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Alex Riesen <raa.lkml@gmail.com>:\n\n> 2009/6/13 Marco Nelissen <marcone@xs4all.nl>:\n>> When running as root, git fails a number of test cases that expect it\n>> to fail on read-only repositories (for example 't0004-unwritable.sh').\n>> I was thinking of either changing the code so that it checks\n>> permissions itself when opening files as root, or add a prerequisite\n>> to those test cases so that they are skipped when running as root.\n>\n> There is such a prerequisite already (POSIXPERM), but what caused\n> you to run the _tests_ as root?\n>\n>> What would be the preferred way?\n>\n> Use the prerequisite would sound right when not the\n> strangeness of the idea.\n\nI think somebody needs to repost an old patch from the archive.\n\n    http://thread.gmane.org/gmane.comp.version-control.git/116729/focus=118385\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n"},{"id":"116294","messageId":"3a3d9e520906141440p720df7c1l6e25b71899daaa7c@mail.gmail.com","threadId":"19802","inReplyTo":"20090614150851.6117@nanako3.lavabit.com","subject":"Re: running git as root","fromName":"Marco Nelissen","fromEmail":"marcone@xs4all.nl","sentAt":"2009-06-14T21:40:19Z","receivedAt":"2009-06-14T21:40:19Z","isPatch":false,"sender":{"key":"marcone@xs4all.nl","avatar":null},"body":"On Sat, Jun 13, 2009 at 11:08 PM, Nanako Shiraishi<nanako3@lavabit.com> wrote:\n> Quoting Alex Riesen <raa.lkml@gmail.com>:\n>\n>> 2009/6/13 Marco Nelissen <marcone@xs4all.nl>:\n>>> When running as root, git fails a number of test cases that expect it\n>>> to fail on read-only repositories (for example 't0004-unwritable.sh').\n>>> I was thinking of either changing the code so that it checks\n>>> permissions itself when opening files as root, or add a prerequisite\n>>> to those test cases so that they are skipped when running as root.\n>>\n>> There is such a prerequisite already (POSIXPERM), but what caused\n>> you to run the _tests_ as root?\n>>\n>>> What would be the preferred way?\n>>\n>> Use the prerequisite would sound right when not the\n>> strangeness of the idea.\n>\n> I think somebody needs to repost an old patch from the archive.\n>\n>    http://thread.gmane.org/gmane.comp.version-control.git/116729/focus=118385\n\nThat's almost identical to the patch I wanted to submit, except for\nthe name 'SANITY', which doesn't make much sense I think.\n"}]}