how to create a self extracting tarball?

bob 295 icanprogram-sKcZck+fQKg at public.gmane.org
Thu Nov 20 20:28:42 UTC 2008


On November 20, 2008 01:08 pm, Lennart Sorensen wrote:
> On Thu, Nov 20, 2008 at 12:58:08PM -0500, bob 295 wrote:
> > I'm trying to streamline the installation of a tarball for an open source
> > project I maintain.    Currently the users manually undo the tarball and
> > then manually execute a build script from within that tarball.  eg.
> >
> > tar -zxvf simpl.3.2.1.tar.gz
> > simpl/scripts/buildsimpl
> >
> > I'd like to simplify things to the point that the user downloads a file
> > called "simpl.3.2.1" and then installs it by typing that file name.  ie.
> > simpl.3.2.1
> >
> > Any ideas how I could go about this?
> >
> > Certainly I could build in some self extraction and autolocation logic
> > into a higher level script which I bundle into my tarball and call it
> > "installer". The process simplifies a little to:
> >
> > tar -zxvf simpl.3.2.1.tar.gz installer
> > ./installer
> >
> > but that doesn't meet my goal of a self extracting file.
> >
> > Thanks in advance for any suggestions.
>
> The traditional method involves doing a shar archive (shell archive),
> which is a shell script containing a uuencoded or similar tar file,
> which will then extract it's own contents and do the appropriate work
> on it.
>
> Personally, I _HATE_ when people do that.
>
> System administrators install stuff.  They know how to do that.
>
> Users use things, they do NOT install things, and they most certainly
> never ever ever execute 3rd party code.  Well unless they are windows
> users that is, and well we know how well that works security and
> stability wise.

Was able to find this short procedure on the Net.

http://stuartwells.net/slides/selfextract.htm

It works,  although I don't confess to fully understand the awk line.

I do tend to agree with your comments about self extracting archives.   In the 
case of my project the "tire kickers" are often experienced developers and 
not necessarily system administrators.     I wanted to minimize the "loss of 
interest" factor if the installation was multi stepped and susceptable to 
miscues.

Thanks.

bob

--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list