-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support umask for git repos (try 2) #574
Conversation
When cloning a repo, it can be useful to have shared access such that other members of the cloning user's group are able to manage the repo as well. This requires two components: 1. The setgid bit to be set on directories; this can be accomplished by puppet code which creates the repo directory before calling vcsrepo. 2. A umask that allows group writeability to be used during the clone. This patch implements the second component. Note that for git, specifically, there is a core.sharedRepository option, but this only seems to be respected on 'git init', not 'git clone'. By default, git will respect the umask anyhow. I do not have ready access to the other version control systems, so I only implemented this for git, but using a umask is likely portable to other version control systems as well. For the umask rspec test, documentation is here: https://serverspec.org/resource_types.html#file Despite the documentation saying that this "supports 3 and 4 number octet matching", the backend implementation is finnicky. https://github.com/mizzy/specinfra/blob/6e4460cbc46033add002d41266719bf157dbed63/lib/specinfra/command/base/file.rb#L55 This shells out to the stat and grep commands, and the specified stat output format results in a representation that is not zero-padded.
|
Updated to fix the rubocop style check failure. -Corey |
|
Thank you @bugfood, and again, apologies for any inconvenience! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bugfood as suspected all tests are now passing :-)
Happy to merge this change now - thanks again for your work on this one!
|
Nice, thank you. I'm glad we can get this through. |
This is a re-attempt of: #541
I can't re-open that PR (see: #541 (comment)).
@jordanbreen28 can you please either check this one or re-open the original PR, if possible now?
Differences from the last revision of the original PR are:
Thanks,
Corey