[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RFC: Installer program for non-free packages

Dear all,

Prompted by the desire to package various non-free Monte Carlo generators
for Debian, I've just written a small script I call "apt-installer" that
can act as an installation program for non-free binaries or source code
that Debian can't legally distribute.  (Some examples could be realplayer
or msttcorefonts.)  It is somewhat of a cross between apt-src and the Fink
program of Mac OS X.  You can obtain the apt-installer package here:

	deb http://borex.princeton.edu/~kmccarty/ unstable main
	deb-src http://borex.princeton.edu/~kmccarty/ unstable main

The idea is that Debian developers who want to create a binary package, 
let's say for example realplayer, write a realplayer-installer-data 
package containing the debian/ directory for the realplayer package; the 
realplayer-installer-data package puts the realplayer's debian/ directory 
into /usr/share/apt-installer/realplayer.  The debian/rules file of 
realplayer must contain a get-orig-source target.  Then, to obtain the 
realplayer package, an end user can run these commands:

	apt-get install apt-installer realplayer-installer-data
	apt-installer build realplayer --location ~/src
	sudo dpkg -i ~/src/realplayer_<version>_i386.deb

At the second step, apt-installer runs the command 
	/usr/share/apt-installer/realplayer/debian/rules get-orig-source 
in order to download the realplayer binaries from www.real.com (or
wherever) into ~/src/realplayer-<version>; copies the realplayer package's
debian/ directory into that directory; registers the resulting tree with
apt-src; and creates a .deb.  

For more details, see apt-installer(1) or look in
/usr/share/doc/apt-installer/examples after installing apt-installer.

* Advantages of using apt-installer:
  - No legal risk for Debian of distributing non-free sources or binaries;
    all downloads and compilation are done on the end-user's machine.
  - Similar to apt-src, so it is somewhat flexible and familiar.
  - Uses apt-src as a backend, so that apt-src knows about any source 
    trees created by apt-installer.
  - Files installed by using the .debs created by apt-installer are
    known to dpkg / APT (unlike, say, the Arial.ttf, etc. installed by
    the msttcorefonts installer program).
  - Provides a consistent interface with which to install non-free 

* Disadvantages:
  - Unlike current installer packages, cannot install the resulting 
    binaries from within the postinst script, because dpkg is non-
    re-entrant.  However, one could use Debconf to ask the user where
    to put the created .debs.
  - Written in shell.  (I know, I'll learn perl one of these days...)
  - Rewriting installation packages to use apt-installer is probably a
    pain in the neck.
  - Leaves created packages in the ugly "Obsolete and Locally Created
    Packages" section.
  - No real-life examples of how to use apt-installer exist yet.

Please let me know any thoughts, suggestions, or constructive criticism.
(Did I miss a program that already does the exact same thing?)  Apologies, 
but I will be unable to check email until Monday.


Kevin McCarty                Physics Department
kmccarty@princeton.edu       Princeton University
www.princeton.edu/~kmccarty  Princeton, NJ 08544

Reply to: