1834780 Members
2646 Online
110070 Solutions
New Discussion

Re: Editing depot files

 
SOLVED
Go to solution
Robin King_1
Regular Advisor

Editing depot files

I am trying to install a from a few depots that I got from thewrittenword.com. It's a very helpful source of compiled open source software.
The software I'm trying to install will work great. The only thing is it installs it into /opt/TWWfsw/.
I want to change this to /opt/
The option in swinstall to change where the software goes when is installed will work, and I can swinstall it into /opt. However the links within the software fail, for example the /sbin/init.d scripts still point to /opt/TWWfsw etc.
What I'm trying to do now is remove any references to /opt/TWWfsw from the depot file (attached)

Is this possible, or am I flogging a dead horse?

I've tried a few sed command, but have failed miserably.

4 REPLIES 4
Tim Sanko
Trusted Contributor

Re: Editing depot files

I might suggest that a symbolic link might make life easier...

Tim
Helen French
Honored Contributor

Re: Editing depot files

You can modify software depots using swpackage command. These man pages will give you more information:

# man 4 swpackage
# man 1m swpackage
Life is a promise, fulfill it!
James Lynch
Valued Contributor
Solution

Re: Editing depot files

A depot file is nothing more than a tar archive with relative paths. You can extract the archive to a temporary directory and then edit the scripts contained within and remove the refernces. Once you have completed that, use the tar command to recreate the depot file.

To extract the depot:
mkdir /tmp/tempdepot
cd /tmp/tempdepot
tar -xvf
do your editing of the scripts
cd /tmp/tempdepot
tar cvf .

JL
Wild turkey surprise? I love wild turkey surprise!
Robin King_1
Regular Advisor

Re: Editing depot files

Thanks James.

I worked this out last night, and have found the files that need editing. Thanks all for pushing me in the right direction.