Last active
June 21, 2026 20:03
-
-
Save richyo-codes/eed91b795925f091299ebedcd891412c to your computer and use it in GitHub Desktop.
flutter trixie sysroot patch - useful for testing gtk 4 with newer api. 4.18.6 vs 4.8.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/engine/src/build/config/sysroot.gni b/engine/src/build/config/sysroot.gni | |
| index 12c8df99f44..3d942fc91c2 100644 | |
| --- a/engine/src/build/config/sysroot.gni | |
| +++ b/engine/src/build/config/sysroot.gni | |
| @@ -24,7 +24,7 @@ if (current_toolchain == default_toolchain && target_sysroot != "") { | |
| if (use_default_linux_sysroot && !is_fuchsia) { | |
| if (current_cpu == "x64") { | |
| sysroot = | |
| - rebase_path("//build/linux/debian_bullseye_amd64-sysroot", root_build_dir) | |
| + rebase_path("//build/linux/debian_trixie_amd64-sysroot", root_build_dir) | |
| } else if (current_cpu == "arm64") { | |
| sysroot = | |
| rebase_path("//build/linux/debian_bullseye_arm64-sysroot", root_build_dir) | |
| diff --git a/engine/src/build/linux/sysroot_scripts/install-sysroot.py b/engine/src/build/linux/sysroot_scripts/install-sysroot.py | |
| index 2d4cea9342d..43fe591fbc4 100755 | |
| --- a/engine/src/build/linux/sysroot_scripts/install-sysroot.py | |
| +++ b/engine/src/build/linux/sysroot_scripts/install-sysroot.py | |
| @@ -25,7 +25,7 @@ import os | |
| import shutil | |
| import subprocess | |
| import sys | |
| -from urllib.request import urlopen | |
| +from urllib.request import Request, urlopen | |
| SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) | |
| SRC_DIR = os.path.dirname(os.path.dirname(os.path.dirname(SCRIPT_DIR))) | |
| VALID_ARCHS = ("amd64", "i386", "armhf", "arm64", "mipsel", "mips64el", | |
| @@ -39,7 +39,7 @@ ARCH_TRANSLATIONS = { | |
| "ppc64le": "ppc64el", | |
| } | |
| DEFAULT_TARGET_PLATFORMS = { | |
| - "amd64": "bullseye", | |
| + "amd64": "trixie", | |
| "i386": "bullseye", | |
| "armhf": "bullseye", | |
| "arm64": "bullseye", | |
| @@ -132,7 +132,8 @@ def InstallSysroot(sysroots_json_path, target_platform, target_arch): | |
| sys.stderr.flush() | |
| for _ in range(3): | |
| try: | |
| - response = urlopen(url) | |
| + request = Request(url, headers={"User-Agent": "flutter-sysroot-installer"}) | |
| + response = urlopen(request) | |
| with open(tarball, "wb") as f: | |
| f.write(response.read()) | |
| break | |
| diff --git a/engine/src/build/linux/sysroot_scripts/sysroots.json b/engine/src/build/linux/sysroot_scripts/sysroots.json | |
| index d6093b00711..75d32950c23 100644 | |
| --- a/engine/src/build/linux/sysroot_scripts/sysroots.json | |
| +++ b/engine/src/build/linux/sysroot_scripts/sysroots.json | |
| @@ -46,5 +46,11 @@ | |
| "SysrootDir": "debian_trixie_riscv64-sysroot", | |
| "Tarball": "debian_trixie_riscv64_sysroot.tar.xz", | |
| "URL": "https://commondatastorage.googleapis.com/chrome-linux-sysroot" | |
| + }, | |
| + "trixie_amd64": { | |
| + "Sha256Sum": "8eb07f074dae448662e6ad009191563e2b7ced1fadaa72b6244c961e49d99087", | |
| + "SysrootDir": "debian_trixie_amd64-sysroot", | |
| + "Tarball": "debian_trixie_amd64_sysroot.tar.xz", | |
| + "URL": "https://pub-538e4d72d3224264a892247ed9612d65.r2.dev" | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
python engine/src/build/linux/sysroot_scripts/install-sysroot.py --all