A note about Fedora 16 #22

Closed
robertoaloi opened this Issue May 8, 2012 · 8 comments

Comments

Projects
None yet
5 participants
@robertoaloi

Having recently installed Erlang via kerl on a Fedora machine I've noticed the following, which might be of help for someone.

By default, the sudoers configuration for Fedora doesn't keep the value of the $HOME variable, which is used by kerl script.

This means that if you run the kerl build command from normal user, sudoing just to run the kerl install command, this will fail, kerl not being able to find any build:

$ ./kerl build R15B01 r15b01
Getting the available releases from erlang.org...
[...]
Agner has been successfully built
$ sudo ./kerl install r15b01 /opt/erlang/r15b01
No build named r15b01
$ ./kerl build R15B01 r15b01
There's already a build named r15b01
./kerl list builds
R15B01,r15b01

I understand this is not a bug in kerl, but it would be useful to provide a more verbose output to the user, for example showing where kerl is looking for builds.

@yrashk

This comment has been minimized.

Show comment Hide comment
@yrashk

yrashk May 8, 2012

Collaborator

Interesting behaviour. @thomasc, wdyt?

Collaborator

yrashk commented May 8, 2012

Interesting behaviour. @thomasc, wdyt?

@thomasc

This comment has been minimized.

Show comment Hide comment
@thomasc

thomasc May 8, 2012

Contributor

You can probably work around this using something like $ sudo HOME=$HOME ./kerl install r15b01 /opt/erlang/r15b01
Kerl was designed for user-specific rather than system wide installations, but you're right there should be a way to get a more verbose output to diagnose problems like this.

Contributor

thomasc commented May 8, 2012

You can probably work around this using something like $ sudo HOME=$HOME ./kerl install r15b01 /opt/erlang/r15b01
Kerl was designed for user-specific rather than system wide installations, but you're right there should be a way to get a more verbose output to diagnose problems like this.

@robertoaloi

This comment has been minimized.

Show comment Hide comment
@robertoaloi

robertoaloi May 9, 2012

@thomasc The work-around I've used was to prepend:

HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

to the kerl script. This assumes the script resides on the same directory as the .kerl dir, which is obviously not always true.

@thomasc The work-around I've used was to prepend:

HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

to the kerl script. This assumes the script resides on the same directory as the .kerl dir, which is obviously not always true.

@thomasc

This comment has been minimized.

Show comment Hide comment
@thomasc

thomasc May 9, 2012

Contributor

In my workaround $HOME is substituted in the context of the original user, so what's actually executed as root is HOME=/path/to/original/user/home ./kerl install r15b01 /opt/erlang/r15b01
As a result it can be run from any directory.

Contributor

thomasc commented May 9, 2012

In my workaround $HOME is substituted in the context of the original user, so what's actually executed as root is HOME=/path/to/original/user/home ./kerl install r15b01 /opt/erlang/r15b01
As a result it can be run from any directory.

@mrallen1

This comment has been minimized.

Show comment Hide comment
@mrallen1

mrallen1 Apr 15, 2016

Collaborator

I think dying with an error message if $HOME is unset is ok. I know this ticket is really old but was this workaround ever merged?

Collaborator

mrallen1 commented Apr 15, 2016

I think dying with an error message if $HOME is unset is ok. I know this ticket is really old but was this workaround ever merged?

@mazenharake

This comment has been minimized.

Show comment Hide comment
@mazenharake

mazenharake Jul 19, 2016

Contributor

Pull request available for the small fix.

Contributor

mazenharake commented Jul 19, 2016

Pull request available for the small fix.

@mrallen1

This comment has been minimized.

Show comment Hide comment
@mrallen1

mrallen1 Jul 19, 2016

Collaborator

Please open it. Thanks!

Collaborator

mrallen1 commented Jul 19, 2016

Please open it. Thanks!

mrallen1 added a commit that referenced this issue Jul 19, 2016

@mazenharake

This comment has been minimized.

Show comment Hide comment
@mazenharake

mazenharake Jul 19, 2016

Contributor

This was merged, perhaps we can close this issue now? Sorry for the confusion.

Contributor

mazenharake commented Jul 19, 2016

This was merged, perhaps we can close this issue now? Sorry for the confusion.

@mrallen1 mrallen1 closed this Jul 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment