I'm trying to setup a Ubuntu mirror with selected packages from different repositories, by using apt-move
, which I've been using on Ubuntu 10.04 without (too much) problems.
I've installed apt-move
and setup it accordingly to my needs:
# dpkg -l | grep apt-move
ii apt-move 4.2.27-2 Maintain Debian packages in a package pool
The configuration file /etc/apt-move.conf
is as follows:
# cat /etc/apt-move.conf | grep -v -e ^# -e ^$
APTSITES="/all/"
LOCALDIR=/var/local/mirrors/ubuntu
DIST=precise
PKGTYPE=binary
FILECACHE=/var/cache/apt/archives
LISTSTATE=/var/lib/apt/lists
DELETE=no
MAXDELETE=20
COPYONLY=no
PKGCOMP="none gzip"
CONTENTS=yes
GPGKEY=
Of course, I've created the directory mentioned in LOCALDIR
.
Let's try it. After doing a sudo apt-get -d install vim
I have some debs laying around on /var/cache/apt/archives
:
# ls -1 /var/cache/apt/archives/
libgpm2_1.20.4-4_amd64.deb
libpython2.7_2.7.3-0ubuntu3.1_amd64.deb
lock
partial
python2.7_2.7.3-0ubuntu3.1_amd64.deb
python2.7-minimal_2.7.3-0ubuntu3.1_amd64.deb
vim_2%3a7.3.429-2ubuntu2.1_amd64.deb
vim-common_2%3a7.3.429-2ubuntu2.1_amd64.deb
vim-runtime_2%3a7.3.429-2ubuntu2.1_all.deb
vim-tiny_2%3a7.3.429-2ubuntu2.1_amd64.deb
I first do a apt-move get
.
# apt-move get
Updating from local Packages files...
All done, exiting.
Then a apt-move move
:
# apt-move move
Moving files...
Skipping files:
Moving Files:
/var/cache/apt/archives/libgpm2_1.20.4-4_amd64.deb
/var/cache/apt/archives/libpython2.7_2.7.3-0ubuntu3.1_amd64.deb
/var/cache/apt/archives/python2.7-minimal_2.7.3-0ubuntu3.1_amd64.deb
/var/cache/apt/archives/python2.7_2.7.3-0ubuntu3.1_amd64.deb
/var/cache/apt/archives/vim-common_2%3a7.3.429-2ubuntu2.1_amd64.deb
/var/cache/apt/archives/vim-runtime_2%3a7.3.429-2ubuntu2.1_all.deb
/var/cache/apt/archives/vim-tiny_2%3a7.3.429-2ubuntu2.1_amd64.deb
/var/cache/apt/archives/vim_2%3a7.3.429-2ubuntu2.1_amd64.deb
All done, exiting.
So far so good. Let's check the repository pool.
# ls -lah /var/local/mirrors/ubuntu/pool/
total 8,0K
drwxr-sr-x 2 root staff 4,0K dic 3 11:39 .
drwxr-sr-x 5 root staff 4,0K dic 3 11:39 ..
Oops. It's empty. So, where are the packages?
# find / -iname vim-common_2%3a7.3.429-2ubuntu2.1_amd64.deb
#
Nowhere. Nice. The dists
dir is empty, too:
# ls -lah /var/local/mirrors/ubuntu/dists
total 8,0K
drwxr-sr-x 2 root staff 4,0K dic 3 11:50 .
drwxr-sr-x 5 root staff 4,0K dic 3 11:50 ..
However, there's a .apt-move
directory with some information:
# ls /var/local/mirrors/ubuntu/.apt-move/
arch binary dists pool precise.arch.amd64 precise.binary source version
But there's not too much info in there, actually. The directories dists
and pool
are also empty.
Going more manual won't help. Using apt-move movefile
results in the same:
# apt-move movefile vim_2%3a7.3.429-2ubuntu2.1_amd64.deb
Moving files...
Skipping files:
Moving Files:
/var/cache/apt/archives/vim_2%3a7.3.429-2ubuntu2.1_amd64.deb
All done, exiting.
Aaand empty directories. Some idea on what could be happening?
Am I doing something wrong?
Are there some alternatives to apt-move (that fit my needs here!) that are worth trying?