Re: Using rpm as installer

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

 



Hi James

Thanks for your help so far..
I have NOW got my rpm file which is used only as a program installer.. and
works OK but I have got the following problem..

In SPEC file in %files section I have some Configuration files which I have
set them as config files as below:
%files
%config /home/etc/ftp/ftp-config.txt

This is to avoid over-writing the old of  config files which are already
installed by previous rpm instillation.
What I Mean that  when I use rpm to upgrade I don't want  the rpm copy the
config files if ther are ready there.
But putting %config does not work and when I upgrade the program are copied.
What I am doing wrong and how I can I prevent the config files to installed
when upgrading

Cheers

Ali

----- Original Message ----- 
From: "James Olin Oden" <joden@xxxxxxxxxxxxx>
To: "RPM Package Manager" <rpm-list@xxxxxxxxxx>
Sent: Wednesday, March 24, 2004 5:11 PM
Subject: Re: Using rpm as installer


> 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
>


_______________________________________________
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