A couple basic binary RPM questions

devzero2000 pinto.elia at gmail.com
Fri Jan 9 09:25:20 UTC 2009

On Thu, Jan 8, 2009 at 4:57 PM, Paul Krauss <pkrauss at cmcplace.com> wrote:

>  I'm new to rpm's and spent most of yesterday at work coming up with a
> simple binary rpm file.  My prep section unpacks the tar file. Which
> contains 2 binary executables, a config file, and a shared object.  The
> build section does nothing.  My install section creates a directory in the
> opt/ folder and copies over the 4 files.
> My question is: I've noticed that in almost every example I see on the net
> for binary rpms, people are calling ./configure ./make and ./make install.
> Doesn't that seem overly complicated?  Why not just a couple copy commands?
> All we are trying to do with a binary rpm is place some executable files in
> the person's file system, right?

One of rpm design goal was to use "pristine source" - rpm was born for
packaging Open Source Software in first place.
(ref. http://rpm.org/max-rpm/s1-intro-to-rpm-rpm-design-goals.html

Sure. It is possible to do "binary rpm" - for example some commercial vendor
do it. But if you can it is better to follow  the rpm original philosophy,
imho. For example, doing "binary rpm"  you cannot - for example - reproduce
the RPM - "rebuild" - with safety - almost - between changes of OS/shared
libs  release - naturally it would be necessary to have used in first place
the  GNU buildtool in the right way.

Returning to the main observation,   it is possible to observe that the
several sections of spec - %setup, %build, %install ) have a correspondence
nearly identical to  the unpacking/compilation/installation step of program
that use the GNU buildtool - with the difference that the " make install"
does not install in build system but into the RPM build root (FWIW, it is
possibile to build the  rpm  in a chroot env also) . A little ascii art
could be useful

On the "target" system  |  In the rpm SPEC
                                   |  on the "build system"
tar -xvf tarbal                 |        %prep
cd program-version        |        %setup -q
./configure                    |    %build
make                           |    %configure
                                   |    make %{?_smp_mflags}
                                   | # Install on the RPM_BUILD_ROOT as "not
root user"
make install                  | %install
                                   | rm -rf $RPM_BUILD_ROOT
                                   | make install DESTDIR=$RPM_BUILD_ROOT


> Rpm-list mailing list
> Rpm-list at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rpm.org/pipermail/rpm-list/attachments/20090109/f1c636d0/attachment.htm 

More information about the Rpm-list mailing list