Re: [gentoo-dev] Home directory for the 'portage' user

2019-09-02 Thread Matt Turner
On Mon, Sep 2, 2019 at 10:05 AM Mike Gilbert  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.

Agreed. Many people would like to put /var/tmp/portage on tmpfs. If
the portage user needs any persistent configuration (like an ssh key)
putting its home on tmpfs would be difficult.



[gentoo-dev] Home directory for the 'portage' user

2019-09-02 Thread Mike Gilbert
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]
 builtins[494]: cd with no arguments fails if HOME is unset
 builtins[-1]: error_count = 1

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