Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
-
b5acc813
by Dan Ballard at 2024-02-28T12:59:28-08:00
7 changed files:
- projects/browser/build
- projects/browser/build.android
- projects/tor-android-service/build
- + projects/tor-expert-bundle/AndroidManifest.xml
- projects/tor-expert-bundle/build
- projects/tor-expert-bundle/config
- projects/tor-onion-proxy-library/build
Changes:
... | ... | @@ -90,10 +90,10 @@ mv [% c('input_files_by_name/noscript') %] "$TBDIR/$EXTSPATH/{73a6fe31-595d-460b |
90 | 90 | [% END -%]
|
91 | 91 | }
|
92 | 92 | |
93 | - tar -xvf [% c('input_files_by_name/tor-expert-bundle') %]
|
|
93 | + tar -xvf [% c('input_files_by_name/tor-expert-bundle') %]/tor-expert-bundle.tar.gz
|
|
94 | 94 | [% IF c("var/macos_universal") -%]
|
95 | 95 | mkdir aarch64
|
96 | - tar -C aarch64 -xf [% c('input_files_by_name/tor-expert-bundle-aarch64') %]
|
|
96 | + tar -C aarch64 -xf [% c('input_files_by_name/tor-expert-bundle-aarch64') %]/tor-expert-bundle.tar.gz
|
|
97 | 97 | [% END -%]
|
98 | 98 | |
99 | 99 | # geoip(6) and anything else that belongs in the data dir from the expert bundle
|
... | ... | @@ -451,13 +451,13 @@ fi |
451 | 451 | [%IF c("var/tor-browser") -%]
|
452 | 452 | tor_expert_bundle_src="[% c("input_files_by_name/tor-expert-bundle") %]"
|
453 | 453 | # strip off trailing "$buildid.tar.gz"
|
454 | - tor_expert_bundle_dest=${tor_expert_bundle_src:0:-14}.tar.gz
|
|
455 | - cp $rootdir/[% c("input_files_by_name/tor-expert-bundle") %] "$OUTDIR"/$tor_expert_bundle_dest
|
|
454 | + tor_expert_bundle_dest=${tor_expert_bundle_src:0:-7}.tar.gz
|
|
455 | + cp $rootdir/[% c("input_files_by_name/tor-expert-bundle") %]/tor-expert-bundle.tar.gz "$OUTDIR"/$tor_expert_bundle_dest
|
|
456 | 456 | [% IF c("var/macos_universal") %]
|
457 | 457 | tor_expert_bundle_src="[% c('input_files_by_name/tor-expert-bundle-aarch64') %]"
|
458 | 458 | # strip off trailing "$buildid.tar.gz"
|
459 | - tor_expert_bundle_dest=${tor_expert_bundle_src:0:-14}.tar.gz
|
|
460 | - cp $rootdir/[% c('input_files_by_name/tor-expert-bundle-aarch64') %] "$OUTDIR"/$tor_expert_bundle_dest
|
|
459 | + tor_expert_bundle_dest=${tor_expert_bundle_src:0:-7}.tar.gz
|
|
460 | + cp $rootdir/[% c('input_files_by_name/tor-expert-bundle-aarch64') %]/tor-expert-bundle.tar.gz "$OUTDIR"/$tor_expert_bundle_dest
|
|
461 | 461 | [% END -%]
|
462 | 462 | [% END -%]
|
463 | 463 | [% IF c("var/build_infos_json") -%]
|
... | ... | @@ -24,7 +24,7 @@ cd /var/tmp/build |
24 | 24 | mv $rootdir/[% c('input_files_by_name/noscript') %] "$noscript_path"
|
25 | 25 | |
26 | 26 | [%IF c("var/tor-browser") -%]
|
27 | - tar -xaf "$rootdir/[% c("input_files_by_name/tor-expert-bundle") %]" tor/pluggable_transports/pt_config.json
|
|
27 | + tar -xaf "$rootdir/[% c("input_files_by_name/tor-expert-bundle") %]/tor-expert-bundle.tar.gz" tor/pluggable_transports/pt_config.json
|
|
28 | 28 | [% END -%]
|
29 | 29 | unzip -j "$apk" assets/omni.ja
|
30 | 30 | mkdir omni
|
... | ... | @@ -70,8 +70,8 @@ unsign_patch="[% dest_dir %]/[% c('filename') %]/[% c('var/project-name') %]-qa- |
70 | 70 | bsdiff $qa_apk $aligned_apk $unsign_patch
|
71 | 71 | |
72 | 72 | [%IF c("var/tor-browser") -%]
|
73 | - tor_expert_bundle_src="[% c("input_files_by_name/tor-expert-bundle") %]"
|
|
73 | + tor_expert_bundle_src="[% c('input_files_by_name/tor-expert-bundle') %]"
|
|
74 | 74 | # strip off trailing "$buildid.tar.gz"
|
75 | - tor_expert_bundle_dest=${tor_expert_bundle_src:0:-14}.tar.gz
|
|
76 | - cp $rootdir/$tor_expert_bundle_src [% dest_dir %]/[% c('filename') %]/$tor_expert_bundle_dest
|
|
75 | + tor_expert_bundle_dest=${tor_expert_bundle_src:0:-7}.tar.gz
|
|
76 | + cp "$rootdir/[% c("input_files_by_name/tor-expert-bundle") %]/tor-expert-bundle.tar.gz" [% dest_dir %]/[% c('filename') %]/$tor_expert_bundle_dest
|
|
77 | 77 | [% END -%] |
... | ... | @@ -35,7 +35,7 @@ rm -fR service/src/main/jniLibs/* |
35 | 35 | # Extract tor-expert-bundle
|
36 | 36 | tebdir=$rootdir/tor-expert-bundle-[% arch %]
|
37 | 37 | mkdir $tebdir
|
38 | - tar -C $tebdir -xf $rootdir/[% c('input_files_by_name/tor-expert-bundle-' _ arch) %]
|
|
38 | + tar -C $tebdir -xf $rootdir/[% c('input_files_by_name/tor-expert-bundle-' _ arch) %]/tor-expert-bundle.tar.gz
|
|
39 | 39 | |
40 | 40 | # Figure out our android abi from our arch
|
41 | 41 | [% IF arch == "armv7" -%]
|
1 | +<?xml version="1.0" encoding="utf-8"?>
|
|
2 | +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3 | + package="org.torproject.torExpertBundle"
|
|
4 | + android:versionCode="1"
|
|
5 | + android:versionName="0.0.1" >
|
|
6 | + |
|
7 | + <uses-sdk
|
|
8 | + android:minSdkVersion="16"
|
|
9 | + android:targetSdkVersion="29" />
|
|
10 | + |
|
11 | + <uses-permission android:name="android.permission.INTERNET" />
|
|
12 | + |
|
13 | + <application android:allowBackup="false" >
|
|
14 | + </application>
|
|
15 | + |
|
16 | +</manifest> |
|
\ No newline at end of file |
... | ... | @@ -2,6 +2,10 @@ |
2 | 2 | [% c("var/set_default_env") -%]
|
3 | 3 | distdir=/var/tmp/dist/[% project %]
|
4 | 4 | mkdir -p $distdir
|
5 | + |
|
6 | +output_dir=[% dest_dir %]/[% c('filename') %]
|
|
7 | +mkdir -p $output_dir
|
|
8 | + |
|
5 | 9 | cd $distdir
|
6 | 10 | |
7 | 11 | tar -xkf $rootdir/[% c('input_files_by_name/tor') %]
|
... | ... | @@ -18,6 +22,32 @@ tar -xkf $rootdir/[% c('input_files_by_name/conjure') %] |
18 | 22 | awk '{gsub(/\$\{pt_extension\}/, "[% c("var/pt_extension") %]"); print}' $rootdir/pt_config.json > pt_config.json
|
19 | 23 | |
20 | 24 | cd $distdir
|
25 | + |
|
26 | +# package a .aar on android
|
|
27 | +[% IF c("var/android") -%]
|
|
28 | + aar_file=torExpertBundle-[% c('arch') %].aar
|
|
29 | + |
|
30 | + mkdir aar
|
|
31 | + mkdir -p aar/jni/[% c('arch') %]
|
|
32 | + mkdir -p aar/assets/common
|
|
33 | + |
|
34 | + cp -a tor/libTor.so aar/jni/[% c('arch') %]/
|
|
35 | + cp -a tor/pluggable_transports/conjure-client aar/jni/[% c('arch') %]/libConjure.so
|
|
36 | + cp -a tor/pluggable_transports/lyrebird aar/jni/[% c('arch') %]/Lyrebird.so
|
|
37 | + cp -a tor/pluggable_transports/snowflake-client aar/jni/[% c('arch') %]/libSnowflake.so
|
|
38 | + cp -a tor/pluggable_transports/webtunnel-client aar/jni/[% c('arch') %]/libWebtunnel.so
|
|
39 | + |
|
40 | + cp -a data/* aar/assets/common/
|
|
41 | + |
|
42 | + cp -a tor/pluggable_transports/pt_config.json aar/assets/common/
|
|
43 | + |
|
44 | + cp -a $rootdir/AndroidManifest.xml aar/
|
|
45 | + |
|
46 | + cd aar
|
|
47 | + jar -cvf $output_dir/tor-expert-bundle-[% c('arch') %].aar *
|
|
48 | + cd ..
|
|
49 | +[% END %]
|
|
50 | + |
|
21 | 51 | [%
|
22 | 52 | SET tar_src = [ "tor", "data" ];
|
23 | 53 | IF c("var/linux");
|
... | ... | @@ -25,6 +55,6 @@ cd $distdir |
25 | 55 | END;
|
26 | 56 | c('tar', {
|
27 | 57 | tar_src => tar_src,
|
28 | - tar_args => '-czvf' _ dest_dir _ '/' _ c('filename'),
|
|
58 | + tar_args => '-czvf' _ dest_dir _ '/' _ c('filename') _ '/tor-expert-bundle.tar.gz',
|
|
29 | 59 | });
|
30 | -%] |
|
60 | +%] |
|
\ No newline at end of file |
1 | 1 | # vim: filetype=yaml sw=2
|
2 | -filename: '[% project %]-[% c("var/osname") %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
|
|
2 | +filename: '[% project %]-[% c("var/osname") %]-[% c("version") %]-[% c("var/build_id") %]'
|
|
3 | 3 | version: '[% c("var/torbrowser_version") %]'
|
4 | 4 | |
5 | 5 | container:
|
... | ... | @@ -23,3 +23,4 @@ input_files: |
23 | 23 | - name: conjure
|
24 | 24 | project: conjure
|
25 | 25 | - filename: pt_config.json
|
26 | + - filename: AndroidManifest.xml |
... | ... | @@ -43,7 +43,7 @@ patch -p1 < $rootdir/0001-Bug-40800-Add-WebTunnel-support.patch |
43 | 43 | # Extract tor-expert-bundle
|
44 | 44 | tebdir=$rootdir/tor-expert-bundle-[% arch %]
|
45 | 45 | mkdir $tebdir
|
46 | - tar -C $tebdir -xf $rootdir/[% c('input_files_by_name/tor-expert-bundle-' _ arch) %]
|
|
46 | + tar -C $tebdir -xf $rootdir/[% c('input_files_by_name/tor-expert-bundle-' _ arch) %]/tor-expert-bundle.tar.gz
|
|
47 | 47 | ptdir=$tebdir/tor/pluggable_transports
|
48 | 48 | |
49 | 49 | # Overwrite the obfs4proxy binary provided by Pluto and add Snowflake
|