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

Re: help needed on rpm packaging



Alexius Luke writes:
>Hi All,
>
>    I am new to RPM package building.I have written a spec file for
>packaging my software.The software is a servlets based webserver.In the
>%install tag I place the installation script of my servlet programs.And then
>change some details in the apache and tomcat configuration files since it is
>needed by my servlets.
>    When I build the package with the  rpm -ba mypfg.spec command the
>instructions under the %install tag executes and the rpm file is
>generated.But when I use the generated rpm file to install it using the
>rpm -ivh mypkg.rpm then the %install portion is not executed.
>    Is this how rpm works or am I missing out anything.Please do explain me
>how the %install part works during building(rpm -ba specfile) and
>installing(rpm -ivh genrpmfile).

Alexius,

This may be an over simplification, but basically the %prep, %setup, %build, and
%install portions install the program on your system just like you would if you
were building it from the source files.  You are in fact setting up and
installing the program from source.

%install primarily is the "make install" part of the build.  It takes the files
that you just compiled and puts them where they're supposed to be on the
computer.

%files is the part where you tell rpm where to find *all* the files that have
just been installed. This is what becomes the actual rpm - these files.

I have on occasion left the %prep, %setup, %build, and %install portions out of
the spec file, built the package from source myself, read through the install
log to see what files were installed and where, put this into the rpm spec files
%file section, built the rpm with that spec file, and found myself with a
working rpm.  This isn't according to Hoyle, but...

Hope this help.

Glen






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