Repository creation / update script
John Berninger <[email protected]>
| Newsgroups | gmane.network.up2date.current.devel |
|---|---|
| Message-ID | <[email protected]> |
For anyone who's interested, I've got a fairly short script that I'm
using to create / update Red Hat Linux repositories for my testing - it
can be used to create an initial repository, or to simply pull new
updates since the repository was last updated. I'm including the script
as an attachment.
Some disclaimers:
- This is used for my development purposes, it is not in
production at all
- I'm only interested in the ix86 and compatible architectures,
so I deliberately ignore things like s390 and ia64
- I'm only interested in RHL 7.0 through 7.3, nothing 6.2 or
before
- You'll need a good 12 - 15 GB minimum available for 7.0
through 7.3 plus all updates
- This doesn't do anything with the Current server, all it does
is give you local on-disk trees in the same directory
structure of an official Red Hat mirror.
That said, this script assumes the existence of /export, and
will put everything in /export for you. If you find it useful, feel
free to steal it - it's not copyrighted or anything. :)
--
Thank you,
John Berninger
Systems Administrator [email protected]
Department of Mathematics Box 8205, Harrelson Hall
NC State University Raleigh, NC 27695
Phone: (919)515-6315 Fax: (919)515-3798
GPG Key ID: A8C1D45C
Fingerprint: B1BB 90CB 5314 3113 CF22 66AE 822D 42A8 A8C1 D45C
--
syncme.sh
(application/x-sh, 667 B)
#!/bin/sh
[[ -d /export ]] || exit 1
for f in 7.0 7.1 7.2 7.3; do
[[ -d /export/redhat-${f} ]] || mkdir /export/redhat-${f}
rsync -avz kickstart::redhat/linux/${f}/en/os/i386/RedHat/RPMS/ /export/redhat-${f}/RPMS
rsync -avz kickstart::redhat/linux/${f}/en/os/i386/SRPMS/ /export/redhat-${f}/SRPMS
[[ -d /export/updates/redhat-${f} ]] || mkdir -p /export/updates/redhat-${f}
rsync -avz kickstart::redhat/linux/updates/${f}/en/os/ /export/updates/redhat-${f}/RPMS --exclude alphaev6 --exclude alpha --exclude images --exclude s390 --exclude SRPMS --exlude ia64
rsync -avz kickstart::redhat/linux/updates/${f}/en/os/SRPMS/ /export/updates/redhat-${f}/SRPMS
done