i would like to create a rpm repository for fedora packages on my local network. due to storage limitations i want the repository to be empty initially and download packages once they are accessed.Backgroundi work a lot with local VMs. Every time i create a new VM and install fedora a lot of packages are downloaded from the internet. Most of the downloaded packages are the same. To speed up the process i would like the RPMs to be cached on a server located on the same network.similar questions have been answered with a combination of createrepo & reposync. i Do not like the reposync part, because i do not want to clone the whole repository in up-front when i only need some of the packages.Ideal Solutioni would like the server on my local network to act as a rpm repository for my fedora installations. it should pass-through the metadata from whatever is configured in /etc/yum.repod.d/*. The server should deliver the requested RPM if it is present in the local cache or download it if it is not and deliver it then.less ambitious approach would be to configure a single rpm repository instead of https://mirrors.fedoraproject.org/... and just use a http proxy.Update: 02 Nov. 2015i already have a nginx running on the network, so i played around with a combination of proxy_pass and proxy_cache. It kinda works, but has imho more drawbacks then benefits:a separate configuration for every repo configured in /etc/yum.repo.d/*.can't use metadata from https://mirrors.fedoraproject.org/ because of alternate mirrors.i dropped the nginx thing and installed squid like suggested in comments. squid works great for me. With the store_id_program configuration i am even able to use the alternate mirrors and still hit the cache, no matter where the RPM came from originally.
how to create a on-demand rpm mirror
fedora;rpm;squid