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

Re: SRPM



On Thu, 5 Feb 1998, Alexander Indenbaum wrote:

> On Thu, 5 Feb 1998, Peter L. Peres wrote:
> 
> > On Thu, 5 Feb 1998, Alexander Indenbaum wrote:
> > 
> > > Hi!
> > > 
> > > It is probably a FAQ question...
> > > 
> > > Anyway, how do I eat those srpms?
> > > 
> > > What I want to do is to take srpm, unpack it, patch sources and
> > > to compile it.
> > > 
> > > I just do not find oldgood *tar.gz sources.
> > > 
> > > So how do I do it?
> > > 
> > >   Alexander Indenbaum
> > >   baum@actcom.co.il
> > 
> > unrpm
> > 
> > or 
> > 
> > rpm [RTFM for options]
> 
> First I read man rpm
> after that I read rpm2cpio
> next I read man cpio
> 
> And when I finally unpacked this thing I found out that it doees not
> include source, only spec file and pathes. Sources are also not found 
> on RH ftp site ( at least not in place which is easy to find :{) ) and
> site to which refer spec file is down!
> 
> I'm probably too tired and doing everything wrong, but if you want to use
> system sources - RH is probably not the best choise ;{)

Lots of people swear by it. Many more swear by other things, and it
doesn't help much. Some swear really horribly.

On (almost) any RH and Caldera CD there is a directory called SRPM which
contains links to links that point to [s]rpms (source rpms). These are the
sources you are looking for, packed with rpm instead of tgz. There is a
trivial shell script that allows you to list the info in all the rpm files
on a CD, together with the filepath from root. (HINT: use find...-exec,
rpm, and the usual glue). This works for any platform that can run the rpm
program. 

The key is, to unpack the libs in any directory you want to (/usr/src),
except root, for the obvious reason. 

When you unpack rpms on a non-rpm system, pay attention to the
dependencies listed in the info of the rpm. You may have to unrpm more
packages than you think to make things work. Also observe the order in
which the dependencies appear, and do things in that order if building a
compilable source tree. I haven't seen a rpm patch another's source tree
yet but it's possible. Some include libs used by RH are special, and so
are their headers. You need them usually.

FYI I have (many) rpms from Caldera and RH CDs, of which I stock a small
pile (just to look of course, and for development. I run Slackware). They
cannot do anything more than the usual Slackware shell script, run as
root, can do. A correctly written Slackware install.sh can even run rpm if
required. And an install.sh is a shell script, that a Solaris or AIX or
even NT can read and understand without any special tools (and modify to
suit needs, of course).

Replacing a general purpose programming language (shell) with a
purpose-designed application, always solves most problems well, and never
solves the special cases. (This is how hacks are born - I've never seen a
modification of a shell script being called a hack) Since one installs
software only that often, and *that's* when non-standard problems
occur, if at all, the rpm project was a MAJOR overkill imho.
  
This utility-to-make-your-hard-life-easier-against-your-will-cos-we-know-
better-and-there-are-100,000-people-who-didn't-complain-about-it stuff 
reminds me of another firm. Anyway many Linux users use rpm and it works
for them (almost all of Caldera and RH users, that is those who do not go 
the sane way of recompiling almost everything from the sources, such as
Ira for example).

Peter