richard pushed to branch main at The Tor Project / Applications / RBM
Commits:
9336d42f by Nicolas Vigier at 2024-01-25T11:42:58+01:00
Bug 40068: Use Capture::Tiny instead of IO::CaptureOutput
The IO::CaptureOutput perl module is deprecated, so we switch to
Capture::Tiny.
The Capture::Tiny module does not provide a capture_exec function
similar to the one from IO::CaptureOutput, so we implement one using the
same name, which avoids changing all the places where we were using it.
- - - - -
2 changed files:
- lib/RBM.pm
- lib/RBM/DefaultConfig.pm
Changes:
=====================================
lib/RBM.pm
=====================================
@@ -10,7 +10,7 @@ use YAML::XS qw(LoadFile);
use Template;
use File::Basename;
use IO::Handle;
-use IO::CaptureOutput qw(capture_exec);
+use Capture::Tiny qw(capture);
use File::Temp;
use File::Copy;
use File::Copy::Recursive qw(fcopy);
@@ -29,7 +29,7 @@ use feature "state";
BEGIN {
require Exporter;
our @ISA = qw(Exporter);
- our @EXPORT = qw(exit_error);
+ our @EXPORT = qw(exit_error capture_exec);
}
our $config;
@@ -308,6 +308,15 @@ sub exit_error {
exit (exists $_[1] ? $_[1] : 1);
}
+sub capture_exec {
+ my @cmd = @_;
+ my ($stdout, $stderr, $exit) = capture {
+ system(@cmd);
+ };
+ return ($stdout, $stderr, $exit == 0, $exit) if wantarray();
+ return $stdout;
+}
+
sub set_git_gpg_wrapper {
my ($project) = @_;
my $w = project_config($project, 'gpg_wrapper');
=====================================
lib/RBM/DefaultConfig.pm
=====================================
@@ -10,9 +10,8 @@ BEGIN {
}
use File::Basename;
-use RBM;
+use RBM qw(capture_exec);
use Cwd qw(getcwd);
-use IO::CaptureOutput qw(capture_exec);
use File::Temp;
use File::Path qw(make_path);
View it on GitLab: https://gitlab.torproject.org/tpo/applications/rbm/-/commit/9336d42fdd669af…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/rbm/-/commit/9336d42fdd669af…
You're receiving this email because of your account on gitlab.torproject.org.
boklm pushed to branch maint-13.0 at The Tor Project / Applications / tor-browser-build
Commits:
af1c78b5 by Nicolas Vigier at 2024-01-25T11:19:16+01:00
Update rbm for rbm#40067
- - - - -
1 changed file:
- rbm
Changes:
=====================================
rbm
=====================================
@@ -1 +1 @@
-Subproject commit 40acf540fe75055df2eb78454f070f57d0804729
+Subproject commit b5e5b04aaf677c4bacfb5ace45598313286bfdf6
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/a…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/a…
You're receiving this email because of your account on gitlab.torproject.org.
boklm pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
83a1a381 by Nicolas Vigier at 2024-01-25T11:17:52+01:00
Update rbm for rbm#40067
- - - - -
1 changed file:
- rbm
Changes:
=====================================
rbm
=====================================
@@ -1 +1 @@
-Subproject commit 40acf540fe75055df2eb78454f070f57d0804729
+Subproject commit b5e5b04aaf677c4bacfb5ace45598313286bfdf6
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/8…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/8…
You're receiving this email because of your account on gitlab.torproject.org.
boklm pushed to branch tor-browser-115.7.0esr-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
6292bbc9 by Nicolas Vigier at 2024-01-25T10:26:11+01:00
fixup! Bug 41668: Tweaks to the Base Browser updater for Tor Browser
Bug 42293: Don't disable updater when run by torbrowser-launcher flatpak
When the TORBROWSER_LAUNCHER environment variable is set (which
is set by torbrowser-launcher since version 0.3.7) we assume that Tor
Browser is not installed by a Flatkpak. Although torbrowser-launcher
itself can be installed by a Flatpak, this should not prevent the
updater from working.
- - - - -
1 changed file:
- widget/gtk/WidgetUtilsGtk.cpp
Changes:
=====================================
widget/gtk/WidgetUtilsGtk.cpp
=====================================
@@ -138,6 +138,11 @@ void SetLastMousePressEvent(GdkEvent* aEvent) {
bool IsRunningUnderSnap() { return !!GetSnapInstanceName(); }
bool IsRunningUnderFlatpak() {
+ // tor-browser#42293: Don't disable updater when run by torbrowser-launcher flatpak
+ const char* torbrowserLauncher = g_getenv("TORBROWSER_LAUNCHER");
+ if (torbrowserLauncher) {
+ return false;
+ }
// https://gitlab.gnome.org/GNOME/gtk/-/blob/4300a5c609306ce77cbc8a3580c19201d…
static bool sRunning = [] {
return g_file_test("/.flatpak-info", G_FILE_TEST_EXISTS);
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/6292bbc…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/6292bbc…
You're receiving this email because of your account on gitlab.torproject.org.
boklm pushed to branch tor-browser-115.7.0esr-13.5-1 at The Tor Project / Applications / Tor Browser
Commits:
5898a9ab by Nicolas Vigier at 2024-01-25T10:21:48+01:00
fixup! Bug 41668: Tweaks to the Base Browser updater for Tor Browser
Bug 42293: Don't disable updater when run by torbrowser-launcher flatpak
When the TORBROWSER_LAUNCHER environment variable is set (which
is set by torbrowser-launcher since version 0.3.7) we assume that Tor
Browser is not installed by a Flatkpak. Although torbrowser-launcher
itself can be installed by a Flatpak, this should not prevent the
updater from working.
- - - - -
1 changed file:
- widget/gtk/WidgetUtilsGtk.cpp
Changes:
=====================================
widget/gtk/WidgetUtilsGtk.cpp
=====================================
@@ -138,6 +138,11 @@ void SetLastMousePressEvent(GdkEvent* aEvent) {
bool IsRunningUnderSnap() { return !!GetSnapInstanceName(); }
bool IsRunningUnderFlatpak() {
+ // tor-browser#42293: Don't disable updater when run by torbrowser-launcher flatpak
+ const char* torbrowserLauncher = g_getenv("TORBROWSER_LAUNCHER");
+ if (torbrowserLauncher) {
+ return false;
+ }
// https://gitlab.gnome.org/GNOME/gtk/-/blob/4300a5c609306ce77cbc8a3580c19201d…
static bool sRunning = [] {
return g_file_test("/.flatpak-info", G_FILE_TEST_EXISTS);
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5898a9a…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5898a9a…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
23474930 by Pier Angelo Vendrame at 2024-01-24T17:08:30+01:00
Bug 41066: Compress the APKs more
Our APK was refused by the Play Store as too big.
As a workaround, for this release we can try to compress the APK more,
by extracting it and repacking it with 7-zip.
The preferred and long-term solution would be to switch to Android App
Bundles, but this might require some changes to our signing scripts.
- - - - -
2 changed files:
- projects/browser/build.android
- projects/browser/config
Changes:
=====================================
projects/browser/build.android
=====================================
@@ -46,13 +46,19 @@ mv $rootdir/[% c('input_files_by_name/noscript') %] "$noscript_path"
mv $rootdir/allowed_addons.json $assets_dir/allowed_addons.json
-[% c('zip', {
- zip_src => [ '$assets_dir' ],
- zip_args => '$apk',
- }) %]
+mkdir apk
+pushd apk
+7zz x "$apk"
+cp -R ../assets ./
+find -type f -exec touch -m -t '[% USE date; date.format(pc("firefox-android", "timestamp"), format = "%Y%m%d%H%M") %]' {} \;
+find -type f ! -name resources.arsc -printf '%P\n' | sort > ../files.txt
+7zz a -tzip -mx9 -mtc- -spf ../repacked.apk @../files.txt
+# resources.arsc must not be compressed as per the APK specifications
+7zz a -tzip -mm=Copy -mtc- ../repacked.apk resources.arsc
+popd
aligned_apk=$(basename $apk .apk)_aligned.apk
-zipalign -vp 4 $apk $aligned_apk
+zipalign -vp 4 repacked.apk $aligned_apk
# Sign a QA build. This .apk is not a debug version and doesn't contain a debug
# flag in the manifest.
=====================================
projects/browser/config
=====================================
@@ -46,7 +46,13 @@ targets:
var:
verify_allowed_addons: 1
arch_deps:
- - openjdk-11-jdk-headless
+ - 7zip
+ - openjdk-17-jdk-headless
+ container:
+ # 7zip is in backports in bullseye, and we can already use Java 17 for
+ # apksigner.
+ suite: bookworm
+ arch: amd64
torbrowser:
var:
prefs_file: 000-tor-browser.js
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/2…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/2…
You're receiving this email because of your account on gitlab.torproject.org.
richard pushed to branch main at The Tor Project / Applications / RBM
Commits:
b5e5b04a by Nicolas Vigier at 2024-01-24T10:24:19+01:00
Bug 40067: Use --no-verbose wget option when not running in a terminal
Use the `--no-verbose` option when stdout is not a tty. We avoid setting
the option when `getting_id` is set, in order to have constant
`input_file_id` when `urlget` is being used inside the `exec` script in
`input_files`.
- - - - -
2 changed files:
- doc/options_misc.asc
- lib/RBM/DefaultConfig.pm
Changes:
=====================================
doc/options_misc.asc
=====================================
@@ -21,6 +21,9 @@ abbrev_length::
This option sets the length of the abbreviated commits, when
using the +abbrev+ option.
+isatty::
+ This option is true when stdout is connected to a tty.
+
tar::
Use this options instead of 'tar' in build scripts when you want
to create deterministic tar files. This options set tar arguments
=====================================
lib/RBM/DefaultConfig.pm
=====================================
@@ -151,6 +151,7 @@ our %default_config = (
debug => 0,
compress_tar => 'gz',
version => "[%- exit_error('No version specified for ' _ project); -%]",
+ isatty => sub { -t STDOUT },
####
####
####
@@ -577,7 +578,7 @@ set -e
END;
-%]
tmpfile="\$(mktemp -p [% shell_quote(rbm_tmp_dir) %])"
-wget -O"\$tmpfile" [% shell_quote(c("URL")) %]
+wget[% IF !c("getting_id") && !c("isatty") %] --no-verbose[% END %] -O"\$tmpfile" [% shell_quote(c("URL")) %]
mv -f "\$tmpfile" [% shell_quote(dest_dir _ "/" _ c("filename")) %]
URLGET
sig_ext => [ qw(gpg asc sig) ],
View it on GitLab: https://gitlab.torproject.org/tpo/applications/rbm/-/commit/b5e5b04aaf677c4…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/rbm/-/commit/b5e5b04aaf677c4…
You're receiving this email because of your account on gitlab.torproject.org.