Home directory for the 'portage' user

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Home directory for the 'portage' user

Mike Gilbert-2
I would like to create an acct-user package for the 'portage' user,
but I'm having trouble deciding on a home directory.

baselayout currently sets it to /var/tmp/portage, and this just seems
like a bad idea to me. I'm pretty sure we have a QA policy against
installing files there anyway.

If we set the home directory to /dev/null, this may cause problems for
unit tests that expect the account to have a valid home directory. For
example, see this bug report for app-shells/ksh, which is about a test
case that fails when the HOME environment variable is unset. It also
fails if the home directory is not a directory (/dev/null).

https://github.com/att/ast/issues/1391

/x/portage/app-shells/ksh-2020.0.0_beta1/work/ksh-2020.0.0_beta1-build/src/cmd/ksh93/ksh[5]:
cd: /dev/null: [Not a directory]
<E> builtins[494]: cd with no arguments fails if HOME is unset
<W> builtins[-1]: error_count = 1

So, I guess we should pick somewhere to create an empty directory for
portage. Any suggestions?

Reply | Threaded
Open this post in threaded view
|

Re: Home directory for the 'portage' user

Mike Gilbert-2
On Mon, Sep 2, 2019 at 1:04 PM Mike Gilbert <[hidden email]> wrote:

>
> I would like to create an acct-user package for the 'portage' user,
> but I'm having trouble deciding on a home directory.
>
> baselayout currently sets it to /var/tmp/portage, and this just seems
> like a bad idea to me. I'm pretty sure we have a QA policy against
> installing files there anyway.
>
> If we set the home directory to /dev/null, this may cause problems for
> unit tests that expect the account to have a valid home directory. For
> example, see this bug report for app-shells/ksh, which is about a test
> case that fails when the HOME environment variable is unset. It also
> fails if the home directory is not a directory (/dev/null).
>
> https://github.com/att/ast/issues/1391
>
> /x/portage/app-shells/ksh-2020.0.0_beta1/work/ksh-2020.0.0_beta1-build/src/cmd/ksh93/ksh[5]:
> cd: /dev/null: [Not a directory]
> <E> builtins[494]: cd with no arguments fails if HOME is unset
> <W> builtins[-1]: error_count = 1
>
> So, I guess we should pick somewhere to create an empty directory for
> portage. Any suggestions?

/var/lib/portage/home was suggested in IRC. If there are any
objections to that path, please make them known.