summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rodriguez Reboredo2023-06-03 10:29:15 -0300
committerCaleb Maclennan2023-06-13 08:03:35 +0300
commitddc12c2922789d0e2e1d5435f8ecb16a9902aefd (patch)
tree5a4e4e88be0733eea49a5a3124833f783834ef76
parent3aa560b4ef5d5edadaebc5ad4d5b1a454ddaf15a (diff)
downloadaur-ddc12c2922789d0e2e1d5435f8ecb16a9902aefd.tar.gz
uppkg: brave 1.52.117
upstream release Signed-off-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Signed-off-by: Caleb Maclennan <caleb@alerque.com>
-rw-r--r--.SRCINFO39
-rw-r--r--PKGBUILD86
-rw-r--r--brave-1.11-bat-native-ledger-header_fix-ctime.patch10
-rw-r--r--brave-1.43-bat-native-ads-hash_vectorizer_fix-cstring.patch12
-rw-r--r--brave-1.43-bat-native-ads-vector_data_fix-cmath.patch12
-rw-r--r--brave-1.43-bitcoin-core_remove-serialize.h.patch116
-rw-r--r--brave-1.49-brave_wallet-hd_key-vector_fix.patch22
-rw-r--r--system-rust-utils.patch72
8 files changed, 77 insertions, 292 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d9bec05f7804..3e22971f4ee6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = brave
pkgdesc = Web browser that blocks ads and trackers by default
- pkgver = 1.49.128
+ pkgver = 1.52.117
pkgrel = 1
url = https://www.brave.com/download
arch = x86_64
@@ -42,7 +42,6 @@ pkgbase = brave
depends = hicolor-icon-theme
depends = fontconfig
depends = woff2
- depends = aom
depends = brotli
depends = libjpeg
depends = icu
@@ -66,46 +65,42 @@ pkgbase = brave
optdepends = org.freedesktop.secrets: password storage backend on GNOME / Xfce
optdepends = kwallet: support for storing passwords in KWallet on Plasma
options = !lto
- source = brave-browser::git+https://github.com/brave/brave-browser.git#tag=v1.49.128
- source = brave::git+https://github.com/brave/brave-core.git#tag=v1.49.128
- source = chromium::git+https://chromium.googlesource.com/chromium/src.git#tag=111.0.5563.110
+ source = brave-browser::git+https://github.com/brave/brave-browser.git#tag=v1.52.117
+ source = brave::git+https://github.com/brave/brave-core.git#tag=v1.52.117
+ source = chromium::git+https://chromium.googlesource.com/chromium/src.git#tag=114.0.5735.90
source = depot_tools::git+https://chromium.googlesource.com/chromium/tools/depot_tools.git
source = https://github.com/foutrelis/chromium-launcher/archive/refs/tags/v8/chromium-launcher-8.tar.gz
- source = https://github.com/stha09/chromium-patches/releases/download/chromium-111-patchset-2/chromium-111-patchset-2.tar.xz
source = chromium-launcher-electron-app.patch
source = chromium-launcher-vendor.patch
source = system-rust-utils.patch
- source = brave-1.11-bat-native-ledger-header_fix-ctime.patch
source = brave-1.19-BUILD.gn.patch
- source = brave-1.43-bat-native-ads-hash_vectorizer_fix-cstring.patch
- source = brave-1.43-bat-native-ads-vector_data_fix-cmath.patch
- source = brave-1.43-bitcoin-core_remove-serialize.h.patch
source = brave-1.43-debounce-debounce_navigation_throttle_fix.patch
source = brave-1.43-ntp_background_images-std-size_t.patch
source = brave-1.48-partitioned_host_state_map-cstring.patch
- source = brave-1.49-brave_wallet-hd_key-vector_fix.patch
- source = https://raw.githubusercontent.com/archlinux/svntogit-packages/c762dd2d9d0eaa900772315d57bb5ed7dfdf895d/trunk/sql-relax-constraints-on-VirtualCursor-layout.patch
- source = https://raw.githubusercontent.com/archlinux/svntogit-packages/c762dd2d9d0eaa900772315d57bb5ed7dfdf895d/trunk/disable-GlobalMediaControlsCastStartStop.patch
- source = https://raw.githubusercontent.com/archlinux/svntogit-packages/c762dd2d9d0eaa900772315d57bb5ed7dfdf895d/trunk/use-oauth2-client-switches-as-default.patch
+ source = https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/raw/fa08adba87b6222bdf9ba31aaa41579e634ec444/add-some-typename-s-that-are-required-in-C-17.patch
+ source = https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/raw/fa08adba87b6222bdf9ba31aaa41579e634ec444/REVERT-disable-autoupgrading-debug-info.patch
+ source = https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/raw/fa08adba87b6222bdf9ba31aaa41579e634ec444/download-bubble-typename.patch
+ source = https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/raw/fa08adba87b6222bdf9ba31aaa41579e634ec444/webauthn-variant.patch
+ source = https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/raw/fa08adba87b6222bdf9ba31aaa41579e634ec444/random-fixes-for-gcc13.patch
+ source = https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/raw/fa08adba87b6222bdf9ba31aaa41579e634ec444/disable-GlobalMediaControlsCastStartStop.patch
+ source = https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/raw/fa08adba87b6222bdf9ba31aaa41579e634ec444/use-oauth2-client-switches-as-default.patch
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = 213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a
- sha256sums = a016588340f1559198e4ce61c6e91c48cf863600f415cb5c46322de7e1f77909
sha256sums = 9235485adc4acbfaf303605f4428a6995a7b0b3b5a95181b185afbcb9f1f6ae5
sha256sums = 404bf09df39310a1e374c5e7eb9c7311239798adf4e8cd85b7ff04fc79647f88
- sha256sums = a8b119138c7157a71f2d1240bea5a2af9593d6b774586f5cc337b344cd9a18b8
- sha256sums = 1f7c9e7f15876bf3a6611971dc10ad0311fdcc92bc4d369ff077c984b395b802
+ sha256sums = 579c5cf5cd59c89ac363f0adcf42463a4aa2effb30fbf09467d4745bf26c2e7d
sha256sums = 12a3d37ffca4c0fa25f89f02efdf79d24f6412ee29ec35e8a00f9086dba4e822
- sha256sums = a4ed0ad8f4931bae08c42a20266b8e2f934f21811fe0892960798f14a1fcfd0b
- sha256sums = 5c1e562b25d4fe614f3a77e00accc53001541b7b3f308fb7512cce1138878d7e
- sha256sums = 0b5764355b9201d201b1e08f700bbb5a7fa238bef127b95d36cbf8ce2afa73a6
sha256sums = 30a6a9ca2a6dd965cb2d9f02639079130948bf45d483f0c629f2cf8394a1c22f
sha256sums = ea0cd714ccaa839baf7c71e9077264016aa19415600f16b77d5398fd49f5a70b
sha256sums = 3864fcb12aaec849fd0e5423c9c5dfb1fdd7805e298a52125776bb24abe71e3c
- sha256sums = f55438b4d5fd3c14e3e6c16383e6305ec52818c1fc9438d0d40ff72d157504a3
- sha256sums = e66be069d932fe18811e789c57b96249b7250257ff91a3d82d15e2a7283891b7
+ sha256sums = 621ed210d75d0e846192c1571bb30db988721224a41572c27769c0288d361c11
+ sha256sums = 1b782b0f6d4f645e4e0daa8a4852d63f0c972aa0473319216ff04613a0592a69
+ sha256sums = d464eed4be4e9bf6187b4c40a759c523b7befefa25ba34ad6401b2a07649ca2a
+ sha256sums = 590fabbb26270947cb477378b53a9dcd17855739076b4af9983e1e54dfcab6d7
+ sha256sums = ba4dd0a25a4fc3267ed19ccb39f28b28176ca3f97f53a4e9f5e9215280040ea0
sha256sums = 7f3b1b22d6a271431c1f9fc92b6eb49c6d80b8b3f868bdee07a6a1a16630a302
sha256sums = e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711
diff --git a/PKGBUILD b/PKGBUILD
index dd312e38fa86..6c710e0ea00d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -28,7 +28,7 @@
: "${COMPONENT:=4}"
pkgname=brave
-pkgver=1.49.128
+pkgver=1.52.117
pkgrel=1
pkgdesc='Web browser that blocks ads and trackers by default'
arch=(x86_64)
@@ -46,7 +46,7 @@ optdepends=('pipewire: WebRTC desktop sharing under Wayland'
'org.freedesktop.secrets: password storage backend on GNOME / Xfce'
'kwallet: support for storing passwords in KWallet on Plasma')
options=('!lto') # Chromium adds its own flags for ThinLTO
-_chromium_ver=111.0.5563.110
+_chromium_ver=114.0.5735.90
_gcc_patchset=2
_patchset_name="chromium-${_chromium_ver%%.*}-patchset-$_gcc_patchset"
_launcher_ver=8
@@ -55,45 +55,41 @@ source=("brave-browser::git+https://github.com/brave/brave-browser.git#tag=v$pkg
"chromium::git+https://chromium.googlesource.com/chromium/src.git#tag=$_chromium_ver"
'depot_tools::git+https://chromium.googlesource.com/chromium/tools/depot_tools.git'
"https://github.com/foutrelis/chromium-launcher/archive/refs/tags/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz"
- "https://github.com/stha09/chromium-patches/releases/download/$_patchset_name/$_patchset_name.tar.xz"
chromium-launcher-electron-app.patch
chromium-launcher-vendor.patch
system-rust-utils.patch
- brave-1.11-bat-native-ledger-header_fix-ctime.patch
brave-1.19-BUILD.gn.patch
- brave-1.43-bat-native-ads-hash_vectorizer_fix-cstring.patch
- brave-1.43-bat-native-ads-vector_data_fix-cmath.patch
- brave-1.43-bitcoin-core_remove-serialize.h.patch
brave-1.43-debounce-debounce_navigation_throttle_fix.patch
brave-1.43-ntp_background_images-std-size_t.patch
- brave-1.48-partitioned_host_state_map-cstring.patch
- brave-1.49-brave_wallet-hd_key-vector_fix.patch)
-_arch_revision=c762dd2d9d0eaa900772315d57bb5ed7dfdf895d
-_patches=(sql-relax-constraints-on-VirtualCursor-layout.patch
+ brave-1.48-partitioned_host_state_map-cstring.patch)
+_arch_revision=fa08adba87b6222bdf9ba31aaa41579e634ec444
+_patches=(add-some-typename-s-that-are-required-in-C-17.patch
+ REVERT-disable-autoupgrading-debug-info.patch
+ download-bubble-typename.patch
+ webauthn-variant.patch
+ random-fixes-for-gcc13.patch
disable-GlobalMediaControlsCastStartStop.patch
use-oauth2-client-switches-as-default.patch)
for _patch in "${_patches[@]}"; do
- source+=("https://raw.githubusercontent.com/archlinux/svntogit-packages/$_arch_revision/trunk/$_patch")
+ source+=("https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/raw/$_arch_revision/$_patch")
done
sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a'
- 'a016588340f1559198e4ce61c6e91c48cf863600f415cb5c46322de7e1f77909'
'9235485adc4acbfaf303605f4428a6995a7b0b3b5a95181b185afbcb9f1f6ae5'
'404bf09df39310a1e374c5e7eb9c7311239798adf4e8cd85b7ff04fc79647f88'
- 'a8b119138c7157a71f2d1240bea5a2af9593d6b774586f5cc337b344cd9a18b8'
- '1f7c9e7f15876bf3a6611971dc10ad0311fdcc92bc4d369ff077c984b395b802'
+ '579c5cf5cd59c89ac363f0adcf42463a4aa2effb30fbf09467d4745bf26c2e7d'
'12a3d37ffca4c0fa25f89f02efdf79d24f6412ee29ec35e8a00f9086dba4e822'
- 'a4ed0ad8f4931bae08c42a20266b8e2f934f21811fe0892960798f14a1fcfd0b'
- '5c1e562b25d4fe614f3a77e00accc53001541b7b3f308fb7512cce1138878d7e'
- '0b5764355b9201d201b1e08f700bbb5a7fa238bef127b95d36cbf8ce2afa73a6'
'30a6a9ca2a6dd965cb2d9f02639079130948bf45d483f0c629f2cf8394a1c22f'
'ea0cd714ccaa839baf7c71e9077264016aa19415600f16b77d5398fd49f5a70b'
'3864fcb12aaec849fd0e5423c9c5dfb1fdd7805e298a52125776bb24abe71e3c'
- 'f55438b4d5fd3c14e3e6c16383e6305ec52818c1fc9438d0d40ff72d157504a3'
- 'e66be069d932fe18811e789c57b96249b7250257ff91a3d82d15e2a7283891b7'
+ '621ed210d75d0e846192c1571bb30db988721224a41572c27769c0288d361c11'
+ '1b782b0f6d4f645e4e0daa8a4852d63f0c972aa0473319216ff04613a0592a69'
+ 'd464eed4be4e9bf6187b4c40a759c523b7befefa25ba34ad6401b2a07649ca2a'
+ '590fabbb26270947cb477378b53a9dcd17855739076b4af9983e1e54dfcab6d7'
+ 'ba4dd0a25a4fc3267ed19ccb39f28b28176ca3f97f53a4e9f5e9215280040ea0'
'7f3b1b22d6a271431c1f9fc92b6eb49c6d80b8b3f868bdee07a6a1a16630a302'
'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711')
@@ -109,7 +105,7 @@ declare -gA _system_libs=(
[harfbuzz-ng]=harfbuzz
[icu]=icu
[jsoncpp]=jsoncpp
- [libaom]=aom
+ #[libaom]=aom # https://aomedia.googlesource.com/aom/+/706ee36dcc82
#[libavif]=libavif # https://github.com/AOMediaCodec/libavif/commit/4d2776a3
[libdrm]=
[libjpeg]=libjpeg
@@ -127,9 +123,7 @@ declare -gA _system_libs=(
_unwanted_bundled_libs=(
"$(printf "%s\n" ${!_system_libs[@]} | sed 's/^libjpeg$/&_turbo/')"
)
-for _dep in "${_system_libs[@]}"; do
- depends+=($_dep)
-done
+depends+=(${_system_libs[@]})
prepare() {
cd chromium-launcher-$_launcher_ver
@@ -190,7 +184,8 @@ prepare() {
--local_state=src/chrome/android/profiles/local.txt \
--output_name=src/chrome/android/profiles/afdo.prof \
--gs_url_base=chromeos-prebuilt/afdo-job/llvm
- # ln -s /usr/bin/java third_party/jdk/current/bin
+ mkdir -p third_party/jdk/current/bin
+ ln -s /usr/bin/java third_party/jdk/current/bin
# Brave specific hooks
cd src/brave
@@ -218,13 +213,19 @@ prepare() {
patch -Np1 -i "${srcdir}/use-oauth2-client-switches-as-default.patch"
# Upstream fixes
- patch -Np1 -i "${srcdir}/sql-relax-constraints-on-VirtualCursor-layout.patch"
+ patch -Np1 -i "${srcdir}/add-some-typename-s-that-are-required-in-C-17.patch"
+
+ # Revert addition of compiler flag that needs newer clang
+ patch -Rp1 -i "${srcdir}/REVERT-disable-autoupgrading-debug-info.patch"
# Disable kGlobalMediaControlsCastStartStop by default
# https://crbug.com/1314342
patch -Np1 -i "${srcdir}/disable-GlobalMediaControlsCastStartStop.patch"
- # Fixes for building with libstdc++ instead of libc++
+ # Build fixes
+ patch -Np1 -i "${srcdir}/download-bubble-typename.patch"
+ patch -Np1 -i "${srcdir}/webauthn-variant.patch"
+ patch -Np1 -i "${srcdir}/random-fixes-for-gcc13.patch"
# Hacky patching
sed -e 's/\(enable_distro_version_check =\) true/\1 false/g' -i chrome/installer/linux/BUILD.gn
@@ -324,7 +325,6 @@ build() {
'enable_hangout_services_extension=true'
'enable_widevine=true'
'enable_nacl=false'
- #'use_vaapi=true'
)
_flags+=("rustup_path=\"$HOME/.rustup\"" "cargo_path=\"$HOME/.cargo\"")
@@ -370,38 +370,36 @@ build() {
CXXFLAGS=${CXXFLAGS/-Wp,-D_GLIBCXX_ASSERTIONS}
## See explanation on top to select your build
+ local _build_type
case $COMPONENT in
0)
echo "Normal build (with debug)"
- npm run build
- npm run build -- --target chrome_sandbox
- npm run build -- --target chromedriver.unstripped
+ npm_args=()
;;
2)
echo "Static build"
- npm run build Static
- npm run build Static -- --target chrome_sandbox
- npm run build Static -- --target chromedriver.unstripped
+ _build_type=Static
+ npm_args=()
;;
3)
echo "Debug build"
- npm run build Debug
- npm run build Debug -- --target chrome_sandbox
- npm run build Debug -- --target chromedriver.unstripped
+ _build_type=Debug
+ npm_args=()
;;
4)
echo "Release custom build"
- npm run build Release -- "${npm_args[@]}"
- npm run build Release -- --target chrome_sandbox "${npm_args[@]}"
- npm run build Release -- --target chromedriver.unstripped "${npm_args[@]}"
+ _build_type=Release
;;
1|*)
echo "Release build"
- npm run build Release
- npm run build Release -- --target chrome_sandbox
- npm run build Release -- --target chromedriver.unstripped
+ _build_type=Release
+ npm_args=()
;;
esac
+
+ npm run build ${_build_type} -- "${npm_args[@]}"
+ npm run build ${_build_type} -- --target chrome_sandbox "${npm_args[@]}"
+ npm run build ${_build_type} -- --target chromedriver.unstripped "${npm_args[@]}"
}
package() {
@@ -411,7 +409,7 @@ package() {
install -Dm644 LICENSE \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE.launcher"
- install -d -m0755 "$pkgdir/usr/lib/$pkgname/"{,locales,resources}
+ install -dm755 "$pkgdir/usr/lib/$pkgname/"{,locales,resources}
# Copy necessary release files
cd ../brave-browser/src
diff --git a/brave-1.11-bat-native-ledger-header_fix-ctime.patch b/brave-1.11-bat-native-ledger-header_fix-ctime.patch
deleted file mode 100644
index a68cb9b894a7..000000000000
--- a/brave-1.11-bat-native-ledger-header_fix-ctime.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/brave/vendor/bat-native-ledger/src/bat/ledger/internal/contribution/contribution.cc
-+++ b/brave/vendor/bat-native-ledger/src/bat/ledger/internal/contribution/contribution.cc
-@@ -7,6 +7,7 @@
-
- #include <algorithm>
- #include <cmath>
-+#include <ctime>
- #include <memory>
- #include <utility>
- #include <vector>
diff --git a/brave-1.43-bat-native-ads-hash_vectorizer_fix-cstring.patch b/brave-1.43-bat-native-ads-hash_vectorizer_fix-cstring.patch
deleted file mode 100644
index c139127aeb5e..000000000000
--- a/brave-1.43-bat-native-ads-hash_vectorizer_fix-cstring.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/vendor/bat-native-ads/src/bat/ads/internal/ml/transformation/hash_vectorizer.cc b/vendor/bat-native-ads/src/bat/ads/internal/ml/transformation/hash_vectorizer.cc
-index 7933b7d988..1a9498dd43 100644
---- a/brave/vendor/bat-native-ads/src/bat/ads/internal/ml/transformation/hash_vectorizer.cc
-+++ b/brave/vendor/bat-native-ads/src/bat/ads/internal/ml/transformation/hash_vectorizer.cc
-@@ -5,6 +5,8 @@
-
- #include "bat/ads/internal/ml/transformation/hash_vectorizer.h"
-
-+#include <cstring>
-+
- #include "third_party/zlib/zlib.h"
-
diff --git a/brave-1.43-bat-native-ads-vector_data_fix-cmath.patch b/brave-1.43-bat-native-ads-vector_data_fix-cmath.patch
deleted file mode 100644
index 9be651d17d8b..000000000000
--- a/brave-1.43-bat-native-ads-vector_data_fix-cmath.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/vendor/bat-native-ads/src/bat/ads/internal/ml/data/vector_data.cc b/vendor/bat-native-ads/src/bat/ads/internal/ml/data/vector_data.cc
-index 9f53602351..f7365fc0aa 100644
---- a/brave/vendor/bat-native-ads/src/bat/ads/internal/ml/data/vector_data.cc
-+++ b/brave/vendor/bat-native-ads/src/bat/ads/internal/ml/data/vector_data.cc
-@@ -8,6 +8,7 @@
- #include <limits>
- #include <numeric>
- #include <utility>
-+#include <cmath>
-
- #include "base/check_op.h"
-
diff --git a/brave-1.43-bitcoin-core_remove-serialize.h.patch b/brave-1.43-bitcoin-core_remove-serialize.h.patch
deleted file mode 100644
index eb6948e896d3..000000000000
--- a/brave-1.43-bitcoin-core_remove-serialize.h.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-diff --git a/brave/chromium_src/brave/third_party/bitcoin-core/src/src/serialize.h b/brave/chromium_src/brave/third_party/bitcoin-core/src/src/serialize.h
-deleted file mode 100644
-index 84ed46ed35..0000000000
---- a/brave/chromium_src/brave/third_party/bitcoin-core/src/src/serialize.h
-+++ /dev/null
-@@ -1,28 +0,0 @@
--/* Copyright (c) 2021 The Brave Authors. All rights reserved.
-- * This Source Code Form is subject to the terms of the Mozilla Public
-- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
-- * You can obtain one at http://mozilla.org/MPL/2.0/. */
--
--#ifndef BRAVE_CHROMIUM_SRC_BRAVE_THIRD_PARTY_BITCOIN_CORE_SRC_SRC_SERIALIZE_H_
--#define BRAVE_CHROMIUM_SRC_BRAVE_THIRD_PARTY_BITCOIN_CORE_SRC_SRC_SERIALIZE_H_
--
--#include <ios>
--#include <string>
--
--#include "base/check.h"
--
--namespace std {
--namespace brave {
--using string = ::std::string;
--}
--} // namespace std
--
--#define throw CHECK(false) <<
--#define ios_base brave
--#define failure string
--#include "src/brave/third_party/bitcoin-core/src/src/serialize.h"
--#undef throw
--#undef ios_base
--#undef string
--
--#endif // BRAVE_CHROMIUM_SRC_BRAVE_THIRD_PARTY_BITCOIN_CORE_SRC_SRC_SERIALIZE_H_
-diff --git a/brave/third_party/bitcoin-core/src/src/serialize.h b/brave/third_party/bitcoin-core/src/src/serialize.h
-index d9ca984f9..f23f8c412 100644
---- a/brave/third_party/bitcoin-core/src/src/serialize.h
-+++ b/brave/third_party/bitcoin-core/src/src/serialize.h
-@@ -24,6 +24,8 @@
- #include <prevector.h>
- #include <span.h>
-
-+#include "base/check.h"
-+
- /**
- * The maximum size of a serialized object in bytes or number of elements
- * (for eg vectors) when the size is encoded as CompactSize.
-@@ -327,22 +329,22 @@ uint64_t ReadCompactSize(Stream& is, bool range_check = true)
- {
- nSizeRet = ser_readdata16(is);
- if (nSizeRet < 253)
-- throw std::ios_base::failure("non-canonical ReadCompactSize()");
-+ CHECK(false) << std::string("non-canonical ReadCompactSize()");
- }
- else if (chSize == 254)
- {
- nSizeRet = ser_readdata32(is);
- if (nSizeRet < 0x10000u)
-- throw std::ios_base::failure("non-canonical ReadCompactSize()");
-+ CHECK(false) << std::string("non-canonical ReadCompactSize()");
- }
- else
- {
- nSizeRet = ser_readdata64(is);
- if (nSizeRet < 0x100000000ULL)
-- throw std::ios_base::failure("non-canonical ReadCompactSize()");
-+ CHECK(false) << std::string("non-canonical ReadCompactSize()");
- }
- if (range_check && nSizeRet > MAX_SIZE) {
-- throw std::ios_base::failure("ReadCompactSize(): size too large");
-+ CHECK(false) << std::string("ReadCompactSize(): size too large");
- }
- return nSizeRet;
- }
-@@ -435,12 +437,12 @@ I ReadVarInt(Stream& is)
- while(true) {
- unsigned char chData = ser_readdata8(is);
- if (n > (std::numeric_limits<I>::max() >> 7)) {
-- throw std::ios_base::failure("ReadVarInt(): size too large");
-+ CHECK(false) << std::string("ReadVarInt(): size too large");
- }
- n = (n << 7) | (chData & 0x7F);
- if (chData & 0x80) {
- if (n == std::numeric_limits<I>::max()) {
-- throw std::ios_base::failure("ReadVarInt(): size too large");
-+ CHECK(false) << std::string("ReadVarInt(): size too large");
- }
- n++;
- } else {
-@@ -512,7 +514,7 @@ struct CustomUintFormatter
-
- template <typename Stream, typename I> void Ser(Stream& s, I v)
- {
-- if (v < 0 || v > MAX) throw std::ios_base::failure("CustomUintFormatter value out of range");
-+ if (v < 0 || v > MAX) CHECK(false) << std::string("CustomUintFormatter value out of range");
- if (BigEndian) {
- uint64_t raw = htobe64(v);
- s.write(((const char*)&raw) + 8 - Bytes, Bytes);
-@@ -548,7 +550,7 @@ struct CompactSizeFormatter
- {
- uint64_t n = ReadCompactSize<Stream>(s, RangeCheck);
- if (n < std::numeric_limits<I>::min() || n > std::numeric_limits<I>::max()) {
-- throw std::ios_base::failure("CompactSize exceeds limit of type");
-+ CHECK(false) << std::string("CompactSize exceeds limit of type");
- }
- v = n;
- }
-@@ -571,7 +573,7 @@ struct LimitedStringFormatter
- {
- size_t size = ReadCompactSize(s);
- if (size > Limit) {
-- throw std::ios_base::failure("String length limit exceeded");
-+ CHECK(false) << std::string("String length limit exceeded");
- }
- v.resize(size);
- if (size != 0) s.read((char*)v.data(), size);
diff --git a/brave-1.49-brave_wallet-hd_key-vector_fix.patch b/brave-1.49-brave_wallet-hd_key-vector_fix.patch
deleted file mode 100644
index 253765bc82f3..000000000000
--- a/brave-1.49-brave_wallet-hd_key-vector_fix.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/brave/components/brave_wallet/browser/internal/hd_key.cc b/brave/components/brave_wallet/browser/internal/hd_key.cc
-index e42c4094ab..42670dce00 100644
---- a/brave/components/brave_wallet/browser/internal/hd_key.cc
-+++ b/brave/components/brave_wallet/browser/internal/hd_key.cc
-@@ -546,7 +546,7 @@ std::unique_ptr<HDKeyBase> HDKey::DeriveChildFromPath(const std::string& path) {
- hd_key->SetPrivateKey(private_key_);
- else
- hd_key->SetPublicKey(public_key_);
-- hd_key->chain_code_ = chain_code_;
-+ hd_key->chain_code_.assign(chain_code_.begin(), chain_code_.end());
- return std::unique_ptr<HDKeyBase>{hd_key.release()};
- }
- std::vector<std::string> entries =
-@@ -565,7 +565,7 @@ std::unique_ptr<HDKeyBase> HDKey::DeriveChildFromPath(const std::string& path) {
- hd_key->SetPrivateKey(private_key_);
- else
- hd_key->SetPublicKey(public_key_);
-- hd_key->chain_code_ = chain_code_;
-+ hd_key->chain_code_.assign(chain_code_.begin(), chain_code_.end());
- continue;
- }
- bool is_hardened = entry.length() > 1 && entry.back() == '\'';
diff --git a/system-rust-utils.patch b/system-rust-utils.patch
index 5c1fbc9f9d7d..79f2680d11c9 100644
--- a/system-rust-utils.patch
+++ b/system-rust-utils.patch
@@ -1,37 +1,22 @@
-diff --git a/build/rust/run_cxxbridge.py b/build/rust/run_cxxbridge.py
-index 5aa1f56ec2..370c181a47 100644
---- a/build/rust/run_cxxbridge.py
-+++ b/build/rust/run_cxxbridge.py
-@@ -22,7 +22,8 @@ import subprocess
-
- def run(cargo_path, args, output, is_header):
- cargo_home = os.path.join(cargo_path, RUST_DEPS_PACKAGE_VERSION)
-- exe = os.path.abspath(os.path.join(cargo_home, 'bin', 'cxxbridge'))
-+ # exe = os.path.abspath(os.path.join(cargo_home, 'bin', 'cxxbridge'))
-+ exe = os.path.abspath(os.path.join('/usr', 'bin', 'cxxbridge'))
-
- if sys.platform == "win32":
- exe = exe + '.exe'
diff --git a/script/cargo.py b/script/cargo.py
-index d7d872ef5b..6c550f56fc 100755
+index 0766c5f118..40b88e9a5c 100755
--- a/script/cargo.py
+++ b/script/cargo.py
-@@ -23,7 +23,8 @@ def run_cargo(command, args):
- env['RUSTUP_HOME'] = rustup_home
- env['CARGO_HOME'] = rustup_home
+@@ -21,7 +21,7 @@ def run_cargo(command, args):
+ # Enable experimental features in non-nightly builds
+ env['RUSTC_BOOTSTRAP'] = '1'
+
+- rustup_bin_dir = os.path.abspath(os.path.join(rustup_home, 'bin'))
++ rustup_bin_dir = os.path.abspath(os.path.join('/usr', 'bin'))
+ cargo_exe = args.exe
-- rustup_bin = os.path.abspath(os.path.join(rustup_home, 'bin'))
-+ # rustup_bin = os.path.abspath(os.path.join(rustup_home, 'bin'))
-+ rustup_bin = os.path.abspath(os.path.join('/usr', 'bin'))
- cargo_exe = os.path.join(rustup_bin, 'cargo')
- if sys.platform == "win32":
- cargo_exe += ".exe"
+ env['PATH'] = rustup_bin_dir + os.pathsep + env['PATH']
diff --git a/script/cargo_cbindgen.py b/script/cargo_cbindgen.py
-index 97a69b6625..fdd05a43a5 100755
+index db28fd013e..e2082e36fe 100755
--- a/script/cargo_cbindgen.py
+++ b/script/cargo_cbindgen.py
-@@ -22,7 +22,8 @@ def run(args):
- cargo_home = os.path.join(args.cargo_path, RUST_DEPS_PACKAGE_VERSION)
+@@ -20,7 +20,8 @@ def run(args):
+ cargo_home = args.cargo_home
env["CARGO_HOME"] = cargo_home
- rustup_bin = os.path.abspath(os.path.join(rustup_home, "bin"))
@@ -40,38 +25,17 @@ index 97a69b6625..fdd05a43a5 100755
cbindgen_bin = os.path.join(
rustup_bin, "cbindgen" if sys.platform != "win32" else "cbindgen.exe"
)
-diff --git a/script/deps_config.py b/script/deps_config.py
-index 999ce5f74c..e463b24ff9 100755
---- a/script/deps_config.py
-+++ b/script/deps_config.py
-@@ -8,7 +8,7 @@ import os
- # Version number and URL for pre-configured rust dependency package
- # e.g. rust_deps_mac_0.1.0.gz
- DEPS_PACKAGES_URL = "https://brave-build-deps-public.s3.brave.com"
--RUST_DEPS_PACKAGE_VERSION = "1.1.0"
-+RUST_DEPS_PACKAGE_VERSION = "" # "1.1.0"
- MAC_TOOLCHAIN_ROOT = os.path.join(os.path.dirname(os.path.dirname(
- os.path.dirname(__file__))),
- 'build', 'mac_files')
diff --git a/script/download_rust_deps.py b/script/download_rust_deps.py
-index 920f5f837a..655fb832f2 100755
+index d1d4b70eb2..ce9e6e816c 100755
--- a/script/download_rust_deps.py
+++ b/script/download_rust_deps.py
-@@ -7,6 +7,7 @@
-
- import argparse
- import os
-+import shutil
- import subprocess
- import sys
-
-@@ -207,7 +208,8 @@ def main():
- }
- ]
+@@ -191,7 +191,8 @@ def main():
+ "features": "vendored-openssl",
+ }]
for tool in tools:
-- cargo_install(tool)
+- cargo_install(tool, rustup_home)
+ if shutil.which(tool["name"]) is None:
-+ cargo_install(tool)
++ cargo_install(tool, rustup_home)
return 0