Re: using rpms for non-root installs

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

 



Hello.

Yum also may be used with --installroot=root
I have used yum and rpm on that kind with aliases for current user to install software from repositories on shared hosting absolutely without root privileges.

In most cases it works, except some cases when particular binaries looks say own config files by fixed path (/etc/appname/default.conf). In such situation you may deep look documentation about config configuration options, environment variables and so. As last alternative before start patching source code you may also just patch elf binary to replace that path by some with the same length (I have done it by compose symlynks appropriately).

In any case, it some sort of hacks and depend from you really needs. If it intended for other users and predictable reproducible results you should patch software to bring them configurability in some way. And offer such patches to upstream also will be good idea.

31.01.2013 11:40, Michael Stahnke пишет:
You actually may have an option. It's dirty, and here be dragons. I
know this from working on RPM on AIX, so again, it's hacky. I did this
on a CentOS 6.3 box for my example, should work on Fedora.

You can do something like:

   ls zip-3.0-1.el6.x86_64.rpm
   mkdir $HOME/.myrpm
   cp -pr /var/lib/rpm/* $HOME/.myrpm/
   chown -R $USER  $HOME/.myrpm/
   rpm -Uvh --justdb --dbpath $HOME/.myrpm zip-3.0-1.el6.x86_64.rpm
   rpm2cpio < zip-3.0-1.el6.x86_64.rpm | cpio  -idmv
   rpm -q --dbpath $HOME/.myrpm zip

Results:

[vagrant@localhost ~]$ rpm -q --dbpath /home/vagrant/.myrpm zip
zip-3.0-1.el6.x86_64
[vagrant@localhost ~]$ rpm -q zip
package zip is not installed


You now have zip installed (and rooted) in $HOME.  You'd have to add
the --dbpath option to rpm any time you used it, and it would get out
of sync with the system rpm database unless you wrote some tooling
around that. But it's completely do-able.

Again, it's ugly and I don't recommend it.


stahnma

--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux