views:

223

answers:

4

I'm trying to update our installer so a user can simply double-click on a file and have all the dependencies and our software installed easily. This is a suite of applications that will are deployed on a clean Ubuntu 8.04 installation. I have investigated making a .deb file, but listing the dependencies doesn't work because there is no Internet access available. And, any script that would set up a local apt repository would still need to be run from the command line. Is there a way to put a deb file inside of a deb file?

I know many companies ship shell scripts that you have to chmod +x, then execute. This is not acceptable. It is ridiculous that this isn't possible; especially considering the distribution and architecture is fixed.

A: 

it's possible to put deb-files into deb-files. the only thing you need to do is to configure the appropriate scripts.

a .deb-file consists in:

  • 1x control.tar.gz: contains a file "control" (describes the package) and optional files like "postinst" (script executed right after extraction). there are other files you might include, google should deliver information about the available scripts.

  • 1x data.tar.gz: contains some structure of root-filesystem which contains files/folders that need to be (re-)placed. additionally, you may configure the behaviour in the mentioned scripts.

  • 1x debian-binary: as far as i remember this is simply a version number in a file. don't know exactly what it means, just remember that in most of the cases this is 2.0

So you now may put your .deb files in the data-package. those are extracted by your script... and installed using:

# dpkg -i yourpackage1.deb yourpackage2.deb

hope that clarifies part of it. if you need detail i can research further, i already made some deb-packages for myself (scripts i use often etc)

regards

Atmocreations
The post-install script can't safely recursively invoke dpkg, so this won't work.
bdonlan
does it need to do it recursively? what if he's for example having all the .deb files in the /tmp-folder of the data-archive. the shell-script den dpkg-i's all of those files in one step... what's wrong with that?
Atmocreations
+2  A: 

If you are totally confident that it will be installed on the same system every time, you can find the list of package dependencies yourself, fetch them from the Ubuntu repos, and package them up with your software. You just have to be clear that your software is for a specific version, probably deal with things like keeping up with maintenance releases.

You can also easily install with a script. As for your complaint about making scripts executable, well, I don't know how you're shipping your product, but since you say it's going somewhere without internet access, I assume it's going to be copied from some kind of media. If you make the script executable when you put it on that media, you're done.

If you'd like to do this using packages, you can create a CD which contains a package repository. You can find all kinds of information on this with google. For starters, try this - it's a GUI for doing it. http://aptoncd.sourceforge.net/

Jefromi
The app is distributed as a tar file, I believe. But users still have to extract it themselves and run the script.
Matt Green
Well, you could certainly use that tar file as the data for a .deb package, and use the script to create the rest of the package.
Jefromi
A: 

Klik works as far as I know, but obviously it has to be installed.

http://klik.atekon.de/

Rich Bradshaw
A: 

After all this time, I found a satisfying answer: a makeself self-extracting executable that starts the install script using sudo. The user can either run it from a terminal (after chmod-ing it) or can double-click it and tell it to "Run" from the prompt.

Matt Green