FS#72317 - Feature: Don't ask super user permissions for install-root that does not require sudo permissions

Attached to Project: Pacman
Opened by Robin (reportaman) - Friday, 01 October 2021, 18:48 GMT
Task Type Feature Request
Category General
Status Unconfirmed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version 6.0.0
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Summary and Info:
When the install root passed to pacman using -r/--root does not require super user permissions, pacman should not ask for sudo permissions.

Rationale/Story:?
I have worked in big tech, and the way all engineers are made to work is by logging into some shared machine that they don't have sudo permissions to. If one wishes to install a tool that they like locally in home directory (given they don't have sudo permissions), all they can do is download the source code and compile it themselves. That means finding and compiling all dependencies manually, and adjusting the configutation prefix, compiler/linker options for each compile, etc. Pacman already provides an option to specify an install root different from the default by passing -r <path> / --root <path>. But pacman asks for super user permissions even if the passed root does not require super user permission (like somewhere in ones home directory tree).

Benefit:
Ideally this will enable the users to maintain a local package directory where they can install tools that they care about, and their dependencies.

Steps to Reproduce:
Try passing --root <some path in user's home directory> to pacman, it still asks for sudo.
This task depends upon

Comment by morganamilo (morganamilo) - Friday, 01 October 2021, 18:59 GMT
I'd like this feature but hooks chroot into the root dir so they would not work without root.
Comment by morganamilo (morganamilo) - Friday, 01 October 2021, 19:00 GMT
On top of that, the plan eventually is to get pacman to chroot into the rootdir too.
Comment by Robin (reportaman) - Friday, 01 October 2021, 19:08 GMT
Would https://github.com/proot-me/proot help? Am shooting in the dark, someone named BrainDamage in #archlinux IRC suggested that.
Comment by Allan McRae (Allan) - Friday, 01 October 2021, 23:00 GMT
"and adjusting the configutation prefix"

This is the problem. Packages are built expecting a given filesystem root. Installing them with "--root" and expecting them to work without that being the system root is not going to work. They will still search for libraries in /usr/lib etc.
Comment by morganamilo (morganamilo) - Saturday, 02 October 2021, 01:09 GMT
Yeah my personal want for this is seperate. Just testing pacman and the such. fakeroot and --dbonly cover this though. Would be nice to not have to use fakeroot though.

Loading...