2 # Updates the source mirror, generates a new index, verifies it is serving and
3 # then swaps the old index with the new one.
5 # In case anything goes wrong, you can manually swap back the old index, see
10 /bin
/rm -rf /dcs
/NEW
/dcs
/OLD
11 /bin
/mkdir
/dcs
/NEW
/dcs
/OLD
13 /usr
/bin
/debmirror
--diff=none
-a none
--source -s main
-h deb-mirror.de
-r /debian
/dcs
/source-mirror
>/dev
/null
14 /usr
/bin
/debmirror
--diff=none
--exclude-deb-section=.
* --include golang-mode
--nocleanup -a none
--arch amd64
-s main
-h deb-mirror.de
-r /debian
/dcs
/source-mirror
>/dev
/null
17 if ! wget
-q http
://udd.debian.org
/udd-popcon.sql.xz
-O $POPCONDUMP
19 wget
-q http
://public-udd-mirror.xvm.mit.edu
/snapshots
/udd-popcon.sql.xz
-O $POPCONDUMP
21 echo 'DROP TABLE popcon; DROP TABLE popcon_src;' | psql udd
22 xz
-d -c $POPCONDUMP | psql udd
25 /usr
/bin
/compute-ranking \
26 -mirror_path=/dcs
/source-mirror
29 -mirror_path=/dcs
/source-mirror \
30 -new_unpacked_path=/dcs
/unpacked-new \
31 -old_unpacked_path=/dcs
/unpacked
>/dev
/null
34 -index_shard_path=/dcs
/NEW
/ \
35 -unpacked_path=/dcs
/unpacked-new
/ \
38 # cat > /etc/sudoers.d/dcs-verify-new-files <<EOT
39 # dcs ALL=(ALL:ALL) NOPASSWD: /dcs/verify-new-files.sh
41 # cat > /etc/sudoers.d/dcs-swap-index <<EOT
42 # dcs ALL=(ALL:ALL) NOPASSWD: /dcs/swap-index.sh
44 sudo
/dcs
/verify-new-files.sh
&& sudo
/dcs
/swap-index.sh