Loading archive.conf +6 −21 Original line number Diff line number Diff line # vim:set sw=2 ts=2 ft=sh et: # Archive base directory # Archlinux remote rsync server ARCHIVE_RSYNC='rsync://polymorf.fr/archlinux/' # Archive local directory ARCHIVE_DIR='/srv/archive' # Package extensions Loading @@ -14,12 +17,6 @@ PKGSIG="$PKGEXT.sig" # Enable repositories archiving ARCHIVE_REPO=1 # Repositories source REPO_RSYNC='rsync://polymorf.fr/archlinux/' # Local repositories snapshot tree REPO_DIR="$ARCHIVE_DIR/repos" # Enable daily repo trees # This offer daily, weekly, monthly, yearly snapshot trees REPO_DAYLY=1 Loading @@ -36,21 +33,12 @@ REPO_PACKAGES_INDEX=1 # Better option is to let it to 0 to look only in the last snapshot REPO_PACKAGES_FULL_SEARCH=0 # Local repositories snapshot tree PACKAGES_DIR="$ARCHIVE_DIR/packages" ############################################################################## #### ISO ############################################################################## # Enable ISO archiving ARCHIVE_ISO=0 # ISO files origin ISO_RSYNC='rsync://polymorf.fr/archlinux/iso/' # Local ISO tree ISO_DIR="$ARCHIVE_DIR/iso" ARCHIVE_ISO=1 ############################################################################## #### AUR Loading @@ -59,8 +47,5 @@ ISO_DIR="$ARCHIVE_DIR/iso" # Enale AUR archiving ARCHIVE_AUR=0 # AUR tree origin # AUR Rsync Tree AUR_RSYNC='rsync://aur.archlinux.org/unsupported/' # Local AUR tree AUR_DIR="$ARCHIVE_DIR/aur" archive.sh +11 −2 Original line number Diff line number Diff line Loading @@ -64,8 +64,8 @@ repo_rsync() { msg2 'Rsyncing...' # rsync from master using last sync # we must use absolute path with --link-dest to avoid errors rsync -rltH $LINKDEST --exclude '*/.*' "$REPO_RSYNC" "$SNAP/" || fail "Unable to rsync: $REPO_RSYNC" rsync -rltH $LINKDEST --exclude '*/.*' --exclude 'iso/*' "$ARCHIVE_RSYNC" "$SNAP/" || fail "Unable to rsync: $ARCHIVE_RSYNC" # only to have a quick check of sync in listdir touch "$SNAP" Loading @@ -92,6 +92,7 @@ repo_daily() { # update the packages tree with packages in snapshoted repositories repo_packages() { msg "Updating package tree" local PACKAGES_DIR="$ARCHIVE_DIR/packages" local PKGFLAT="$PACKAGES_DIR/.all" #must be subdirectory of $PACKAGES_DIR local SCANDIR filename pkgname first parent tdst fdst Loading Loading @@ -172,6 +173,9 @@ repo_packages_index() { iso_rsync() { msg "Rsyncing ISO" local ISO_RSYNC="$ARCHIVE_RSYNC/iso/" local ISO_DIR="$ARCHIVE_DIR/iso" # ensure destination exists [[ -d "$ISO_DIR" ]] || mkdir -p "$ISO_DIR" Loading @@ -183,6 +187,7 @@ iso_rsync() { aur_rsync() { msg "Snapshoting AUR" local AUR_DIR="$ARCHIVE_DIR/aur" local SNAPR="$(date +%Y/%m/%d)" local SNAP="$AUR_DIR/$SNAPR" Loading Loading @@ -228,6 +233,8 @@ main() { umask 022 if (( $ARCHIVE_REPO )); then REPO_DIR="$ARCHIVE_DIR/repos" repo_rsync (( $REPO_DAYLY )) && repo_daily Loading @@ -238,6 +245,8 @@ main() { (( $ARCHIVE_ISO)) && iso_rsync (( $ARCHIVE_AUR)) && aur_rsync return 0 } main "$@" Loading
archive.conf +6 −21 Original line number Diff line number Diff line # vim:set sw=2 ts=2 ft=sh et: # Archive base directory # Archlinux remote rsync server ARCHIVE_RSYNC='rsync://polymorf.fr/archlinux/' # Archive local directory ARCHIVE_DIR='/srv/archive' # Package extensions Loading @@ -14,12 +17,6 @@ PKGSIG="$PKGEXT.sig" # Enable repositories archiving ARCHIVE_REPO=1 # Repositories source REPO_RSYNC='rsync://polymorf.fr/archlinux/' # Local repositories snapshot tree REPO_DIR="$ARCHIVE_DIR/repos" # Enable daily repo trees # This offer daily, weekly, monthly, yearly snapshot trees REPO_DAYLY=1 Loading @@ -36,21 +33,12 @@ REPO_PACKAGES_INDEX=1 # Better option is to let it to 0 to look only in the last snapshot REPO_PACKAGES_FULL_SEARCH=0 # Local repositories snapshot tree PACKAGES_DIR="$ARCHIVE_DIR/packages" ############################################################################## #### ISO ############################################################################## # Enable ISO archiving ARCHIVE_ISO=0 # ISO files origin ISO_RSYNC='rsync://polymorf.fr/archlinux/iso/' # Local ISO tree ISO_DIR="$ARCHIVE_DIR/iso" ARCHIVE_ISO=1 ############################################################################## #### AUR Loading @@ -59,8 +47,5 @@ ISO_DIR="$ARCHIVE_DIR/iso" # Enale AUR archiving ARCHIVE_AUR=0 # AUR tree origin # AUR Rsync Tree AUR_RSYNC='rsync://aur.archlinux.org/unsupported/' # Local AUR tree AUR_DIR="$ARCHIVE_DIR/aur"
archive.sh +11 −2 Original line number Diff line number Diff line Loading @@ -64,8 +64,8 @@ repo_rsync() { msg2 'Rsyncing...' # rsync from master using last sync # we must use absolute path with --link-dest to avoid errors rsync -rltH $LINKDEST --exclude '*/.*' "$REPO_RSYNC" "$SNAP/" || fail "Unable to rsync: $REPO_RSYNC" rsync -rltH $LINKDEST --exclude '*/.*' --exclude 'iso/*' "$ARCHIVE_RSYNC" "$SNAP/" || fail "Unable to rsync: $ARCHIVE_RSYNC" # only to have a quick check of sync in listdir touch "$SNAP" Loading @@ -92,6 +92,7 @@ repo_daily() { # update the packages tree with packages in snapshoted repositories repo_packages() { msg "Updating package tree" local PACKAGES_DIR="$ARCHIVE_DIR/packages" local PKGFLAT="$PACKAGES_DIR/.all" #must be subdirectory of $PACKAGES_DIR local SCANDIR filename pkgname first parent tdst fdst Loading Loading @@ -172,6 +173,9 @@ repo_packages_index() { iso_rsync() { msg "Rsyncing ISO" local ISO_RSYNC="$ARCHIVE_RSYNC/iso/" local ISO_DIR="$ARCHIVE_DIR/iso" # ensure destination exists [[ -d "$ISO_DIR" ]] || mkdir -p "$ISO_DIR" Loading @@ -183,6 +187,7 @@ iso_rsync() { aur_rsync() { msg "Snapshoting AUR" local AUR_DIR="$ARCHIVE_DIR/aur" local SNAPR="$(date +%Y/%m/%d)" local SNAP="$AUR_DIR/$SNAPR" Loading Loading @@ -228,6 +233,8 @@ main() { umask 022 if (( $ARCHIVE_REPO )); then REPO_DIR="$ARCHIVE_DIR/repos" repo_rsync (( $REPO_DAYLY )) && repo_daily Loading @@ -238,6 +245,8 @@ main() { (( $ARCHIVE_ISO)) && iso_rsync (( $ARCHIVE_AUR)) && aur_rsync return 0 } main "$@"