My workplace provides me a rocky8 server for development, but I'm not a sudoer. I want the management functions dnf provides without the hassle of manually downloading rpms. Is there a way to use dnf (or other trickery) to install packages to my own installroot without super user privileges?
My attempt: use proot to both bind the existing filesystem and mimic super-user privileges.
proot -S /
whoami # i am root in the proot shell
On the host filesystem (outside of proot) I make a directory in my home called "mydnf". Then I enter the proot and run
# neovim is an example of a package I might like to install
dnf --installroot /home/quinnc/mydnf/ install neovim --releasever 8
and it starts to work, it reads from some repos. But then I get:
RPM: error: Unable to change root directory: Operation not permitted
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction test error:
Errors occurred during test transaction.
My best guess is I need to mount a writable directory wherever dnf expects the packages to be installed. But I'm not what would be necessary.