Downloading from Ubuntu repos
November 02, 2008 —
BarryK
I might as well document this. I'm new to Ubuntu (and Debian) repos and it took me awhile to find out where they are and how to download packages.
What has made things a bit difficult is that Ubuntu 8.10 "Intrepid Ibex" was officially announced before the iso's and packages had fully filtered through to the mirrors. On the day of the announcement on Distrowatch (30th Oct), I managed to download Xubuntu, then tackled the packages.
What I wanted to do was download all the Intrepid binary i386 packages. Ubuntu has them in the categories "main", "restricted", "universe" and "multiverse". The main repo, http://archive.ubuntu.com/ubuntu/ or ftp://archive.ubuntu.com/ubuntu/, was almost crippled by the demand, so I went to http://ftp.filearena.net/pub/ubuntu/.
What I did was download the package lists for Intrepid. For example, for "main" I downloaded http://archive.ubuntu.com/ubuntu/dists/intrepid/main/binary-i386/Packages.gz. I gunzipped it and renamed to 'Packages-i386-main'. I did the same for the other categories. These 'Packages' files contain entries like this:
Filename: pool/main/a/abiword/abiword_2.6.4-4ubuntu4_i386.deb
So, I wrote a little script:
rm -f failed-${1} 2>/dev/null
cd i386-${1}
#UARCHIVE="ftp://archive.ubuntu.com/ubuntu"
UARCHIVE="http://ftp.filearena.net/pub/ubuntu"
grep '^Filename: pool' ../Packages-i386-${1} | cut -f 2-9 -d ' ' | grep 'deb$' |
while read ONEDEB
do
wget -N $UARCHIVE/$ONEDEB
[ $? -ne 0 ] && echo "$ONEDEB" >> ../failed-${1}
sync
done
Called with the name of the category, ex "main". It merrily downloaded packages, using up most of my relative's monthly download limit! She has a 20GB off-peak monthly limit, so I changed to doing it in the off-peak times. The 'failed-main' file had lots of entries, and this was due to the mirror site not yet being fully sync'ed to the main repo. Even now, a few days after the release announcement, there are about a dozen packages not yet there (for 'main', I haven't done the others yet). Note, 'du -m' shows that 'main' packages are occupying 5753MB.
PS
The four categories, main, restricted, universe and multiverse, are explained here:
http://www.ubuntu.com/community/ubuntustory/components
Comments
ttuuxxxUsername: ttuuxxx
I usually look at the Intrepid packages by this link http://packages.ubuntu.com/intrepid/ Anyways I really like this new look on Ubuntu and looking forward to helping if I can, Thanks ttuuxxx
gNewSense
Username: nic2109
"If you (or any other reader) want a truly "free' Ubuntu/Debian then you could look at gNewSense which is a fork of Ubuntu with all the non-free stuff stripped out. It's supported/promoted by the Free Software Foundation so they might look kindly on a new light version built with the Puppy philosophy and offer some "support".
gNewSense
Username: nic2109
"If you (or any other reader) want a truly "free' Ubuntu/Debian then you could look at gNewSense which is a fork of Ubuntu with all the non-free stuff stripped out. It's supported/promoted by the Free Software Foundation so they might look kindly on a new light version built with the Puppy philosophy and offer some "support".
Tags: woof