Package management

Paul Lussier p.lussier at comcast.net
Tue May 15 11:34:21 EDT 2007


Neil Joseph Schelly <neil at jenandneil.com> writes:

> On Tuesday 15 May 2007 10:04, Charlie Farinella wrote:
>> How does everyone else do this?
>
> In the Debian world, at least, I generally follow this order of precedence.
>
> 4.  Finally, failing all that, I'll compile something from source
> and keep it as confined to /usr/local as possible.  You could go one
> step farther if you're going to deploy this to multiple servers and
> create an RPM package from your custom compiled installation, but
> that's up to you I guess.

Bah!

 $ apt-get source foo=<desired package number>
 $ cd foo-<version number>
 $ dpkg-buildpackage -rfakeroot
 $ cd .. && dpkg -i foo-<version number>

This will compile the source for whatever version of the debian
package foo you need against your installed library base, create a
package for it, then install it.

You can go one step further and create a central local repository for
packages you maintain yourself so all packages are a) in one location,
b) easily installable from all local machines.

The repository could be a simple centrally mounted NFS directory.
Run:
 
  $ dpkg-scanpackages <dir name> /dev/null > <dir name>/Packages;\
    gzip -c <dir name>/Packages > <dir name>/Packages.gz

And now you've got yourself a "simple" debian repository.
Add the following to your /etc/apt/sources.list:

  deb file:/path/to/nfs/parent-dir <dir name>/

do an apt-get update, and as they say in France, "there you go!"

Caveat: This process may or may not work the first time, may or may
        not have pieces missing, and may or may not need some
        tweaking. However, it is, AFAICT, the exact process I use here
        at work on occasion.  We also use "normal" repositories as
        well, and have build up quite a complex list of "helper"
        scripts/programs to assist the, ahem, less than adequate
        debian utilities :)

But in theory, this process should work if you only need to manage a
small collection of packages.

-- 
Seeya,
Paul

              ASCII stupid question, get a stupid ANSI!


More information about the gnhlug-discuss mailing list