How to deal with custom repositories and apt-mirror

apt

We're running an internal debian package mirror via apt-mirror and this is working fine for the official debian package repositories. However, now I would like to add custom repositories which apt-mirror should monitor and keep up to date with.

The problem I am having is figuring out how to symlink the content of the custom repositories to my htdocs.

Right now I've got the following symlinks set up:

/var/www/debian -> /var/spool/apt-mirror/mirror/ftp.no.debian.org/debian
/var/www/debian-security -> /var/spool/apt-mirror/mirror/security.debian.org/debian-security

How do I go about adding symlinks from /var/www to the following package mirrors in such a way that I avoid having to add a new /var/www directory for each of the packages:

/var/spool/apt-mirror/mirror/pkg.jenkins-ci.org/debian/binary
/var/spool/apt-mirror/mirror/dev.zenoss.org/deb/dists/main/stable/binary-i386

Preferably I would be able to add more custom repositories without having to update /etc/apt/sources.list on all the machines that are using the internal mirror. For example making them all accessible via

deb http://mirror.internal/debian-custom main

Best Answer

Each repository you are mirroring is separate by itself and will require a separate sources.list entry, or alternatively sources.list.d/ file. This is compounded by the different structure in your mirrored directory tree structures. As one of the apt-mirror Debian package maintainers I can say this is not something it was developed to support.

If you wanted to have a single custom repository you would need to take the contents of all those custom repositories contents and generating your own Packages file using one of the various packages available for handling your own repository. I would consider looking into mini-dinstall or reprepro for what you're wanting to do.

Related Topic