On 23/08/2011, at 11:44 AM, dkam wrote:
> https://gist.github.com/1164090
>
> Babushka constantly asks for my password for sudo access to create /
> usr/local/babushka, but never actually creates /usr/local/babushka
This is an issue with how sudo is configured on 11.04. The same is true for Arch Linux.
https://github.com/benhoskings/babushka/blob/master/lib/babushka/pkg_helpers/pacman_helper.rb#L11-17
Babushka is asking for the password over and over because it's creating each subdirectory with a separate command. I should combine them all into one.
> Manually creating /usr/local/babushka doesn't seem to help either.
>
> From the Gists, it looks like it's trying to create /usr/local/bin, /
> usr/local/lib, /usr/local/etc, etc, rather than creating those within /
> usr/local/babushka.
That's correct; it's creating /usr/local/... to make sure the structure under /usr/local is correct. That's not strictly required for babushka itself, but it is for a bunch of things that happen next, which is why it's there.
I could probably remove that dep from the installation process and require it later, e.g. from the 'src' template.
> Additionally, on my other hosts, /usr/local/babushka is owned by my
> user account, not root:admin - that seems to be a bug?
That's odd. I doubt babushka would have changed the ownership later; perhaps you bootstrapped as that user?
—Ben
--
To post, email babush...@googlegroups.com
To unsubscribe, email babushka_app...@googlegroups.com
~
http://babushka.me
http://github.com/benhoskings/babushka
http://groups.google.com/group/babushka_app
On Tuesday, 23 August 2011 at 11:53 AM, Ben Hoskings wrote:
On 23/08/2011, at 11:53 AM, Ben Hoskings wrote:
> Hi Dan,
>
>
> On 23/08/2011, at 11:44 AM, dkam wrote:
>
>> https://gist.github.com/1164090
>>
>> Babushka constantly asks for my password for sudo access to create /
>> usr/local/babushka, but never actually creates /usr/local/babushka
>
> This is an issue with how sudo is configured on 11.04. The same is true for Arch Linux.
>
> https://github.com/benhoskings/babushka/blob/master/lib/babushka/pkg_helpers/pacman_helper.rb#L11-17
>
> Babushka is asking for the password over and over because it's creating each subdirectory with a separate command. I should combine them all into one.
Ahh - that makes sense. Fixed.
>
>
>> Manually creating /usr/local/babushka doesn't seem to help either.
>>
>> From the Gists, it looks like it's trying to create /usr/local/bin, /
>> usr/local/lib, /usr/local/etc, etc, rather than creating those within /
>> usr/local/babushka.
>
> That's correct; it's creating /usr/local/... to make sure the structure under /usr/local is correct. That's not strictly required for babushka itself, but it is for a bunch of things that happen next, which is why it's there.
>
> I could probably remove that dep from the installation process and require it later, e.g. from the 'src' template.
I understand why this happens now - related to the sudo configuration above.
>
>
>> Additionally, on my other hosts, /usr/local/babushka is owned by my
>> user account, not root:admin - that seems to be a bug?
>
> That's odd. I doubt babushka would have changed the ownership later; perhaps you bootstrapped as that user?
Yes - I installed it as my user, but given that Babushka has the ability to correctly set the permissions, shouldn't it go ahead and set it up as root:admin?
I retried installation as root and everything worked correctly. I've checked that fixing the sudo config also would have solved my problems. Thanks very much for your help.
Cheers,
Dan
>
> —Ben
>
> --
> To post, email babush...@googlegroups.com
> To unsubscribe, email babushka_app...@googlegroups.com
> ~
> http://babushka.me
> http://github.com/benhoskings/babushka
> http://groups.google.com/group/babushka_app
--
Dan Milne d...@nmilne.com
http://da.nmilne.com/
http://booko.com.au/
>>> Additionally, on my other hosts, /usr/local/babushka is owned by my
>>> user account, not root:admin - that seems to be a bug?
>>
>> That's odd. I doubt babushka would have changed the ownership later; perhaps you bootstrapped as that user?
>
> Yes - I installed it as my user, but given that Babushka has the ability to correctly set the permissions, shouldn't it go ahead and set it up as root:admin?
The idea is that it just writes files (mainly by shelling out to git) as the current user, and doesn't touch ownership, so you can control the ownership yourself by choosing the user account.
On a Mac, for instance, you most likely want to install to /usr/local but have babushka owned by your account, so you can update it without sudoing, as with a homebrew install.
This is also how `make install` and friends work - to install as root, you just sudo it.
—Ben