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

Re: Converting shell script to RPM



On Mon, 9 Jul 2001, Timur Tabi wrote:

>>>"The buildroot tag is used to define an alternate build root. The name
>>>is a bit misleading, as the build root is actually used when the
>>>software is /installed/ during the build process."
>>>Which build process?  The build process for the rpm-file itself?
>>>
>>
>>Yes, that build process.
>>
>Now, I'm even more confused.  Why would I install software during the
>process when I build the RPM file?  After all, the RPM file is used to
>install the software.  If I install the software while building the RPM,
>then what's left to do?  The software is already installed!

How does RPM know what files that just got compiled go where in
the filesystem?  It can't pull magic out of the air...  That is
what the %install section is for in the spec.  %install is NOT
what happens when you type:

rpm -ivh package.rpm

Rather, %install in the spec occurs directly after %build, and is
a series of shell commands which would install the software by
hand on a system *without* RPM.  This puts the files where they
need to be, and then RPM takes those files in the %files section
and packages them up keeping their existing paths intact.  That's
it in a nutshell anyway.

So %install is installing the software *temporarily* at _build_
time on to the build system's live directories, _just_ for
packaging purposes.  After that they are removed if the build is
successful.  Which is why not using a buildroot is evil.

Using a buildroot can be translated to "RPM, when you are
building a package, and have finished comiling everything, could
you please install the files for this package in directory named
/somewhere/else/* instead of on my live system, so that my system
does not get hosed."

>I get the feeling that RPM just doesn't work like installers for other OS's.

I don't think it has ever been a goal of RPM to clone any other
OS's installer.  That is a good thing too BTW.


----------------------------------------------------------------------
    Mike A. Harris  -  Linux advocate  -  Open Source advocate
       Opinions and viewpoints expressed are solely my own.
----------------------------------------------------------------------
Microsoft (noun).  C+ students programming in c++.  -- Mike DeMaria





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