I'm trying to set up an APT repository on my local network that will work similar to apt-mirror
except, I don't want to mirror an entire repository, I only want to serve specific packages of my choosing. I need to be able to download the packages I want from the public APT repositories and serve them from mine. I've had a look into apt-mirror
, apt-cacher
and reprepo
.
Apt-mirror
doesn't look like it will work as it mirrors an entire repository and automatically downloads updates, which I want to do manually. Apt-cacher
just caches packages downloaded by people on the network so that's not what I'm looking for either. Reprepro
looks like it is what I want but I can't figure out how make it serve packages I download from public repositories. Everything I have managed to find uses reprepro
to create, sign and serve your own packages that aren't in official repositories.
How would I go about setting this up and adding specific packages? I don't want to resign the packages myself, I would rather leave them signed by the public repository.
I would also like to control what happens if the client tries to install a package that is not in this repository, I'm not sure what exactly I want to do in this situation yet but I'm tossing up between blocking/disallowing the download, and redirecting them to the public repository.
EDIT:
For this to work would I need each package to be set-up exactly the same as it is on the public repository? ie. Would it need to be in the same sub directories (stable, testing, main, contrib, etc) and have the same entry in the packages.gz
file? If so, how would I find out all this information about the package and is there an automatic way to ensure it is correct in my repository? Much like apt-mirror
/apt-cache
how they automatically copy the official repo?