boklm pushed to branch main at The Tor Project / Applications / tor-browser-build

Commits:

6 changed files:

Changes:

  • projects/linux-packages/build
    ... ... @@ -10,6 +10,16 @@ export SOURCE_DATE_EPOCH='[% c("timestamp") %]'
    10 10
     umask 0022
    
    11 11
     
    
    12 12
     [% IF c("var/build_deb_pkg") -%]
    
    13
    +  [% IF c("var/browser-linux-i686") -%]
    
    14
    +    # When building an i386 deb package, dh_strip requires i686-linux-gnu-*
    
    15
    +    # commands not provided by the binutils x86_64 package on debian stretch.
    
    16
    +    # We can use the binutils-i686-gnu package when we switch to buster.
    
    17
    +    mkdir -p /var/tmp/dist/binutils
    
    18
    +    for bin in strip objcopy objdump; do
    
    19
    +      ln -s /usr/bin/$bin /var/tmp/dist/binutils/i686-linux-gnu-$bin
    
    20
    +    done
    
    21
    +    export PATH="/var/tmp/dist/binutils:$PATH"
    
    22
    +  [% END -%]
    
    13 23
       cd $distdir
    
    14 24
       project_dir=[% c("var/system_pkg/pkg_name") %]-[% c("var/system_pkg/pkg_version") %]
    
    15 25
       mkdir "$project_dir"
    
    ... ... @@ -41,20 +51,20 @@ umask 0022
    41 51
       [% END -%]
    
    42 52
       [% IF c("var/browser-linux-i686") -%]
    
    43 53
         extract_src_tar \
    
    44
    -      $rootdir/[% c('input_files_by_name/linux-x86_64') %]/[% c("var/project-name") %]-linux-i686-[% c("version") %].tar.xz \
    
    54
    +      $rootdir/[% c('input_files_by_name/linux-i686') %]/[% c("var/project-name") %]-linux-i686-[% c("version") %].tar.xz \
    
    45 55
           i386
    
    46 56
       [% END -%]
    
    47 57
     
    
    58
    +  dpkg-buildpackage --unsigned-source --unsigned-changes --build=source
    
    48 59
       [% FOREACH deb_arch = c("var_p/system_pkg/deb_archs") -%]
    
    49
    -    dpkg-buildpackage --unsigned-source --unsigned-changes --build=full --host-arch=[% deb_arch %]
    
    60
    +    dpkg-buildpackage --unsigned-source --unsigned-changes --build=binary --host-arch=[% deb_arch %]
    
    50 61
         deb_file_name='[% c("var/system_pkg/pkg_name") %]_[% c("var/system_pkg/pkg_version") %]-[% c("var/system_pkg/pkg_revision") %]_[% deb_arch %].deb'
    
    51 62
         dpkg-deb --info "../$deb_file_name"
    
    52
    -    pushd ..
    
    53
    -    mv -f "$deb_file_name" *.dsc *.orig.tar.xz *.debian.tar.xz "$OUTDIR/"
    
    54
    -    popd
    
    63
    +    mv -f ../"$deb_file_name" "$OUTDIR/"
    
    55 64
       [% END -%]
    
    56 65
     
    
    57 66
       cd ..
    
    67
    +  mv -f *.dsc *.orig.tar.xz *.debian.tar.xz "$OUTDIR/"
    
    58 68
     [% END %]
    
    59 69
     
    
    60 70
     [% IF c("var/build_rpm_pkg") -%]
    
    ... ... @@ -77,10 +87,15 @@ EOF
    77 87
       [% END -%]
    
    78 88
       [% IF c("var/browser-linux-i686") -%]
    
    79 89
         cp -a $rootdir/[% c('input_files_by_name/linux-i686') %]/[% c("var/project-name") %]-linux-i686-[% c("version") %].tar.xz \
    
    80
    -      SOURCES/[% c("var/system_pkg/pkg_name") %]-linux-i686-[% c("var/system_pkg/pkg_version") %].tar.xz
    
    90
    +      SOURCES/[% c("var/system_pkg/pkg_name") %]-linux-i386-[% c("var/system_pkg/pkg_version") %].tar.xz
    
    81 91
       [% END -%]
    
    82 92
       rpmdir=$(pwd)
    
    83
    -  rpmbuild --define "_topdir $rpmdir" -v -bb SPECS/[% c("var/system_pkg/pkg_name") %].spec
    
    93
    +  [% IF c("var/browser-linux-x86_64") -%]
    
    94
    +    rpmbuild --define "_topdir $rpmdir" -v -bb SPECS/[% c("var/system_pkg/pkg_name") %].spec
    
    95
    +  [% END -%]
    
    96
    +  [% IF c("var/browser-linux-i686") -%]
    
    97
    +    rpmbuild --define "_topdir $rpmdir" --target i686-redhat-linux -v -bb SPECS/[% c("var/system_pkg/pkg_name") %].spec
    
    98
    +  [% END -%]
    
    84 99
       mv RPMS/*/*.rpm "$OUTDIR/"
    
    85 100
     
    
    86 101
     [% END %]

  • projects/linux-packages/config
    ... ... @@ -23,7 +23,12 @@ targets:
    23 23
     
    
    24 24
       deb:
    
    25 25
         var:
    
    26
    -      build_deb_pkg: '[% c("var/mullvad-browser") %]'
    
    26
    +      build_deb_pkg: 1
    
    27
    +      pre_pkginst: |
    
    28
    +        dpkg --add-architecture i386
    
    29
    +        # some :i386 packages fail to install when /var/lib/dpkg/available
    
    30
    +        # does not exist, so create it as an empty file
    
    31
    +        echo > /var/lib/dpkg/available
    
    27 32
           arch_deps:
    
    28 33
             # Packages needed to build the deb package
    
    29 34
             - dpkg-dev
    
    ... ... @@ -40,10 +45,20 @@ targets:
    40 45
             - libpulse-dev
    
    41 46
             - libx11-xcb-dev
    
    42 47
             - libxt-dev
    
    48
    +        - linux-libc-dev:i386
    
    49
    +        - libasound2-dev:i386
    
    50
    +        - libfontconfig1-dev:i386
    
    51
    +        - libfreetype6-dev:i386
    
    52
    +        - libgconf2-dev:i386
    
    53
    +        - libgtk-3-dev:i386
    
    54
    +        - libpango1.0-dev:i386
    
    55
    +        - libpulse-dev:i386
    
    56
    +        - libx11-xcb-dev:i386
    
    57
    +        - libxt-dev:i386
    
    43 58
     
    
    44 59
       rpm:
    
    45 60
         var:
    
    46
    -      build_rpm_pkg: '[% c("var/mullvad-browser") %]'
    
    61
    +      build_rpm_pkg: 1
    
    47 62
     
    
    48 63
           arch_deps:
    
    49 64
             # Packages needed to build the rpm package
    
    ... ... @@ -71,6 +86,7 @@ targets:
    71 86
         var:
    
    72 87
           browser_type: torbrowser
    
    73 88
           system_pkg:
    
    89
    +        pkg_description: 'Tor Browser is a privacy-focused web browser designed to minimize tracking and fingerprinting, using the Tor network to protect your privacy and anonymity.'
    
    74 90
             pkg_url: 'https://torproject.org/'
    
    75 91
       basebrowser:
    
    76 92
         var:
    
    ... ... @@ -149,6 +165,8 @@ input_files:
    149 165
         refresh_input: 1
    
    150 166
         enable: '[% c("var/build_deb_pkg") %]'
    
    151 167
       - filename: debian/rules
    
    168
    +    content: "[% INCLUDE 'debian/rules.in' %]"
    
    169
    +    refresh_input: 1
    
    152 170
         enable: '[% c("var/build_deb_pkg") %]'
    
    153 171
     
    
    154 172
       # rpm package
    

  • projects/linux-packages/debian/rulesprojects/linux-packages/debian/rules.in
    ... ... @@ -7,4 +7,4 @@ override_dh_strip_nondeterminism:
    7 7
     	dh_strip_nondeterminism -Xxpi
    
    8 8
     
    
    9 9
     override_dh_shlibdeps:
    
    10
    -	dh_shlibdeps -Xabicheck
    10
    +	dh_shlibdeps -Xabicheck[% IF c("var/tor-browser") %] -l$(CURDIR)/debian/[% c("var/system_pkg/pkg_name") %]/[% c('var/system_pkg/install_path') %]/TorBrowser/Tor[% END %]

  • projects/linux-packages/rpm-package.spec
    ... ... @@ -34,7 +34,7 @@ Source1: [% c("var/system_pkg/pkg_name") %].desktop
    34 34
     Source2: %{name}-linux-x86_64-%{version}.tar.xz
    
    35 35
     [% END -%]
    
    36 36
     [% IF c("var/browser-linux-i686") -%]
    
    37
    -Source3: %{name}-linux-i686-%{version}.tar.xz
    
    37
    +Source3: %{name}-linux-i386-%{version}.tar.xz
    
    38 38
     [% END -%]
    
    39 39
     
    
    40 40
     %description
    

  • projects/mmdebstrap-image/config
    ... ... @@ -42,6 +42,12 @@ targets:
    42 42
               "deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://archive.debian.org/debian-archive/debian/ stretch main"
    
    43 43
               "deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://archive.debian.org/debian-archive/debian-security/ stretch/updates main"
    
    44 44
     
    
    45
    +  buster-amd64:
    
    46
    +    var:
    
    47
    +      minimal_apt_version: 1.8.2
    
    48
    +      container:
    
    49
    +        suite: buster
    
    50
    +        arch: amd64
    
    45 51
     
    
    46 52
       bullseye-amd64:
    
    47 53
         var:
    

  • projects/release/config
    ... ... @@ -47,7 +47,7 @@ targets:
    47 47
       browser-linux-x86_64:
    
    48 48
         var:
    
    49 49
           browser-linux-x86_64: 1
    
    50
    -      linux-packages: '[% c("var/mullvad-browser") %]'
    
    50
    +      linux-packages: '[% c("var/mullvad-browser") || c("var/tor-browser-linux-packages") %]'
    
    51 51
       browser-linux-x86_64-asan:
    
    52 52
         var:
    
    53 53
           browser-linux-x86_64: 1
    
    ... ... @@ -55,7 +55,7 @@ targets:
    55 55
       browser-linux-i686:
    
    56 56
         var:
    
    57 57
           browser-linux-i686: '[% c("var/browser_type") != "mullvadbrowser" %]'
    
    58
    -      linux-packages: '[% c("var/mullvad-browser") %]'
    
    58
    +      linux-packages: '[% c("var/mullvad-browser") || c("var/tor-browser-linux-packages") %]'
    
    59 59
       browser-windows-i686:
    
    60 60
         var:
    
    61 61
           browser-windows-i686: '[% c("var/browser_type") != "mullvadbrowser" %]'
    
    ... ... @@ -93,6 +93,7 @@ targets:
    93 93
         var:
    
    94 94
           browser_type: torbrowser
    
    95 95
           git_tag_prefix: tbb
    
    96
    +      tor-browser-linux-packages: '[% ! c("var/release") %]'
    
    96 97
       basebrowser:
    
    97 98
         var:
    
    98 99
           browser_type: basebrowser