Re: [gentoo-dev] Re: [RFC, PATCH] user.eclass: gracefully return when unprivileged

2017-12-16 Thread Michael Orlitzky
On 11/27/2017 10:16 AM, Mike Gilbert wrote:
> On Mon, Nov 27, 2017 at 6:46 AM, Aaron W. Swenson  
> wrote:
>>
>> You should now be able to do compilation and tests without having the
>> user/group created. For example, dev-db/postgresql doesn’t need the
>> postgres system user and group in order to successfully run through
>> src_test and src_install. It just needs the user/group at run time.
> 
> Sounds like the enewuser call should be moved from pkg_setup to
> pkg_postinst in that case.
> 

https://bugs.gentoo.org/525828



Re: [gentoo-dev] Re: [RFC, PATCH] user.eclass: gracefully return when unprivileged

2017-11-27 Thread Mike Gilbert
On Mon, Nov 27, 2017 at 6:46 AM, Aaron W. Swenson  wrote:
> On 2017-11-26 10:02, Benda Xu wrote:
>> Hi Patrick,
>>
>> Patrick McLean  writes:
>>
>> > I use portage as non-root all the time when developing and testing
>> > ebuilds, via the "ebuild" command.
>>
>> The enewgroup and enewuser are used in pkg_* functions, as documented in
>> user.eclass _assert_pkg_ebuild_phase() function.  They require root to
>> execute.
>>
>> So no worries, your workflow will not be affected.
>
> Actually, it will probably be better.
>
> You should now be able to do compilation and tests without having the
> user/group created. For example, dev-db/postgresql doesn’t need the
> postgres system user and group in order to successfully run through
> src_test and src_install. It just needs the user/group at run time.

Sounds like the enewuser call should be moved from pkg_setup to
pkg_postinst in that case.



Re: [gentoo-dev] Re: [RFC, PATCH] user.eclass: gracefully return when unprivileged

2017-11-27 Thread Aaron W. Swenson
On 2017-11-26 10:02, Benda Xu wrote:
> Hi Patrick,
> 
> Patrick McLean  writes:
> 
> > I use portage as non-root all the time when developing and testing
> > ebuilds, via the "ebuild" command.
> 
> The enewgroup and enewuser are used in pkg_* functions, as documented in
> user.eclass _assert_pkg_ebuild_phase() function.  They require root to
> execute.
> 
> So no worries, your workflow will not be affected.

Actually, it will probably be better.

You should now be able to do compilation and tests without having the
user/group created. For example, dev-db/postgresql doesn’t need the
postgres system user and group in order to successfully run through
src_test and src_install. It just needs the user/group at run time.


signature.asc
Description: Digital signature


Re: [gentoo-dev] Re: [RFC, PATCH] user.eclass: gracefully return when unprivileged

2017-11-25 Thread Benda Xu
Fabian Groffen  writes:

> I think we could definitely live with this until someone requests
> otherwise.

Indeed.

Committed, thanks a lot!

Benda


signature.asc
Description: PGP signature


Re: [gentoo-dev] Re: [RFC, PATCH] user.eclass: gracefully return when unprivileged

2017-11-25 Thread Benda Xu
Hi Patrick,

Patrick McLean  writes:

> I use portage as non-root all the time when developing and testing
> ebuilds, via the "ebuild" command.

The enewgroup and enewuser are used in pkg_* functions, as documented in
user.eclass _assert_pkg_ebuild_phase() function.  They require root to
execute.

So no worries, your workflow will not be affected.

Yours,
Benda



Re: [gentoo-dev] Re: [RFC, PATCH] user.eclass: gracefully return when unprivileged

2017-11-21 Thread Patrick McLean


On 2017-11-21 03:19 AM, Benda Xu wrote:
> Francesco Riosa  writes:
> 
>> maybe ewarn() is more appropriate than einfo()?
>> Just in case it's executed outside the scope of prefix
> 
> I can't remember any use case when portage (or, paludis, etc.) is
> executed as a normal user but not a from Prefix.
> 
> This message will only affect Prefix users, who won't be surprised that
> they cannot create new groups or users.  Therefore I think einfo is more
> appropriate.
> 
> 
> Furthermore, we do have Prefix that runs as a root, mostly usable on NAS
> or smartphones, when we do ultimately like portage to manage groups and
> users.

I use portage as non-root all the time when developing and testing
ebuilds, via the "ebuild" command.