Dan Ballard pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
-
aa8564bd
by Dan Ballard at 2025-02-13T07:51:19-08:00
4 changed files:
Changes:
| ... | ... | @@ -120,12 +120,6 @@ mv [% c('input_files_by_name/noscript') %] "$TBDIR/$EXTSPATH/{73a6fe31-595d-460b |
| 120 | 120 | # Move tor and dependencies to where TB expects them
|
| 121 | 121 | mv_tbdir tor/* "$TORBINPATH"
|
| 122 | 122 | |
| 123 | - # on linux, libstdc++ lives in it's own directory
|
|
| 124 | - [% IF c("var/linux") %]
|
|
| 125 | - mkdir -p "$TBDIR/$TORBINPATH/libstdc++"
|
|
| 126 | - mv "$TBDIR/$TORBINPATH"/libstdc++.so.* "$TBDIR/$TORBINPATH/libstdc++"
|
|
| 127 | - [% END %]
|
|
| 128 | - |
|
| 129 | 123 | # the expert bundle includes tor-gencert, which isn't needed for browser releases
|
| 130 | 124 | [% IF c("var/windows") %]
|
| 131 | 125 | rm "$TBDIR/$TORBINPATH/tor-gencert.exe"
|
| ... | ... | @@ -189,6 +183,13 @@ tar -C "${TB_STAGE_DIR}" -xf [% c('input_files_by_name/firefox') %]/browser.tar. |
| 189 | 183 | done
|
| 190 | 184 | popd
|
| 191 | 185 | rm -rf $TMP_MANUAL_PATH
|
| 186 | + |
|
| 187 | + # on linux, libstdc++ lives in it's own directory
|
|
| 188 | + [% IF c("var/linux") %]
|
|
| 189 | + # For legacy reasons, libstdc++ is with tor binaries in Tor Browser.
|
|
| 190 | + # We would have to test the updater to move it outside.
|
|
| 191 | + mv "$TBDIR/libstdc++" "$TBDIR/$TORBINPATH/libstdc++"
|
|
| 192 | + [% END %]
|
|
| 192 | 193 | [% END -%]
|
| 193 | 194 | |
| 194 | 195 | [% IF c("var/namecoin") %]
|
| ... | ... | @@ -347,20 +347,24 @@ END; |
| 347 | 347 | |
| 348 | 348 | [% IF c("var/linux") -%]
|
| 349 | 349 | /var/tmp/dist/gcc/bin/"${CROSS_PREFIX}g++" $rootdir/abicheck.cc -o Browser/abicheck -std=c++17
|
| 350 | - [% IF !c("var/tor-browser") -%]
|
|
| 351 | - libdest=Browser/libstdc++
|
|
| 352 | - mkdir -p "$libdest"
|
|
| 353 | - libdir=[% c("var/libdir") %]
|
|
| 354 | - [% IF c("var/linux-cross") -%]
|
|
| 355 | - libdir="[% c("var/crosstarget") %]/$libdir"
|
|
| 356 | - [% END -%]
|
|
| 357 | - # FIXME: tor-browser-build#40749
|
|
| 358 | - cp "/var/tmp/dist/gcc/$libdir/libstdc++.so."* "$libdest"
|
|
| 359 | - [% IF c("var/asan") -%]
|
|
| 360 | - cp "/var/tmp/dist/gcc/$libdir/libasan.so."* "$libdest"
|
|
| 361 | - cp "/var/tmp/dist/gcc/$libdir/libubsan.so."* "$libdest"
|
|
| 362 | - [% END -%]
|
|
| 350 | + libdest=Browser/libstdc++
|
|
| 351 | + mkdir -p "$libdest"
|
|
| 352 | + libdir=[% c("var/libdir") %]
|
|
| 353 | + [% IF c("var/linux-cross") -%]
|
|
| 354 | + libdir="[% c("var/crosstarget") %]/$libdir"
|
|
| 363 | 355 | [% END -%]
|
| 356 | + # Not copying libstdc++.so.* as that dups with the full libstdc++.so.6.0.xx the .6 links to
|
|
| 357 | + # and libstdc++.so.6.0.28-gdb.py which is also not needed
|
|
| 358 | + cp "/var/tmp/dist/gcc/$libdir/libstdc++.so.6" "$libdest"
|
|
| 359 | + [% IF c("var/asan") -%]
|
|
| 360 | + cp "/var/tmp/dist/gcc/$libdir/libasan.so."* "$libdest"
|
|
| 361 | + cp "/var/tmp/dist/gcc/$libdir/libubsan.so."* "$libdest"
|
|
| 362 | + [% END -%]
|
|
| 363 | + # Strip and generate debuginfo for libs
|
|
| 364 | + for LIB in "$libdest"/*so*
|
|
| 365 | + do
|
|
| 366 | + "$STRIP" "$LIB"
|
|
| 367 | + done
|
|
| 364 | 368 | [% END -%]
|
| 365 | 369 | |
| 366 | 370 | echo "Starting to package artifacts $(date)"
|
| ... | ... | @@ -38,8 +38,5 @@ We plan to do it also on desktop platforms, see |
| 38 | 38 | |
| 39 | 39 | ## Other Linux libraries
|
| 40 | 40 | |
| 41 | -For Linux we also include here libstdc++ (and the sanitizers, if enabled), even
|
|
| 42 | -though they aren't needed by tor.
|
|
| 43 | - |
|
| 44 | -Also, on we provide debug symbols, but only for Linux, and only in
|
|
| 41 | +For Linux we provide debug symbols, but only for Linux, and only in
|
|
| 45 | 42 | `tor-expert-bundle`. |
| ... | ... | @@ -52,22 +52,7 @@ openssldir=/var/tmp/dist/openssl |
| 52 | 52 | cp $openssldir/lib/libssl.so.3 "$TORBINDIR"
|
| 53 | 53 | cp $openssldir/lib/libcrypto.so.3 "$TORBINDIR"
|
| 54 | 54 | cp $libeventdir/lib/libevent-2.1.so.7 "$TORBINDIR"
|
| 55 | - # We need to copy the libstdc++.so.6 for Tor Browser on older Linux distros.
|
|
| 56 | - # Copying it into /Browser, which feels more natural, and amending
|
|
| 57 | - # LD_LIBRARY_PATH breaks updates from a Tor Browser with the old
|
|
| 58 | - # LD_LIBRARY_PATH value to the Tor Browser with the newer one. Thus, we copy
|
|
| 59 | - # the libstdc++ into the directory with the libs tor depends on, too. See bug
|
|
| 60 | - # 13359 for further details.
|
|
| 61 | - libdir=[% c("var/libdir") %]
|
|
| 62 | - [% IF c("var/linux-cross") -%]
|
|
| 63 | - libdir="[% c("var/crosstarget") %]/$libdir"
|
|
| 64 | - [% END -%]
|
|
| 65 | - cp "/var/tmp/dist/gcc/$libdir/libstdc++.so.6" "$TORBINDIR"
|
|
| 66 | - [% IF c("var/asan") -%]
|
|
| 67 | - cp "/var/tmp/dist/gcc/$libdir/libasan.so.6" "$TORBINDIR"
|
|
| 68 | - cp "/var/tmp/dist/gcc/$libdir/libubsan.so.1" "$TORBINDIR"
|
|
| 69 | - [% END -%]
|
|
| 70 | - chmod 700 "$TORBINDIR"/*.so*
|
|
| 55 | + |
|
| 71 | 56 | # This is needed to make RPATH unavailable. See bug 9150.
|
| 72 | 57 | export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TORBINDIR"
|
| 73 | 58 | [% END %]
|
| ... | ... | @@ -136,17 +121,9 @@ cd $distdir |
| 136 | 121 | do
|
| 137 | 122 | LIB=`basename $i`
|
| 138 | 123 | |
| 139 | - if [ $LIB == 'libstdc++.so.6' ]; then
|
|
| 140 | - # keeping this separate to maintain reproducibility; we can probably
|
|
| 141 | - # treat this the same as the rest (though it seems libstdc++ doesn't come with
|
|
| 142 | - # any useful debug symbols since we don't build it, so maybe we should figure
|
|
| 143 | - # out how to package them
|
|
| 144 | - "$STRIP" "$TORBINDIR/$LIB"
|
|
| 145 | - else
|
|
| 146 | - "$OBJCOPY" --only-keep-debug "$TORBINDIR/$LIB" "$TORDEBUGDIR/$LIB"
|
|
| 147 | - "$STRIP" "$TORBINDIR/$LIB"
|
|
| 148 | - "$OBJCOPY" --add-gnu-debuglink="$TORDEBUGDIR/$LIB" "$TORBINDIR/$LIB"
|
|
| 149 | - fi
|
|
| 124 | + "$OBJCOPY" --only-keep-debug "$TORBINDIR/$LIB" "$TORDEBUGDIR/$LIB"
|
|
| 125 | + "$STRIP" "$TORBINDIR/$LIB"
|
|
| 126 | + "$OBJCOPY" --add-gnu-debuglink="$TORDEBUGDIR/$LIB" "$TORBINDIR/$LIB"
|
|
| 150 | 127 | done
|
| 151 | 128 | [% END %]
|
| 152 | 129 |