Re: Using rpm as installer

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

 



On Wed, 24 Mar 2004, AliN wrote:

> Hi James
> 
> Thanks for your reply.. yes rpmbuild is working..:)
> 
> Now trying to create my special SPEC file I have done it as noarch and I
> have removed all, build, prep, install and clean sections and have only
> %file..Now I have following questions.
> 
> 1 - When binary .rpm file id created.. does it contains all the files
> defined in %file section?
> 
Yes.

> 2 - %files lists the files to be packaged
> 
Yes.  Really the answer to 1 is a result of 2.

> 3 - I assume I don't need to have %install to install files as %file section
> does the installation process.
>
No, you need %install to copy the files into your build root.  %files then 
looks for the files listed offset the build root, and packages them up.
At install time the files that were listed by %files will be delivered
to the system.  Really, %install is kind of a misnomer, in that it is a
build time script not an install time script.  Its name probably comes 
from the fact that it is in %install that "make install" is generally run,
and because it "installs" the files to the build root.
 
> 4 - How do I define the directories in which the packaged files have to be
> installed... in the target machine..
>
%files lists files where they will be found on the build machine.
In %install you cp them to that location offset the build root.  So if 
your spec file had the one file /usr/bin/e to deliver, you would have
soemthing like:

...
BuildRoot: /tmp/root
...
%install
mkdir -p $RPM_BUILD_ROOT
cp e $RPM_BUILD_ROOT/usr/bin/e
...
%files
/usr/bin/e


Cheers...james 


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux