Re: Good resource for installing binaries via RPM?

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

 



I've pulled what's left of my hair out regarding a similar situation. Some 
of this commercial software is an absolute BEAR getting to install... 
Especially when it touches stuff in /etc and what not..  A real RPM should 
be able to build as a non-root user, and it's almost impossible to get it 
to work that way when it does things like you mention..  I did write a 
little script (use at your own risk) that will do replaces for path name's 
and stuff... it works pretty nice..

If you want to use it, get it a source definition in your spec file : 

Source1: replace.py

Then setup a macro to call it:

%define replace $RPM_SOURCE_DIR/replace.py

Then whenever you want to change stuff in a text file you can do:

%replace hello goodbye %{buildroot}/path/to/file

It's a lot cleaner for me than using sed (you don't have to escape out 
weird characters).  It's attached to the email. 



James


James S. Martin, RHCE
Contractor
Administrative Office of the United States Courts
Washington, DC
(202) 502-2394




"Cameron, Thomas" <Thomas.Cameron@xxxxxxxxxxxxxxxxx>
Sent by: rpm-list-bounces@xxxxxxxxxx
04/29/2004 04:56 PM
Please respond to RPM Package Manager
 
        To:     rpm-list@xxxxxxxxxx
        cc: 
        Subject:        Good resource for installing binaries via RPM?


Hi all -

We use an application which is installed via an installer script and a 
tarball - it's not a source tarball.  The installation process is kind of 
weird - you have to create a certain directory structure and unpack the 
tarball into it.  Then you run two scripts which install the software.

The scripts just create a config file, sets some permissions and adds a 
line to /etc/services.  The config file is identical across every machine 
it is installed on except for a few small changes like hostname.

I know what files and directories the installer script creates, and what 
the permissions are.

So what I am thinking is I want to create an RPM to copy the files to the 
system and then in %post change the config file from a generic version to 
one with those small changes in it using sed.

Has anyone done this?  Is there a "best practice" on doing it?  Or better 
yet, and example on the Web of the spec file?

Thanks!
--
Thomas Cameron, RHCE, CNE, MCSE, MCT
Assistant Vice President
Linux Design and Engineering
Bank of America
(972) 997-9641

The opinions expressed in this message are mine alone and do not 
necessarily reflect the opinions of my employer, Bank of America. 


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

Attachment: replace.py
Description: Binary data

_______________________________________________
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