boklm pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
-
4c9640b6
by NoisyCoil at 2024-12-12T12:03:29+01:00
6 changed files:
- projects/linux-packages/build
- projects/linux-packages/config
- projects/linux-packages/debian/control.in
- projects/linux-packages/rpm-package.spec
- projects/release/build
- projects/release/config
Changes:
... | ... | @@ -57,6 +57,11 @@ umask 0022 |
57 | 57 | $rootdir/[% c('input_files_by_name/linux-i686') %]/[% c("var/project-name") %]-linux-i686-[% c("version") %].tar.xz \
|
58 | 58 | i386
|
59 | 59 | [% END -%]
|
60 | + [% IF c("var/browser-linux-aarch64") -%]
|
|
61 | + extract_src_tar \
|
|
62 | + $rootdir/[% c('input_files_by_name/linux-aarch64') %]/[% c("var/project-name") %]-linux-aarch64-[% c("version") %].tar.xz \
|
|
63 | + arm64
|
|
64 | + [% END -%]
|
|
60 | 65 | |
61 | 66 | dpkg-buildpackage --unsigned-source --unsigned-changes --build=source
|
62 | 67 | [% FOREACH deb_arch = c("var_p/system_pkg/deb_archs") -%]
|
... | ... | @@ -92,6 +97,10 @@ EOF |
92 | 97 | cp -a $rootdir/[% c('input_files_by_name/linux-i686') %]/[% c("var/project-name") %]-linux-i686-[% c("version") %].tar.xz \
|
93 | 98 | SOURCES/[% c("var/system_pkg/pkg_name") %]-linux-i386-[% c("var/system_pkg/pkg_version") %].tar.xz
|
94 | 99 | [% END -%]
|
100 | + [% IF c("var/browser-linux-aarch64") -%]
|
|
101 | + cp -a $rootdir/[% c('input_files_by_name/linux-aarch64') %]/[% c("var/project-name") %]-linux-aarch64-[% c("version") %].tar.xz \
|
|
102 | + SOURCES/[% c("var/system_pkg/pkg_name") %]-linux-aarch64-[% c("var/system_pkg/pkg_version") %].tar.xz
|
|
103 | + [% END -%]
|
|
95 | 104 | rpmdir=$(pwd)
|
96 | 105 | [% IF c("var/browser-linux-x86_64") -%]
|
97 | 106 | rpmbuild --define "_topdir $rpmdir" -v -bb SPECS/[% c("var/system_pkg/pkg_name") %].spec
|
... | ... | @@ -99,6 +108,9 @@ EOF |
99 | 108 | [% IF c("var/browser-linux-i686") -%]
|
100 | 109 | rpmbuild --define "_topdir $rpmdir" --target i686-redhat-linux -v -bb SPECS/[% c("var/system_pkg/pkg_name") %].spec
|
101 | 110 | [% END -%]
|
111 | + [% IF c("var/browser-linux-aarch64") -%]
|
|
112 | + rpmbuild --define "_topdir $rpmdir" --target aarch64-redhat-linux -v -bb SPECS/[% c("var/system_pkg/pkg_name") %].spec
|
|
113 | + [% END -%]
|
|
102 | 114 | mv RPMS/*/*.rpm "$OUTDIR/"
|
103 | 115 | |
104 | 116 | [% END %] |
... | ... | @@ -19,6 +19,7 @@ var: |
19 | 19 | deb_archs_list:
|
20 | 20 | - '[% IF c("var/browser-linux-x86_64") %]amd64[% END %]'
|
21 | 21 | - '[% IF c("var/browser-linux-i686") %]i386[% END %]'
|
22 | + - '[% IF c("var/browser-linux-aarch64") %]arm64[% END %]'
|
|
22 | 23 | |
23 | 24 | |
24 | 25 | targets:
|
... | ... | @@ -28,7 +29,7 @@ targets: |
28 | 29 | build_deb_pkg: 1
|
29 | 30 | pre_pkginst: |
|
30 | 31 | dpkg --add-architecture i386
|
31 | - # some :i386 packages fail to install when /var/lib/dpkg/available
|
|
32 | + # some foreign-arch packages fail to install when /var/lib/dpkg/available
|
|
32 | 33 | # does not exist, so create it as an empty file
|
33 | 34 | echo > /var/lib/dpkg/available
|
34 | 35 | arch_deps:
|
... | ... | @@ -58,6 +59,31 @@ targets: |
58 | 59 | - libpulse-dev:i386
|
59 | 60 | - libx11-xcb-dev:i386
|
60 | 61 | - libxt-dev:i386
|
62 | + deb-arm64:
|
|
63 | + var:
|
|
64 | + build_deb_pkg: 1
|
|
65 | + pre_pkginst: |
|
|
66 | + dpkg --add-architecture arm64
|
|
67 | + # some foreign-arch packages fail to install when /var/lib/dpkg/available
|
|
68 | + # does not exist, so create it as an empty file
|
|
69 | + echo > /var/lib/dpkg/available
|
|
70 | + arch_deps:
|
|
71 | + # Packages needed to build the deb package
|
|
72 | + - dpkg-dev
|
|
73 | + - debhelper
|
|
74 | + - dh-exec
|
|
75 | + - dh-apparmor
|
|
76 | + # Packages needed to generate dependencies for the deb package
|
|
77 | + - linux-libc-dev:arm64
|
|
78 | + - libasound2-dev:arm64
|
|
79 | + - libfontconfig1-dev:arm64
|
|
80 | + - libfreetype6-dev:arm64
|
|
81 | + - libgconf2-dev:arm64
|
|
82 | + - libgtk-3-dev:arm64
|
|
83 | + - libpango1.0-dev:arm64
|
|
84 | + - libpulse-dev:arm64
|
|
85 | + - libx11-xcb-dev:arm64
|
|
86 | + - libxt-dev:arm64
|
|
61 | 87 | |
62 | 88 | rpm:
|
63 | 89 | var:
|
... | ... | @@ -72,18 +98,15 @@ targets: |
72 | 98 | container:
|
73 | 99 | suite: bookworm
|
74 | 100 | |
75 | - browser-all:
|
|
76 | - - browser-linux-x86_64
|
|
77 | - - browser-linux-i686
|
|
78 | - |
|
79 | - browser-all-desktop: browser-all
|
|
80 | - |
|
81 | 101 | browser-linux-x86_64:
|
82 | 102 | var:
|
83 | 103 | browser-linux-x86_64: 1
|
84 | 104 | browser-linux-i686:
|
85 | 105 | var:
|
86 | 106 | browser-linux-i686: '[% c("var/browser_type") != "mullvadbrowser" %]'
|
107 | + browser-linux-aarch64:
|
|
108 | + var:
|
|
109 | + browser-linux-aarch64: 1
|
|
87 | 110 | |
88 | 111 | torbrowser:
|
89 | 112 | var:
|
... | ... | @@ -139,6 +162,13 @@ input_files: |
139 | 162 | - '[% c("var/build_target") %]'
|
140 | 163 | - '[% c("var/browser_type") %]-linux-i686'
|
141 | 164 | |
165 | + - name: linux-aarch64
|
|
166 | + project: browser
|
|
167 | + enable: '[% c("var/browser-linux-aarch64") %]'
|
|
168 | + target:
|
|
169 | + - '[% c("var/build_target") %]'
|
|
170 | + - '[% c("var/browser_type") %]-linux-aarch64'
|
|
171 | + |
|
142 | 172 | - filename: Makefile
|
143 | 173 | content: "[% INCLUDE 'Makefile.in' %]"
|
144 | 174 | refresh_input: 1
|
... | ... | @@ -5,7 +5,7 @@ Section: web |
5 | 5 | Build-Depends: debhelper (>= 9), dh-apparmor
|
6 | 6 | |
7 | 7 | Package: [% c("var/system_pkg/pkg_name") %]
|
8 | -Architecture: [% c("var_p/system_pkg/deb_archs").join(" ") %]
|
|
8 | +Architecture: amd64 i386 arm64
|
|
9 | 9 | Depends: ${shlibs:Depends},
|
10 | 10 | Description: [% c('var/display_name') %]
|
11 | 11 | [% c("var/system_pkg/pkg_description") %] |
... | ... | @@ -21,6 +21,7 @@ |
21 | 21 | %global privlibs %{privlibs}|libxul
|
22 | 22 | %global __provides_exclude ^(%{privlibs})\\.so
|
23 | 23 | %global __requires_exclude ^(%{privlibs})\\.so
|
24 | +%global __strip true
|
|
24 | 25 | |
25 | 26 | Summary: [% c("var/display_name") %]
|
26 | 27 | Name: [% c("var/system_pkg/pkg_name") %]
|
... | ... | @@ -36,6 +37,9 @@ Source2: %{name}-linux-x86_64-%{version}.tar.xz |
36 | 37 | [% IF c("var/browser-linux-i686") -%]
|
37 | 38 | Source3: %{name}-linux-i386-%{version}.tar.xz
|
38 | 39 | [% END -%]
|
40 | +[% IF c("var/browser-linux-aarch64") -%]
|
|
41 | +Source4: %{name}-linux-aarch64-%{version}.tar.xz
|
|
42 | +[% END -%]
|
|
39 | 43 | |
40 | 44 | %description
|
41 | 45 | [% c("var/system_pkg/pkg_description") %]
|
... | ... | @@ -40,8 +40,13 @@ mkdir -p "$destdir" |
40 | 40 | [% IF c("var/browser-linux-aarch64") -%]
|
41 | 41 | mv [% c('input_files_by_name/linux-aarch64') %]/* "$destdir"/
|
42 | 42 | [% END -%]
|
43 | -[% IF c("var/linux-packages") -%]
|
|
44 | - mv [% c('input_files_by_name/deb-packages') %]/* "$destdir"/
|
|
43 | +[% IF c("var/linux-packages") || c("var/linux-packages-aarch64") -%]
|
|
44 | + [% IF c("var/linux-packages") -%]
|
|
45 | + mv [% c('input_files_by_name/deb-packages') %]/* "$destdir"/
|
|
46 | + [% END -%]
|
|
47 | + [% IF c("var/linux-packages-aarch64") -%]
|
|
48 | + mv [% c('input_files_by_name/deb-packages-aarch64') %]/* "$destdir"/
|
|
49 | + [% END -%]
|
|
45 | 50 | mv [% c('input_files_by_name/rpm-packages') %]/* "$destdir"/
|
46 | 51 | [% END -%]
|
47 | 52 | [% IF c("var/browser-src") -%]
|
... | ... | @@ -63,7 +63,7 @@ targets: |
63 | 63 | browser-linux-aarch64:
|
64 | 64 | var:
|
65 | 65 | browser-linux-aarch64: '[% ! c("var/browser-all-target") || c("var/testbuild") || c("var/nightly") %]'
|
66 | - linux-packages: 0
|
|
66 | + linux-packages-aarch64: '[% (! c("var/browser-all-target") || c("var/testbuild") || c("var/nightly")) && (c("var/mullvad-browser") || c("var/tor-browser-linux-packages")) %]'
|
|
67 | 67 | browser-windows-i686:
|
68 | 68 | var:
|
69 | 69 | browser-windows-i686: '[% c("var/browser_type") != "mullvadbrowser" %]'
|
... | ... | @@ -210,20 +210,40 @@ input_files: |
210 | 210 | - name: deb-packages
|
211 | 211 | project: linux-packages
|
212 | 212 | enable: '[% c("var/linux-packages") %]'
|
213 | - # Add linux-x86_64 targets for container config
|
|
214 | - target_prepend:
|
|
213 | + # Add $browser_type-linux-x86_64 target for container config
|
|
214 | + target:
|
|
215 | + - '[% IF c("var/testbuild") %]testbuild[% END %]'
|
|
216 | + - '[% c("var/build_target") %]'
|
|
217 | + - '[% IF c("var/browser-linux-i686") %]browser-linux-i686[% END %]'
|
|
218 | + - '[% IF c("var/browser-linux-x86_64") %]browser-linux-x86_64[% END %]'
|
|
215 | 219 | - deb
|
216 | - - linux-x86_64
|
|
217 | - - linux
|
|
220 | + - '[% c("var/browser_type") %]-linux-x86_64'
|
|
221 | + |
|
222 | + # linux-aarch64 requires a separate container because of multi-arch
|
|
223 | + # conflicts between amd64 and arm64
|
|
224 | + - name: deb-packages-aarch64
|
|
225 | + project: linux-packages
|
|
226 | + enable: '[% c("var/linux-packages-aarch64") %]'
|
|
227 | + # Add $browser_type-linux-x86_64 target for container config
|
|
228 | + target:
|
|
229 | + - '[% IF c("var/testbuild") %]testbuild[% END %]'
|
|
230 | + - '[% c("var/build_target") %]'
|
|
231 | + - browser-linux-aarch64
|
|
232 | + - deb-arm64
|
|
233 | + - '[% c("var/browser_type") %]-linux-x86_64'
|
|
218 | 234 | |
219 | 235 | - name: rpm-packages
|
220 | 236 | project: linux-packages
|
221 | - enable: '[% c("var/linux-packages") %]'
|
|
222 | - # Add linux-x86_64 targets for container config
|
|
223 | - target_prepend:
|
|
237 | + enable: '[% c("var/linux-packages") || c("var/linux-packages-aarch64") %]'
|
|
238 | + # Add $browser_type-linux-x86_64 target for container config
|
|
239 | + target:
|
|
240 | + - '[% IF c("var/testbuild") %]testbuild[% END %]'
|
|
241 | + - '[% c("var/build_target") %]'
|
|
242 | + - '[% IF c("var/browser-linux-i686") %]browser-linux-i686[% END %]'
|
|
243 | + - '[% IF c("var/browser-linux-x86_64") %]browser-linux-x86_64[% END %]'
|
|
244 | + - '[% IF c("var/linux-packages-aarch64") %]browser-linux-aarch64[% END %]'
|
|
224 | 245 | - rpm
|
225 | - - linux-x86_64
|
|
226 | - - linux
|
|
246 | + - '[% c("var/browser_type") %]-linux-x86_64'
|
|
227 | 247 | |
228 | 248 | - name: windows-i686
|
229 | 249 | project: browser
|