Tested with WOODY, SARGE, ETCH, LENNY
- Install/configure a ftp server that provides e.g. /var/ftp/pub/debian/deb-cds
- Install apt-ftparchive
- Create somewhere a file called apt-ftparchive.conf and put the following lines in it:
(example works for etch, i386 amd64 and powerpc)
Dir
{
ArchiveDir "/var/ftp/pub/debian/deb-cds/";
CacheDir "tmp/";
};
Default
{
Packages::Compress ". gzip";
DeLinkLimit 0;
FileMode 0644;
}
TreeDefault
{
Packages "$(DIST)/$(SECTION)/binary-$(ARCH)/Packages";
Directory "pool/$(SECTION)";
Contents "$(DIST)/Contents-$(ARCH)"
};
tree "dists/lenny"
{
Sections "main contrib non-free";
Architectures "i386 amd64 powerpc";
}
- Create directories (in this case lenny (stable) and i386, amd64 and powerpc):
cd /var/ftp/pub/debian/deb-cds
mkdir tmp
#i386
mkdir -p dists/lenny/main/binary-i386
mkdir -p dists/lenny/contrib/binary-i386
mkdir -p dists/lenny/non-free/binary-i386
#amd64
mkdir -p dists/lenny/main/binary-amd64
mkdir -p dists/lenny/contrib/binary-amd64
mkdir -p dists/lenny/non-free/binary-amd64
#powerpc
mkdir -p dists/lenny/main/binary-powerpc
mkdir -p dists/lenny/contrib/binary-powerpc
mkdir -p dists/lenny/non-free/binary-powerpc
#
cd dists
ln -s lenny stable
cd ..
- For each cd do: cp -r /cdrom/pool /var/ftp/pub/debian/deb-cds/
- cd /var/ftp/pub/debian/deb-cds/
apt-ftparchive generate apt-ftparchive.conf
- chown -R ftp.proxy /var/ftp/pub/debian/deb-cds
- find /var/ftp/pub/debian/deb-cds -name TRANS.TBL -exec rm -v '{}' ';'
- client /etc/apt/sources.list:
deb ftp://your_server/pub/debian/deb-cds/ stable main contrib non-free
I only use this ftp server for already installed systems, if you use it for fresh installations you'll may face some problems. Just mail me if this is the case.
-
The Woody installation insists on Release file, the Etch even requires a signed Release file.
cd /var/ftp/pub/debian/deb-cds/dists/lenny/
echo "Origin: Debian
Label: Debian
Suite: stable
Version: 5.0
Codename: lenny
Architectures: amd64 i386 powerpc
Components: main contrib
Description: Debian 4.0r0 Released copied from DVD and CD to ftp" > Release
apt-ftparchive release . >> Release
See also Debian Syntax Release File.
In order to be able to sign the Release file you need a gpg key (I'll assume 12345678 is your key id, see gpg --list-keys for the real value):
gpg --gen-key
gpg --detach-sign --armor --output Release.gpg --local-user 12345678 --sign Release
Either send this key to a keyserver or offer if for manual download somewhere.
gpg --send-keys 12345678
gpg --armor --export 12345678 > mykey.txt
Each client has to accept it once:
cat mykey.txt | apt-key add -
-
The ftp doesn't contain the root, rescue and drivers floppies. Any need for this?
20-02-2009 22.36