[tbb-commits] [Git][tpo/applications/tor-browser-build][maint-13.0] 2 commits: Bug 40884: add upload-sha256sums make target and release script
Pier Angelo Vendrame (@pierov)
git at gitlab.torproject.org
Tue Dec 5 07:46:53 UTC 2023
Pier Angelo Vendrame pushed to branch maint-13.0 at The Tor Project / Applications / tor-browser-build
Commits:
744d13bf by Dan Ballard at 2023-12-05T08:46:28+01:00
Bug 40884: add upload-sha256sums make target and release script
- - - - -
bfc545e4 by Pier Angelo Vendrame at 2023-12-05T08:46:45+01:00
Bug 41026: Use a relative target_dir in upload_sha256sums
~/ is expanded by the shell issuing the command, so it results in the
local home directory, not the remote one.
However, since we are using a path that is relative to the home, we
can simply use a relative one.
- - - - -
4 changed files:
- Makefile
- projects/release/config
- + projects/release/upload_sha256sums
- rbm.local.conf.example
Changes:
=====================================
Makefile
=====================================
@@ -668,12 +668,28 @@ cargo_vendor-rcodesign: submodule-update
submodule-update:
git submodule update --init
+# requires tpo_user variable be set in rbm.local.conf
+torbrowser-upload-sha256sums-release: submodule-update
+ $(rbm) build release --step upload_sha256sums --target release --target torbrowser
+
+# requires tpo_user variable be set in rbm.local.conf
+torbrowser-upload-sha256sums-alpha: submodule-update
+ $(rbm) build release --step upload_sha256sums --target alpha --target torbrowser
+
torbrowser-signtag-release: submodule-update
$(rbm) build release --step signtag --target release --target torbrowser
torbrowser-signtag-alpha: submodule-update
$(rbm) build release --step signtag --target alpha --target torbrowser
+# requires tpo_user variable be set in rbm.local.conf
+mullvadbrowser-upload-sha256sums-release: submodule-update
+ $(rbm) build release --step upload_sha256sums --target release --target mullvadbrowser
+
+# requires tpo_user variable be set in rbm.local.conf
+mullvadbrowser-upload-sha256sums-alpha: submodule-update
+ $(rbm) build release --step upload_sha256sums --target alpha --target mullvadbrowser
+
mullvadbrowser-signtag-release: submodule-update
$(rbm) build release --step signtag --target release --target mullvadbrowser
=====================================
projects/release/config
=====================================
@@ -258,6 +258,11 @@ steps:
debug: 0
input_files: []
dmg2mar: '[% INCLUDE dmg2mar %]'
+ upload_sha256sums:
+ build_log: '-'
+ debug: 0
+ input_files: []
+ upload_sha256sums: '[% INCLUDE upload_sha256sums %]'
compare_windows_signed_unsigned_exe:
build_log: '-'
debug: 0
=====================================
projects/release/upload_sha256sums
=====================================
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Tool to sign sha256sums of builds and upload them to where signing/download-unsigned-sha256sums-gpg-signatures-from-people-tpo expects them to be
+
+version=[% c("version") %]-[% c("var/torbrowser_build") %]
+signed=[% c("var/signed_status") %]
+channel=[% c("var/build_target") %]
+browser=[% c("var/browser_type") %]
+
+src_dir=[% shell_quote(path(dest_dir)) %]/$signed/$version
+
+target_dir=public_html/builds/$browser/$channel/$version/
+
+echo "browser:$browser channel:$channel signed:$signed version:$version"
+
+if [ ! -d $src_dir ]; then
+ echo "ERROR: $src_dir does not exist!"
+ exit
+fi
+
+cd $src_dir
+for i in sha256sums*.txt; do
+ if [ ! -f $i.asc ] ; then
+ gpg -abs [% c("var/sign_build_gpg_opts") %] $i;
+ fi
+done
+
+if [ -z '[% c("var/tpo_user") %]' ]; then
+ print "tpo_user variable unset, required to upload to people.torproject.org. Please set in rbm.local.conf"
+ exit
+fi
+
+ssh [% c("var/tpo_user") %]@people.torproject.org "mkdir -p $target_dir"
+rsync sha256sums*.* [% c("var/tpo_user") %]@people.torproject.org:$target_dir
+echo "Synced sha256sums to https://people.torproject.org/~[% c("var/tpo_user") %]/builds/$browser/$channel/$version/"
=====================================
rbm.local.conf.example
=====================================
@@ -55,6 +55,11 @@ var:
### and sha256sums-unsigned-build.incrementals.txt files.
#sign_build_gpg_opts: '--local-user XXXXXXXX'
+ ### The var/tpo_user option is used on the release upload_sha256sums step
+ ### and is the user on people.torproject.org that ssh/rsync will try to
+ ### upload the files to
+ #tpo_user: username
+
### The clean configuration is used by the cleaning script to find the
### branches and build targets you are using, to compute the list of
### files that should be kept.
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/7e8b72791e1b53670aef05a61f59777a6cb4e14f...bfc545e40437cfaae25eaf27c3a88a9da0199d8e
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/7e8b72791e1b53670aef05a61f59777a6cb4e14f...bfc545e40437cfaae25eaf27c3a88a9da0199d8e
You're receiving this email because of your account on gitlab.torproject.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20231205/12dcb5b4/attachment-0001.htm>
More information about the tbb-commits
mailing list