I’m a sysop for a linux workspace at a university. We mirror all the ppa’s we make available. We’ve done this for years using apt-mirror and for many ppa’s. Now however I’m having trouble with apt-mirror and packages.ros.org. It took me a bit to figure out the problem came from the mirror and not the workplaces themselves. When I run apt-mirror it finishes without any errors, but when I look at <our.mirror>/packages.ros.org/ros/ubuntu/dists/focal/{InRelease,Release,Release.gpg} the files are not what they claim to be. All 3 files have the same size (32K) and seem to be the Contents-amd64.bz2 Contents-amd64.gz Contents-amd64.xz files. It only happens with packages.ros.org/ros/ubuntu/dists/focal/.
My apt-mirror mirror.list file contains the same statement for xenial, bionic, focal and stretch, but only focal has the problem:
ros ubuntu focal
deb http://packages.ros.org/ros/ubuntu focal main
deb-src http://packages.ros.org/ros/ubuntu focal main
clean http://packages.ros.org/ros/ubuntu
Also every other repo we mirror (the list is quite extensive) works fine.
I’ve tried to completely remove hte mirror and make a fresh copy, but the same thing happens.
I hope someone here can help me figure out what\why is happening. Does anyone else see this behavior from apt-mirror?
To help you to debug please ask your question on https://answers.ros.org And provide enough instructions to reproduce how you’re setting up your mirror and experience the same problem. There’s likely something you’re doing differently that we’ll need to be able to observe.
And also please reply back here with a link to the question so others who find your post here can also find your question and hopefully solution.
I’ve solved the problem, but not as one would expect. Firstly I removed all distro’s I knew we weren’t actively using any more (bionic & stretch). After this the ros focal repo still had the same problem. However this cleared up enough free disk space to allow me to run apt-mirror in a new dir and essentially create a fresh clone of all the ppa’s. When I looked at this fresh ros focal repo, the files were good. So something in the old directory structure was causing an error with the downloading of the (In)Release files for the ros focal repo!?!? There was no problem with apt-mirror or with the ros focal repo. The “quick” fix was to make sure I had enough free disk space to make a new clone of all our repo’s in a new dir. Apparently many years of apt-mirror usage and many distro upgrades have somehow left behind or created something buggy, which causes apt-mirror to behave weirdly. I am not going to try and find out what exactly caused the problem, because even after removing all those repo’s we still have an extensive list left and I don’t want to sift through those to find what the problem was.
TL;DR
Remove entire apt-mirror base_path dir, create a new dir and run apt-mirror again.