This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: local cygwin mirror


Stuart McGraw wrote:

> - setup.exe's idea of what to download seems to depend on
> what is installed on the download machine.  Is there some
> way to tell setup.exe to only download new/updated packages
> that are not already in the download directory, and not
> pay any attention to what is installed?  I find it a very
> confusing program to use.

You could try temporarily renaming out of the way
/etc/setup/installed.db so that setup thinks there are no packages
installed.  It will then try to download all selected packages that are
not already in the local download dir.  It should be obvious that you'd
do this with the "download only" option and not actually try to install
anything in this state.

> - In perusing the cygwin website I got the idea that the
> appropriate way to do this is to create a local mirror of
> the distribution.  OK, but I don't want or have space for
> "prev" versions, or source code packages.  Will setup.exe
> work with such a partial mirror?

Yes, this is fine.

> - Does such a mirror have to be served from a http/ftp server
> or are files in a directory ok?

A plain directory is fine.

> - Is there any difference between the download directory
> created by setup.exe, and a mirror of one of the distribution
> sites (other than the packages present, of course)?

To setup they are the same -- whether the directory was created by
setup.exe or whether you create it, the only thing that matters is that
there is a setup.ini in the root of the tree, and that the directory
structure as it exists on the mirror sites is maintained.  After that,
it doesn't matter whether there is one package or every package,
setup.exe will just offer to install whatever is there.

> - Can I manually build and maintain a directory that looks
> a setup.exe created download directory, and simply install
> from that?

Yes, precisely.  Just point setup.exe to the root of the tree you
created (the dir containing setup.ini) using the "Install from local
dir".

> - Has anyone written a script to do this?

I don't use a script, I just use rsync.  I have the following in my
crontab to run twice a day automatically:

00 10,22 * * * rsync -rlt --exclude=mail-archives/ --exclude=stage/
--exclude=tmp/ rsync://ftp.inf.tu-dresden.de/cygwin/ /d/packages/cygwin/
>/dev/null

Of course, this will keep a full copy in sync with the mirrors,
containing the [prev] versions and source packages.  You can play around
with --exclude so that it doesn't download source packages, perhaps
something like --exclude="*-src.tar.*".  For [prev] versions there is no
simple way, but since rsync only downloads the things that have changed,
you only download them once anyway.  The disk space cost still exists
though.

If you can't live with the [prev] versions taking up space then you
could probably write something in perl that would take the setup.ini and
a mirror base URL and spit out a list of file URLs.  You can then feed
that to rsync or a program that can do ftp mirroring like lftp.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]