PDA

View Full Version : How to share rpm's already on a local box



BillGradwohl
3rd August 2017, 11:33 PM
I support a few dozen Fedora boxes. Because I have a relatively slow Internet connection (128kB/sec) due to my physical location, it takes a long time to do a dnf -y update per machine. I'm in the process of nuking and installing F26 on all the boxes and it's taking forever due to the patches.

I'm looking for a way of seeding a box with the rpm's already on a local box so a dnf update can just find them already available and not have to download them.

Is there an approved mechanism (via config file, etc) to do this?
If not, is there a hack I can employ?

I can't afford to do a real mirror as my connection can't handle it, so I'm looking for a work around.

srakitnican
4th August 2017, 07:17 AM
You can use setup one of the machine as a proxy cache. That way only the packages you download with get stored and reused.

http://forums.fedoraforum.org/showthread.php?t=311480

BillGradwohl
4th August 2017, 01:53 PM
I hadn't thought about Squid in over a dozen years. I forgot it even existed. Thanks for the wake up.

BillGradwohl
5th August 2017, 05:24 PM
I got two email notifications of replies to this issue from nsnbm and PabloTwo but they don't show up here. How does that work?

I decided to nuke PackageKit as it was giving me grief. The script I wrote years ago to push rpm's to other boxes only worked on the dnf area, but I found so many rpm's in the PackageKit cache it made things confusing. On my personal machine, I had over 500M of rpm's in the PackageKit area of /var/cache and the same rpm's in the dnf area of the cache. If PackageKit is supposed to just form an abstraction layer above dnf, then why does it have its own cache?

These were downloaded one extra time using my puny 128KB worth of bandwidth. I can't afford that.

I'm going back to the bash script to ssh/rsync the various dnf cache areas on my master box to all the other boxes and each has keepcache=true. That way I download once and seed the other boxes from my cache.

I attached my script.

srakitnican
6th August 2017, 01:13 AM
Well the thing is that PackageKit is currently a whole package manager that happens to be compatible with rpm. Disabling PackageKit makes sense, I have it disabled as well.


$ gsettings set org.gnome.software download-updates false

This is a per user setting though. Not sure about the right approach to disable it completely on a system.

I think I had success with following:


$ sudo systemctl mask packagekit

nsnbm
6th August 2017, 01:16 AM
BillGradwohl wrote:


I got two email notifications of replies to this issue from nsnbm ...

What you saw was the result of my deletion of my message, so you got the notification when I submitted it, but because I deleted it, it doesn't appear in the forum. The message was to suggest you create a local repo, which is something I have done successfully in the past, using createrepo, but I hadn't used that repo with other machines on the network, so I hadn't configured dnf on other machines to use that particular repo, so I thought it better to leave it with the suggestions that had already been made rather than something more speculative, hence I deleted the message. But now you have it for what it's worth.

kldixon
6th August 2017, 09:04 AM
Thanks for that packagekit suggestion, srakitnican.
Also:


$ gsettings set org.gnome.software allow-updates false

To kill notifications see:
http://forums.fedoraforum.org/showthread.php?t=298948

And this should stop dnf from downloading metadata in the background, so you only download the metadata when you choose to do an update:


# systemctl disable dnf-makecache.timer