Lazy or caching dnf mirror recommendations?

I have been a long time user of the dnf-local-plugin. I used this feature to cache rpms that were locally installed on a system into what is effectively a lazy mirror of upstream yum repositories. I then share this mirror, via the plugin, with other Fedora machines (vms or bare metal) on my local network. I live in a rural area with a slow and expensive internet connection. I see significant reductions in bandwidth consumption and improvements in dnf update performance.

With Fedora 41 and dnf5 this plugin is no longer available. Are there any good, modern implementations of a lazy yum mirror that I can set up to replicate these savings?

By lazy mirror I mean that the mirror only holds the rpms actually installed. If the requested rpm is not in the lazy mirror it would retrieve the rpm directly from Fedora mirrors transparently in the background.

thanks

1 Like

No answer Brad, just a comment, and that comment is that I hope that when all is said and done, the local plugin is carried over into Fedora 41/DNF5 and beyond. I’ve been using this plugin since it was introduced, and would hate to see it disappear.

1 Like
# Server
sudo dnf install dnf5-plugins nfs-utils
sudo dnf config-manager setopt keepcache=True
sudo tee /etc/exports.d/dnf5.exports << EOF > /dev/null
/var/cache/libdnf5 *(rw,no_root_squash)
EOF
sudo systemctl --now enable nfs-server.service
sudo firewall-cmd --permanent --add-service=nfs
sudo firewall-cmd --reload

# Client
SERVER="192.168.1.1"
sudo dnf install dnf5-plugins nfs-utils
sudo dnf config-manager setopt keepcache=True
sudo tee -a /etc/fstab << EOF > /dev/null
${SERVER}:/var/cache/libdnf5 /var/cache/libdnf5 nfs defaults,nofail
EOF
sudo systemctl daemon-reload
sudo mount -a
1 Like

Thanks Vladislav. Since I use NFS already to share the DNF local plugin repository (at /srv/repo/f41) I can give this a try. I may use an overlay at least with VMs.

1 Like

Thanks again for the update Vladislav. Very elegant!

1 Like