Skip to content

Bug 41317: Add the linux-aarch64 target to linux-packages

NoisyCoil requested to merge NoisyCoil/tor-browser-build:bug_41317 into main

Merge Info

Issues

Resolves

Related

Merging

Target Branches

  • main: esr128-14.5
  • maint-14.0: esr128-14.0
  • maint-13.5: esr115-13.5

Backporting

Timeline

  • No Backport (preferred): patchset for the next major stable
  • Immediate: patchset needed as soon as possible
  • Next Minor Stable Release: patchset that needs to be verified in nightly before backport
  • Eventually: patchset that needs to be verified in alpha before backport

(Optional) Justification

  • Emergency security update: patchset fixes CVEs, 0-days, etc
  • Censorship event: patchset enables censorship circumvention
  • Critical bug-fix: patchset fixes a bug in core-functionality
  • Consistency: patchset which would make development easier if it were in both the alpha and release branches; developer tools, build system changes, etc
  • Sponsor required: patchset required for sponsor
  • Other: please explain

Issue Tracking

Review

Request Reviewer

  • Request review from an applications developer depending on modified system:
    • NOTE: if the MR modifies multiple areas, please /cc all the relevant reviewers (since gitlab only allows 1 reviewer)
    • accessibility : henry
    • android : clairehurst, dan
    • build system : boklm
    • extensions : ma1
    • firefox internals (XUL/JS/XPCOM) : jwilde, ma1
    • fonts : pierov
    • frontend (implementation) : henry
    • frontend (review) : donuts, morgan
    • localization : henry, pierov
    • macOS : clairehurst, dan
    • nightly builds : boklm
    • rebases/release-prep : boklm, dan, ma1, morgan, pierov
    • security : jwilde, ma1
    • signing : boklm, morgan
    • updater : pierov
    • windows : jwilde, morgan
    • misc/other : morgan, pierov

Change Description

This MR completes the linux-aarch64 series by enabling builds of the deb and rpm packages. Other than this, what's missing is enabling linux-aarch64 in the browser-all and browser-all-desktop targets for alpha and release builds, and the updater. I'll leave both of these to you all :-)

Two notes:

  • While @boklm wired things up so that a single container may be used to build debs for all arches, unfortunately the libpulse-dev container dependency pulls in a libglib2.0-dev version whose arm64 and amd64 variants conflict in stretch (trying to install one uninstalls the other and vice-versa) for unidentified reasons. This is solved in more recent Debian releases (e.g. they install just fine in bookworm), but building the deb package on a more recent release makes the packages uninstallable in earlier ones (dh_shlibdeps sets the minimum version of the deb's dependencies based on what it sees in the releases's repositories so, e.g., bookworm's deps will not be installable in stretch). Since I worked very hard to make arm64 builds as good as amd64 ones, and since there's an obvious solution to this issue -- that is, building the arm64 packages in a separate container -- I'd rather not loose support for deb packages in early Debian releases. So I defined a deb-arm64 target which is selected when the deb package is built for aarch64. This is just a copy of deb (so, unfortunately, the two targets will need to be kept in sync), which only installs the :arm64 variants of the arch-specific packages instead of the :amd64 and :i686 ones.
  • Building the rpm package needs aarch64-linux-gnu-strip for the stripping step. This could be dealt with by importing either binutils-cross-aarch64 or gcc-cross and telling rpmbuild to use that. However, binaries are already stripped, so this extra step is completely useless. Therefore I did like we already do for deb packages, and plainly disabled stripping for rpm packages too. This is done by setting the __strip rpm macro to true. Note that this also "affects" x86_64 and i686 (in theory; in practice, again, binaries are already stripped).

How Tested

By building the deb and rpm packages and installing them in Debian and Fedora, respectively.

Merge request reports

Loading