Re: [gentoo-dev] Sanity check: enewuser in binpkg with portage-utils
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 signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] Sanity check: enewuser in binpkg with portage-utils
Dnia 20 lipca 2017 18:15:00 CEST, Thomas Deutschmann 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)
Re: [gentoo-dev] Sanity check: enewuser in binpkg with portage-utils
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 signature.asc Description: OpenPGP digital signature
[gentoo-dev] Sanity check: enewuser in binpkg with portage-utils
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