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

Re: [Fwd: Building an RPM from a compiled application]

Ah, I believe that I have figured out both issues.

1) Prefix in the %post script.  I set the Prefix: value in my spec file
to /home/dazel (typically where we install), and made sure that all of
the files in the %files list started with /home/dazel/<rest of the
path>.  Changing the prefix with 'rpm -vv --install --prefix /tmp/dazel'
works fine.

In the %post script, I reference the install directory as
$RPM_INSTALL_PREFIX.  So, to run the perl script I need to run, I do:

cd $RPM_INSTALL_PREFIX/repository/etc
perl ./setperm

and everything works fine.

Now, is that right? (the use of RPM_INSTALL_PREFIX?)  Or is there
another way to do it.  I found RPM_INSTALL_PREFIX by running 'strings'
on rpm and greping for prefix.  Not exactly ideal documentation :-)

2) Files not being removed during erase.  Um, actually, the files are
being removed.  The directories are not, however, but I imagine that
this is intentional.  It just happens that in my case, I expect to *not*
install into /usr/bin (or whatever), so it would be OK to remove the

Thanks for everyone's help,
- Bill

Gregory Leblanc wrote:
> > -----Original Message-----
> > From: Bill Woodward [mailto:wpwood@dazel.com]
> >
> > OK, I was able to get this to work.  I set up the %prep and %build
> > sections to do nothing, and then in the %install section, I
> > untarred the
> > tar file and listed all of the files it in the %files section.  Works
> > great!
> Cool!
> > Two questions:
> > 1) I want to create a post-installation script, but the package may be
> > relocated.  Relocation's OK, but I need to run a couple of
> > perl scripts
> > that are installed and I can't figure out how to do it from
> > the correct
> > directory.
> Are you using a prefix in you spec file?  I think a line like
> Prefix: /usr
> will do the trick.  Unless of course I'm misunderstanding the question.
> > 2) I'm having trouble uninstalling (rpm -vv --erase <rpmname>).  It
> > looks like things are being done, but the files are not removed.
> I can't help you on that one.  Can you send the output from 'rpm -vve
> <rpmname>'?
>         Greg
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/rpm-list

<>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <><
Bill Woodward (Bill_CCHKK@yahoo.com or wpwood@dazel.com)

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