3 ms·
I asked this only after googling, and having done previous research. The best I was able to find for RPM is https://www.redhat.com/archives/rpm-list/2001-Decem
by daxelrod 11y ago
I asked this only after googling, and having done previous research.
The best I was able to find for RPM is https://www.redhat.com/archives/rpm-list/2001-December/msg00077.html https://www.redhat.com/archives/rpm-list/2001-December/msg00... , which involves creating your own RPM database in your user directory, and using --prefix. Unfortunately, --prefix requires an RPM to have been built with relocatability http://www.rpm.org/max-rpm/s1-rpm-reloc-building-relocatable.html http://www.rpm.org/max-rpm/s1-rpm-reloc-building-relocatable... in mind, and my experience is that most RPMs I've found from RedHat, EPEL, and Fedora aren't actually relocatable. Further many of them depend upon other root-specific things like creating new users, editing init files, chowning, etc. Of course, with this approach, you also need to create a dummy package to provide dependencies for all of the root-installed things on the system, and keep it up to date yourself.
I looked through https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html-single/RPM_Guide/ https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentat... at your suggestion, but was unable to find the section you're talking about. Perhaps I overlooked it?
I'll also note that yum requires root unless you're willing to make substantial modifications to its source code, a process that I started but was never able to finish. This is outside of the scope of what I asked, however.
I'm less familiar with dpkg, but everything I've found so far simply suggests going around the package manager and instead unpacking the package and dealing with it manually.
- peterwwillis 11y agoWell you are right that the information isn't succinctly stated in the Fedora RPM guide or Maximum RPM, though different parts of these manuals go over the different things needed to set up a local install. However, these are the results on the first page for a google of "installing rpms in local home directory". Some explain the rpm database, some talk about relocatability, and some talk about unpacking with cpio. There is no 100% reproducible solution. But you are taking software which was built to be installed on the system level and installing it on the user level, which never maps 100% on any operating system (as most users don't/shouldn't have admin privileges). Installing a package locally to a user - best practices? https://unix.stackexchange.com/questions/73653/installing-a-package-locally-to-a-user-best-practices https://unix.stackexchange.com/questions/73653/installing-a-... Linux: Building RPMs without root access http://www.techonthenet.com/linux/build_rpm.php http://www.techonthenet.com/linux/build_rpm.php yum install in user home for non-admins https://unix.stackexchange.com/questions/61283/yum-install-in-user-home-for-non-admins https://unix.stackexchange.com/questions/61283/yum-install-i... How can I install an RPM without being root? https://superuser.com/questions/209808/how-can-i-install-an-rpm-without-being-root https://superuser.com/questions/209808/how-can-i-install-an-... rpm without root https://serverfault.com/questions/100189/rpm-without-root https://serverfault.com/questions/100189/rpm-without-root