[LinuxPPS] ldattach + Debian Lenny

Bernhard Schiffner bernhard at schiffner-limbach.de
Sat Jun 6 13:17:33 CEST 2009


On Friday 05 June 2009 16:26:55 Joshua Anhalt wrote:
...
> Unfortunately, I don't know of a safe way to use the unstable package
> on a stable machine. (Personally, I would not want to mix packages,
> especially for something as fundamental as util-linux.  I would
> recommend compiling ldattach from source.)
...

I encounter the same situation. I have stable machines and others more leading 
edge.
What I'am doing to make something "newer" available to all local users I'll 
decribe here.

Preface: I only have acess to internet by modem.
For nearly everything more then ca. 10MB I must go to other sites (public 
library, friends with DSL etc. This is Germany in the 21. century: fiber in 
the cellar, modem in the appartment!)

What I'am doing:
1.) I have a local Debian mirror for x86/stable
2.) I have my own local repository for packets more advanced (but without to 
much dependencies)
3.) In case of emergencies I try to build a package from sources.
4.) Last ressort: compile from sources and flood /usr/local.

Now in detail:

ad 1.)
It's all about something like :

# Debian (allg.)
#
P2=""
P2=$P2"--method=http --arch=i386 "
P2=$P2"--dist=lenny --section=main,contrib,non-free "
P2=$P2"--host=ftp2.de.debian.org --root=debian "
P2=$P2"--pdiff=none --progress --passive --nosource "
P2=$P2"--postcleanup --ignore-release-gpg "
P2=$P2"--ignore-missing-release "
P2=$P2"/home/debian/debian "

debmirror -v $P2

etc.

ad 2.)
Create the structure of a debian server and fill it with the packages you want 
(unstable or self-compiled from sources):

bs4:~# tree /home/debian/debian-bs-imports/
/home/debian/debian-bs-imports/
|-- dists
|   `-- local
|       `-- main
|           `-- binary-i386
|               |-- Packages
|               |-- Packages.bz2
|               |-- Packages.gz
|               |-- ardour-i686_2.7.1-2_i386.deb
... ... ... 
`-- project
    `-- trace
        `-- bs4

After adding the *.deb file there, integrate these packages into your mirror 
with

cd /home/debian/debian-bs-imports
#
dpkg-scanpackages -ai386 dists/local/main/binary-i386 > 
dists/local/main/binary-i386/Packages
#
cat dists/local/main/binary-i386/Packages | gzip -9c > 
dists/local/main/binary-i386/Packages.gz
#
cat dists/local/main/binary-i386/Packages | bzip2 -z9 > 
dists/local/main/binary-i386/Packages.bz2

Finally add something like

deb http://lo/debian-bs-imports local main

to your /etc/apt/sources.list to make this repository known to the installer.

This method has the advantage that you have precise control over what you are 
using. You can roll back and forth as you like.
If your "advanced" packages become common later on, they are automatically 
superseded by normal debian packages.


ad 3.)
Download the sources run something like

export DEB_BUILD_OPTIONS=nostrip
(if you want to do some debugging later on)

dpkg-buildpackage -r fakeroot -us -b

and put the resulting *.deb into your local repository as explained in ad 2.)

This method has the advantage of using packages (libraries!) already 
available. Keep in mind that this can create something "hairy" in detail.


ad 4.)
If you use something not "debianized" do what's sayed in the respective 
INSTALL or README files. Keep care to set the install-prefix to /usr/local.
You can do an "make install" as normal user first to check this.

Maybe there are tools to monitor installs like this. I sort 
something "unwanted" out by file creation time ...

I hope these informations help you (and perhaps others too).


Bernhard



More information about the LinuxPPS mailing list