[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#996540: Post install fails when run as non-root user and does not respect PKG_ROOT



Control: reopen -1
Control: severity -1 wishlist

Am 17.01.2022 um 09:10 teilte Johannes Schauer Marin Rodrigues mit:

Hi,

I didn't decide how to go further yet. For now I reopen and set severity to wishlist as it doesn't sound like a bug to me.

@Glenn: if you have patches to implement your request we'll think about adopting them. Let us know.

Hilmar

Quoting Glenn Washburn (2022-01-17 08:42:24)
I'll restate my use case briefly here. The use case is installing packages as
an unprivileged user to a user writable location (I don't have privileges on
this machine and can't chroot). This can be done by invoking the dpkg binary
with the "--force-script-chrootless" option and works, but the post install
fails.

And just as I told you in that other bug, you can achieve that same thing
without being root by using either fakechroot or by unsharing the user
namespace. But you definitely have privileges for the former.

We don't need to put support allowing maintainer scripts to be run as another
user as the root user if there are mechanisms that can fake the root user. For
good reasons package maintainers are cautious when it's about increasing the
complexity of their maintainer scripts and it should only be done when it's
absolutely necessary.

The final decision of course lies with the texinfo maintainers and not me. I'm
just explaining for you (again) why this is not needed. Just have a look at the
mmdebstrap code and how it fakes being root to create chroot tarballs without
any root privileges. Take that code and use it for your own project and you
will not have to file another of these bugs as all packages will just magically
work without any changes. If you need help understanding how mmdebstrap does
what it does I (again) offer you my help.



--
sigfault

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


Reply to: