Install issues

25 views
Skip to first unread message

dkam

unread,
Aug 22, 2011, 9:44:45 PM8/22/11
to babushka_app
Hey guys,
I've got Babushka running nicely on 4 of my hosts, but Babushka
won't install on the final host.

https://gist.github.com/1164090
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

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.

Additionally, on my other hosts, /usr/local/babushka is owned by my
user account, not root:admin - that seems to be a bug?

Thanks,
Dan

Ben Hoskings

unread,
Aug 22, 2011, 9:53:23 PM8/22/11
to babush...@googlegroups.com
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.


> 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

Paul Annesley

unread,
Aug 22, 2011, 10:07:07 PM8/22/11
to babush...@googlegroups.com
I use this at the start of my bootstrap shell script, before it invoked babushka:

# defeat Ubuntu 11.04 sudo tty_tickets madness.
echo "%admin ALL=NOPASSWD: ALL" > admin_nopasswd
chmod 0440 admin_nopasswd
sudo bash -c "chown root: admin_nopasswd; mv admin_nopasswd /etc/sudoers.d/"

It will prompt for password just once, and from then on permit passwordless sudo to users in the admin group.

- Paul

Paul Annesley

unread,
Aug 22, 2011, 10:07:16 PM8/22/11
to babush...@googlegroups.com
I use this at the start of my bootstrap shell script, before it invoked babushka:

# defeat Ubuntu 11.04 sudo tty_tickets madness.
echo "%admin ALL=NOPASSWD: ALL" > admin_nopasswd
chmod 0440 admin_nopasswd
sudo bash -c "chown root: admin_nopasswd; mv admin_nopasswd /etc/sudoers.d/"

It will prompt for password just once, and from then on permit passwordless sudo to users in the admin group.

- Paul

On Tuesday, 23 August 2011 at 11:53 AM, Ben Hoskings wrote:

Dan Milne

unread,
Aug 22, 2011, 10:10:43 PM8/22/11
to babush...@googlegroups.com
Hi Ben,

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

--
Dan Milne d...@nmilne.com
http://da.nmilne.com/
http://booko.com.au/

Ben Hoskings

unread,
Aug 22, 2011, 10:14:15 PM8/22/11
to babush...@googlegroups.com
On 23/08/2011, at 12:10 PM, Dan Milne wrote:

>>> 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

Reply all
Reply to author
Forward
0 new messages