0

I'm new to RPM and was wondering whether it's possible to deploy a rpm package not as a root. The reason behind this is that for our code releases we need to build a rpm, so though I build a rpm as myself, when I want to install it to test whether my package is fine, I need to have sudo access to rpm so that I can install it as root. The problem with this is that I cannot then delete the files/directories that were installed as part of this rpm, nor can I reinstall since I have only been given sudo rpm permission for "-ivh" option.

1 Answer 1

0

No, not easily. Your best bet would be a chroot environment or something like a Docker/Moby container.

4
  • Thanks. I was wondering whether it's possible to create a local repository (gist.github.com/fernandoaleman/1377211) and maybe install the rpms there? Is this something that is even worth exploring more? And, would this approach enable me to install rpms without root access since I'm targeting a local repository? Jul 21, 2017 at 15:50
  • You seem to have your terminology confused. RPMs can be installed on a machine. When they are, that program / feature is now available. A repository is simply a place to keep them to be installed or accessed by others. Jul 22, 2017 at 15:56
  • I just came across this - linuxquestions.org/questions/linux-newbie-8/…. Using this approach, I think I can install a rpm locally and without needing to be the root. Am I right? Jul 24, 2017 at 16:38
  • That's something covered by my "not easily" but yes, that should work. Jul 25, 2017 at 0:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.