[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [builders/tor-browser-build] 08/09: Bug 40476: Add staticiforme-prepare-cdn-dist-upload
This is an automated email from the git hooks/post-receive script.
boklm pushed a commit to branch maint-11.0
in repository builders/tor-browser-build.
commit 467ce323b8f1992e28c3c52c333038b68cd7281d
Author: Nicolas Vigier <boklm@xxxxxxxxxxxxxx>
AuthorDate: Sat Apr 30 14:18:16 2022 +0200
Bug 40476: Add staticiforme-prepare-cdn-dist-upload
This is replacing tools/update/publish_version.sh
---
tools/signing/staticiforme-prepare-cdn-dist-upload | 36 ++++++++++++++++++++
tools/update/publish_version.sh | 39 ----------------------
2 files changed, 36 insertions(+), 39 deletions(-)
diff --git a/tools/signing/staticiforme-prepare-cdn-dist-upload b/tools/signing/staticiforme-prepare-cdn-dist-upload
new file mode 100755
index 0000000..d9069c0
--- /dev/null
+++ b/tools/signing/staticiforme-prepare-cdn-dist-upload
@@ -0,0 +1,36 @@
+#!/bin/bash
+set -e
+script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+source "$script_dir/functions"
+
+dist_dir="/srv/dist-master.torproject.org/htdocs/torbrowser/$tbb_version"
+cat > "$dist_dir/.htaccess" << 'EOF'
+RewriteEngine On
+RewriteRule ^sha256sums.txt$ sha256sums-unsigned-build.txt
+RewriteRule ^sha256sums.txt.asc$ sha256sums-unsigned-build.txt.asc
+RewriteRule ^sha256sums.incrementals.txt$ sha256sums-unsigned-build.incrementals.txt
+RewriteRule ^sha256sums.incrementals.txt.asc$ sha256sums-unsigned-build.incrementals.txt.asc
+EOF
+chgrp -R tb-release "$dist_dir"
+chmod 775 "$dist_dir"
+chmod 664 "$dist_dir"/*
+chmod 664 "$dist_dir/.htaccess"
+
+cdn_dir="/srv/cdn-master.torproject.org/htdocs/aus1/torbrowser/$tbb_version"
+if test -d "$cdn_dir"
+then
+ echo "Error: $cdn_dir already exists" >&2
+ exit 1
+fi
+mkdir "$cdn_dir"
+chgrp tb-release "$cdn_dir"
+chmod 775 "$cdn_dir"
+cd "$cdn_dir"
+for marfile in "$dist_dir"/*.mar; do
+ ln -f "$marfile" .
+done
+
+echo "$tbb_version is ready to upload to cdn.tpo and dist.tpo"
+echo "You should remove the old version(s) before starting the upload with:"
+echo ' static-update-component cdn.torproject.org && static-update-component dist.torproject.org'
+echo '(preferably using screen or tmux)'
diff --git a/tools/update/publish_version.sh b/tools/update/publish_version.sh
deleted file mode 100755
index 393701d..0000000
--- a/tools/update/publish_version.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-
-set -e
-
-TORBROWSER_VERSION=$1
-if [ -z "${TORBROWSER_VERSION}" ]; then
- echo "please specify version number (excluding -buildN)"
- exit 1
-fi
-
-PREV_TORBROWSER_VERSION=$2
-if [ -z "${PREV_TORBROWSER_VERSION}" ]; then
- echo "please specify a previous version number (needed for copying .htaccess file)"
- exit 1
-fi
-
-wget --continue -nH --cut-dirs=2 -r -l 1 "https://people.torproject.org/~sysrqb/builds/${TORBROWSER_VERSION}"
-#wget --continue -nH --cut-dirs=2 -r -l 1 "https://people.torproject.org/~gk/builds/${TORBROWSER_VERSION}"
-rm "${TORBROWSER_VERSION}/index.html*"
-
-date
-mv "${TORBROWSER_VERSION}" /srv/dist-master.torproject.org/htdocs/torbrowser/
-cp "/srv/dist-master.torproject.org/htdocs/torbrowser/${PREV_TORBROWSER_VERSION}/.htaccess" "/srv/dist-master.torproject.org/htdocs/torbrowser/${TORBROWSER_VERSION}/"
-chmod 775 "/srv/dist-master.torproject.org/htdocs/torbrowser/${TORBROWSER_VERSION}"
-chmod 664 "/srv/dist-master.torproject.org/htdocs/torbrowser/${TORBROWSER_VERSION}"/*
-chown -R :torwww "/srv/dist-master.torproject.org/htdocs/torbrowser/${TORBROWSER_VERSION}"
-cd "/srv/dist-master.torproject.org/htdocs/torbrowser/${TORBROWSER_VERSION}"
-for i in *.asc; do echo "$i"; gpg -q "$i" || exit; done
-date
-static-update-component dist.torproject.org
-
-mkdir "/srv/cdn-master.torproject.org/htdocs/aus1/torbrowser/${TORBROWSER_VERSION}"
-chmod 775 "/srv/cdn-master.torproject.org/htdocs/aus1/torbrowser/${TORBROWSER_VERSION}"
-cd "/srv/cdn-master.torproject.org/htdocs/aus1/torbrowser/${TORBROWSER_VERSION}"
-for marfile in /srv/dist-master.torproject.org/htdocs/torbrowser/"${TORBROWSER_VERSION}"/*.mar; do ln -f "${marfile}" .; done
-date
-static-update-component cdn.torproject.org
-
-echo "Now sync and publish update responses"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits