Commit 37c0d265 authored by Dan Ballard's avatar Dan Ballard Committed by richard
Browse files

Bug 40884: add upload-sha256sums make target and release script

parent f72fe528
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -650,12 +650,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

+5 −0
Original line number Diff line number Diff line
@@ -258,3 +258,8 @@ steps:
    debug: 0
    input_files: []
    dmg2mar: '[% INCLUDE dmg2mar %]'
  upload_sha256sums:
    build_log: '-'
    debug: 0
    input_files: []
    upload_sha256sums: '[% INCLUDE upload_sha256sums %]'
+34 −0
Original line number Diff line number Diff line
#!/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/"
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
@@ -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.