diff options
author | J0WI <J0WI@users.noreply.github.com> | 2020-10-10 21:09:09 +0200 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2020-10-11 18:55:29 +0000 |
commit | 0473bf344912e1b0751cfefff4782450d34a5ba1 (patch) | |
tree | 7221805a88c03120f2e04b4826fbf51eb351ae75 | |
parent | 4c8b0917827bf702d07e9f9f4bde10367051a759 (diff) | |
download | alpine_aports-0473bf344912e1b0751cfefff4782450d34a5ba1.tar.bz2 alpine_aports-0473bf344912e1b0751cfefff4782450d34a5ba1.tar.xz alpine_aports-0473bf344912e1b0751cfefff4782450d34a5ba1.zip |
testing/thunderbird: upgrade to 78.3.2
-rw-r--r-- | testing/thunderbird/APKBUILD | 186 | ||||
-rw-r--r-- | testing/thunderbird/allow-custom-rust-vendor.patch | 564 | ||||
-rw-r--r-- | testing/thunderbird/disable-ccache-stats.patch | 20 | ||||
-rw-r--r-- | testing/thunderbird/disable-neon-in-aom.patch | 41 | ||||
-rw-r--r-- | testing/thunderbird/fix-musl.patch | 11 | ||||
-rw-r--r-- | testing/thunderbird/fix-rust-target.patch | 24 | ||||
-rw-r--r-- | testing/thunderbird/fix-sandbox-membarrier.patch | 54 | ||||
-rw-r--r-- | testing/thunderbird/fix-seccomp-bpf.patch | 14 | ||||
-rw-r--r-- | testing/thunderbird/fix-toolkit.patch | 90 | ||||
-rw-r--r-- | testing/thunderbird/remove-faulty-libvpx-check.patch | 13 | ||||
-rw-r--r-- | testing/thunderbird/sandbox-fork.patch | 13 | ||||
-rw-r--r-- | testing/thunderbird/sandbox-sched_setscheduler.patch | 23 |
12 files changed, 767 insertions, 286 deletions
diff --git a/testing/thunderbird/APKBUILD b/testing/thunderbird/APKBUILD index c44cd6136b..77e18984b4 100644 --- a/testing/thunderbird/APKBUILD +++ b/testing/thunderbird/APKBUILD | |||
@@ -1,18 +1,21 @@ | |||
1 | # Contributor: Joseph Benden <joe@benden.us> | 1 | # Contributor: Joseph Benden <joe@benden.us> |
2 | # Maintainer: Joseph Benden <joe@benden.us> | 2 | # Maintainer: Joseph Benden <joe@benden.us> |
3 | |||
4 | pkgname=thunderbird | 3 | pkgname=thunderbird |
5 | pkgver=68.12.0 | 4 | pkgver=78.3.2 |
6 | pkgrel=0 | 5 | pkgrel=0 |
7 | pkgdesc="Thunderbird email client" | 6 | pkgdesc="Thunderbird email client" |
8 | url="https://www.thunderbird.net/" | 7 | url="https://www.thunderbird.net/" |
9 | arch="all !s390x !armhf !mips !mips64" # limited by rust and cargo. Fails on armhf due to bad assembly | 8 | # Limited on: |
9 | # s390x, mips, mips64: limited by rust and cargo | ||
10 | # armhf: build failure on armhf due to wasm | ||
11 | arch="all !s390x !armhf !mips !mips64" | ||
10 | license="GPL-3.0-or-later AND LGPL-2.1-or-later AND MPL-2.0" | 12 | license="GPL-3.0-or-later AND LGPL-2.1-or-later AND MPL-2.0" |
11 | options="!check !strip" | 13 | options="!check !strip" |
12 | depends=" | 14 | depends=" |
13 | alsa-lib | 15 | alsa-lib |
14 | dbus-glib | 16 | dbus-glib |
15 | ffmpeg | 17 | ffmpeg |
18 | gnupg | ||
16 | gtk+3.0 | 19 | gtk+3.0 |
17 | hunspell | 20 | hunspell |
18 | icu | 21 | icu |
@@ -26,25 +29,24 @@ depends=" | |||
26 | libxt | 29 | libxt |
27 | nspr | 30 | nspr |
28 | nss | 31 | nss |
29 | sqlite | ||
30 | startup-notification | ||
31 | " | 32 | " |
32 | makedepends=" | 33 | makedepends=" |
33 | alsa-lib-dev | 34 | alsa-lib-dev |
34 | autoconf2.13 | 35 | autoconf2.13 |
35 | automake | 36 | automake |
36 | bsd-compat-headers | 37 | bsd-compat-headers |
37 | bzip2-dev | ||
38 | cargo | 38 | cargo |
39 | cbindgen | 39 | cbindgen |
40 | clang-dev | 40 | clang-dev |
41 | dbus-glib-dev | 41 | dbus-glib-dev |
42 | ffmpeg-dev | 42 | ffmpeg-dev |
43 | gettext | ||
43 | gtk+2.0-dev | 44 | gtk+2.0-dev |
44 | gtk+3.0-dev | 45 | gtk+3.0-dev |
45 | hunspell-dev | 46 | hunspell-dev |
46 | icu-dev | 47 | icu-dev |
47 | libevent-dev | 48 | libevent-dev |
49 | libffi-dev | ||
48 | libidl-dev | 50 | libidl-dev |
49 | libjpeg-turbo-dev | 51 | libjpeg-turbo-dev |
50 | libnotify-dev | 52 | libnotify-dev |
@@ -52,6 +54,8 @@ makedepends=" | |||
52 | libtheora-dev | 54 | libtheora-dev |
53 | libtool | 55 | libtool |
54 | libvorbis-dev | 56 | libvorbis-dev |
57 | libvpx-dev | ||
58 | libwebp-dev | ||
55 | libxcomposite-dev | 59 | libxcomposite-dev |
56 | libxt-dev | 60 | libxt-dev |
57 | llvm-dev | 61 | llvm-dev |
@@ -61,11 +65,10 @@ makedepends=" | |||
61 | nspr-dev | 65 | nspr-dev |
62 | nss-dev | 66 | nss-dev |
63 | nss-static | 67 | nss-static |
64 | python2 | 68 | pipewire-dev |
65 | python3-dev | 69 | pulseaudio-dev |
70 | python3 | ||
66 | sed | 71 | sed |
67 | sqlite-dev | ||
68 | startup-notification-dev | ||
69 | wireless-tools-dev | 72 | wireless-tools-dev |
70 | yasm | 73 | yasm |
71 | zip | 74 | zip |
@@ -73,19 +76,20 @@ makedepends=" | |||
73 | source="https://ftp.mozilla.org/pub/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz | 76 | source="https://ftp.mozilla.org/pub/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz |
74 | stab.h | 77 | stab.h |
75 | 78 | ||
76 | disable-ccache-stats.patch | ||
77 | fix-fortify-system-wrappers.patch | 79 | fix-fortify-system-wrappers.patch |
78 | fix-seccomp-bpf.patch | ||
79 | fix-toolkit.patch | ||
80 | fix-tools.patch | 80 | fix-tools.patch |
81 | mallinfo.patch | 81 | mallinfo.patch |
82 | 82 | ||
83 | disable-moz-stackwalk.patch | 83 | disable-moz-stackwalk.patch |
84 | fix-musl.patch | ||
85 | fix-rust-target.patch | 84 | fix-rust-target.patch |
86 | fix-webrtc-glibcisms.patch | 85 | fix-webrtc-glibcisms.patch |
87 | fix-sandbox-membarrier.patch | ||
88 | fd6847c9416f9eebde636e21d794d25d1be8791d.patch | 86 | fd6847c9416f9eebde636e21d794d25d1be8791d.patch |
87 | allow-custom-rust-vendor.patch | ||
88 | |||
89 | remove-faulty-libvpx-check.patch | ||
90 | disable-neon-in-aom.patch | ||
91 | sandbox-fork.patch | ||
92 | sandbox-sched_setscheduler.patch | ||
89 | 93 | ||
90 | thunderbird.desktop | 94 | thunderbird.desktop |
91 | " | 95 | " |
@@ -147,40 +151,25 @@ _clear_vendor_checksums() { | |||
147 | 151 | ||
148 | prepare() { | 152 | prepare() { |
149 | default_prepare | 153 | default_prepare |
150 | |||
151 | cp "$srcdir"/stab.h toolkit/crashreporter/google-breakpad/src/ | 154 | cp "$srcdir"/stab.h toolkit/crashreporter/google-breakpad/src/ |
152 | 155 | ||
153 | # https://bugzilla.mozilla.org/show_bug.cgi?id=1341234 | 156 | _clear_vendor_checksums audio_thread_priority |
154 | mkdir -p "$builddir"/objdir | 157 | _clear_vendor_checksums target-lexicon-0.9.0 |
155 | echo "ac_add_options BINDGEN_CFLAGS='-I/usr/include/nspr -I/usr/include/pixman-1'" >>objdir/.mozconfig | ||
156 | |||
157 | _clear_vendor_checksums cssparser | ||
158 | } | 158 | } |
159 | 159 | ||
160 | build() { | 160 | build() { |
161 | mkdir -p "$builddir"/objdir | 161 | mkdir -p "$builddir"/objdir |
162 | cd "$builddir"/objdir | 162 | cd "$builddir"/objdir |
163 | 163 | ||
164 | sed -e 's/checkImpl/checkFFImpl/g' -i ../js/src/vm/JSContext*.h | ||
165 | |||
166 | export SHELL=/bin/sh | 164 | export SHELL=/bin/sh |
167 | export BUILD_OFFICIAL=1 | 165 | export BUILD_OFFICIAL=1 |
168 | export MOZILLA_OFFICIAL=1 | 166 | export MOZILLA_OFFICIAL=1 |
169 | export USE_SHORT_LIBNAME=1 | 167 | export USE_SHORT_LIBNAME=1 |
170 | export MACH_NO_TERMINAL_FOOTER=1 | ||
171 | # Find our triplet JSON | 168 | # Find our triplet JSON |
172 | export RUST_TARGET="$CTARGET" | 169 | export RUST_TARGET="$CTARGET" |
173 | export TERM=ansi-generic | ||
174 | |||
175 | # gcc 6 | ||
176 | export CXXFLAGS="-fno-delete-null-pointer-checks -fno-schedule-insns2" | ||
177 | 170 | ||
178 | # set rpath so linker finds the libs | 171 | # set rpath so linker finds the libs |
179 | export LDFLAGS="$LDFLAGS -Wl,-rpath,$_mozappdir -Wl,--gc-sections" | 172 | export LDFLAGS="$LDFLAGS -Wl,-rpath,$_mozappdir" |
180 | |||
181 | # ignore compiler warnings | ||
182 | export CXXFLAGS="$CXXFLAGS -Wno-class-memaccess -Wno-multistatement-macros -Wno-ignored-qualifiers" | ||
183 | export LDFLAGS="$LDFLAGS -Wno-subobject-linkage" | ||
184 | 173 | ||
185 | case "$CARCH" in | 174 | case "$CARCH" in |
186 | arm*|x86*) | 175 | arm*|x86*) |
@@ -207,6 +196,8 @@ build() { | |||
207 | --prefix=/usr \ | 196 | --prefix=/usr \ |
208 | --libdir=/usr/lib \ | 197 | --libdir=/usr/lib \ |
209 | $_arch_config \ | 198 | $_arch_config \ |
199 | $_low_mem_flags \ | ||
200 | $_rust_simd \ | ||
210 | \ | 201 | \ |
211 | --disable-crashreporter \ | 202 | --disable-crashreporter \ |
212 | --disable-gold \ | 203 | --disable-gold \ |
@@ -217,115 +208,124 @@ build() { | |||
217 | --disable-strip \ | 208 | --disable-strip \ |
218 | --disable-tests \ | 209 | --disable-tests \ |
219 | --disable-updater \ | 210 | --disable-updater \ |
220 | --disable-debug \ | ||
221 | --disable-debug-symbols \ | ||
222 | \ | 211 | \ |
223 | --with-distribution-id=org.alpinelinux \ | ||
224 | --enable-alsa \ | 212 | --enable-alsa \ |
225 | --enable-application=comm/mail \ | 213 | --enable-application=comm/mail \ |
226 | --enable-default-toolkit=cairo-gtk3 \ | 214 | --enable-cdp \ |
215 | --enable-dbus \ | ||
216 | --enable-default-toolkit=cairo-gtk3-wayland \ | ||
217 | --enable-ffmpeg \ | ||
218 | --enable-hardening \ | ||
219 | --enable-necko-wifi \ | ||
227 | --enable-official-branding \ | 220 | --enable-official-branding \ |
221 | --enable-openpgp \ | ||
222 | --enable-optimize="$CFLAGS -O2" \ | ||
228 | --enable-release \ | 223 | --enable-release \ |
229 | --enable-startup-notification \ | 224 | --enable-smoosh \ |
230 | --enable-system-ffi \ | 225 | --enable-system-ffi \ |
231 | --enable-system-sqlite \ | 226 | --enable-system-pixman \ |
232 | --enable-ffmpeg \ | ||
233 | $_rust_simd \ | ||
234 | $_low_mem_flags \ | ||
235 | --enable-hardening \ | ||
236 | \ | 227 | \ |
237 | --with-system-bz2 \ | 228 | --with-system-ffi \ |
238 | --with-system-icu \ | 229 | --with-system-icu \ |
230 | --with-system-jpeg \ | ||
239 | --with-system-libevent \ | 231 | --with-system-libevent \ |
232 | --with-system-libvpx \ | ||
240 | --with-system-nspr \ | 233 | --with-system-nspr \ |
241 | --with-system-nss \ | 234 | --with-system-nss \ |
242 | --with-system-pixman \ | 235 | --with-system-pixman \ |
243 | --with-system-png \ | 236 | --with-system-png \ |
237 | --with-system-webp \ | ||
244 | --with-system-zlib \ | 238 | --with-system-zlib \ |
245 | --without-ccache \ | 239 | --with-distribution-id=org.alpinelinux \ |
246 | --with-clang-path=/usr/bin/clang \ | 240 | --with-clang-path=/usr/bin/clang \ |
247 | --with-libclang-path=/usr/lib | 241 | --with-libclang-path=/usr/lib |
248 | # FIXME: fix build with --with-system-libvpx and libvpx 1.8.0 | ||
249 | # https://bugzilla.mozilla.org/show_bug.cgi?id=1525393 | ||
250 | make | 242 | make |
251 | } | 243 | } |
252 | 244 | ||
253 | package() { | 245 | package() { |
254 | cd "$builddir"/objdir | 246 | cd "$builddir"/objdir |
255 | 247 | ||
256 | DESTDIR="$pkgdir" \ | 248 | make install \ |
257 | MOZ_MAKE_FLAGS="$MAKEOPTS" \ | 249 | DESTDIR="$pkgdir" \ |
258 | ../mach install | 250 | MOZ_MAKE_FLAGS="$MAKEOPTS" |
259 | 251 | ||
260 | install -m755 -d $pkgdir/usr/share/applications | 252 | install -m755 -d "$pkgdir"/usr/share/applications |
261 | install -m755 -d $pkgdir/usr/share/pixmaps | 253 | install -m755 -d "$pkgdir"/usr/share/pixmaps |
262 | install -m755 -d $pkgdir/usr/share/icons | ||
263 | install -m755 -d $pkgdir/usr/share/icons/hicolor | ||
264 | 254 | ||
265 | for i in 16 22 24 32 48 64 128 256; do | 255 | local _png |
266 | install -Dm644 "$builddir"/comm/mail/branding/thunderbird/default$i.png \ | 256 | for _png in ../browser/branding/official/default*.png; do |
267 | "$pkgdir/usr/share/icons/hicolor/${i}x$i/apps/$pkgname.png" | 257 | local i=${_png%.png} |
258 | i=${i##*/default} | ||
259 | install -D -m644 "$_png" "$pkgdir"/usr/share/icons/hicolor/"$i"x"$i"/apps/thunderbird.png | ||
268 | done | 260 | done |
261 | |||
269 | install -Dm644 "$builddir"/comm/mail/branding/thunderbird/TB-symbolic.svg \ | 262 | install -Dm644 "$builddir"/comm/mail/branding/thunderbird/TB-symbolic.svg \ |
270 | "$pkgdir/usr/share/icons/hicolor/symbolic/apps/thunderbird-symbolic.svg" | 263 | "$pkgdir/usr/share/icons/hicolor/symbolic/apps/thunderbird-symbolic.svg" |
271 | install -Dm644 "$builddir"/comm/mail/branding/thunderbird/default48.png \ | 264 | install -Dm644 "$builddir"/comm/mail/branding/thunderbird/default48.png \ |
272 | $pkgdir/usr/share/pixmaps/$pkgname.png | 265 | $pkgdir/usr/share/pixmaps/$pkgname.png |
273 | 266 | ||
274 | install -m644 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop | 267 | install -m644 "$srcdir"/thunderbird.desktop "$pkgdir"/usr/share/applications/thunderbird.desktop |
268 | |||
269 | # Add StartupWMClass=firefox on the .desktop files so Desktop Environments | ||
270 | # correctly associate the window with their icon, the correct fix is to have | ||
271 | # thunderbird sets its own AppID but this will work for the meantime | ||
272 | # See: https://bugzilla.mozilla.org/show_bug.cgi?id=1607399 | ||
273 | echo "StartupWMClass=thunderbird" >> "$pkgdir"/usr/share/applications/thunderbird.desktop | ||
274 | |||
275 | # install our vendor prefs | ||
276 | install -d "$pkgdir"/$_mozappdir/browser/defaults/preferences | ||
275 | 277 | ||
276 | _vendorjs="$pkgdir/usr/lib/$pkgname/defaults/preferences/vendor.js" | 278 | cat >> "$pkgdir"/$_mozappdir/defaults/preferences/vendor.js <<- EOF |
277 | install -Dm644 /dev/stdin "$_vendorjs" <<END | 279 | // Use LANG environment variable to choose locale |
278 | // Use LANG environment variable to choose locale | 280 | pref("intl.locale.requested", ""); |
279 | pref("intl.locale.requested", ""); | ||
280 | 281 | ||
281 | // Use system-provided dictionaries | 282 | // Use system-provided dictionaries |
282 | pref("spellchecker.dictionary_path", "/usr/share/hunspell"); | 283 | pref("spellchecker.dictionary_path", "/usr/share/hunspell"); |
283 | 284 | ||
284 | // Disable default mailer checking. | 285 | // Disable default mailer checking. |
285 | pref("mail.shell.checkDefaultMail", false); | 286 | pref("mail.shell.checkDefaultMail", false); |
286 | 287 | ||
287 | // Don't disable our bundled extensions in the application directory | 288 | // Don't disable our bundled extensions in the application directory |
288 | pref("extensions.autoDisableScopes", 11); | 289 | pref("extensions.autoDisableScopes", 11); |
289 | pref("extensions.shownSelectionUI", true); | 290 | pref("extensions.shownSelectionUI", true); |
290 | END | 291 | EOF |
291 | 292 | ||
292 | _distini="$pkgdir/usr/lib/$pkgname/distribution/distribution.ini" | 293 | cat >> "$pkgdir"/$_mozappdir/distribution/distribution.ini <<- EOF |
293 | install -Dm644 /dev/stdin "$_distini" <<END | 294 | [Global] |
294 | [Global] | 295 | id=alpinelinux |
295 | id=alpinelinux | 296 | version=1.0 |
296 | version=1.0 | 297 | about=Mozilla Thunderbird for Alpine Linux |
297 | about=Mozilla Thunderbird for Alpine Linux | ||
298 | 298 | ||
299 | [Preferences] | 299 | [Preferences] |
300 | app.distributor=alpinelinux | 300 | app.distributor=alpinelinux |
301 | app.distributor.channel=$pkgname | 301 | app.distributor.channel=$pkgname |
302 | app.partner.alpinelinux=alpinelinux | 302 | app.partner.alpinelinux=alpinelinux |
303 | END | 303 | EOF |
304 | 304 | ||
305 | # Install a wrapper to avoid confusion about binary path | 305 | # Install a wrapper to avoid confusion about binary path |
306 | install -Dm755 /dev/stdin "$pkgdir/usr/bin/$pkgname" <<END | 306 | cat >> "$pkgdir/usr/bin/$pkgname" <<- EOF |
307 | #!/bin/sh | 307 | #!/bin/sh |
308 | exec /usr/lib/$pkgname/thunderbird "\$@" | 308 | exec $_mozappdir/thunderbird "\$@" |
309 | END | 309 | EOF |
310 | 310 | ||
311 | # Replace duplicate binary with wrapper | 311 | # Replace duplicate binary with wrapper |
312 | # https://bugzilla.mozilla.org/show_bug.cgi?id=658850 | 312 | # https://bugzilla.mozilla.org/show_bug.cgi?id=658850 |
313 | ln -snf "$pkgdir/usr/bin/$pkgname" \ | 313 | ln -snf "$pkgdir/usr/bin/$pkgname" \ |
314 | "$pkgdir/usr/lib/$pkgname/thunderbird-bin" | 314 | "$pkgdir/$_mozappdir/thunderbird-bin" |
315 | } | 315 | } |
316 | 316 | ||
317 | sha512sums="e7559536a9e024747e3ac7c20e4ffde5adf57657d02109ea32c39bf736ad03707fc7a14a0d3f1c91fa6fd69ead3c38d6c32ce78bd468834d9ba7f77f728332c6 thunderbird-68.12.0.source.tar.xz | 317 | sha512sums="8c0beb2a54f34f9b06605ddc54443c8dbb4e376911bcfa2d5c4b235d4e6f484f1862afba977d0cfcac1222c1b738f967c9b74397ba99c84bd16cc70480a455d8 thunderbird-78.3.2.source.tar.xz |
318 | 0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127 stab.h | 318 | 0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127 stab.h |
319 | 3e57b2541f3889a1cf701860c8bf299f294cb077b0e8cfffda271cf02d1f59b25a697485d0df66e847e47f795b1ace54488a84a42851f2f8587717335537b44d disable-ccache-stats.patch | ||
320 | 2f4f15974d52de4bb273b62a332d13620945d284bbc6fe6bd0a1f58ff7388443bc1d3bf9c82cc31a8527aad92b0cd3a1bc41d0af5e1800e0dcbd7033e58ffd71 fix-fortify-system-wrappers.patch | 319 | 2f4f15974d52de4bb273b62a332d13620945d284bbc6fe6bd0a1f58ff7388443bc1d3bf9c82cc31a8527aad92b0cd3a1bc41d0af5e1800e0dcbd7033e58ffd71 fix-fortify-system-wrappers.patch |
321 | 84b84d2d7dbc16002510bf856796ad345ac38ef6d3254670230189bba7c2d4781714d231236d5a3d70129a4597b430c3171644b01ad0f5a5bb13b55d407337a4 fix-seccomp-bpf.patch | ||
322 | 2c65ea7280e6e89826ebad563ee25203a99ff0b4ba8fc60ec261ada6c69874d649c6ac92fcecc6307a6e5a00de27d7956acf944d556ddfadec0411be16f4e0b8 fix-toolkit.patch | ||
323 | 4d55f41d15be7457ad630f8f07e4fc0314c2f75720010b4bbe6a2a7f3228210a1e069949e11795efbe2e784b0762e79fdfe5b8ec38e8a64cb8d9cf3b57dd5af1 fix-tools.patch | 320 | 4d55f41d15be7457ad630f8f07e4fc0314c2f75720010b4bbe6a2a7f3228210a1e069949e11795efbe2e784b0762e79fdfe5b8ec38e8a64cb8d9cf3b57dd5af1 fix-tools.patch |
324 | a4a3e062661bda64d502d426c480ac9645345860118de9df9ffe6e0597738c70c11e5cdef2d4fd12c5e2ee30a09310159230524655a419a4f7e4eeeb0f3c06b0 mallinfo.patch | 321 | a4a3e062661bda64d502d426c480ac9645345860118de9df9ffe6e0597738c70c11e5cdef2d4fd12c5e2ee30a09310159230524655a419a4f7e4eeeb0f3c06b0 mallinfo.patch |
325 | 454ea3263cabce099accbdc47aaf83be26a19f8b5a4568c01a7ef0384601cf8315efd86cd917f9c8bf419c2c845db89a905f3ff9a8eb0c8e41042e93aa96a85c disable-moz-stackwalk.patch | 322 | 454ea3263cabce099accbdc47aaf83be26a19f8b5a4568c01a7ef0384601cf8315efd86cd917f9c8bf419c2c845db89a905f3ff9a8eb0c8e41042e93aa96a85c disable-moz-stackwalk.patch |
326 | e0df4fc649012f023443ce9165da29d36459dbca5df64a31008b28d96264fba909858de36d0cf1b1cb1aab898342413f0cd77c90ebe21d1f9a0504631d6d1d0e fix-musl.patch | 323 | 089c97e6011e86a9b9d9e7b0c8ba3af0519d1ce4e2b1e9ab7719762d6968388bfa47dad3bf23a6d41c3d66fdcc6c15e2c926e3ff9500bfd4fbf1b53e6d19dc57 fix-rust-target.patch |
327 | c397bd594428b009d1533922a3728a0ec74403714417f4b90c38c1b7751749b0585d48e77c79efa05c6c22a0d9a8ac04d535eb5bb8deb51684852c03c05d94cd fix-rust-target.patch | ||
328 | d35cacb9ede80e6bfbef0709823e536dddfb1c02d776275b0b7adb5969e9927d8c6117df96873569c3f3db0a18ee5db24f8086a9311a05077892be43a3dd8d79 fix-webrtc-glibcisms.patch | 324 | d35cacb9ede80e6bfbef0709823e536dddfb1c02d776275b0b7adb5969e9927d8c6117df96873569c3f3db0a18ee5db24f8086a9311a05077892be43a3dd8d79 fix-webrtc-glibcisms.patch |
329 | f85f2c19c3dafab915bcb40e580fc442fd9eab5916696849edf0b105c758dd807dfe23a6479935613c81496711eb377c73227c03eb8582204c3442a4d0e397a2 fix-sandbox-membarrier.patch | ||
330 | 60845dcb034b2c4459c30f7d5f25c8176cf42df794e2cc0e86c3e2abb6541c24b962f3a16ca70a288d4d6f377b68d00b2904b22463108559612053d835d9bff1 fd6847c9416f9eebde636e21d794d25d1be8791d.patch | 325 | 60845dcb034b2c4459c30f7d5f25c8176cf42df794e2cc0e86c3e2abb6541c24b962f3a16ca70a288d4d6f377b68d00b2904b22463108559612053d835d9bff1 fd6847c9416f9eebde636e21d794d25d1be8791d.patch |
326 | 4e584621145cf8add069c6dac18e805b3274a1ee402d84e924df2341f7d3c5be261a93ef51283bacbd606f47fbdc628c4323ecc31efc5b403b8d224b18dc278f allow-custom-rust-vendor.patch | ||
327 | bb75b2abda86e455d81571052a2cfec5a9d858ffa91c50a7217b4b6c02cbfc0400e9114a27bd54ce78d7d3a44e9b03927cf0317654d98c0f39d26c63c9670117 remove-faulty-libvpx-check.patch | ||
328 | f963fcdba7307a0b1712dfb95ceba4ab49f449f60e550bb69d15d50272e6df9add90862251ee561e4ea5fd171a2703552ffa7aade92996f5f0b3e577f1544a6d disable-neon-in-aom.patch | ||
329 | 4911ddb41bef8d9f6d6200159cde465627e940fe1c09099be55769d21a5a52a3f737e1bf803daa96126c035b091aea880fbc5d2e6cf5da96ddd17322461a72d6 sandbox-fork.patch | ||
330 | db26757b2ebf9f567962e32294b4ae48b3a5d0378a7589dfe650fe3a179ff58befbab5082981c68e1c25fb9e56b2db1e4e510d4bca17c3e3aedbf9a2f21806eb sandbox-sched_setscheduler.patch | ||
331 | 95a2b1deb4f6c90750fdd2bfe8ca0a7879a5b267965091705a6beb0a0a4b1ccad75d11df7b9885543ca4232ff704e975c6946f4c11804cb71c471e06f9576001 thunderbird.desktop" | 331 | 95a2b1deb4f6c90750fdd2bfe8ca0a7879a5b267965091705a6beb0a0a4b1ccad75d11df7b9885543ca4232ff704e975c6946f4c11804cb71c471e06f9576001 thunderbird.desktop" |
diff --git a/testing/thunderbird/allow-custom-rust-vendor.patch b/testing/thunderbird/allow-custom-rust-vendor.patch new file mode 100644 index 0000000000..218650f411 --- /dev/null +++ b/testing/thunderbird/allow-custom-rust-vendor.patch | |||
@@ -0,0 +1,564 @@ | |||
1 | From a5a3db2d32ff1d359aef5ec586b91164570c1685 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dan Gohman <sunfish@mozilla.com> | ||
3 | Date: Tue, 5 Nov 2019 09:56:15 -0800 | ||
4 | Subject: [PATCH 1/7] Support custom vendor strings. | ||
5 | |||
6 | Add support for custom vendors, as in "x86_64-gentoo-linux-musl". | ||
7 | |||
8 | Fixes #33. | ||
9 | --- | ||
10 | src/targets.rs | 108 ++++++++++++++++++++++++++++++++++++++++++++++++- | ||
11 | src/triple.rs | 4 -- | ||
12 | 2 files changed, 106 insertions(+), 6 deletions(-) | ||
13 | |||
14 | diff --git a/src/targets.rs b/src/targets.rs | ||
15 | index 6ae570e..90b2736 100644 | ||
16 | --- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs | ||
17 | +++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs | ||
18 | @@ -1,6 +1,8 @@ | ||
19 | // This file defines all the identifier enums and target-aware logic. | ||
20 | |||
21 | use crate::triple::{Endianness, PointerWidth, Triple}; | ||
22 | +use alloc::boxed::Box; | ||
23 | +use alloc::string::String; | ||
24 | use core::fmt; | ||
25 | use core::str::FromStr; | ||
26 | |||
27 | @@ -292,7 +294,7 @@ impl Aarch64Architecture { | ||
28 | |||
29 | /// The "vendor" field, which in practice is little more than an arbitrary | ||
30 | /// modifier. | ||
31 | -#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] | ||
32 | +#[derive(Clone, Debug, PartialEq, Eq, Hash)] | ||
33 | #[allow(missing_docs)] | ||
34 | pub enum Vendor { | ||
35 | Unknown, | ||
36 | @@ -306,6 +308,15 @@ pub enum Vendor { | ||
37 | Sun, | ||
38 | Uwp, | ||
39 | Wrs, | ||
40 | + | ||
41 | + /// A custom vendor. "Custom" in this context means that the vendor is | ||
42 | + /// not specifically recognized by upstream Autotools, LLVM, Rust, or other | ||
43 | + /// relevant authorities on triple naming. It's useful for people building | ||
44 | + /// and using locally patched toolchains. | ||
45 | + /// | ||
46 | + /// Outside of such patched environments, users of `target-lexicon` should | ||
47 | + /// treat `Custom` the same as `Unknown` and ignore the string. | ||
48 | + Custom(Box<String>), | ||
49 | } | ||
50 | |||
51 | /// The "operating system" field, which sometimes implies an environment, and | ||
52 | @@ -717,6 +728,7 @@ impl fmt::Display for Vendor { | ||
53 | Vendor::Sun => "sun", | ||
54 | Vendor::Uwp => "uwp", | ||
55 | Vendor::Wrs => "wrs", | ||
56 | + Vendor::Custom(ref name) => name, | ||
57 | }; | ||
58 | f.write_str(s) | ||
59 | } | ||
60 | @@ -738,7 +750,46 @@ impl FromStr for Vendor { | ||
61 | "sun" => Vendor::Sun, | ||
62 | "uwp" => Vendor::Uwp, | ||
63 | "wrs" => Vendor::Wrs, | ||
64 | - _ => return Err(()), | ||
65 | + custom => { | ||
66 | + use alloc::borrow::ToOwned; | ||
67 | + | ||
68 | + // A custom vendor. Since triple syntax is so loosely defined, | ||
69 | + // be as conservative as we can to avoid potential ambiguities. | ||
70 | + // We err on the side of being too strict here, as we can | ||
71 | + // always relax it if needed. | ||
72 | + | ||
73 | + // Don't allow empty string names. | ||
74 | + if custom.is_empty() { | ||
75 | + return Err(()); | ||
76 | + } | ||
77 | + | ||
78 | + // Don't allow any other recognized name as a custom vendor, | ||
79 | + // since vendors can be omitted in some contexts. | ||
80 | + if Architecture::from_str(custom).is_ok() | ||
81 | + || OperatingSystem::from_str(custom).is_ok() | ||
82 | + || Environment::from_str(custom).is_ok() | ||
83 | + || BinaryFormat::from_str(custom).is_ok() | ||
84 | + { | ||
85 | + return Err(()); | ||
86 | + } | ||
87 | + | ||
88 | + // Require the first character to be an ascii lowercase. | ||
89 | + if !custom.chars().nth(0).unwrap().is_ascii_lowercase() { | ||
90 | + return Err(()); | ||
91 | + } | ||
92 | + | ||
93 | + // Restrict the set of characters permitted in a custom vendor. | ||
94 | + if custom | ||
95 | + .find(|c: char| { | ||
96 | + !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.') | ||
97 | + }) | ||
98 | + .is_some() | ||
99 | + { | ||
100 | + return Err(()); | ||
101 | + } | ||
102 | + | ||
103 | + Vendor::Custom(Box::new(custom.to_owned())) | ||
104 | + } | ||
105 | }) | ||
106 | } | ||
107 | } | ||
108 | @@ -1120,4 +1171,57 @@ mod tests { | ||
109 | assert_eq!(t.environment, Environment::Eabihf); | ||
110 | assert_eq!(t.binary_format, BinaryFormat::Elf); | ||
111 | } | ||
112 | + | ||
113 | + #[test] | ||
114 | + fn custom_vendors() { | ||
115 | + assert!(Triple::from_str("x86_64--linux").is_err()); | ||
116 | + assert!(Triple::from_str("x86_64-42-linux").is_err()); | ||
117 | + assert!(Triple::from_str("x86_64-__customvendor__-linux").is_err()); | ||
118 | + assert!(Triple::from_str("x86_64-^-linux").is_err()); | ||
119 | + assert!(Triple::from_str("x86_64- -linux").is_err()); | ||
120 | + assert!(Triple::from_str("x86_64-CustomVendor-linux").is_err()); | ||
121 | + assert!(Triple::from_str("x86_64-linux-linux").is_err()); | ||
122 | + assert!(Triple::from_str("x86_64-x86_64-linux").is_err()); | ||
123 | + assert!(Triple::from_str("x86_64-elf-linux").is_err()); | ||
124 | + assert!(Triple::from_str("x86_64-gnu-linux").is_err()); | ||
125 | + assert!(Triple::from_str("x86_64-linux-customvendor").is_err()); | ||
126 | + assert!(Triple::from_str("customvendor").is_err()); | ||
127 | + assert!(Triple::from_str("customvendor-x86_64").is_err()); | ||
128 | + assert!(Triple::from_str("x86_64-").is_err()); | ||
129 | + assert!(Triple::from_str("x86_64--").is_err()); | ||
130 | + | ||
131 | + let t = Triple::from_str("x86_64-customvendor-linux") | ||
132 | + .expect("can't parse target with custom vendor"); | ||
133 | + assert_eq!(t.architecture, Architecture::X86_64); | ||
134 | + assert_eq!( | ||
135 | + t.vendor, | ||
136 | + Vendor::Custom(Box::new(String::from_str("customvendor").unwrap())) | ||
137 | + ); | ||
138 | + assert_eq!(t.operating_system, OperatingSystem::Linux); | ||
139 | + assert_eq!(t.environment, Environment::Unknown); | ||
140 | + assert_eq!(t.binary_format, BinaryFormat::Elf); | ||
141 | + assert_eq!(t.to_string(), "x86_64-customvendor-linux"); | ||
142 | + | ||
143 | + let t = Triple::from_str("x86_64-customvendor") | ||
144 | + .expect("can't parse target with custom vendor"); | ||
145 | + assert_eq!(t.architecture, Architecture::X86_64); | ||
146 | + assert_eq!( | ||
147 | + t.vendor, | ||
148 | + Vendor::Custom(Box::new(String::from_str("customvendor").unwrap())) | ||
149 | + ); | ||
150 | + assert_eq!(t.operating_system, OperatingSystem::Unknown); | ||
151 | + assert_eq!(t.environment, Environment::Unknown); | ||
152 | + assert_eq!(t.binary_format, BinaryFormat::Unknown); | ||
153 | + | ||
154 | + assert_eq!( | ||
155 | + Triple::from_str("unknown-foo"), | ||
156 | + Ok(Triple { | ||
157 | + architecture: Architecture::Unknown, | ||
158 | + vendor: Vendor::Custom(Box::new(String::from_str("foo").unwrap())), | ||
159 | + operating_system: OperatingSystem::Unknown, | ||
160 | + environment: Environment::Unknown, | ||
161 | + binary_format: BinaryFormat::Unknown, | ||
162 | + }) | ||
163 | + ); | ||
164 | + } | ||
165 | } | ||
166 | diff --git a/src/triple.rs b/src/triple.rs | ||
167 | index 36dcd9a..1abda26 100644 | ||
168 | --- a/third_party/rust/target-lexicon.0.9.0/src/triple.rs | ||
169 | +++ b/third_party/rust/target-lexicon-0.9.0/src/triple.rs | ||
170 | @@ -322,10 +322,6 @@ mod tests { | ||
171 | Triple::from_str("foo"), | ||
172 | Err(ParseError::UnrecognizedArchitecture("foo".to_owned())) | ||
173 | ); | ||
174 | - assert_eq!( | ||
175 | - Triple::from_str("unknown-foo"), | ||
176 | - Err(ParseError::UnrecognizedVendor("foo".to_owned())) | ||
177 | - ); | ||
178 | assert_eq!( | ||
179 | Triple::from_str("unknown-unknown-foo"), | ||
180 | Err(ParseError::UnrecognizedOperatingSystem("foo".to_owned())) | ||
181 | |||
182 | From 6f90d7274dce4e7f9bb120f6b36cf26881bde9a7 Mon Sep 17 00:00:00 2001 | ||
183 | From: Dan Gohman <sunfish@mozilla.com> | ||
184 | Date: Tue, 5 Nov 2019 10:33:56 -0800 | ||
185 | Subject: [PATCH 2/7] Add more tests. | ||
186 | |||
187 | --- | ||
188 | src/targets.rs | 30 ++++++++++++++++++++++++++++-- | ||
189 | 1 file changed, 28 insertions(+), 2 deletions(-) | ||
190 | |||
191 | diff --git a/src/targets.rs b/src/targets.rs | ||
192 | index 90b2736..7d1f069 100644 | ||
193 | --- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs | ||
194 | +++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs | ||
195 | @@ -1174,6 +1174,7 @@ mod tests { | ||
196 | |||
197 | #[test] | ||
198 | fn custom_vendors() { | ||
199 | + // Test various invalid cases. | ||
200 | assert!(Triple::from_str("x86_64--linux").is_err()); | ||
201 | assert!(Triple::from_str("x86_64-42-linux").is_err()); | ||
202 | assert!(Triple::from_str("x86_64-__customvendor__-linux").is_err()); | ||
203 | @@ -1190,6 +1191,31 @@ mod tests { | ||
204 | assert!(Triple::from_str("x86_64-").is_err()); | ||
205 | assert!(Triple::from_str("x86_64--").is_err()); | ||
206 | |||
207 | + // Test various Unicode things. | ||
208 | + assert!( | ||
209 | + Triple::from_str("x86_64-𝓬𝓾𝓼𝓽𝓸𝓶𝓿𝓮𝓷𝓭𝓸𝓻-linux").is_err(), | ||
210 | + "unicode font hazard" | ||
211 | + ); | ||
212 | + assert!( | ||
213 | + Triple::from_str("x86_64-ćúśtőḿvéńdőŕ-linux").is_err(), | ||
214 | + "diacritical mark stripping hazard" | ||
215 | + ); | ||
216 | + assert!( | ||
217 | + Triple::from_str("x86_64-customvendοr-linux").is_err(), | ||
218 | + "homoglyph hazard" | ||
219 | + ); | ||
220 | + assert!(Triple::from_str("x86_64-customvendor-linux").is_ok()); | ||
221 | + assert!( | ||
222 | + Triple::from_str("x86_64-ffi-linux").is_err(), | ||
223 | + "normalization hazard" | ||
224 | + ); | ||
225 | + assert!(Triple::from_str("x86_64-ffi-linux").is_ok()); | ||
226 | + assert!( | ||
227 | + Triple::from_str("x86_64-customvendor-linux").is_err(), | ||
228 | + "zero-width character hazard" | ||
229 | + ); | ||
230 | + | ||
231 | + // Test some valid cases. | ||
232 | let t = Triple::from_str("x86_64-customvendor-linux") | ||
233 | .expect("can't parse target with custom vendor"); | ||
234 | assert_eq!(t.architecture, Architecture::X86_64); | ||
235 | @@ -1202,8 +1228,8 @@ mod tests { | ||
236 | assert_eq!(t.binary_format, BinaryFormat::Elf); | ||
237 | assert_eq!(t.to_string(), "x86_64-customvendor-linux"); | ||
238 | |||
239 | - let t = Triple::from_str("x86_64-customvendor") | ||
240 | - .expect("can't parse target with custom vendor"); | ||
241 | + let t = | ||
242 | + Triple::from_str("x86_64-customvendor").expect("can't parse target with custom vendor"); | ||
243 | assert_eq!(t.architecture, Architecture::X86_64); | ||
244 | assert_eq!( | ||
245 | t.vendor, | ||
246 | |||
247 | From c0e318b3c1be2d1965579f07dd563fb9cc0c4eb1 Mon Sep 17 00:00:00 2001 | ||
248 | From: Dan Gohman <sunfish@mozilla.com> | ||
249 | Date: Tue, 5 Nov 2019 12:56:31 -0800 | ||
250 | Subject: [PATCH 3/7] Use `.chars().any(...)` instead of | ||
251 | `.find(...).is_some()`. | ||
252 | |||
253 | --- | ||
254 | src/targets.rs | 9 +++------ | ||
255 | 1 file changed, 3 insertions(+), 6 deletions(-) | ||
256 | |||
257 | diff --git a/src/targets.rs b/src/targets.rs | ||
258 | index 7d1f069..1078dd3 100644 | ||
259 | --- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs | ||
260 | +++ b/third_party/rust/target-lexicon/src-0.9.0/targets.rs | ||
261 | @@ -779,12 +779,9 @@ impl FromStr for Vendor { | ||
262 | } | ||
263 | |||
264 | // Restrict the set of characters permitted in a custom vendor. | ||
265 | - if custom | ||
266 | - .find(|c: char| { | ||
267 | - !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.') | ||
268 | - }) | ||
269 | - .is_some() | ||
270 | - { | ||
271 | + if custom.chars().any(|c: char| { | ||
272 | + !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.') | ||
273 | + }) { | ||
274 | return Err(()); | ||
275 | } | ||
276 | |||
277 | |||
278 | From f319950528654c772193d9eb3bf40bc8df35fcae Mon Sep 17 00:00:00 2001 | ||
279 | From: Dan Gohman <sunfish@mozilla.com> | ||
280 | Date: Thu, 7 Nov 2019 15:15:48 -0800 | ||
281 | Subject: [PATCH 4/7] Fix build.rs to generate the correct code to build | ||
282 | Vendors. | ||
283 | |||
284 | --- | ||
285 | build.rs | 14 ++++++++++++-- | ||
286 | 1 file changed, 12 insertions(+), 2 deletions(-) | ||
287 | |||
288 | diff --git a/build.rs b/build.rs | ||
289 | index a0ba3b7..446f9e7 100644 | ||
290 | --- a/third_party/rust/target-lexicon-0.9.0/build.rs | ||
291 | +++ b/third_party/rust/target-lexicon-0.9.0/build.rs | ||
292 | @@ -32,6 +32,7 @@ mod parse_error { | ||
293 | } | ||
294 | } | ||
295 | |||
296 | +use self::targets::Vendor; | ||
297 | use self::triple::Triple; | ||
298 | |||
299 | fn main() { | ||
300 | @@ -60,7 +61,7 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> { | ||
301 | " architecture: Architecture::{:?},", | ||
302 | triple.architecture | ||
303 | )?; | ||
304 | - writeln!(out, " vendor: Vendor::{:?},", triple.vendor)?; | ||
305 | + writeln!(out, " vendor: {},", vendor_display(&triple.vendor))?; | ||
306 | writeln!( | ||
307 | out, | ||
308 | " operating_system: OperatingSystem::{:?},", | ||
309 | @@ -90,7 +91,7 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> { | ||
310 | writeln!(out, "impl Vendor {{")?; | ||
311 | writeln!(out, " /// Return the vendor for the current host.")?; | ||
312 | writeln!(out, " pub const fn host() -> Self {{")?; | ||
313 | - writeln!(out, " Vendor::{:?}", triple.vendor)?; | ||
314 | + writeln!(out, " {}", vendor_display(&triple.vendor))?; | ||
315 | writeln!(out, " }}")?; | ||
316 | writeln!(out, "}}")?; | ||
317 | writeln!(out)?; | ||
318 | @@ -160,3 +161,12 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> { | ||
319 | |||
320 | Ok(()) | ||
321 | } | ||
322 | + | ||
323 | +fn vendor_display(vendor: &Vendor) -> String { | ||
324 | + match vendor { | ||
325 | + Vendor::Custom(custom) => { | ||
326 | + format!("Vendor::Custom(Box::new(String::from_str({:?})))", custom) | ||
327 | + } | ||
328 | + known => format!("Vendor::{:?}", known), | ||
329 | + } | ||
330 | +} | ||
331 | |||
332 | From e558f6934535be3b8ccc9a99a33e861cb7431dfe Mon Sep 17 00:00:00 2001 | ||
333 | From: Dan Gohman <sunfish@mozilla.com> | ||
334 | Date: Fri, 8 Nov 2019 12:10:34 -0800 | ||
335 | Subject: [PATCH 5/7] Fix custom vendors in `const fn` contexts. | ||
336 | |||
337 | --- | ||
338 | build.rs | 15 +++++++++++---- | ||
339 | src/lib.rs | 4 ++-- | ||
340 | src/targets.rs | 51 ++++++++++++++++++++++++++++++++++++++++++-------- | ||
341 | 3 files changed, 56 insertions(+), 14 deletions(-) | ||
342 | |||
343 | diff --git a/build.rs b/build.rs | ||
344 | index 446f9e7..e88206e 100644 | ||
345 | --- a/third_party/rust/target-lexicon-0.9.0/build.rs | ||
346 | +++ b/third_party/rust/target-lexicon-0.9.0/build.rs | ||
347 | @@ -53,6 +53,8 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> { | ||
348 | writeln!(out, "use crate::Aarch64Architecture::*;")?; | ||
349 | writeln!(out, "#[allow(unused_imports)]")?; | ||
350 | writeln!(out, "use crate::ArmArchitecture::*;")?; | ||
351 | + writeln!(out, "#[allow(unused_imports)]")?; | ||
352 | + writeln!(out, "use crate::CustomVendor;")?; | ||
353 | writeln!(out)?; | ||
354 | writeln!(out, "/// The `Triple` of the current host.")?; | ||
355 | writeln!(out, "pub const HOST: Triple = Triple {{")?; | ||
356 | @@ -139,7 +141,11 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> { | ||
357 | " architecture: Architecture::{:?},", | ||
358 | triple.architecture | ||
359 | )?; | ||
360 | - writeln!(out, " vendor: Vendor::{:?},", triple.vendor)?; | ||
361 | + writeln!( | ||
362 | + out, | ||
363 | + " vendor: {},", | ||
364 | + vendor_display(&triple.vendor) | ||
365 | + )?; | ||
366 | writeln!( | ||
367 | out, | ||
368 | " operating_system: OperatingSystem::{:?},", | ||
369 | @@ -164,9 +170,10 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> { | ||
370 | |||
371 | fn vendor_display(vendor: &Vendor) -> String { | ||
372 | match vendor { | ||
373 | - Vendor::Custom(custom) => { | ||
374 | - format!("Vendor::Custom(Box::new(String::from_str({:?})))", custom) | ||
375 | - } | ||
376 | + Vendor::Custom(custom) => format!( | ||
377 | + "Vendor::Custom(CustomVendor::Static({:?}))", | ||
378 | + custom.as_str() | ||
379 | + ), | ||
380 | known => format!("Vendor::{:?}", known), | ||
381 | } | ||
382 | } | ||
383 | diff --git a/src/lib.rs b/src/lib.rs | ||
384 | index 8d6da8d..70f6488 100644 | ||
385 | --- a/third_party/rust/target-lexicon-0.9.0/src/lib.rs | ||
386 | +++ b/third_party/rust/target-lexicon-0.9.0/src/lib.rs | ||
387 | @@ -28,7 +28,7 @@ mod triple; | ||
388 | pub use self::host::HOST; | ||
389 | pub use self::parse_error::ParseError; | ||
390 | pub use self::targets::{ | ||
391 | - Aarch64Architecture, Architecture, ArmArchitecture, BinaryFormat, Environment, OperatingSystem, | ||
392 | - Vendor, | ||
393 | + Aarch64Architecture, Architecture, ArmArchitecture, BinaryFormat, CustomVendor, Environment, | ||
394 | + OperatingSystem, Vendor, | ||
395 | }; | ||
396 | pub use self::triple::{CallingConvention, Endianness, PointerWidth, Triple}; | ||
397 | diff --git a/src/targets.rs b/src/targets.rs | ||
398 | index 1078dd3..7152020 100644 | ||
399 | --- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs | ||
400 | +++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs | ||
401 | @@ -4,6 +4,7 @@ use crate::triple::{Endianness, PointerWidth, Triple}; | ||
402 | use alloc::boxed::Box; | ||
403 | use alloc::string::String; | ||
404 | use core::fmt; | ||
405 | +use core::hash::{Hash, Hasher}; | ||
406 | use core::str::FromStr; | ||
407 | |||
408 | /// The "architecture" field, which in some cases also specifies a specific | ||
409 | @@ -292,6 +293,39 @@ impl Aarch64Architecture { | ||
410 | } | ||
411 | } | ||
412 | |||
413 | +/// A string for a `Vendor::Custom` that can either be used in `const` | ||
414 | +/// contexts or hold dynamic strings. | ||
415 | +#[derive(Clone, Debug, Eq)] | ||
416 | +pub enum CustomVendor { | ||
417 | + /// An owned `String`. This supports the general case. | ||
418 | + Owned(Box<String>), | ||
419 | + /// A static `str`, so that `CustomVendor` can be constructed in `const` | ||
420 | + /// contexts. | ||
421 | + Static(&'static str), | ||
422 | +} | ||
423 | + | ||
424 | +impl CustomVendor { | ||
425 | + /// Extracts a string slice. | ||
426 | + pub fn as_str(&self) -> &str { | ||
427 | + match self { | ||
428 | + CustomVendor::Owned(s) => s, | ||
429 | + CustomVendor::Static(s) => s, | ||
430 | + } | ||
431 | + } | ||
432 | +} | ||
433 | + | ||
434 | +impl PartialEq for CustomVendor { | ||
435 | + fn eq(&self, other: &Self) -> bool { | ||
436 | + self.as_str() == other.as_str() | ||
437 | + } | ||
438 | +} | ||
439 | + | ||
440 | +impl Hash for CustomVendor { | ||
441 | + fn hash<H: Hasher>(&self, state: &mut H) { | ||
442 | + self.as_str().hash(state) | ||
443 | + } | ||
444 | +} | ||
445 | + | ||
446 | /// The "vendor" field, which in practice is little more than an arbitrary | ||
447 | /// modifier. | ||
448 | #[derive(Clone, Debug, PartialEq, Eq, Hash)] | ||
449 | @@ -316,7 +350,7 @@ pub enum Vendor { | ||
450 | /// | ||
451 | /// Outside of such patched environments, users of `target-lexicon` should | ||
452 | /// treat `Custom` the same as `Unknown` and ignore the string. | ||
453 | - Custom(Box<String>), | ||
454 | + Custom(CustomVendor), | ||
455 | } | ||
456 | |||
457 | /// The "operating system" field, which sometimes implies an environment, and | ||
458 | @@ -728,7 +762,7 @@ impl fmt::Display for Vendor { | ||
459 | Vendor::Sun => "sun", | ||
460 | Vendor::Uwp => "uwp", | ||
461 | Vendor::Wrs => "wrs", | ||
462 | - Vendor::Custom(ref name) => name, | ||
463 | + Vendor::Custom(ref name) => name.as_str(), | ||
464 | }; | ||
465 | f.write_str(s) | ||
466 | } | ||
467 | @@ -779,13 +813,14 @@ impl FromStr for Vendor { | ||
468 | } | ||
469 | |||
470 | // Restrict the set of characters permitted in a custom vendor. | ||
471 | - if custom.chars().any(|c: char| { | ||
472 | + fn is_prohibited_char(c: char) -> bool { | ||
473 | !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.') | ||
474 | - }) { | ||
475 | + } | ||
476 | + if custom.chars().any(is_prohibited_char) { | ||
477 | return Err(()); | ||
478 | } | ||
479 | |||
480 | - Vendor::Custom(Box::new(custom.to_owned())) | ||
481 | + Vendor::Custom(CustomVendor::Owned(Box::new(custom.to_owned()))) | ||
482 | } | ||
483 | }) | ||
484 | } | ||
485 | @@ -1218,7 +1253,7 @@ mod tests { | ||
486 | assert_eq!(t.architecture, Architecture::X86_64); | ||
487 | assert_eq!( | ||
488 | t.vendor, | ||
489 | - Vendor::Custom(Box::new(String::from_str("customvendor").unwrap())) | ||
490 | + Vendor::Custom(CustomVendor::Static("customvendor")) | ||
491 | ); | ||
492 | assert_eq!(t.operating_system, OperatingSystem::Linux); | ||
493 | assert_eq!(t.environment, Environment::Unknown); | ||
494 | @@ -1230,7 +1265,7 @@ mod tests { | ||
495 | assert_eq!(t.architecture, Architecture::X86_64); | ||
496 | assert_eq!( | ||
497 | t.vendor, | ||
498 | - Vendor::Custom(Box::new(String::from_str("customvendor").unwrap())) | ||
499 | + Vendor::Custom(CustomVendor::Static("customvendor")) | ||
500 | ); | ||
501 | assert_eq!(t.operating_system, OperatingSystem::Unknown); | ||
502 | assert_eq!(t.environment, Environment::Unknown); | ||
503 | @@ -1240,7 +1275,7 @@ mod tests { | ||
504 | Triple::from_str("unknown-foo"), | ||
505 | Ok(Triple { | ||
506 | architecture: Architecture::Unknown, | ||
507 | - vendor: Vendor::Custom(Box::new(String::from_str("foo").unwrap())), | ||
508 | + vendor: Vendor::Custom(CustomVendor::Static("foo")), | ||
509 | operating_system: OperatingSystem::Unknown, | ||
510 | environment: Environment::Unknown, | ||
511 | binary_format: BinaryFormat::Unknown, | ||
512 | |||
513 | From bc4b444133b8a5e56602f7c77c10ef3f1e7a7c78 Mon Sep 17 00:00:00 2001 | ||
514 | From: Dan Gohman <sunfish@mozilla.com> | ||
515 | Date: Mon, 18 Nov 2019 13:45:58 -0800 | ||
516 | Subject: [PATCH 6/7] Add a testcase with a BOM too, just in case. | ||
517 | |||
518 | --- | ||
519 | src/targets.rs | 4 ++++ | ||
520 | 1 file changed, 4 insertions(+) | ||
521 | |||
522 | diff --git a/src/targets.rs b/src/targets.rs | ||
523 | index 7152020..9a4d990 100644 | ||
524 | --- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs | ||
525 | +++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs | ||
526 | @@ -1246,6 +1246,10 @@ mod tests { | ||
527 | Triple::from_str("x86_64-customvendor-linux").is_err(), | ||
528 | "zero-width character hazard" | ||
529 | ); | ||
530 | + assert!( | ||
531 | + Triple::from_str("x86_64-customvendor-linux").is_err(), | ||
532 | + "BOM hazard" | ||
533 | + ); | ||
534 | |||
535 | // Test some valid cases. | ||
536 | let t = Triple::from_str("x86_64-customvendor-linux") | ||
537 | |||
538 | From 721fbbe1c9cfd3adc9aaf011c62d6a36078f4133 Mon Sep 17 00:00:00 2001 | ||
539 | From: Dan Gohman <sunfish@mozilla.com> | ||
540 | Date: Mon, 18 Nov 2019 20:56:40 -0800 | ||
541 | Subject: [PATCH 7/7] Use an anonymous function instead of just a local | ||
542 | function. | ||
543 | |||
544 | --- | ||
545 | src/targets.rs | 5 ++--- | ||
546 | 1 file changed, 2 insertions(+), 3 deletions(-) | ||
547 | |||
548 | diff --git a/src/targets.rs b/src/targets.rs | ||
549 | index 9a4d990..eb5a088 100644 | ||
550 | --- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs | ||
551 | +++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs | ||
552 | @@ -813,10 +813,9 @@ impl FromStr for Vendor { | ||
553 | } | ||
554 | |||
555 | // Restrict the set of characters permitted in a custom vendor. | ||
556 | - fn is_prohibited_char(c: char) -> bool { | ||
557 | + if custom.chars().any(|c: char| { | ||
558 | !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.') | ||
559 | - } | ||
560 | - if custom.chars().any(is_prohibited_char) { | ||
561 | + }) { | ||
562 | return Err(()); | ||
563 | } | ||
564 | |||
diff --git a/testing/thunderbird/disable-ccache-stats.patch b/testing/thunderbird/disable-ccache-stats.patch deleted file mode 100644 index 82ca2aa1cb..0000000000 --- a/testing/thunderbird/disable-ccache-stats.patch +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | --- a/python/mozbuild/mozbuild/controller/building.py 2019-07-03 15:25:28.000000000 +0000 | ||
2 | +++ b/python/mozbuild/mozbuild/controller/building.py 2019-07-17 02:49:12.693079588 +0000 | ||
3 | @@ -940,7 +940,7 @@ class BuildDriver(MozbuildObject): | ||
4 | warnings_path = self._get_state_filename('warnings.json') | ||
5 | monitor = self._spawn(BuildMonitor) | ||
6 | monitor.init(warnings_path) | ||
7 | - ccache_start = monitor.ccache_stats() | ||
8 | + ccache_start = None # monitor.ccache_stats() | ||
9 | footer = BuildProgressFooter(self.log_manager.terminal, monitor) | ||
10 | |||
11 | # Disable indexing in objdir because it is not necessary and can slow | ||
12 | @@ -1158,7 +1158,7 @@ class BuildDriver(MozbuildObject): | ||
13 | if high_finder: | ||
14 | print(FINDER_SLOW_MESSAGE % finder_percent) | ||
15 | |||
16 | - ccache_end = monitor.ccache_stats() | ||
17 | + ccache_end = None # monitor.ccache_stats() | ||
18 | |||
19 | ccache_diff = None | ||
20 | if ccache_start and ccache_end: | ||
diff --git a/testing/thunderbird/disable-neon-in-aom.patch b/testing/thunderbird/disable-neon-in-aom.patch new file mode 100644 index 0000000000..01be79c047 --- /dev/null +++ b/testing/thunderbird/disable-neon-in-aom.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | Firefox (75) and AOM itself fail to build with NEON enabled. As such | ||
2 | we should disable it for now. | ||
3 | |||
4 | In file included from /home/buildozer/aports/community/firefox/src/firefox-75.0/third_party/aom/aom_dsp/arm/blend_a64_mask_neon.c:12: | ||
5 | /home/buildozer/aports/community/firefox/src/firefox-75.0/third_party/aom/av1/common/arm/mem_neon.h: In function 'load_u8_8x8': | ||
6 | /usr/lib/gcc/armv7-alpine-linux-musleabihf/9.3.0/include/arm_neon.h:10303:1: error: inlining failed in call to always_inline 'vld1_u8': target specific option mismatch | ||
7 | 10303 | vld1_u8 (const uint8_t * __a) | ||
8 | | ^~~~~~~ | ||
9 | --- a/media/libaom/moz.build 2020-04-09 08:20:14.608439591 +0200 | ||
10 | +++ b/media/libaom/moz.build 2020-04-09 08:20:21.801745246 +0200 | ||
11 | @@ -42,30 +42,6 @@ | ||
12 | ASFLAGS += [ '-I%s/media/libaom/config/linux/ia32/' % TOPSRCDIR ] | ||
13 | LOCAL_INCLUDES += [ '/media/libaom/config/linux/ia32/' ] | ||
14 | EXPORTS.aom += [ 'config/linux/ia32/config/aom_config.h' ] | ||
15 | -elif CONFIG['CPU_ARCH'] == 'arm': | ||
16 | - EXPORTS.aom += files['ARM_EXPORTS'] | ||
17 | - ASFLAGS += [ | ||
18 | - '-I%s/media/libaom/config/linux/arm/' % TOPSRCDIR, | ||
19 | - '-I%s/libaom' % OBJDIR, | ||
20 | - ] | ||
21 | - LOCAL_INCLUDES += [ '/media/libaom/config/linux/arm/' ] | ||
22 | - EXPORTS.aom += [ 'config/linux/arm/config/aom_config.h' ] | ||
23 | - | ||
24 | - SOURCES += files['ARM_SOURCES'] | ||
25 | - | ||
26 | - for f in SOURCES: | ||
27 | - if f.endswith('neon.c'): | ||
28 | - SOURCES[f].flags += CONFIG['VPX_ASFLAGS'] | ||
29 | - | ||
30 | - if CONFIG['OS_TARGET'] == 'Android': | ||
31 | - # For cpu-features.h | ||
32 | - LOCAL_INCLUDES += [ | ||
33 | - '%%%s/sources/android/cpufeatures' % CONFIG['ANDROID_NDK'], | ||
34 | - ] | ||
35 | - if CONFIG['CC_TYPE'] == 'clang': | ||
36 | - ASFLAGS += [ | ||
37 | - '-no-integrated-as', | ||
38 | - ] | ||
39 | else: | ||
40 | # Generic C-only configuration | ||
41 | EXPORTS.aom += files['GENERIC_EXPORTS'] | ||
diff --git a/testing/thunderbird/fix-musl.patch b/testing/thunderbird/fix-musl.patch deleted file mode 100644 index 996a45f130..0000000000 --- a/testing/thunderbird/fix-musl.patch +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | --- a/tools/profiler/core/platform-linux-android.cpp 2019-07-09 22:58:30.039475686 +0200 | ||
2 | +++ b/tools/profiler/core/platform-linux-android.cpp 2019-07-09 22:58:39.331437677 +0200 | ||
3 | @@ -73,7 +73,7 @@ | ||
4 | |||
5 | int profiler_current_thread_id() { | ||
6 | // glibc doesn't provide a wrapper for gettid(). | ||
7 | -#if defined(__GLIBC__) | ||
8 | +#if defined(__linux__) | ||
9 | return static_cast<int>(static_cast<pid_t>(syscall(SYS_gettid))); | ||
10 | #else | ||
11 | return static_cast<int>(gettid()); | ||
diff --git a/testing/thunderbird/fix-rust-target.patch b/testing/thunderbird/fix-rust-target.patch index f1a98dfd53..14f39691cf 100644 --- a/testing/thunderbird/fix-rust-target.patch +++ b/testing/thunderbird/fix-rust-target.patch | |||
@@ -1,10 +1,18 @@ | |||
1 | Allow us to just set RUST_TARGEt ourselves instead of hacking around in mozilla's | 1 | Allow us to just set RUST_TARGEt ourselves instead of hacking around in mozilla's |
2 | weird custom build system... | 2 | weird custom build system... |
3 | 3 | ||
4 | diff -upr firefox-68.9.0.orig/build/moz.configure/rust.configure firefox-68.9.0/build/moz.configure/rust.configure | 4 | --- a/build/moz.configure/rust.configure |
5 | --- firefox-68.9.0.orig/build/moz.configure/rust.configure 2020-06-02 22:54:39.982616128 +0200 | 5 | +++ b/build/moz.configure/rust.configure |
6 | +++ firefox-68.9.0/build/moz.configure/rust.configure 2020-06-02 23:08:37.656332899 +0200 | 6 | @@ -224,6 +224,8 @@ |
7 | @@ -345,7 +345,7 @@ def rust_triple_alias(host_or_target): | 7 | rust_supported_targets, arm_target, when=rust_compiler) |
8 | @checking('for rust %s triplet' % host_or_target_str) | ||
9 | @imports('os') | ||
10 | + @imports(_from='mozbuild.util', _import='ensure_unicode') | ||
11 | + @imports(_from='mozbuild.util', _import='system_encoding') | ||
12 | @imports(_from='mozbuild.configure.util', _import='LineIO') | ||
13 | @imports(_from='mozbuild.shellutil', _import='quote') | ||
14 | @imports(_from='tempfile', _import='mkstemp') | ||
15 | @@ -328,7 +330,7 @@ | ||
8 | 16 | ||
9 | return None | 17 | return None |
10 | 18 | ||
@@ -13,3 +21,11 @@ diff -upr firefox-68.9.0.orig/build/moz.configure/rust.configure firefox-68.9.0/ | |||
13 | 21 | ||
14 | if rustc_target is None: | 22 | if rustc_target is None: |
15 | die("Don't know how to translate {} for rustc".format( | 23 | die("Don't know how to translate {} for rustc".format( |
24 | @@ -373,7 +375,7 @@ | ||
25 | os.remove(out_path) | ||
26 | |||
27 | # This target is usable. | ||
28 | - return rustc_target | ||
29 | + return ensure_unicode(rustc_target, system_encoding) | ||
30 | |||
31 | return rust_target | ||
diff --git a/testing/thunderbird/fix-sandbox-membarrier.patch b/testing/thunderbird/fix-sandbox-membarrier.patch deleted file mode 100644 index 4bd3b80d2a..0000000000 --- a/testing/thunderbird/fix-sandbox-membarrier.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | allow usage of SYS_membarrier, needed since musl-1.1.22 | ||
2 | |||
3 | Taken from voidlinux: https://github.com/void-linux/void-packages/commit/4198411ac3b9e2620e171c662df82008da0faebb | ||
4 | |||
5 | --- a/security/sandbox/linux/SandboxFilter.cpp | ||
6 | +++ b/security/sandbox/linux/SandboxFilter.cpp | ||
7 | @@ -572,6 +572,8 @@ | ||
8 | case __NR_set_tid_address: | ||
9 | return Allow(); | ||
10 | #endif | ||
11 | + case __NR_membarrier: | ||
12 | + return Allow(); | ||
13 | |||
14 | // prctl | ||
15 | case __NR_prctl: { | ||
16 | |||
17 | --- a/security/sandbox/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h | ||
18 | +++ b/security/sandbox/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h | ||
19 | @@ -1385,6 +1385,10 @@ | ||
20 | #define __NR_memfd_create (__NR_SYSCALL_BASE+385) | ||
21 | #endif | ||
22 | |||
23 | +#if !defined(__NR_membarrier) | ||
24 | +#define __NR_membarrier (__NR_SYSCALL_BASE+389) | ||
25 | +#endif | ||
26 | + | ||
27 | // ARM private syscalls. | ||
28 | #if !defined(__ARM_NR_BASE) | ||
29 | #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000) | ||
30 | |||
31 | --- a/security/sandbox/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h | ||
32 | +++ b/security/sandbox/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h | ||
33 | @@ -1290,5 +1290,9 @@ | ||
34 | #define __NR_memfd_create 319 | ||
35 | #endif | ||
36 | |||
37 | +#if !defined(__NR_membarrier) | ||
38 | +#define __NR_membarrier 324 | ||
39 | +#endif | ||
40 | + | ||
41 | #endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_64_LINUX_SYSCALLS_H_ | ||
42 | |||
43 | --- a/security/sandbox/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h | ||
44 | +++ b/security/sandbox/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h | ||
45 | @@ -1490,5 +1490,9 @@ | ||
46 | #define __NR_shutdown 373 | ||
47 | #endif | ||
48 | |||
49 | +#if !defined(__NR_membarrier) | ||
50 | +#define __NR_membarrier 375 | ||
51 | +#endif | ||
52 | + | ||
53 | #endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_ | ||
54 | |||
diff --git a/testing/thunderbird/fix-seccomp-bpf.patch b/testing/thunderbird/fix-seccomp-bpf.patch deleted file mode 100644 index de7bd175ee..0000000000 --- a/testing/thunderbird/fix-seccomp-bpf.patch +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | --- a/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc 2018-12-14 08:53:46.083976137 +0000 | ||
2 | +++ b/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc 2018-12-14 08:51:22.084596411 +0000 | ||
3 | @@ -25,6 +25,11 @@ | ||
4 | #include "sandbox/linux/system_headers/linux_seccomp.h" | ||
5 | #include "sandbox/linux/system_headers/linux_signal.h" | ||
6 | |||
7 | +// musl libc defines siginfo_t __si_fields instead of _sifields | ||
8 | +#if defined(OS_LINUX) && !defined(__GLIBC__) | ||
9 | +#define _sifields __si_fields | ||
10 | +#endif | ||
11 | + | ||
12 | namespace { | ||
13 | |||
14 | struct arch_sigsys { | ||
diff --git a/testing/thunderbird/fix-toolkit.patch b/testing/thunderbird/fix-toolkit.patch deleted file mode 100644 index 414734dfec..0000000000 --- a/testing/thunderbird/fix-toolkit.patch +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | diff --git a/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc b/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc | ||
2 | index 4222ce3..4d40c6a 100644 | ||
3 | --- a/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc | ||
4 | +++ b/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc | ||
5 | @@ -46,6 +46,7 @@ | ||
6 | #include <sys/mman.h> | ||
7 | #include <sys/stat.h> | ||
8 | #include <unistd.h> | ||
9 | +#include <libgen.h> | ||
10 | |||
11 | #include <iostream> | ||
12 | #include <set> | ||
13 | diff --git a/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc b/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc | ||
14 | index 6019fc7..5953e32 100644 | ||
15 | --- a/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc | ||
16 | +++ b/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc | ||
17 | @@ -41,6 +41,10 @@ | ||
18 | |||
19 | #include "common/using_std_string.h" | ||
20 | |||
21 | +#ifndef N_UNDF | ||
22 | +#define N_UNDF 0 | ||
23 | +#endif | ||
24 | + | ||
25 | using std::vector; | ||
26 | |||
27 | namespace google_breakpad { | ||
28 | diff --git a/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h b/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h | ||
29 | index 98ee2dd..d57aa68 100644 | ||
30 | --- a/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h | ||
31 | +++ b/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h | ||
32 | @@ -55,7 +55,7 @@ | ||
33 | |||
34 | #ifdef HAVE_MACH_O_NLIST_H | ||
35 | #include <mach-o/nlist.h> | ||
36 | -#elif defined(HAVE_A_OUT_H) | ||
37 | +#elif 0 | ||
38 | #include <a.out.h> | ||
39 | #endif | ||
40 | |||
41 | diff --git a/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h b/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h | ||
42 | index 93fdad7..f34e5e0 100644 | ||
43 | --- a/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h | ||
44 | +++ b/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h | ||
45 | @@ -1239,6 +1239,12 @@ struct kernel_statfs { | ||
46 | #ifndef __NR_fallocate | ||
47 | #define __NR_fallocate 285 | ||
48 | #endif | ||
49 | + | ||
50 | +#undef __NR_pread | ||
51 | +#define __NR_pread __NR_pread64 | ||
52 | +#undef __NR_pwrite | ||
53 | +#define __NR_pwrite __NR_pwrite64 | ||
54 | + | ||
55 | /* End of x86-64 definitions */ | ||
56 | #elif defined(__mips__) | ||
57 | #if _MIPS_SIM == _MIPS_SIM_ABI32 | ||
58 | diff --git a/toolkit/mozapps/update/common/updatedefines.h b/toolkit/mozapps/update/common/updatedefines.h | ||
59 | index 79276f7..4c67976 100644 | ||
60 | --- a/toolkit/mozapps/update/common/updatedefines.h | ||
61 | +++ b/toolkit/mozapps/update/common/updatedefines.h | ||
62 | @@ -87,7 +87,7 @@ static inline int mywcsprintf(WCHAR* dest, size_t count, const WCHAR* fmt, | ||
63 | |||
64 | # ifdef SOLARIS | ||
65 | # include <sys/stat.h> | ||
66 | -# else | ||
67 | +# elif !defined(__linux__) || defined(__GLIBC__) | ||
68 | # include <fts.h> | ||
69 | # endif | ||
70 | # include <dirent.h> | ||
71 | diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp | ||
72 | index 257ccb4..01314e4 100644 | ||
73 | --- a/toolkit/mozapps/update/updater/updater.cpp | ||
74 | +++ b/toolkit/mozapps/update/updater/updater.cpp | ||
75 | @@ -3978,6 +3978,7 @@ | ||
76 | |||
77 | int add_dir_entries(const NS_tchar* dirpath, ActionList* list) { | ||
78 | int rv = OK; | ||
79 | +#if !defined(__linux__) || defined(__GLIBC__) | ||
80 | FTS* ftsdir; | ||
81 | FTSENT* ftsdirEntry; | ||
82 | mozilla::UniquePtr<NS_tchar[]> searchpath(get_full_path(dirpath)); | ||
83 | @@ -4085,6 +4086,7 @@ | ||
84 | } | ||
85 | |||
86 | fts_close(ftsdir); | ||
87 | +#endif | ||
88 | |||
89 | return rv; | ||
90 | } | ||
diff --git a/testing/thunderbird/remove-faulty-libvpx-check.patch b/testing/thunderbird/remove-faulty-libvpx-check.patch new file mode 100644 index 0000000000..3fc5fb4c0f --- /dev/null +++ b/testing/thunderbird/remove-faulty-libvpx-check.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | --- a/toolkit/moz.configure.orig 2020-04-07 18:04:13.886159258 +0200 | ||
2 | +++ b/toolkit/moz.configure 2020-04-07 18:04:37.905834036 +0200 | ||
3 | @@ -1422,11 +1422,6 @@ | ||
4 | "with system libvpx. Use --without-system-libvpx to build " | ||
5 | "with in-tree libvpx.")) | ||
6 | |||
7 | - check_symbol('vpx_codec_dec_init_ver', flags=vpx.libs, onerror=lambda: die( | ||
8 | - "--with-system-libvpx requested but symbol vpx_codec_dec_init_ver " | ||
9 | - "not found" | ||
10 | - )) | ||
11 | - | ||
12 | set_config('MOZ_SYSTEM_LIBVPX', True) | ||
13 | |||
diff --git a/testing/thunderbird/sandbox-fork.patch b/testing/thunderbird/sandbox-fork.patch new file mode 100644 index 0000000000..328943cb00 --- /dev/null +++ b/testing/thunderbird/sandbox-fork.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | make SYS_fork non-fatal, musl uses it for fork(2) | ||
2 | |||
3 | --- a/security/sandbox/linux/SandboxFilter.cpp | ||
4 | +++ b/security/sandbox/linux/SandboxFilter.cpp | ||
5 | @@ -1253,6 +1253,8 @@ | ||
6 | // usually do something reasonable on error. | ||
7 | case __NR_clone: | ||
8 | return ClonePolicy(Error(EPERM)); | ||
9 | + case __NR_fork: | ||
10 | + return Error(ENOSYS); | ||
11 | |||
12 | # ifdef __NR_fadvise64 | ||
13 | case __NR_fadvise64: | ||
diff --git a/testing/thunderbird/sandbox-sched_setscheduler.patch b/testing/thunderbird/sandbox-sched_setscheduler.patch new file mode 100644 index 0000000000..1db645aebb --- /dev/null +++ b/testing/thunderbird/sandbox-sched_setscheduler.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1657849 | ||
2 | diff --git a/security/sandbox/linux/SandboxFilter.cpp b/security/sandbox/linux/SandboxFilter.cpp | ||
3 | index 27da4e7..5a607a4 100644 | ||
4 | --- a/security/sandbox/linux/SandboxFilter.cpp | ||
5 | +++ b/security/sandbox/linux/SandboxFilter.cpp | ||
6 | @@ -1455,6 +1455,7 @@ class GMPSandboxPolicy : public SandboxPolicyCommon { | ||
7 | return Trap(OpenTrap, mFiles); | ||
8 | |||
9 | case __NR_brk: | ||
10 | + case __NR_sched_setscheduler: | ||
11 | // Because Firefox on glibc resorts to the fallback implementation | ||
12 | // mentioned in bug 1576006, we must explicitly allow the get*id() | ||
13 | // functions in order to use NSS in the clearkey CDM. | ||
14 | @@ -1467,8 +1468,7 @@ class GMPSandboxPolicy : public SandboxPolicyCommon { | ||
15 | case __NR_sched_get_priority_max: | ||
16 | return Allow(); | ||
17 | case __NR_sched_getparam: | ||
18 | - case __NR_sched_getscheduler: | ||
19 | - case __NR_sched_setscheduler: { | ||
20 | + case __NR_sched_getscheduler: { | ||
21 | Arg<pid_t> pid(0); | ||
22 | return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr)); | ||
23 | } | ||