[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser-bundle/maint-6.0] Bug 19854: fix URLs in downloads.json file
commit f9d27acb00da3a44206024a6ee3549173d61e6fa
Author: Nicolas Vigier <boklm@xxxxxxxxxxxxxx>
Date: Mon Aug 8 12:14:23 2016 +0200
Bug 19854: fix URLs in downloads.json file
---
tools/update-responses/config.yml | 14 +++++++-------
tools/update-responses/update_responses | 15 +++++++++------
2 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/tools/update-responses/config.yml b/tools/update-responses/config.yml
index 36192fc..ff17d28 100644
--- a/tools/update-responses/config.yml
+++ b/tools/update-responses/config.yml
@@ -3,6 +3,8 @@ releases_dir: ../../gitian
download:
archive_url: https://archive.torproject.org/tor-package-archive/torbrowser
gpg_keyring: ../../gitian/gpg/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
@@ -13,13 +15,12 @@ build_targets:
osx32: Darwin_x86-gcc3
osx64: Darwin_x86_64-gcc3
channels:
- alpha: 6.0a5
+ alpha: 6.5a2
release: 6.0.3
versions:
6.0.3:
platformVersion: 45.3.0
detailsURL: https://blog.torproject.org/blog/tor-browser-603-released
- download_url: https://cdn.torproject.org/aus1/torbrowser/6.0.3
incremental_from:
- 6.0.2
migrate_archs:
@@ -27,12 +28,11 @@ versions:
osx32:
minSupportedOSVersion: 10.8
detailsURL: https://blog.torproject.org/blog/end-life-plan-tor-browser-32-bit-macs#updating
- 6.0a5:
- platformVersion: 45.1.0
- detailsURL: https://blog.torproject.org/blog/tor-browser-60a5-released
- download_url: https://cdn.torproject.org/aus1/torbrowser/6.0a5
+ 6.5a2:
+ platformVersion: 45.3.0
+ detailsURL: https://blog.torproject.org/blog/tor-browser-65a2-released
incremental_from:
- - 6.0a4
+ - 6.5a1
migrate_archs:
osx32: osx64
osx32:
diff --git a/tools/update-responses/update_responses b/tools/update-responses/update_responses
index cf307da..faa1037 100755
--- a/tools/update-responses/update_responses
+++ b/tools/update-responses/update_responses
@@ -84,6 +84,7 @@ sub get_version_files {
return if $config->{versions}{$version}{files};
my $files = {};
my $vdir = "$releases_dir/$version";
+ my $download_url = "$config->{download}{mars_url}/$version";
opendir(my $d, $vdir) or exit_error "Error opening directory $vdir";
foreach my $file (readdir $d) {
next unless -f "$vdir/$file";
@@ -91,7 +92,7 @@ sub get_version_files {
my ($os, $lang) = ($1, $2);
$files->{$os}{$lang}{complete} = {
type => 'complete',
- URL => "$config->{versions}{$version}{download_url}/$file",
+ URL => "$download_url/$file",
size => -s "$vdir/$file",
hashFunction => 'SHA512',
hashValue => get_sha512_hex_of_file("$vdir/$file"),
@@ -102,7 +103,7 @@ sub get_version_files {
my ($os, $from_version, $lang) = ($1, $2, $3);
$files->{$os}{$lang}{partial}{$from_version} = {
type => 'partial',
- URL => "$config->{versions}{$version}{download_url}/$file",
+ URL => "$download_url/$file",
size => -s "$vdir/$file",
hashFunction => 'SHA512',
hashValue => get_sha512_hex_of_file("$vdir/$file"),
@@ -117,6 +118,7 @@ sub get_version_downloads {
my ($config, $version) = @_;
my $downloads = {};
my $vdir = "$releases_dir/$version";
+ my $download_url = "$config->{download}{bundles_url}/$version";
opendir(my $d, $vdir) or exit_error "Error opening directory $vdir";
foreach my $file (readdir $d) {
next unless -f "$vdir/$file";
@@ -131,8 +133,8 @@ sub get_version_downloads {
next;
}
$downloads->{$os}{$lang} = {
- binary => "$config->{versions}{$version}{download_url}/$file",
- sig => "$config->{versions}{$version}{download_url}/$file.asc",
+ binary => "$download_url/$file",
+ sig => "$download_url/$file.asc",
};
}
closedir $d;
@@ -175,12 +177,13 @@ sub create_incremental_mar {
my $mar_file = "tor-browser-$os-${from_version}-${new_version}_$lang.incremental.mar";
print "Starting $mar_file\n";
my $mar_file_path = "$releases_dir/$new_version/$mar_file";
+ my $download_url = "$config->{download}{mars_url}/$new_version";
my $finished_file = sub {
exit_error "Error creating $mar_file" unless $_[1] == 0;
print "Finished $mar_file\n";
$config->{versions}{$new_version}{files}{$os}{$lang}{partial}{$from_version} = {
type => 'partial',
- URL => "$config->{versions}{$new_version}{download_url}/$mar_file",
+ URL => "$download_url/$mar_file",
size => -s $mar_file_path,
hashFunction => 'SHA512',
hashValue => get_sha512_hex_of_file($mar_file_path),
@@ -205,7 +208,7 @@ sub create_incremental_mars_for_version {
$pm->run_on_finish(sub { $_[2]->(@_) });
my $v = $config->{versions}{$version};
foreach my $from_version (@{$v->{incremental_from}}) {
- $config->{versions}{$from_version} //= { download_url => '' };
+ $config->{versions}{$from_version} //= {};
get_version_files($config, $from_version);
my $from_v = $config->{versions}{$from_version};
foreach my $os (keys %{$v->{files}}) {
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits