Dan Ballard pushed to branch maint-14.0 at The Tor Project / Applications / tor-browser-build
Commits:
-
90a754f9
by Dan Ballard at 2025-02-19T13:50:34-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") %]
|
| ... | ... | @@ -329,16 +329,20 @@ END; |
| 329 | 329 | |
| 330 | 330 | [% IF c("var/linux") -%]
|
| 331 | 331 | /var/tmp/dist/gcc/bin/g++ $rootdir/abicheck.cc -o Browser/abicheck -std=c++17
|
| 332 | - [% IF !c("var/tor-browser") -%]
|
|
| 333 | - libdest=Browser/libstdc++
|
|
| 334 | - mkdir -p "$libdest"
|
|
| 335 | - # FIXME: tor-browser-build#40749
|
|
| 336 | - cp /var/tmp/dist/gcc/[% c("var/libdir") %]/libstdc++.so.* "$libdest"
|
|
| 337 | - [% IF c("var/asan") -%]
|
|
| 338 | - cp /var/tmp/dist/gcc/[% c("var/libdir") %]/libasan.so.* "$libdest"
|
|
| 339 | - cp /var/tmp/dist/gcc/[% c("var/libdir") %]/libubsan.so.* "$libdest"
|
|
| 340 | - [% END -%]
|
|
| 332 | + libdest=Browser/libstdc++
|
|
| 333 | + mkdir -p "$libdest"
|
|
| 334 | + # Not copying libstdc++.so.* as that dups with the full libstdc++.so.6.0.xx the .6 links to
|
|
| 335 | + # and libstdc++.so.6.0.28-gdb.py which is also not needed
|
|
| 336 | + cp /var/tmp/dist/gcc/[% c("var/libdir") %]/libstdc++.so.* "$libdest"
|
|
| 337 | + [% IF c("var/asan") -%]
|
|
| 338 | + cp /var/tmp/dist/gcc/[% c("var/libdir") %]/libasan.so.* "$libdest"
|
|
| 339 | + cp /var/tmp/dist/gcc/[% c("var/libdir") %]/libubsan.so.* "$libdest"
|
|
| 341 | 340 | [% END -%]
|
| 341 | + # Strip and generate debuginfo for libs
|
|
| 342 | + for LIB in "$libdest"/*so*
|
|
| 343 | + do
|
|
| 344 | + "$STRIP" "$LIB"
|
|
| 345 | + done
|
|
| 342 | 346 | [% END -%]
|
| 343 | 347 | |
| 344 | 348 | 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 |