AutoDeb

Differences between revisions 19 and 20
Revision 19 as of 2005-12-02 14:37:01
Size: 4309
Editor: 62-101-126-215
Comment:
Revision 20 as of 2005-12-02 14:48:21
Size: 4343
Editor: 62-101-126-215
Comment: Make it a Wiki-linkable name
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from Autodeb

AutoDeb is an EXPERIMENTAL script to completely automate compiling and installing software.

The basic concept is that the user downloads any .tar.gz or .tar.bz2 archive created using autoconf (i.e. most programs), and types

  • autodeb archive.tar.gz

The program will be configured, compiled and installed, and a binary .deb package will be created and installed on the system.

Autodeb tries to automatically find and install dependencies (both those needed for compiling, and those needed at runtime), and it lists runtime dependencies as such in the created .deb.

It uses (a modified version of) AutoApt to find development dependencies during 'configure', and CheckInstall to create a .deb binary package.

Contrary to standard AutoApt, autodeb does not just install every file that 'configure' happens to peek at. Instead, it lets 'configure' run and fail, at which point it installs only the last package that 'configure' required, and repeats the process.

Slower (but not really, as a trick is used to reduce the size of the AutoApt database), but avoids installing a lot of useless "false" dependencies (auto-apt always tries to install G77 on my system, just to mention one).

Autodeb can be downloaded at http://ljl.150m.com/autodeb , but PLEASE BE AWARE THAT IT IS VERY EXPERIMENTAL SOFTWARE THAT USES SUPERUSER PRIVILEDGES, AND AS SUCH MIGHT DAMAGE YOUR SYSTEM.

Don't forget to "chmod +x ./autodeb.sh" to make the script executable!

The program I've tested (sort of) autodeb with is XTraceroute, which can be downloaded from http://www.dtek.chalmers.se/~d3august/xt/dl/xtraceroute-0.9.1.tar.gz

Concept

Given a directory containing sourcecode and an autoconf "configure" script, autodeb will

1) Run the 'configure' script under an LD_PRELOAD environment (AutoApt), which tracks all of configure's attempts to access files

2) When 'configure' fails, autodeb looks at the last file that 'configure' tried to access; it asks auto-apt to find the package that files belongs to, installs it, and go back to 1)

3) When 'configure' eventually succeeds, autodeb compiles the sources using 'make'

4) At this point, AutoDeb does a 'make install' under another LD_PRELOAD environment (checkinstall), which tracks all files that are installed to the root filesystem structure, and creates a .deb package of them

5) Now autodeb looks at every executable file contained in the .deb package, and calls 'ldd' on them to determine the shared libraries that they require to run

6) auto-apt is then asked to find which packages those libraries belong to, and autodeb lists these packages as dependencies for the CheckInstall-generated .deb package

Use cases

John doesn't have any experience compiling software from sources, but still he wants to install a program that isn't in any repository. He can run "autodeb tarball" and, with a bit of luck, he'll have the program packaged and installed without doing anything else.

Mary has been using GNU/Linux for a long time, and she's used to the intricacies of autoconf and compiling. However, she's a little busy at the moment and she doesn't have time to manually look for a program's dependencies to compile it. With the help of AutoDeb, she can do something else while AutoDeb builds her program for her.

Known problems and bugs

  • The generated .deb package does not have any dependencies listed.
  • FIXED 'configure' is very slow due to AutoApt crazily looking for packages (while only one search would be really needed)

  • Add your problems here (or contact me directly at ljlbox@tiscali.it if you can't edit this page)...

Changelog

  • 26 November 2005 Finally implemented runtime dependency installing and listing in the Depends: line of created packages.

  • 25 November 2005 Now creating a "custom" auto-apt database that only lists "-dev" packages, making "configure" much faster; implemented gzip and bzip2 archive extraction; fixed name and version extraction from archive name; various miscellaneous fixes.

  • 16 November 2005 Now using aptitude for everything, which should make the script safer, as the black magic I was using previously to find out what packages to remove at program end is no longer needed.

AutoDeb (last edited 2010-01-26 10:09:52 by 93-32-50-153)