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

Re: RPM under Debian?



Jernej Zajc wrote:
> Mitch Blevins wrote:
> [snip]
> > Debian provides different levels of rpm support.
> > 
> > 1) The rpm program is available as a Debian package, and it can
> >    install/uninstall rpms.  This method of use is not advised,
> >    however.  RPM keeps a database of which packages are installed
> >    and uses this database to determine if the required dependencies
> >    for a given package are available.  Since the RPM database
> >    cannot read the database of the native Debian package manager (dpkg)
> >    it will not work as desired.  You can cause serious problems for
> >    your system by trying to use two different package managers
> >    actively.
> > 
> > 2) You can use the 'alien' program, supplied as a debian package,
> >    to convert rpms to debs.  Then you can use dpkg to install the
> >    package, and still have the advantage of a single database of
> >    installed packages.
> > 
> >    This works well for non-system-critical packages and packages
> >    without alot of complex dependencies... but you are just asking
> >    for trouble if you install (for instance) gnome as a converted
> >    alien package.
> > 
> > Of course the best alternative is to install a native deb if
> > available.
> > 
> > -Mitch
> 
> Call me a silly fool, but I cannot but wonder would it be possible
> to make a pkg mgmt program (drpm :-)) that would install RPM
> packages from their native format and put the installed files' and
> dependencies info in the deb database?
> 
> Any dpkg developers willing to comment the idea?

#!/bin/bash
# drpm - program to install RPM and DEB packages from their
# native format and put the installed files and dependencies
# info in the deb database
# (also does Stampede packages)
#
# usage: drpm <packagefile> [<packagefile>] ..

for filename in "$@"; do
  case ${filename} in
    *.rpm|*.slp ) alien --install ${filename} ;;
    *.deb ) dpkg --install ${filename} ;;
    * ) echo "Huh?" ;;
  esac
done

# end drpm


The above script does what you want (in a limited way).
The issue is not compatibility of the formats, but rather compatibility
of the contained programs and their file locations.

Example:
foo.deb - keeps config file in /etc/foo.conf
foo.rpm - keeps config file in /usr/some/other/location/foo.conf

bar.deb - depends on foo.deb
          Has a post-install script that parses the information in foo.conf
	  and fails miserably to find the file from the converted RPM.

Requiring the maintainer of a Debian package to be compatible with not only
the relevant deb files, but also with any possible rpm (Official or not) that
may be floating out on the web would be intractable.

Debian is able to do some amazing things because the packages can depend
on other packages conforming to Debian policy and conventions.
Have you played with apache and its modules on Debian?  Great stuff!
You can drop the mod-perl deb on top of the apache deb and it reconfigures
itself almost as if by magic.

Developers are now working on configuration tools and the ability to
administer multiple machines centrally.  This would not be possible if
it had to support foreign packaging systems and their non-Debian-aware
install scripts.  We should not hold back progress of our distribution
to accomodate less-advanced formats.... especially when Debian has the
most packages availble compared to any other distro.

-Mitch


Reply to: