alerque / aur

Package sources for all the AUR packages I either maintain, co-maintain, or fork.
https://wiki.archlinux.org/index.php/Unofficial_user_repositories#alerque
45 stars 26 forks source link

Update brave to v1.64.113 #59

Open YakoYakoYokuYoku opened 1 year ago

YakoYakoYokuYoku commented 1 year ago

This PR updates brave to 1.64.113.

Changes:

alerque commented 1 year ago

I've tried a couple times to build this from a clean chroot and keep getting stuck on something like this:

generating ninja files...
Widevine cdm host verification is disabled
-------------------------------
/build/brave/src/brave-browser/src
> gn gen /build/brave/src/brave-browser/src/out/Release --args="sardine_client_id=\"7ca8433c-7e61-4e25-b76e-25aa2da68df1\" sardine_client_secret=\"7ca8433c-7e61-4e25-b76e-25aa2da68df1\" is_asan=false enable_full_stack_frames_for_profiling=false v8_enable_verify_heap=false disable_fieldtrial_testing_config=true safe_browsing_mode=1 brave_services_key=\"qjVKcxtUybh8WpKNoQ7Ebgbk
JTMu7omjDHKk=VrPApb8PwJyPE9eqchxedTsMEWg\" root_extra_deps=[\"//brave\"] is_component_build=false is_universal_binary=false proprietary_codecs=true ffmpeg_branding=\"Chrome\" branding_path_component=\"brave\" branding_path_product=\"brave\" enable_nacl=false enable_widevine=true target_cpu=\"x64\" is_official_build=true is_debug=false dcheck_always_on=false brave_channel=\"\"
 brave_google_api_key=\"AIzaSyAREPLACEWITHYOUROWNGOOGLEAPIKEY2Q\" brave_google_api_endpoint=\"https://www.googleapis.com/geolocation/v1/geolocate?key=\" google_default_client_id=\"\" google_default_client_secret=\"\" brave_infura_project_id=\"\" brave_zero_ex_api_key=\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\" bitflyer_production_client_id=\"\" bitflyer_production_client_secret=
\"\" bitflyer_production_fee_address=\"\" bitflyer_production_url=\"\" bitflyer_sandbox_client_id=\"\" bitflyer_sandbox_client_secret=\"\" bitflyer_sandbox_fee_address=\"\" bitflyer_sandbox_url=\"\" gemini_production_api_url=\"\" gemini_production_client_id=\"\" gemini_production_client_secret=\"\" gemini_production_fee_address=\"\" gemini_production_oauth_url=\"\" gemini_san
dbox_api_url=\"\" gemini_sandbox_client_id=\"\" gemini_sandbox_client_secret=\"\" gemini_sandbox_fee_address=\"\" gemini_sandbox_oauth_url=\"\" uphold_production_api_url=\"\" uphold_production_client_id=\"\" uphold_production_client_secret=\"\" uphold_production_fee_address=\"\" uphold_production_oauth_url=\"\" uphold_sandbox_api_url=\"\" uphold_sandbox_client_id=\"\" uphold_
sandbox_client_secret=\"\" uphold_sandbox_fee_address=\"\" uphold_sandbox_oauth_url=\"\" brave_version_major=\"1\" brave_version_minor=\"56\" brave_version_build=\"11\" chrome_version_string=\"115.0.5790.102\" brave_sync_endpoint=\"https://sync-v2.brave.com/v2\" safebrowsing_api_endpoint=\"\" brave_variations_server_url=\"https://variations.brave.com/seed\" updater_prod_endpo
int=\"https://go-updater.brave.com/extensions\" updater_dev_endpoint=\"https://go-updater-dev.bravesoftware.com/extensions\" webcompat_report_api_endpoint=\"https://webcompat.brave.com/1/webcompat\" rewards_grant_dev_endpoint=\"https://grant.rewards.brave.com\" rewards_grant_staging_endpoint=\"https://grant.rewards.brave.com\" rewards_grant_prod_endpoint=\"https://grant.rewar
ds.brave.com\" brave_stats_api_key=\"fe033168-0ff8-4af6-9a7f-95e2cbfc9f4f\" brave_stats_updater_url=\"https://laptop-updates.brave.com\" p3a_json_upload_url=\"https://example.com\" p3a_creative_upload_url=\"https://example.com\" p2a_json_upload_url=\"https://example.com\" p3a_constellation_upload_url=\"https://example.com\" star_randomness_host=\"https://example.com\" enable_
hangout_services_extension=true enable_cdm_host_verification=false enable_pseudolocales=false skip_signing=true sparkle_dsa_private_key_file=\"\" sparkle_eddsa_private_key=\"\" sparkle_eddsa_public_key=\"\" use_goma=false use_libfuzzer=false enable_updater=true enable_update_notifications=true brave_ai_chat_endpoint=\"\" rustc_version=\"rustc 1.71.0 (8ede3aae2 2023-07-12) (Ar
ch Linux rust 1:1.71.0-1)\" custom_toolchain=\"//build/toolchain/linux/unbundle:default\" host_toolchain=\"//build/toolchain/linux/unbundle:default\" clang_base_path=\"/usr\" clang_use_chrome_plugins=false rust_sysroot_absolute=\"/usr\" rustup_home=\"/usr\" symbol_level=0 chrome_pgo_phase=0 treat_warnings_as_errors=false blink_enable_generated_code_formatting=false rtc_use_pi
pewire=true link_pulseaudio=true use_gnome_keyring=false use_sysroot=false use_system_libffi=true use_custom_libcxx=false icu_use_data_file=false cc_wrapper=\"/build/brave/src/brave-browser/src/out/redirect_cc/redirect_cc\" use_vaapi=true is_lsan=false enable_brave_page_graph=true enable_brave_page_graph_webapi_probes=true "
ERROR at //brave/components/brave_rewards/core/config.gni:42:5: Assertion failed.
    assert(bitflyer_production_client_id != "")
    ^-----
See //brave/components/brave_rewards/browser/BUILD.gn:6:1: whence it was imported.
import("//brave/components/brave_rewards/core/config.gni")
^--------------------------------------------------------
See //brave/test/BUILD.gn:310:5: which caused the file to be included.
    "//brave/components/brave_rewards/browser",
    ^-----------------------------------------
null
null

Does that ring any bells for you?

YakoYakoYokuYoku commented 1 year ago

Does that ring any bells for you?

Dah! Yes... Seems that they've added/updated more of these cryptocurrency exchangers, used some boilerplate values for them to make the build go on.

If other issues arise I'll take a closer look.

alerque commented 1 year ago

I'm sorry but I'm traveling this month and lost access to my desktop(s) because of a power outage. This build is too much for my travel laptop, so it's having to wait...I haven't forgotten.

YakoYakoYokuYoku commented 1 year ago

I'm sorry but I'm traveling this month and lost access to my desktop(s) because of a power outage. This build is too much for my travel laptop, so it's having to wait...I haven't forgotten.

Understandable, thanks for the reply and I hope you enjoy your vacation :sunglasses:

alerque commented 7 months ago

I see I neglected to comment back here, but this does not build ATM.

/build/brave/src/brave-browser/src/brave/browser/resources/side_panel/reading_list/images/read_later_empty_dark.svg copied to /build/brave/src/brave-browser/src/chrome/browser/resources/side_panel/reading_list/images/read_later_empty_dark.svg
/build/brave/src/brave-browser/src/brave/chromium_src/chrome/installer/setup/brave_behaviors.cc copied to /build/brave/src/brave-browser/src/chrome/installer/setup/brave_behaviors.cc
/build/brave/src/brave-browser/src/brave/ui/webui/resources/css/text_defaults_md.css copied to /build/brave/src/brave-browser/src/ui/webui/resources/css/text_defaults_md.css
building native redirect_cc...
-------------------------------
/build/brave/src/brave-browser/src
> gn gen /build/brave/src/brave-browser/src/out/redirect_cc --args="import(\"//brave/tools/redirect_cc/args.gni\") use_goma=false goma_dir=\"/build/brave/src/brave-browser/src/brave/vendor/depot_tools/.cipd_bin\" real_gomacc=\"/build/brave/src/brave-browser/src/brave/vendor/depot_tools/.cipd_bin/gomacc\" "
WARNING at //brave/tools/redirect_cc/args.gni:19:13: Build argument has no effect.
rustup_home="/usr"
            ^-----
The variable "rustup_home" was set as a build argument
but never appeared in a declare_args() block in any buildfile.

To view all possible args, run "gn args --list <out_dir>"

The build continued as if that argument was unspecified.

Done. Made 20417 targets from 4006 files in 2735ms
building brave/tools/redirect_cc (id=04049335-c1e3-4f8b-bbbf-be4b9cbf7d91) ...
-------------------------------
/build/brave/src/brave-browser/src
> autoninja -C /build/brave/src/brave-browser/src/out/redirect_cc brave/tools/redirect_cc -k 1 --offline
Traceback (most recent call last):
  File "/build/.cache/.vpython-root/store/python_venv-2nf21e3khjh633a8rq4araell4/contents/lib/python3.11/site-packages/google/auth/transport/requests.py", line 26, in <module>
    import requests
  File "/build/brave/src/brave-browser/src/brave/vendor/requests/requests/__init__.py", line 58, in <module>
    from . import utils
  File "/build/brave/src/brave-browser/src/brave/vendor/requests/requests/utils.py", line 26, in <module>
    from .compat import parse_http_list as _parse_list_header
  File "/build/brave/src/brave-browser/src/brave/vendor/requests/requests/compat.py", line 7, in <module>
    from .packages import chardet
  File "/build/brave/src/brave-browser/src/brave/vendor/requests/requests/packages/__init__.py", line 3, in <module>
    from . import urllib3
  File "/build/brave/src/brave-browser/src/brave/vendor/requests/requests/packages/urllib3/__init__.py", line 10, in <module>
    from .connectionpool import (
  File "/build/brave/src/brave-browser/src/brave/vendor/requests/requests/packages/urllib3/connectionpool.py", line 38, in <module>
    from .response import HTTPResponse
  File "/build/brave/src/brave-browser/src/brave/vendor/requests/requests/packages/urllib3/response.py", line 9, in <module>
    from ._collections import HTTPHeaderDict
  File "/build/brave/src/brave-browser/src/brave/vendor/requests/requests/packages/urllib3/_collections.py", line 1, in <module>
    from collections import Mapping, MutableMapping
ImportError: cannot import name 'Mapping' from 'collections' (/build/.cache/.vpython-root/store/cpython+h61ek3d3v17qa4jp9agnom62t4/contents/lib/python3.11/collections/__init__.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/build/brave/src/depot_tools/autoninja.py", line 31, in <module>
    from google.auth.transport.requests import AuthorizedSession
  File "/build/.cache/.vpython-root/store/python_venv-2nf21e3khjh633a8rq4araell4/contents/lib/python3.11/site-packages/google/auth/transport/requests.py", line 30, in <module>
    six.raise_from(
  File "<string>", line 2, in raise_from
ImportError: The requests library is not installed, please install the requests package to use the requests transport.
null
null
==> ERROR: A failure occurred in build().
    Aborting...
alerque commented 5 months ago

By the way on the Arch official Electron packages (see e.g. 29, 28, 27) we're worked out an alternative way of handling sources where we use a script to extract all the Git submodules and assemble them later. We now get checksumming and pinning with makepkg being able to download (and more importantly, cache) all the sources up front instead of them getting downloaded during the build process. It costs some time up front but rebuilds and version bumps go much faster now! I think we can probably adapt the Chromium source handling from those patches to this build.

Also we worked out the Rust bits, which is probably what's tripping this build up.

YakoYakoYokuYoku commented 5 months ago

I didn't spend my time on this due to being occupied in real life and the problems that having to check for every new Crypto/Web3 feature that requires API keys, which is a pain in the foot, on the flip-side I've got the electron git sources handling (but it might not be functional as I haven't tested it) plus we are using libcxx from LLVM so fewer things that might break. :sweat_smile: Also, sorry if the response was late.

YakoYakoYokuYoku commented 5 months ago

@alerque, one question. Do you happen to know about this error and how to fix it? The Googlesource repos are asking me about some credentials, maybe because of a abuse detection mechanism or something, so I can't fetch from them.

  -> Updating chromium-mirror_third_party_grpc_src git repo...
remote: INVALID_ARGUMENT: Request contains an invalid argument
remote: [type.googleapis.com/google.rpc.LocalizedMessage]
remote: locale: "en-US"
remote: message: "Invalid authentication credentials. Please generate a new identifier: https://chromium.googlesource.com/new-password"
remote: 
remote: [type.googleapis.com/google.rpc.RequestInfo]
remote: request_id: "33a2ac834a00423291b189aafefef073"
fatal: unable to access 'https://chromium.googlesource.com/external/github.com/grpc/grpc.git/': The requested URL returned error: 400
==> WARNING: Failure while updating chromium-mirror_third_party_grpc_src git repo