Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
2579da7c by Pier Angelo Vendrame at 2023-06-07T18:30:37+02:00
Bug 40847: Do not rely on du to compute the HFS size
HFS has the disadvantage that we cannot grow the filesystem while
adding files.
We have to estimate an initial size, instead, and we relied on du for
this. However, du depends on the underlying filesystem, and this could
lead to reproducibility issues (because the HFS headers tell different
sizes).
So, with this change, we compute a rough number of needed blocks by
taking the actual size of the files.
Overshooting is not a problem, because DMG is compressed with bzip2, so
unused space will be trimmed, eventually.
- - - - -
2 changed files:
- projects/browser/ddmg.sh
- tools/signing/ddmg.sh
Changes:
=====================================
projects/browser/ddmg.sh
=====================================
@@ -14,9 +14,13 @@ hfsfile="\$dmg_tmpdir/tbb-uncompressed.dmg"
export LD_PRELOAD=[% c("var/faketime_path") %]
export FAKETIME="[% USE date; GET date.format(c('timestamp'), format = '%Y-%m-%d %H:%M:%S') %]"
-# Use a similar strategy to Mozilla (they have 1.02, we have 1.1)
-size=\$(du -ms [% src %] | awk '{ print int( \$1 * 1.1 ) }')
-dd if=/dev/zero of="\$hfsfile" bs=1M count=\$size
+src_dir=[% src %]
+# 1 for ceiling and 1 for the inode
+fileblocks=\$(find "\$src_dir" -type f -printf '%s\n' | awk '{s += int(\$1 / 4096) + 2} END {print s}')
+directories=\$(find "\$src_dir" -type d | wc -l)
+# Give some room to breathe
+size=\$(echo \$((\$fileblocks + \$directories)) | awk '{print int(\$1 * 1.1)}')
+dd if=/dev/zero of="\$hfsfile" bs=4096 count=\$size
newfs_hfs -v "[% c("var/Project_Name") %]" "\$hfsfile"
pushd [% src %]
=====================================
tools/signing/ddmg.sh
=====================================
@@ -30,9 +30,12 @@ export FAKETIME="2000-01-01 01:01:01"
echo "Starting: " $(basename $dest_file)
-# Use a similar strategy to Mozilla (they have 1.02, we have 1.1)
-size=$(du -ms "$src_dir" | awk '{ print int( $1 * 1.1 ) }')
-dd if=/dev/zero of="$hfsfile" bs=1M count=$size
+# 1 for ceiling and 1 for the inode
+fileblocks=$(find "$src_dir" -type f -printf '%s\n' | awk '{s += int($1 / 4096) + 2} END {print s}')
+directories=$(find "$src_dir" -type d | wc -l)
+# Give some room to breathe
+size=$(echo $(($fileblocks + $directories)) | awk '{print int($1 * 1.1)}')
+dd if=/dev/zero of="$hfsfile" bs=4096 count=$size
newfs_hfs -v "$volume_label" "$hfsfile"
cd $src_dir
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.
Pier Angelo Vendrame pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
6ed4a3c6 by Pier Angelo Vendrame at 2023-06-07T17:02:21+02:00
fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser
Bug 41816: Workaround to fix the top navigation
Using the top navigation does not always work as expected, because we
pass a null connection state, instead of the actual state.
We could start storing the state as a member, however further refactors
are planned (see tor-browser#41710), so also directly asking the parent
for the current state works as a quick&dirty workaround.
- - - - -
1 changed file:
- browser/components/torconnect/content/aboutTorConnect.js
Changes:
=====================================
browser/components/torconnect/content/aboutTorConnect.js
=====================================
@@ -450,7 +450,7 @@ class AboutTorConnect {
if (state?.StateChanged) {
this.elements.connectButton.focus();
}
- if (state.HasEverFailed) {
+ if (state?.HasEverFailed) {
this.setBreadcrumbsStatus(
BreadcrumbStatus.Active,
BreadcrumbStatus.Default,
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/6ed4a3c…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/6ed4a3c…
You're receiving this email because of your account on gitlab.torproject.org.
richard pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
968655c2 by Richard Pospesel at 2023-06-06T18:18:14+00:00
fixup! Bug 1832832 - protect encoder accesses in Java callbacks. r=media-playback-reviewers,alwu a=pascalc
- MOZ_GUARDED_BY is just GUARDED_BY in esr 102
- - - - -
1 changed file:
- dom/media/platforms/android/AndroidDataEncoder.h
Changes:
=====================================
dom/media/platforms/android/AndroidDataEncoder.h
=====================================
@@ -56,7 +56,7 @@ class AndroidDataEncoder final : public MediaDataEncoder {
private:
Mutex mMutex;
- AndroidDataEncoder* mEncoder MOZ_GUARDED_BY(mMutex);
+ AndroidDataEncoder* mEncoder GUARDED_BY(mMutex);
};
friend class CallbacksSupport;
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/968655c…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/968655c…
You're receiving this email because of your account on gitlab.torproject.org.