From: Mark Wooding Date: Sat, 27 Oct 2012 12:05:11 +0000 (+0100) Subject: Merge branch 'master' into distorted X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mirror-admin/commitdiff_plain/56e8c7af77dd4722851949e602f566c68fe15e88?hp=43d42398bcc186ec5f2fed6bc400b818607cdafa Merge branch 'master' into distorted * master: Keep track of the mirror target directory in an environment variable. Conflicts: bin/run-mirrors etc/ftpsync-common.conf --- diff --git a/.userv/rc b/.userv/rc index b86f0c0..daff920 100644 --- a/.userv/rc +++ b/.userv/rc @@ -1,7 +1,9 @@ ### -*-conf-*- if ( glob service run - & glob calling-group ftpadmin + & ( glob calling-group ftpadmin + | glob calling-user root + ) ) no-suppress-args execute bin/run-mirrors diff --git a/bin/run-mirrors b/bin/run-mirrors index 9c24c7d..8fb9ccc 100755 --- a/bin/run-mirrors +++ b/bin/run-mirrors @@ -9,8 +9,8 @@ case $(id -un) in esac ## Set up a plausible environment. -HOME=/var/lib/mirror-admin; export HOME; cd -MIRRORS=/mnt/mirrors; export MIRRORS +HOME=/var/lib/mirror; export HOME; cd +MIRRORS=/mnt/ftp/pub/mirrors; export MIRRORS PATH=$HOME/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/local/sbin export PATH umask 002 diff --git a/etc/ftpsync-common.conf b/etc/ftpsync-common.conf index 5af48ee..19cff88 100644 --- a/etc/ftpsync-common.conf +++ b/etc/ftpsync-common.conf @@ -21,7 +21,7 @@ : ${RSYNC_PATH="$LABEL"} ## The host we mirror from -: ${RSYNC_HOST=ftp.de.debian.org} +: ${RSYNC_HOST=ftp.uk.debian.org} ## In case we need a user to access the rsync share at our upstream host : ${RSYNC_USER=} @@ -30,7 +30,7 @@ : ${RSYNC_PASSWORD=} ## Architectures we want to carry. -: ${WANT_ARCH="i386:amd64"} +: ${WANT_ARCH="i386:amd64:armel"} ## Distributions to inspect for available architectures. : ${SEARCH_DISTS="oldstable stable testing unstable experimental"} @@ -83,7 +83,6 @@ ## want. Crazy, no? ARCH_EXCLUDE=$( bin/debian-excludes $RSYNC_HOST $RSYNC_PATH $WANT_ARCH $SEARCH_DISTS - echo source ) ## Do we have leaf mirror to signal we are done and they should sync? diff --git a/etc/ftpsync-debian-security.conf b/etc/ftpsync-debian-security.conf index 17aaf8d..7069fa8 100644 --- a/etc/ftpsync-debian-security.conf +++ b/etc/ftpsync-debian-security.conf @@ -5,7 +5,7 @@ LABEL=debian-security RSYNC_HOST=security.debian.org SEARCH_DISTS=$( - for i in oldstable stable testing; do + for i in stable testing; do echo $i/updates done ) diff --git a/etc/ftpsync-debian.conf b/etc/ftpsync-debian.conf index 3417c94..db7a9fd 100644 --- a/etc/ftpsync-debian.conf +++ b/etc/ftpsync-debian.conf @@ -3,7 +3,7 @@ ### ftpsync configuration for the Debian main archive. LABEL=debian -RSYNC_HOST=ftp.de.debian.org -SEARCH_DISTS="oldstable stable testing unstable experimental" +RSYNC_HOST=ftp.uk.debian.org +SEARCH_DISTS="stable testing unstable experimental" . etc/ftpsync-common.conf diff --git a/etc/logrotate.conf b/etc/logrotate.conf index a67d4a2..7294f61 100644 --- a/etc/logrotate.conf +++ b/etc/logrotate.conf @@ -7,5 +7,5 @@ rotate 31 minsize 4194304 daily -/var/lib/mirror-admin/log/*.log { +/var/lib/mirror/log/*.log { } diff --git a/etc/mirror.packages b/etc/mirror.packages index a790722..a3c951c 100644 --- a/etc/mirror.packages +++ b/etc/mirror.packages @@ -24,4 +24,14 @@ package=defaults do_deletes=true max_delete_files=80% +###-------------------------------------------------------------------------- +### Nelson Beebe's BibTeX database archive. + +package=utah-bib + site=ftp.math.utah.edu + remote_dir=/pub/tex/bib/ + local_dir=utah-bib + recursive=false + get_patt=\.bib$ + ###----- That's all, folks -------------------------------------------------- diff --git a/etc/mirrors.d/50-debian b/etc/mirrors.d/50-debian new file mode 100755 index 0000000..c17194d --- /dev/null +++ b/etc/mirrors.d/50-debian @@ -0,0 +1,7 @@ +#! /bin/sh -e +### +### Mirror Debian archives. + +for archive in debian-security debian; do + RSYNC="rsync -4" bin/ftpsync sync:all sync:archive:$archive +done diff --git a/etc/mirrors.d/50-mirror b/etc/mirrors.d/50-mirror new file mode 100755 index 0000000..da23848 --- /dev/null +++ b/etc/mirrors.d/50-mirror @@ -0,0 +1,7 @@ +#! /bin/sh -e +### +### Lee MacLoughlin's mirror scripts. + +here=$(pwd) +cd /mnt/ftp/pub/mirrors +mirror -d "$@" "$here"/etc/mirror.packages diff --git a/etc/mirrors.d/50-rfc b/etc/mirrors.d/50-rfc new file mode 100755 index 0000000..0c7200c --- /dev/null +++ b/etc/mirrors.d/50-rfc @@ -0,0 +1,14 @@ +#! /bin/sh -e +### +### Mirror RFCs and Internet Drafts from mirrorservice.org + +. lib/functions.sh +standard_rsync "$@" \ + --exclude /ien/scanned/ \ + --exclude /tar/ \ + --exclude /internet-drafts/ \ + www.ietf.org::everything-ftp/rfc/ \ + /mnt/ftp/pub/mirrors/rfc/ +standard_rsync "$@" \ + rsync.mirrorservice.org::ftp.isi.edu/internet-drafts/ \ + /mnt/ftp/pub/mirrors/internet-drafts/