6.4.11 Local package archive
In order to create a local package archive which is compatible with APT and the
dselect
system, Packages
needs to be created and
package files need to be populated in a particular directory tree.
A local deb repository similar to an official Debian archive can
be made in this way:
# aptitude install dpkg-dev
# cd /usr/local
# install -d pool # physical packages are located here
# install -d dists/unstable/main/binary-i386
# ls -1 pool | sed 's/_.*$/ priority section/' | uniq > override
# editor override # adjust priority and section
# dpkg-scanpackages pool override /usr/local/ \
> dists/unstable/main/binary-i386/Packages
# cat > dists/unstable/main/Release << EOF
Archive: unstable
Version: 3.0
Component: main
Origin: Local
Label: Local
Architecture: i386
EOF
# echo "deb file:/usr/local unstable main" \
>> /etc/apt/sources.list
Alternatively, a quick-and-dirty local deb repository can be made:
# aptitude install dpkg-dev
# mkdir /usr/local/debian
# mv /some/where/package.deb /usr/local/debian
# dpkg-scanpackages /usr/local/debian /dev/null | \
gzip - > /usr/local/debian/Packages.gz
# echo "deb file:/usr/local/debian ./" >> /etc/apt/sources.list
These archives can be remotely accessed by providing access to these
directories through either HTTP or FTP methods and changing entries in
/etc/apt/sources.list
accordingly.