Re: building rpms on debian system?

2006-04-25 Thread Kris Deugau

The Fungi wrote:

I'm not sure I've seen what seems to me to be the obvious solution
come through in a reply yet, but why not just create a custom chroot
for your target distribution (be it RHEL 4 or SUSE 9 or whatever)
and build in there?


Apparently this works pretty well for most people.  If so, great.  I'm
aware that any autobuilt package in Debian is handled with a chroot of
some kind, so obviously I've either been doing something wrong, or I'm
tripping over edge cases that don't get along with virtual Linux
installs of any kind.


Do it a la pbuilder and just keep a tarfile of
the clean system archived so you can have several without taking up
much space, and upgrade them periodically as needed. Your only
limitation is that you're stuck in the chroot using whatever kernel
you've booted for Debian, but if that becomes an issue, UML to the
rescue (in some ways easier to manage than chroots, in my opinion).


For reasonably current OSes, this is probably a useful option.  But my
own experience has been that while it may work OK for semi-recent OS
releases, it's of limited value for older OS releases.

I've never used this for building packages, but I tried for some time to
build an updated version of a Quake2 mod.  Unfortunately, a critical
library used by this mod is only available as a statically-linkable
binary - the library's author(s) did not release their source for
whatever reason.

In order to get the mod to build in such a way that it actually runs
without segfaulting, it must be compiled with a GCC version that matches
the version used to build the library (~2.7something).  At the very
*least*.  (g)libc version, kernel version, possibly the CPU, and who
knows what else may also be factors;  the code will compile and link
apparently without error pretty much anywhere I've tried.  But it will
either fail to load in Quake2 at all, or it will segfault on attempting
to exercise any of its capabilities.  (Once compiled correctly, it seems
to *run* just fine pretty much anywhere.  Nrgh.)

However, **EVERY** attempt I've made to do this in a logically separate
OS running under the current real OS (chroot, UML, and most recently a
VMWare virtual machine) has failed to produce a working binary.  The
ONLY place I've been able to successfully build this mod was in a
distribution that shipped with a suitable GCC, installed on a real P133.
 (RedHat 5.2 or Debian slink [2.1] contain a suitable gcc.)

Other things I've tried in chroots, UML images, and VMWare virtual
machines have shown a minor assortment of other oddities as well.
(Quite aside from the minor headaches of actually getting RedHat and its
descendants and variants installed in a chroot or UML image;  this is
one place Debian has a big advantage.)

-kgd
--
Get your mouse off of there!  You don't know where that email has been!



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: building rpms on debian system?

2006-04-21 Thread Kris Deugau

[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 liblibname; 
 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!


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: building rpms on debian system?

2006-04-21 Thread The Fungi
On Thu, Apr 20, 2006 at 03:32:14PM -0400, Kris Deugau wrote:
 [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 liblibname; 
  very few RH libs do unless the upstream name is libsomething.)
[...]

I'm not sure I've seen what seems to me to be the obvious solution
come through in a reply yet, but why not just create a custom chroot
for your target distribution (be it RHEL 4 or SUSE 9 or whatever)
and build in there? Do it a la pbuilder and just keep a tarfile of
the clean system archived so you can have several without taking up
much space, and upgrade them periodically as needed. Your only
limitation is that you're stuck in the chroot using whatever kernel
you've booted for Debian, but if that becomes an issue, UML to the
rescue (in some ways easier to manage than chroots, in my opinion).
-- 
{ IRL(Jeremy_Stanley); PGP(9E8DFF2E4F5995F8FEADDC5829ABF7441FB84657);
SMTP([EMAIL PROTECTED]); IRC([EMAIL PROTECTED]); ICQ(114362511);
AIM(dreadazathoth); YAHOO(crawlingchaoslabs); FINGER([EMAIL PROTECTED]);
MUD([EMAIL PROTECTED]:6669); WWW(http://fungi.yuggoth.org/); }


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: building rpms on debian system?

2006-04-20 Thread Adam Borowski

On Wed, 19 Apr 2006, 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 ?


As a short-term solution, you can cheat by making a Debian package and 
using alien --to-rpm.  However, if anyone tries to put your RPMs into one 
of their repositories, they can run into problems:


http://sourceforge.net/forum/forum.php?thread_id=1313775forum_id=209131



Oooh... and, seizing an opportunity to push that particular package...
An old ITP, fresh release.  mentors.debian.net, kbtin, clean packaging, 
no dependencies other than libc.  I guess that the lack of source RPMs is 
not a problem here, too :p


Happy hacking,
Adam

--
/---\ Shh, be vewy, vewy quiet,
| [EMAIL PROTECTED] | I'm hunting wuntime ewwows!
\---/
Segmentation fault (core dumped)


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: building rpms on debian system?

2006-04-19 Thread Ted Percival
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 ?
 
  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

You can certainly build them - I have done so in the past. I'm not sure
how well the shared-library dependencies are handled though, you might
find that your desired RPM-based distribution ships with shared
libraries of different versions that you'd prefer to depend on. That
shouldn't be a problem if you expect all your users to have up-to-date
systems, though. It might also not be a problem at all - I have only
done a very small amount of RPM packaging on my Debian system.

You should definitely not install the resulting binary RPM on Debian, of
course (at the very least convert it to .deb with alien). The rpm and
rpmbuild binaries are part of the 'rpm' package.

-Ted



signature.asc
Description: OpenPGP digital signature