LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Using RPM fully on Debian (https://www.linuxquestions.org/questions/linux-software-2/using-rpm-fully-on-debian-187108/)

perlspinr 05-28-2004 06:28 PM

Using RPM fully on Debian
 
I am trying to install some software that is only distributed as a collection of .rpm files. As I use Debian GNU/Linux, I can and have installed the Debian RPM package itself. However, this package on Debian is "disabled" as it only exists as a helper for the "alien" tool.

My question is how to activate the full workings of RPM (perhaps temporarily) so that I can run rpm commands found in a script distributed with this non-Debian software.

My question is NOT:
(a) Why shouldn't I enable RPM / why I should use alien instead
(b) Why does Debian use dpkg/APT instead of rpm
(c) What Bad Things(TM) can happen to my system if I install to it using RPM w/o alien
(d) Why shouldn't I install non-Free software.

If a reader feels the knee-jerk compulsion to get up on a soapbox and do any single or combinatorial permutation on one of the above themes, please note that your impulse-control problem or lack of ability to read with interpretive comprehension is not MY problem and I won't acknowledge your rant.

That unpleasantness out of the way (hey, sorry, but I've seen it all ... been online for while now) ... :(

Here's some details about my system and the Plan.

- I am running Debian "Woody" on an Intel (i-x86) box
- I've configured rpm to regard the 'prefix' for all installs as '/usr/local'
- I want to build the rpm database in /usr/local/src/rpmroot

I cannot get this done - I try the following command as the superuser:

# rpm --initdb -vv --root /usr/local/src/rpmroot

and it fails with the error msg "error: cannot open Packages index using db3 - No such file or directory (2)".

Somehow I find it very hard to believe that there's never been anyone who figured out how to enable rpm fully under Debian.

TIA :D ,
Soren A

:p Update (1): 29 May 2004 2:20 EDT:
I figured out the failure cited above. I had misinterpreted the meaning of the switch '--root' ; I was looking for a way to create the directory that contains SOURCES, BUILD, SPECS, etc. but that isn't what '--root' does. It makes the entire process do a chroot(2) and the --initdb was therefore looking in a crazy non-existing place for where to create files.

The command that I wanted was more like this:

Code:

# rpm --initdb -vv --dbpath /usr/local/var/lib/rpm
Now that isn't all, by itself: creating customized files /etc/rpmrc and /etc/rpm/macros was also necessary to cause RPM to behave correctly in looking for things in these non-default locations. Haven't totally tested it yet, but so far it is looking good.

deepsix 05-28-2004 07:46 PM

debian, gentoo, etc...is set up to use apt.........redhat , suse, mandrake, etc.....are setup for rpm........
it has a lot to do with installed packages lists.........directory structure......scripts.....and other things.....there is no simple answer to this.....
I would recommend you compare the directory structure and packages lists....and how the permissions are setup for the redhat package manager itself........also It wouldnt hurt to try a rpm distro out and watch the messages while installing a rpm ( using the verbose option tells alot).

I also wouldnt use the /usr directory at all for your database because of possible privilege escalation issues...........

I dont know what it is exactly that you want to accomplish......but .....its possible........
peace


All times are GMT -5. The time now is 12:53 AM.