diff options
-rwxr-xr-x | rsync-gen.sh | 12 | ||||
-rwxr-xr-x | sync-origin-mirror-releases.sh | 15 |
2 files changed, 20 insertions, 7 deletions
diff --git a/rsync-gen.sh b/rsync-gen.sh index 82e72b9..8985377 100755 --- a/rsync-gen.sh +++ b/rsync-gen.sh @@ -209,28 +209,28 @@ date -u > ${STAGEDIR_repo_gentoo}/metadata/timestamp # 3) place dtd info in STAGEDIR_repo_gentoo timelog_start "DTD" | timelogger -rsync -Wqa --no-times --checksum --exclude=CVS --exclude=.git --delete ${EXPORTS}/dtd ${STAGEDIR_repo_gentoo}/metadata/ +rsync -Wqa --no-times --checksum --exclude=.git --delete ${EXPORTS}/dtd ${STAGEDIR_repo_gentoo}/metadata/ date -R -u > ${STAGEDIR_repo_gentoo}/metadata/dtd/timestamp.chk timelog___end "DTD" | timelogger # end 3) # 3b) place xml schemas in STAGEDIR_repo_gentoo timelog_start "XML-SCHEMA" | timelogger -rsync -Wqa --no-times --checksum --exclude=CVS --exclude=.git --delete ${EXPORTS}/xml-schema ${STAGEDIR_repo_gentoo}/metadata/ +rsync -Wqa --no-times --checksum --exclude=.git --delete ${EXPORTS}/xml-schema ${STAGEDIR_repo_gentoo}/metadata/ date -R -u > ${STAGEDIR_repo_gentoo}/metadata/xml-schema/timestamp.chk timelog___end "XML-SCHEMA" | timelogger # end 3b) # 4) place glsa's in STAGEDIR_repo_gentoo timelog_start "GLSA" | timelogger -rsync -Wqa --no-times --checksum --exclude=CVS --exclude=.git --delete ${EXPORTS}/glsa ${STAGEDIR_repo_gentoo}/metadata/ +rsync -Wqa --no-times --checksum --exclude=.git --delete ${EXPORTS}/glsa ${STAGEDIR_repo_gentoo}/metadata/ date -R -u > ${STAGEDIR_repo_gentoo}/metadata/glsa/timestamp.chk timelog___end "GLSA" | timelogger # end 4) # 5) place news in STAGEDIR_repo_gentoo timelog_start "NEWS" | timelogger -rsync -Wqa --no-times --checksum --exclude=CVS --exclude=.git --delete ${EXPORTS}/gentoo-news/. ${STAGEDIR_repo_gentoo}/metadata/news +rsync -Wqa --no-times --checksum --exclude=.git --delete ${EXPORTS}/gentoo-news/. ${STAGEDIR_repo_gentoo}/metadata/news date -R -u > ${STAGEDIR_repo_gentoo}/metadata/news/timestamp.chk timelog___end "NEWS" | timelogger # end 5) @@ -272,7 +272,7 @@ timelog_start "FINAL RSYNC" | timelogger FINALDIR_repo_gentoo_tmp=${FINALDIR_repo_gentoo%/} mkdir -p "${FINALDIR_repo_gentoo_tmp}-1" "${FINALDIR_repo_gentoo_tmp}-2" $atomic_rsync -Wqa --exclude=/metadata/timestamp.chk --delete --checksum \ - --exclude=.git --exclude=CVS --exclude=.gitignore \ + "--exclude=.*" \ --chmod=u-s,g-s --no-times \ ${STAGEDIR_repo_gentoo}/ \ ${FINALDIR_repo_gentoo}/ @@ -318,7 +318,7 @@ timelog___end "CACHE RSYNC" | timelogger # 9) rsync from STAGEDIR_repo_gentoo to REPODIR ### testing timelog_start "GIT RSYNC" | timelogger rsync -Wqa --exclude=/metadata/timestamp.chk --delete --checksum \ - --exclude=.git --exclude=CVS --exclude=.gitignore \ + "--exclude=.*" \ --chmod=u-s,g-s \ ${STAGEDIR_repo_gentoo}/ \ ${REPODIR}/ && \ diff --git a/sync-origin-mirror-releases.sh b/sync-origin-mirror-releases.sh index c0e6d4a..57ab8bf 100755 --- a/sync-origin-mirror-releases.sh +++ b/sync-origin-mirror-releases.sh @@ -1,11 +1,24 @@ #!/bin/bash # Copyright 2011-2015 Gentoo Authors; Distributed under the GPL v2 +h=$(hostname --fqdn |cut -d. -f1) + FINALDIR="/data/mirror" PASSWD_FILE="" RSYNC="/usr/bin/rsync" RSYNC_ARGS="--recursive --links --perms --times --delete --hard-links --no-motd --timeout=300 ${PASSWD_FILE:+--password-file }${PASSWD_FILE}" -RSYNC_ARGS="${RSYNC_ARGS} --quiet" +RSYNC_ARGS+=" --quiet" + +case $h in + kestrel) + # kestrel is space constrained, and the binpackages can be re-generated. + # Saves 100+ GB + RSYNC_ARGS+=" --exclude binpackages " + # kestrel is space constrained, and the snapshot squashfs are a nice-to-have: + # Saves 18 GB + RSYNC_ARGS+=" --exclude squashfs " + ;; +esac module=releases ${RSYNC} ${RSYNC_ARGS} masterreleases.gentoo.org::${module}/ ${FINALDIR}/${module}/ |