public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Sanity check: enewuser in binpkg with portage-utils
@ 2017-07-20 14:20 Peter Stuge
  2017-07-20 16:15 ` Thomas Deutschmann
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Stuge @ 2017-07-20 14:20 UTC (permalink / raw)
  To: gentoo-dev

Hi,

I have some ebuilds which use enewuser to create groups and users in
pkg_setup(), and make use of those groups and users in src_install()
in exeopts, insopts etc.

Is there any reason that this would not always work reliably with
binpkgs?

Ie. regardless of whether I am using portage or portage-utils to
install binpkgs with such pkg_setup() and src_install() combinations?

Should it matter if the groups and users already exist? I expect no.

I would expect it to always work reliably, because exeopts/insopts
user and group arguments are looked up by install at run time.

I think I had a problem with this yesterday, but I can't reproduce it.


Thanks

//Peter


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] Sanity check: enewuser in binpkg with portage-utils
  2017-07-20 14:20 [gentoo-dev] Sanity check: enewuser in binpkg with portage-utils Peter Stuge
@ 2017-07-20 16:15 ` Thomas Deutschmann
  2017-07-20 17:17   ` Michał Górny
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Deutschmann @ 2017-07-20 16:15 UTC (permalink / raw)
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 548 bytes --]

Hi,

keep in mind that when installing a binpkg, src_* functions are skipped,
see https://devmanual.gentoo.org/ebuild-writing/functions/

So when you are doing anything with the actual user, you have to do that
in a pkg_* function.

In case of "exeopts", if you do something like

  exeopts -m 6710 -g plgudev

in any src_* function, the created image will use the GID/UIDs from the
system used to create the binpkg. This is probably your problem...

Make sure to adjust permissions in pkg_* functions!


-- 
Regards,
Thomas


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 951 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] Sanity check: enewuser in binpkg with portage-utils
  2017-07-20 16:15 ` Thomas Deutschmann
@ 2017-07-20 17:17   ` Michał Górny
  2017-07-20 17:27     ` Thomas Deutschmann
  0 siblings, 1 reply; 4+ messages in thread
From: Michał Górny @ 2017-07-20 17:17 UTC (permalink / raw)
  To: gentoo-dev, Thomas Deutschmann

Dnia 20 lipca 2017 18:15:00 CEST, Thomas Deutschmann <whissi@gentoo.org> napisał(a):
>Hi,
>
>keep in mind that when installing a binpkg, src_* functions are
>skipped,
>see https://devmanual.gentoo.org/ebuild-writing/functions/
>
>So when you are doing anything with the actual user, you have to do
>that
>in a pkg_* function.
>
>In case of "exeopts", if you do something like
>
>  exeopts -m 6710 -g plgudev
>
>in any src_* function, the created image will use the GID/UIDs from the
>system used to create the binpkg. This is probably your problem...
>
>Make sure to adjust permissions in pkg_* functions!

No. This is entirely wrong and insane. Tar stores user and group names, and restores them correctly.


-- 
Best regards,
Michał Górny (by phone)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] Sanity check: enewuser in binpkg with portage-utils
  2017-07-20 17:17   ` Michał Górny
@ 2017-07-20 17:27     ` Thomas Deutschmann
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Deutschmann @ 2017-07-20 17:27 UTC (permalink / raw)
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 210 bytes --]

On 2017-07-20 19:17, Michał Górny wrote:
> No. This is entirely wrong and insane. Tar stores user and group
> names, and restores them correctly.
Oops, thanks for correction.


-- 
Regards,
Thomas


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 951 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-07-20 17:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-20 14:20 [gentoo-dev] Sanity check: enewuser in binpkg with portage-utils Peter Stuge
2017-07-20 16:15 ` Thomas Deutschmann
2017-07-20 17:17   ` Michał Górny
2017-07-20 17:27     ` Thomas Deutschmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox