Re: building rpms on debian system?
[This is probably the wrong list for this.]
Ek Zindagoi wrote:
I would like to build rpms on a debian system for use on a redhat
system. Can I do that on a debian system ?
In short, no; system libraries on a RedHat system likely have different
versions (and soversions), as well as a few different filesystem paths.
Libraries *will* have different names, except in a few very rare
cases. (Worse, all Debian libraries have package names "lib<libname>";
very few RH libs do unless the upstream name is libsomething.)
Even if I wanted to install the RPM on a debain system, can I run the
rpmbuild -bb command on a debian system and successfully build an RPM
This is a little different. The short answer is "sort of". However, it
won't build easily or well, and it will not install cleanly as an rpm.
There are a couple of solutions:
1) Build in whatever is the "native" package format, then use alien to
convert package formats. This is in no way guaranteed to work well, if
at all (athough it should be pretty good in most cases). This means you
still need a real RedHat system to build .rpm packages, however. (Or at
least, a suitable chroot - my experiences there have been, shall we say,
less than positive.) Or a premade package instead of creating your own.
2) Use my nifty package-building tool debbuild (no direct relation to
anything other than rpm, and that only in the interface and visible
behaviour, as far as I can tell), available at
http://www.deepnet.cx/debbuild/. It's basically an emulation of the
build process and interface used by rpmbuild (the actual rpm component
used to create .rpm packages), except that it builds packages that will
install in some manner resembling "correct" on Debian systems. Please
note, however: this will **NOT** create "Debian Packages"!!
It has some limitations; most notably the various dependency entries in
the spec file will NOT be translated to the suitable Debian equivalents
(I have no idea how that might even be done maintainably).
You WILL almost certainly have to tweak the .spec file for the package
you want to rebuild in order for it to build correctly on Debian.
Certain complex macros will effectively be ignored. Some things in the
%files section will be ignored - largely because there doesn't seem to
be any backend support for such operations in Debian. (IE, specifying
alternate ownership for arbitrary files in the package.)
That said, I think it's a useful tool (otherwise I wouldn't have written
it). I find the RPM build system much easier to work with than the
documented methods for creating Debian Packages in the Debian New
Maintainer's docs, Debian Policy, and pretty much anywhere else I
looked. (The worst problem I ran into is that I could never figure out
if my current build was picking up artifacts from a previous build -
evidence from the .diff.gz in several cases seemed to indicate that I
was. The RPM build process eliminates that by unpacking the tarball
fresh on each build.)
-kgd
--
Get your mouse off of there! You don't know where that email has been!
Reply to: