This is the mail archive of the
mailing list for the Cygwin project.
Mirror, Mirroring, Download, Downloading Cygwin Release Using rsync
- From: L Anderson <lowella at serv dot net>
- To: cygwin at cygwin dot com
- Date: Wed, 20 Apr 2005 02:19:44 -0700
- Subject: Mirror, Mirroring, Download, Downloading Cygwin Release Using rsync
From time to time, as even now, someone asks a question on how to
download Cygwin for installing, locally, on any number of machines,
burning a CD/DVD, etc. The canonical answer seems to be to use Cygwin's
Setup. If "Setup" doesn't run on your system of choice (e.g. FreeBSD,
GNU/Linux...), then how? Although "Setup" does run on my windows
machine, I don't normally use it to download release changes. Instead,
I use rsync, which should work as well on *nix type systems as on a M$
one. So here's how I do it and what works for me--see the bash script
I use rsync to maintain a local Cygwin release mirror so I can use Setup
to locally install anything from Cygwin release on a number of PCs on my
network. I have been doing this for several years with virtually no
problems--except for the occasional rsync mirror that comes or goes.
The nice thing about rsync is that it downloads only what has changed
since the last rsync and with the "--delete" option, it deletes
everything on the local mirror that's not on the official Cygwin mirror
being used.(NB: Not so with wget. It just lets things pile up.) Also,
rsync is very robust in that, should the download be interrupted, it can
be restarted and it picks up, basically, from where it left off.
Moreover, you can still use Setup on an M$ machine to download and
install changes using the same local directory structure, e.g.
/cygdrive/x/cygwin/release. However, using the "--delete" option, the
directories left by Setup will be removed the next time rsync is run but
everything will be current.
Be advised that disk space may now be an issue. Several years ago, when
I started using rsync to mirror Cygwin release, it did so in about
800MB. Now it takes about 2.4GB--somebody has been busy--thanks!
However, frequent rsyncs will only need to download a fraction of that.
Below is the bash script I start manually on my Win98SE system. It's
brutish, lacks sophistication, but works for me. Because my Cygwin
install is Unix, I use Windows' Wordpad (write.exe) to read the log
files (hence, the ".wri" extension). Wordpad can handle both the file
size and line ends properly whereas notepad can't. The script first
runs rsync to download any changes to Setup.exe and Setup.ini, placing
them in /cygdrive/n/pub/Cygwin from where I can run Setup. The script
then runs rsync to update /cygdrive/n/pub/Cygwin/release with the latest
changes. If I first want to see what the new changes are (more or less)
without downloading, I do a "dry run" (rsync -n option). After
rsyncing, I can do a local install with Setup from any machine on my
I just updated the script with the latest rsync mirrors found on the
Cygwin site. Normally, I only use mirror 1 or 2 in the list. If there
were more North American mirrors, I'd try my hand at selecting the one
to use randomly, rather than by menu--share the load.
I hope someone finds this information useful and that it's not redundant.
# Select the rsync mirror to use.
while [ 1 ] ; do
echo "Select the rsync mirror to use or exit:"
echo "1) rsync://mirrors.xmission.com/cygwin/ --Utah"
echo "2) rsync://mirrors.kernel.org/sources.redhat.com/cygwin/
echo "3) rsync://ftp.esat.net/mirrors/sources.redhat.com/pub/cygwin/
echo "4) rsync://ftp.gwdg.de/pub/linux/sources.redhat.com/cygwin/
echo "5) rsync://ftp.inf.tu-dresden.de/cygwin/ --Germany"
echo "6) rsync://ftp.kaist.ac.kr/cygwin/ --Korea"
echo "7) rsync://mirror.averse.net/cygwin/ --Singapore"
echo "0) exit program"
echo -n "Enter selection 0-7:"
case $selection in
1 ) rsyncsite="rsync://mirrors.xmission.com/cygwin/"
2 ) rsyncsite="rsync://mirrors.kernel.org/sources.redhat.com/cygwin/"
5 ) rsyncsite="rsync://ftp.inf.tu-dresden.de/cygwin/"
6 ) rsyncsite="rsync://ftp.kaist.ac.kr/cygwin/"
7 ) rsyncsite="rsync://mirror.averse.net/cygwin/"
0 ) echo "OK! Exiting";
* ) echo "Please enter one of 0 to 7"
echo -n "Do you want a dry run? (yes/no) 'var1': "
if [ "$var1" = "yes" ]
rsync -vaunt --progress --stats --delete $rsyncsite/set*
/cygdrive/n/pub/cygwin > /cygdrive/n/pub/CygwinMgmt/drsetlog.wri
rsync -vaunrt --progress --stats --delete $rsyncsite/release
/cygdrive/n/pub/cygwin > /cygdrive/n/pub/CygwinMgmt/drreleaselog.wri
if [ "$var1" = "no" ]
rsync -vaut --progress --stats --delete $rsyncsite/set*
/cygdrive/n/pub/cygwin > /cygdrive/n/pub/CygwinMgmt/setlog.wri
rsync -vaurt --progress --stats --delete $rsyncsite/release
/cygdrive/n/pub/cygwin > /cygdrive/n/pub/CygwinMgmt/releaselog.wri
echo "Just a dry run."
echo "var1 = $var1"
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html