8 echo "Usage: $0 archive"
13 # START OF OPTIONS ######################################################
15 TARGET_BASE=/org/wanna-build/tmp/archive
16 TARGET="$TARGET_BASE/$1"
18 PASSWORD_BASE=/org/wanna-build/etc
19 PASSWORD_FILE="$PASSWORD_BASE/$1.rsync-password"
21 RSYNC_OPTIONS="--delete --delete-excluded -av"
23 MIRROR_EXCLUDES="--exclude=**/*.changes --exclude=**/installer-* --exclude=**/Packages.diff --exclude=**/Sources.diff --exclude=ChangeLog --exclude=**/Contents-* --exclude=**/Translation-* --exclude=**/*.bz2 --exclude=Packages --exclude=Sources --exclude=**/*.new" # the latter two because we only accept gziped files
24 MIRROR_OPTIONS="$MIRROR_EXCLUDES $RSYNC_OPTIONS"
26 # END OF OPTIONS ########################################################
30 if [ ! "$2" = "nolock" ]
32 # Do locking to avoid destroying other's views on an archive.
33 LOCKFILE="$TARGET/lock"
39 if lockfile -! -r 10 $LOCKFILE
41 echo "Sync failed: cannot lock $LOCKFILE, aborting."
51 BUILDD_QUEUE_OPTIONS="--include=Packages.gz --include=Sources.gz --include=**Release* --exclude=* $RSYNC_OPTIONS"
52 rsync --password-file "$PASSWORD_FILE" $MIRROR_OPTIONS $USER@ftp-master.debian.org::debian/dists/ "$TARGET/archive"
53 rsync --password-file "$PASSWORD_BASE/$1-buildd.rsync-password" $BUILDD_QUEUE_OPTIONS $USER@ftp-master.debian.org::buildd-sid/ "$TARGET/buildd-sid"
54 rsync --password-file "$PASSWORD_BASE/$1-buildd.rsync-password" $BUILDD_QUEUE_OPTIONS $USER@ftp-master.debian.org::buildd-experimental/ "$TARGET/buildd-experimental"
55 # Also sync the Maintainers and Uploaders files for consumption through the web interface.
56 rsync --password-file "$PASSWORD_FILE" $MIRROR_OPTIONS $USER@ftp-master.debian.org::debian/indices/Maintainers /srv/buildd.debian.org/etc/Maintainers
57 rsync --password-file "$PASSWORD_FILE" $MIRROR_OPTIONS $USER@ftp-master.debian.org::debian/indices/Uploaders /srv/buildd.debian.org/etc/Uploaders
62 BUILDD_QUEUE_OPTIONS="--include=Packages.gz --include=Sources.gz --include=**Release* --exclude=* $RSYNC_OPTIONS"
63 rsync $MIRROR_OPTIONS $USER@security-master.debian.org::debian-security/dists/ "$TARGET/archive"
64 rsync --password-file "$PASSWORD_BASE/$1-buildd.rsync-password" $BUILDD_QUEUE_OPTIONS $USER@security-master.debian.org::buildd-wheezy/ "$TARGET/buildd-wheezy"
65 rsync --password-file "$PASSWORD_BASE/$1-buildd.rsync-password" $BUILDD_QUEUE_OPTIONS $USER@security-master.debian.org::buildd-squeeze/ "$TARGET/buildd-squeeze"
66 rsync --password-file "$PASSWORD_BASE/$1-buildd.rsync-password" $BUILDD_QUEUE_OPTIONS $USER@security-master.debian.org::buildd-lenny/ "$TARGET/buildd-lenny"
69 rsync $MIRROR_OPTIONS volatile-master.debian.org::debian-volatile/dists/ "$TARGET/archive"
72 rsync --password-file "$PASSWORD_FILE" $MIRROR_OPTIONS wbadm@backports-master.debian.org::debian-backports/dists/ "$TARGET/archive"
75 rsync $MIRROR_OPTIONS --exclude=woody/ ftp.skolelinux.no::skolelinux-dist/dists/ "$TARGET/archive"
78 echo "Sync target $1 not supported, aborting."