Оригинальный материал, автор: uicraor.
Устанавливаем пакет apt-move. Создаем папку, где будет лежать локальный репозитоий, например, /куда/maverick/. Редактируем конфигурационный файл /etc/apt-move.conf (нужны права root), должно получиться вот так:
#
# You should modify the following configuration to suit your system.
# See the apt-move(8) manpage for information about these settings.
#
# The defaults for this file are simply the settings I currently use.
# Configuration for apt-move script --------------------------------------
# The sites in ``/etc/apt/sources.list'' that you wish to mirror.
APTSITES="/all/"
# Указываем где находится наш локальный репозиторий
LOCALDIR=/куда/maverick/
# Здесь указываем название диструбутива для репозитория, я оставил как есть.
DIST=stable
# The package types you want to mirror.
# Possible values are: binary, source, and both (use only one).
PKGTYPE=binary
# The full (absolute) path to your local cache of package files. The default
# will work for the apt-get packages, unless you've reconfigured apt.
FILECACHE=/var/cache/apt/archives
# The full (absolute) path to your local cache of Packages files. The
# default will work for the apt-get Packages, unless you've reconfigured apt.
LISTSTATE=/var/lib/apt/lists
# Do you want apt-move to delete obsolete files from your mirror? (yes/no)
DELETE=no
# Maximum percentage of files to delete during a normal run.
MAXDELETE=20
# Здесь спрашивают нужны ли нам бинарники из /var/cache/apt/archives после создания локального репозитория, если нужны, пишем yes, если нет, то no
COPYONLY=yes
# Set this to 'none gzip' to get uncompressed Packages/Sources files.
PKGCOMP=gzip
# Set this to yes to make apt-move generate Contents files.
CONTENTS=yes
# Set this to key name to be used for signing Release files.
GPGKEY=
# End Configuration ------------------------------------------------------
Команды:
- apt-move update -создаем локальный репозиторий;
- apt-move movefile имя-пакета -помещаем определённые пакеты в репозиторий;
- apt-move packages -создаем Packages.gz и Sources.gz дерева локального зеркала
В сорс-лист надо добавить такую строку: deb file:/mnt/F-Media/repo/maverick/ stable main non-free restricted universe. NB! Не все ветки репозитория индексируются, некоторые пакеты, попавшие в репозиторий, не будут доступны.