[tbb-commits] [builders/tor-browser-build] 08/32: Bug 40414: Add sync-* signing scripts

gitolite role git at cupani.torproject.org
Wed Apr 20 09:38:45 UTC 2022


This is an automated email from the git hooks/post-receive script.

boklm pushed a commit to branch master
in repository builders/tor-browser-build.

commit 517f4e6bd8f1f70219592f7f8ef28460166e3281
Author: Nicolas Vigier <boklm at torproject.org>
AuthorDate: Mon Jan 17 14:13:11 2022 +0100

    Bug 40414: Add sync-* signing scripts
---
 tools/signing/set-config                                          | 6 ++++++
 tools/signing/set-config.hosts                                    | 6 ++++++
 tools/signing/sync-builder-to-local                               | 8 ++++++++
 tools/signing/sync-builder-to-local.dry-run                       | 1 +
 tools/signing/sync-builder-unsigned-to-local-signed               | 8 ++++++++
 tools/signing/sync-builder-unsigned-to-local-signed.dry-run       | 1 +
 tools/signing/sync-linux-signer-to-local                          | 8 ++++++++
 tools/signing/sync-linux-signer-to-local.dry-run                  | 1 +
 tools/signing/sync-local-to-builder                               | 8 ++++++++
 tools/signing/sync-local-to-builder.dry-run                       | 1 +
 tools/signing/sync-local-to-linux-signer                          | 8 ++++++++
 tools/signing/sync-local-to-linux-signer.dry-run                  | 1 +
 tools/signing/sync-local-to-staticiforme                          | 6 ++++++
 tools/signing/sync-local-to-staticiforme.dry-run                  | 1 +
 tools/signing/sync-macos-local-to-macos-signer                    | 8 ++++++++
 tools/signing/sync-macos-local-to-macos-signer.dry-run            | 1 +
 tools/signing/sync-macos-signer-stapled-to-macos-local-stapled    | 8 ++++++++
 .../sync-macos-signer-stapled-to-macos-local-stapled.dry-run      | 1 +
 tools/signing/sync-scripts-to-linux-signer                        | 8 ++++++++
 tools/signing/sync-scripts-to-linux-signer.dry-run                | 1 +
 tools/signing/sync-scripts-to-macos-signer                        | 8 ++++++++
 tools/signing/sync-scripts-to-macos-signer.dry-run                | 1 +
 22 files changed, 100 insertions(+)

diff --git a/tools/signing/set-config b/tools/signing/set-config
index 99e1bfa..e81ccac 100644
--- a/tools/signing/set-config
+++ b/tools/signing/set-config
@@ -1,9 +1,15 @@
 . "$script_dir/set-config.tbb-version"
+. "$script_dir/set-config.hosts"
 
 bundle_locales="ar ca cs da de el en-US es-AR es-ES fa fr ga-IE he hu id is it ja ka ko lt mk ms my nb-NO nl pl pt-BR ro ru sv-SE th tr vi zh-CN zh-TW"
 
 signed_dir="$script_dir/../../$tbb_version_type/signed"
+signed_version_dir="$signed_dir/$tbb_version"
 macos_stapled_dir="$signed_dir/$tbb_version-macos-stapled"
 macos_signed_dir="$signed_dir/$tbb_version-macos-signed"
 
 faketime_path=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1
+
+echo "${BASH_ARGV0:-}" | grep -q '\.dry-run$' && DRY_RUN='--dry-run'
+test -z "${NON_INTERACTIVE:-}" || rsync_progress="--progress"
+rsync_options="-avH ${rsync_progress:-} ${DRY_RUN:-}"
diff --git a/tools/signing/set-config.hosts b/tools/signing/set-config.hosts
new file mode 100644
index 0000000..6a2d939
--- /dev/null
+++ b/tools/signing/set-config.hosts
@@ -0,0 +1,6 @@
+ssh_host_builder=tbbuild
+ssh_host_linux_signer=linux-signer-notor
+ssh_host_macos_signer=mac-signer-notor
+ssh_host_staticiforme=staticiforme.torproject.org
+
+builder_tor_browser_build_dir=/home/user/tor-browser-build
diff --git a/tools/signing/sync-builder-to-local b/tools/signing/sync-builder-to-local
new file mode 100755
index 0000000..5a251b5
--- /dev/null
+++ b/tools/signing/sync-builder-to-local
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -e
+script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+source "$script_dir/functions"
+
+var_is_defined ssh_host_builder builder_tor_browser_build_dir
+
+rsync $rsync_options "$ssh_host_builder:$builder_tor_browser_build_dir/$tbb_version_type/signed/$tbb_version/" "$signed_version_dir/"
diff --git a/tools/signing/sync-builder-to-local.dry-run b/tools/signing/sync-builder-to-local.dry-run
new file mode 120000
index 0000000..f6de9e2
--- /dev/null
+++ b/tools/signing/sync-builder-to-local.dry-run
@@ -0,0 +1 @@
+sync-builder-to-local
\ No newline at end of file
diff --git a/tools/signing/sync-builder-unsigned-to-local-signed b/tools/signing/sync-builder-unsigned-to-local-signed
new file mode 100755
index 0000000..769faf2
--- /dev/null
+++ b/tools/signing/sync-builder-unsigned-to-local-signed
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -e
+script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+source "$script_dir/functions"
+
+var_is_defined ssh_host_builder builder_tor_browser_build_dir
+
+rsync $rsync_options "$ssh_host_builder:$builder_tor_browser_build_dir/$tbb_version_type/unsigned/$tbb_version-build$tbb_version_build/" "$signed_version_dir/"
diff --git a/tools/signing/sync-builder-unsigned-to-local-signed.dry-run b/tools/signing/sync-builder-unsigned-to-local-signed.dry-run
new file mode 120000
index 0000000..d3a4554
--- /dev/null
+++ b/tools/signing/sync-builder-unsigned-to-local-signed.dry-run
@@ -0,0 +1 @@
+sync-builder-unsigned-to-local-signed
\ No newline at end of file
diff --git a/tools/signing/sync-linux-signer-to-local b/tools/signing/sync-linux-signer-to-local
new file mode 100755
index 0000000..ea29971
--- /dev/null
+++ b/tools/signing/sync-linux-signer-to-local
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -e
+script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+source "$script_dir/functions"
+
+var_is_defined ssh_host_linux_signer
+
+rsync $rsync_options "$ssh_host_linux_signer:$tbb_version/" "$signed_version_dir/"
diff --git a/tools/signing/sync-linux-signer-to-local.dry-run b/tools/signing/sync-linux-signer-to-local.dry-run
new file mode 120000
index 0000000..6c687e1
--- /dev/null
+++ b/tools/signing/sync-linux-signer-to-local.dry-run
@@ -0,0 +1 @@
+sync-linux-signer-to-local
\ No newline at end of file
diff --git a/tools/signing/sync-local-to-builder b/tools/signing/sync-local-to-builder
new file mode 100755
index 0000000..f6a7e25
--- /dev/null
+++ b/tools/signing/sync-local-to-builder
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -e
+script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+source "$script_dir/functions"
+
+var_is_defined ssh_host_builder builder_tor_browser_build_dir
+
+rsync $rsync_options "$signed_version_dir/" "$ssh_host_builder:$builder_tor_browser_build_dir/$tbb_version_type/signed/$tbb_version/"
diff --git a/tools/signing/sync-local-to-builder.dry-run b/tools/signing/sync-local-to-builder.dry-run
new file mode 120000
index 0000000..24f6e15
--- /dev/null
+++ b/tools/signing/sync-local-to-builder.dry-run
@@ -0,0 +1 @@
+sync-local-to-builder
\ No newline at end of file
diff --git a/tools/signing/sync-local-to-linux-signer b/tools/signing/sync-local-to-linux-signer
new file mode 100755
index 0000000..cc4192c
--- /dev/null
+++ b/tools/signing/sync-local-to-linux-signer
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -e
+script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+source "$script_dir/functions"
+
+var_is_defined ssh_host_linux_signer
+
+rsync $rsync_options "$signed_version_dir/" "$ssh_host_linux_signer:$tbb_version/"
diff --git a/tools/signing/sync-local-to-linux-signer.dry-run b/tools/signing/sync-local-to-linux-signer.dry-run
new file mode 120000
index 0000000..c4498ad
--- /dev/null
+++ b/tools/signing/sync-local-to-linux-signer.dry-run
@@ -0,0 +1 @@
+sync-local-to-linux-signer
\ No newline at end of file
diff --git a/tools/signing/sync-local-to-staticiforme b/tools/signing/sync-local-to-staticiforme
new file mode 100755
index 0000000..2372623
--- /dev/null
+++ b/tools/signing/sync-local-to-staticiforme
@@ -0,0 +1,6 @@
+#!/bin/bash
+set -e
+script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+source "$script_dir/functions"
+
+rsync $rsync_options "$signed_version_dir/" "$ssh_host_staticiforme:/srv/dist-master.torproject.org/htdocs/torbrowser/$tbb_version/"
diff --git a/tools/signing/sync-local-to-staticiforme.dry-run b/tools/signing/sync-local-to-staticiforme.dry-run
new file mode 120000
index 0000000..3e0a7fd
--- /dev/null
+++ b/tools/signing/sync-local-to-staticiforme.dry-run
@@ -0,0 +1 @@
+sync-local-to-staticiforme
\ No newline at end of file
diff --git a/tools/signing/sync-macos-local-to-macos-signer b/tools/signing/sync-macos-local-to-macos-signer
new file mode 100755
index 0000000..75dd3a1
--- /dev/null
+++ b/tools/signing/sync-macos-local-to-macos-signer
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -e
+script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+source "$script_dir/functions"
+
+var_is_defined ssh_host_macos_signer
+
+rsync $rsync_options "$signed_version_dir"/*.dmg "$ssh_host_macos_signer:$tbb_version/"
diff --git a/tools/signing/sync-macos-local-to-macos-signer.dry-run b/tools/signing/sync-macos-local-to-macos-signer.dry-run
new file mode 120000
index 0000000..e8f1262
--- /dev/null
+++ b/tools/signing/sync-macos-local-to-macos-signer.dry-run
@@ -0,0 +1 @@
+sync-macos-local-to-macos-signer
\ No newline at end of file
diff --git a/tools/signing/sync-macos-signer-stapled-to-macos-local-stapled b/tools/signing/sync-macos-signer-stapled-to-macos-local-stapled
new file mode 100755
index 0000000..2d170bf
--- /dev/null
+++ b/tools/signing/sync-macos-signer-stapled-to-macos-local-stapled
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -e
+script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+source "$script_dir/functions"
+
+var_is_defined ssh_host_macos_signer
+
+rsync $rsync_options "$ssh_host_macos_signer:$tbb_version/*-stapled.zip" "$macos_stapled_dir/"
diff --git a/tools/signing/sync-macos-signer-stapled-to-macos-local-stapled.dry-run b/tools/signing/sync-macos-signer-stapled-to-macos-local-stapled.dry-run
new file mode 120000
index 0000000..f397acd
--- /dev/null
+++ b/tools/signing/sync-macos-signer-stapled-to-macos-local-stapled.dry-run
@@ -0,0 +1 @@
+sync-macos-signer-stapled-to-macos-local-stapled
\ No newline at end of file
diff --git a/tools/signing/sync-scripts-to-linux-signer b/tools/signing/sync-scripts-to-linux-signer
new file mode 100755
index 0000000..6e46120
--- /dev/null
+++ b/tools/signing/sync-scripts-to-linux-signer
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -e
+script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+source "$script_dir/functions"
+
+var_is_defined ssh_host_linux_signer
+
+rsync $rsync_options "$script_dir/" "$ssh_host_linux_signer:signing-$tbb_version_type/"
diff --git a/tools/signing/sync-scripts-to-linux-signer.dry-run b/tools/signing/sync-scripts-to-linux-signer.dry-run
new file mode 120000
index 0000000..4fa2b82
--- /dev/null
+++ b/tools/signing/sync-scripts-to-linux-signer.dry-run
@@ -0,0 +1 @@
+sync-scripts-to-linux-signer
\ No newline at end of file
diff --git a/tools/signing/sync-scripts-to-macos-signer b/tools/signing/sync-scripts-to-macos-signer
new file mode 100755
index 0000000..d56328d
--- /dev/null
+++ b/tools/signing/sync-scripts-to-macos-signer
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -e
+script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+source "$script_dir/functions"
+
+var_is_defined ssh_host_macos_signer
+
+rsync $rsync_options "$script_dir/" "$ssh_host_macos_signer:signing-$tbb_version_type/"
diff --git a/tools/signing/sync-scripts-to-macos-signer.dry-run b/tools/signing/sync-scripts-to-macos-signer.dry-run
new file mode 120000
index 0000000..1f00d0a
--- /dev/null
+++ b/tools/signing/sync-scripts-to-macos-signer.dry-run
@@ -0,0 +1 @@
+sync-scripts-to-macos-signer
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tbb-commits mailing list