AutoDeb - Ubuntu Wiki
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 something like 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 generated .deb.
It uses 'strace' to find development dependencies during 'configure', and CheckInstall to create a .deb binary package.
Contrary to 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.
This avoids installing a lot of useless "false" dependencies (auto-apt always tries to install G77 on my system, just to mention one).
PLEASE BE AWARE THAT AUTODEB IS VERY EXPERIMENTAL SOFTWARE THAT USES SUPERUSER PRIVILEGES, AND AS SUCH MIGHT DAMAGE YOUR SYSTEM
AutoDeb can be downloaded at http://ubuntu.pastebin.com/f77db4c65
Make the script executable first:
chmod +x autodeb.sh
Then to run in console mode, type
To run in GNOME, type
gksudo ./autodeb.sh --gnome
To run in KDE, type
kdesu ./autodeb.sh --kde
You can also give the filename of a tarball, or a directory, as the last argument in the command line.
Given a directory or a tarball containing source code and an autoconf 'configure' script, autodeb will
1) Run the 'configure' script under strace, 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 goes back to 1)
3) When 'configure' eventually succeeds, autodeb compiles the sources using 'make'
4) At this point, AutoDeb does a 'make install' under a LD_PRELOAD environment (checkinstall), which instead of letting files be installed to the root filesystem structure, it creates a .deb package out 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
XTraceroute - The 'traceroute' package must be installed manually, because /usr/bin/traceroute is a symlink created by its postinst, and thus cannot be found by auto-apt.
SofSip-CLI - Works, with pkg-config detection.
Please add your reports here, specifying the URL to the tarball and the problems you encounter (or stating you encountered none). If you experience problems building the software listed above, please describe them in the corresponding entry. Also, sending a copy of autodeb.log to firstname.lastname@example.org might help me pinpoint bugs.
- The "Cancel" button doesn't work in KDE, and might break things with GNOME, since it just interrupts whatever the script is doing at once
- No prompt in the Zenity multiline textbox, it simply doesn't support it
- The GNOME progress bar tends to move around in the window
- The notification icon in GNOME is wrong
FIXED No log files are created
FIXED The script uses sh when it really needs Bash ( on Edgy, sh != bash ) I assume this can be fixed by changing all references to sh to bash but I have not looked at the script long enough to be sure ~Jordan_U
FIXED 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)
Only dependencies that are not already installed are added as dependencies for the .deb file. This can be a problem when sharing the file with others who do not have the same packages already installed. -- This is definitely not intended behavior for runtime dependencies (it works like this for build dependencies, but those aren't listed at all, since only binary packages are created). Could you send me (email@example.com) the autodeb.log of a build exhibiting the bug, the output of "dpkg -I package.deb" and, if you don't mind, the output of "dpkg -l"?
Add your problems here (or contact me directly at firstname.lastname@example.org if you can't edit this page; attaching autodeb.log is appreciated)...
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.
5 August 2007 Some trivial but vital logfile related bugfixes
4 August 2007 Ad-hoc support for pkg-config (which for some reason isn't caught by strace). Package name and version are now correctly guessed even when '.' is given as directory.
3 August 2007 Check for apt-get errors. A log file of the build is generated in the current directory. The generated Debian package is copied to the current directory.
2 August 2007 Rewritten from scratch. Now uses strace instead of auto-apt, faster and with hopefully better heuristics. Runs as root, although it steps back to a normal user for sensitive operations. Two GUIs are available thanks to Zenity and KDialog.
27 July 2007 Moved back from aptitude to apt-get, since it now supports dependency tracking. Preliminary implementation of strace-based backend, which should be faster than auto-apt, allow for more heuristics and avoid having to hack the auto-apt scripts; auto-apt is still used for searching for packages. The variable USE_STRACE can be unset to revert to the old method.
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.