FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 01-19-2011, 02:47 PM
Michał Górny
 
Default RFC: check for enewuser, enewgroup outside of pkg_setup

On Wed, 19 Jan 2011 16:25:03 +0100
"Paweł Hajdan, Jr." <phajdan.jr@gentoo.org> wrote:

> "If enewuser or enewgroup is called from outside of pkg_setup, fail"

It is useful sometimes to call it in pkg_postinst(), if the user/group
is needed at runtime and not during install-time.

--
Best regards,
Michał Górny
 
Old 01-19-2011, 03:38 PM
Alec Warner
 
Default RFC: check for enewuser, enewgroup outside of pkg_setup

On Wed, Jan 19, 2011 at 3:47 PM, Michał Górny <mgorny@gentoo.org> wrote:
> On Wed, 19 Jan 2011 16:25:03 +0100
> "Paweł Hajdan, Jr." <phajdan.jr@gentoo.org> wrote:
>
>> "If enewuser or enewgroup is called from outside of pkg_setup, fail"
>
> It is useful sometimes to call it in pkg_postinst(), if the user/group
> is needed at runtime and not during install-time.

What difference is there if you run it during setup vs postinst?

-A

>
> --
> Best regards,
> Michał Górny
>
 
Old 01-19-2011, 04:18 PM
Michał Górny
 
Default RFC: check for enewuser, enewgroup outside of pkg_setup

On Wed, 19 Jan 2011 16:38:10 +0000
Alec Warner <antarus@gentoo.org> wrote:

> On Wed, Jan 19, 2011 at 3:47 PM, Michał Górny <mgorny@gentoo.org>
> wrote:
> > On Wed, 19 Jan 2011 16:25:03 +0100
> > "Paweł Hajdan, Jr." <phajdan.jr@gentoo.org> wrote:
> >
> >> "If enewuser or enewgroup is called from outside of pkg_setup,
> >> fail"
> >
> > It is useful sometimes to call it in pkg_postinst(), if the
> > user/group is needed at runtime and not during install-time.
>
> What difference is there if you run it during setup vs postinst?

If the build fails or user aborts the merge, his/her system
is not junked with an unnecessary account/group.

--
Best regards,
Michał Górny
 
Old 01-19-2011, 09:44 PM
Mike Frysinger
 
Default RFC: check for enewuser, enewgroup outside of pkg_setup

On Wednesday, January 19, 2011 12:18:24 Michał Górny wrote:
> On Wed, 19 Jan 2011 16:38:10 +0000 Alec Warner wrote:
> > On Wed, Jan 19, 2011 at 3:47 PM, Michał Górny wrote:
> > > On Wed, 19 Jan 2011 16:25:03 +0100 Paweł Hajdan, Jr. wrote:
> > >> "If enewuser or enewgroup is called from outside of pkg_setup,
> > >> fail"
> > >
> > > It is useful sometimes to call it in pkg_postinst(), if the
> > > user/group is needed at runtime and not during install-time.
> >
> > What difference is there if you run it during setup vs postinst?
>
> If the build fails or user aborts the merge, his/her system
> is not junked with an unnecessary account/group.

this is why we allow people to pick the appropriate step. ebuilds should be
using pkg_{pre,post}inst unless the user/group is needed at src_* time.
-mike
 
Old 05-12-2012, 10:48 PM
Michael Weber
 
Default RFC: check for enewuser, enewgroup outside of pkg_setup

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 01/19/2011 11:44 PM, Mike Frysinger wrote:
> this is why we allow people to pick the appropriate step. ebuilds
> should be using pkg_{pre,post}inst unless the user/group is needed
> at src_* time. -mike

I noticed a rather annoying test inside enewuser for existence of the
provided "shell" path in the filesystem ( user.eclass lines 153-156 ).

If you want to create an user and set the shell variable to an program
you just emerge, you have to call it from pkg_postinst.

(The example was a trivial desktop manager x11-misc/trivdm in [1])

[1]
http://git.overlays.gentoo.org/gitweb/?p=dev/xmw.git;a=tree;f=x11-misc/trivdm

- --
- --
Gentoo Dev
http://xmw.de/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iF4EAREIAAYFAk+u6KAACgkQknrdDGLu8JA+awD+K7HLWLkd+6 eF+uNteODtIJxC
rM46lOPUc7WDf3TXkHoA/job97V3eGMSamAHKp2+kgh7nz1z0VmmNqKxxyD26UE7
=zq6G
-----END PGP SIGNATURE-----
 
Old 05-13-2012, 07:15 AM
Michał Górny
 
Default RFC: check for enewuser, enewgroup outside of pkg_setup

On Sun, 13 May 2012 00:48:00 +0200
Michael Weber <xmw@gentoo.org> wrote:

> On 01/19/2011 11:44 PM, Mike Frysinger wrote:
> > this is why we allow people to pick the appropriate step. ebuilds
> > should be using pkg_{pre,post}inst unless the user/group is needed
> > at src_* time. -mike
>
> I noticed a rather annoying test inside enewuser for existence of the
> provided "shell" path in the filesystem ( user.eclass lines 153-156 ).
>
> If you want to create an user and set the shell variable to an program
> you just emerge, you have to call it from pkg_postinst.

If you don't need it in install-time (i.e. don't install any files
owned by it), you should indeed defer the check as late as possible.
There's no point in creating user earlier when the emerge can still
fail/be aborted.

--
Best regards,
Michał Górny
 

Thread Tools




All times are GMT. The time now is 02:00 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org