GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Unverified Commit de3f97f3 authored by boklm's avatar boklm
Browse files

Bug 17381: add and adapt the update_responses script

Add the update_responses and incrementals makefile rules.

The update_responses script is identical to what we have in
tor-browser-bundle.git, however the config.yml file it is using is now
generated using the infos from rbm.
parent f3fed13f
......@@ -83,6 +83,26 @@ signtag-release: submodule-update
signtag-alpha: submodule-update
$(rbm) build release --step signtag --target alpha
incrementals-release: submodule-update
$(rbm) build release --step update_responses_config --target release
tools/update-responses/download_missing_versions release
tools/update-responses/gen_incrementals release
$(rbm) build release --step hash_incrementals --target release
incrementals-alpha: submodule-update
$(rbm) build release --step update_responses_config --target alpha
tools/update-responses/download_missing_versions alpha
tools/update-responses/gen_incrementals alpha
$(rbm) build release --step hash_incrementals --target alpha
update_responses-release: submodule-update
$(rbm) build release --step update_responses_config --target release --target signed
tools/update-responses/update_responses release
update_responses-alpha: submodule-update
$(rbm) build release --step update_responses_config --target alpha --target signed
tools/update-responses/update_responses alpha
submodule-update:
git submodule update --init
......
......@@ -77,3 +77,13 @@ signtag-{release,alpha}
Create a git signed tag for the selected channel, using the version and
build number defined as var/torbrowser_version and var/torbrowser_build.
incrementals-{release,alpha}
----------------------------
Create incremental mar files for an unsigned build in the release or
alpha channel.
update_responses-{release,alpha}
--------------------------------
Create update responses xml files for a signed build in the release or
alpha channel.
......@@ -7,7 +7,8 @@ git_url: https://git.torproject.org/tor-browser.git
gpg_keyring: torbutton.gpg
var:
firefox_version: 52.3.0esr
firefox_platform_version: 52.3.0
firefox_version: '[% c("var/firefox_platform_version") %]esr'
torbrowser_branch: 7.5
torbrowser_update_channel: alpha
copyright_year: '[% exec("git show -s --format=%ci").remove("-.*") %]'
......
# vim: filetype=yaml sw=2
version: '[% c("var/torbrowser_version") %]'
output_dir: 'release/unsigned'
output_dir: release
var:
signed_status: unsigned
today: '[% USE date; date.format(format = "%Y-%m-%d") %]'
publish_dir: '[% c("version") %]-[% c("var/torbrowser_build") %]'
publish_dir: '[% c("var/signed_status") %]/[% c("version") %]-[% c("var/torbrowser_build") %]'
targets:
torbrowser-all:
......@@ -50,7 +51,7 @@ targets:
publish_dir: '[% c("var/today") %]'
alpha:
output_dir: 'alpha/unsigned'
output_dir: alpha
var:
build_target: alpha
......@@ -60,6 +61,10 @@ targets:
build_target: torbrowser-testbuild
publish_dir: ''
signed:
var:
signed_status: signed
input_files:
# Release
......@@ -112,3 +117,13 @@ steps:
debug: 0
input_files: []
signtag: '[% INCLUDE signtag %]'
update_responses_config:
build_log: '-'
debug: 0
input_files: []
update_responses_config: '[% INCLUDE update_responses_config %]'
hash_incrementals:
build_log: '-'
debug: 0
input_files: []
hash_incrementals: '[% INCLUDE hash_incrementals %]'
#!/bin/bash
[% c("var/set_default_env") -%]
cd [% shell_quote(path(dest_dir)) %]/[% c("var/signed_status") %]/[% c("version") %]-[% c("var/torbrowser_build") %]
sha256sum `ls -1 | grep '\.incremental\.mar$' | sort` > sha256sums-[% c("var/signed_status") %]-build.incrementals.txt
#!/bin/bash
[% c("var/set_default_env") -%]
cat > [% shell_quote(c("basedir")) %]/tools/update-responses/config.yml << 'EOF'
[% INCLUDE update_responses_config.yml -%]
EOF
# Update / create symlink $torbrowser_version -> $torbrowser_version-buildN
versiondir=[% shell_quote(path(dest_dir)) _ '/' _ c("var/signed_status") _ '/' _ c("version") %]
test -L "$versiondir" && rm -f "$versiondir"
test -d "$versiondir" || ln -s [% shell_quote(c("version")) %]-[% shell_quote(c("var/torbrowser_build")) %] "$versiondir"
---
appname_marfile: tor-browser
appname_bundle_osx: TorBrowser
appname_bundle_linux: tor-browser
appname_bundle_win: torbrowser-install
releases_dir: [% path(c('output_dir')) %]/[% c("var/signed_status") %]
download:
archive_url: https://archive.torproject.org/tor-package-archive/torbrowser
gpg_keyring: ../../keyring/torbrowser.gpg
bundles_url: https://dist.torproject.org/torbrowser
mars_url: https://cdn.torproject.org/aus1/torbrowser
build_targets:
linux32: Linux_x86-gcc3
linux64: Linux_x86_64-gcc3
win32:
- WINNT_x86-gcc3
- WINNT_x86-gcc3-x86
- WINNT_x86-gcc3-x64
osx32: Darwin_x86-gcc3
osx64: Darwin_x86_64-gcc3
channels:
[% pc('firefox', 'var/torbrowser_update_channel') %]: [% c("var/torbrowser_version") %]
versions:
[% c("var/torbrowser_version") %]:
platformVersion: [% pc('firefox', 'var/firefox_platform_version') %]
detailsURL: https://blog.torproject.org/blog/tor-browser-[% c("var/torbrowser_version") FILTER remove('\.') %]-released
incremental_from:
[% FOREACH v IN c("var/torbrowser_incremental_from") -%]
- [% v %]
[% END -%]
migrate_archs:
osx32: osx64
migrate_langs:
pt-PT: pt-BR
win32:
minSupportedInstructionSet: SSE2
osx32:
minSupportedOSVersion: 13.0.0
osx64:
minSupportedOSVersion: 13.0.0
......@@ -16,6 +16,9 @@ buildconf:
var:
torbrowser_version: '7.5a4'
torbrowser_build: 'build2'
torbrowser_incremental_from:
- 7.5a2
- 7.5a3
project_name: tor-browser
multi_lingual: 0
build_mar: 1
......
Tor Browser Update Responses script
===================================
This repository contains a script to generate responses for Tor Browser
updater.
See ticket [#12622](https://trac.torproject.org/projects/tor/ticket/12622)
for details.
Dependencies
------------
The following perl modules need to be installed to run the script:
FindBin YAML File::Slurp Digest::SHA XML::Writer File::Temp
IO::CaptureOutput Parallel::ForkManager XML::LibXML LWP JSON
On Debian / Ubuntu you can install them with:
```
# apt-get install libfindbin-libs-perl libyaml-perl libfile-slurp-perl \
libdigest-sha-perl libxml-writer-perl \
libio-captureoutput-perl libparallel-forkmanager-perl \
libxml-libxml-perl libwww-perl libjson-perl
```
On Red Hat / Fedora you can install them with:
```
# for module in FindBin YAML File::Slurp Digest::SHA XML::Writer \
File::Temp IO::CaptureOutput Parallel::ForkManager \
XML::LibXML LWP JSON
do yum install "perl($module)"; done
```
URL Format
----------
The URL format is:
https://something/$channel/$build_target/$tb_version/$lang?force=1
'build_target' is the OS for which the browser was built. The correspo
ndance between the build target and the OS name that we use in archive
files is defined in the config.yml file.
'tb_version' is the Tor Browser version.
'lang' is the locale.
update_responses
\ No newline at end of file
update_responses
\ No newline at end of file
update_responses
\ No newline at end of file
update_responses
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment