From b4b1082e97f61752591a6af0e0dfa2589c62b72c Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 11:48:25 -0800 Subject: [PATCH 01/42] Change all ccache vcpkg hashes. --- .github/workflows/cpp-packaging.yml | 2 +- .github/workflows/desktop.yml | 4 ++-- .github/workflows/integration_tests.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cpp-packaging.yml b/.github/workflows/cpp-packaging.yml index 7b630174ce..bea434de30 100644 --- a/.github/workflows/cpp-packaging.yml +++ b/.github/workflows/cpp-packaging.yml @@ -383,7 +383,7 @@ jobs: uses: actions/cache@v2 with: path: external/vcpkg/installed - key: dev-vcpkg-${{ matrix.architecture }}-${{ matrix.vcpkg_triplet_suffix }}-${{ matrix.msvc_runtime }}-${{ matrix.linux_abi }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}${{env.VCPKG_EXTRA_HASH}} + key: dev-vcpkg-${{ matrix.architecture }}-${{ matrix.vcpkg_triplet_suffix }}-${{ matrix.msvc_runtime }}-${{ matrix.linux_abi }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}${{env.VCPKG_EXTRA_HASH}}-2 - name: Cache ccache files if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 291ab1cac2..27f940d821 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -140,7 +140,7 @@ jobs: uses: actions/cache@v2 with: path: external/vcpkg/installed - key: dev-vcpkg-${{ matrix.architecture }}-${{ env.VCPKG_SUFFIX }}-${{ matrix.msvc_runtime }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}${{ env.VCPKG_EXTRA_HASH }} + key: dev-vcpkg-${{ matrix.architecture }}-${{ env.VCPKG_SUFFIX }}-${{ matrix.msvc_runtime }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}${{ env.VCPKG_EXTRA_HASH }}-2 - name: Cache ccache files if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') @@ -305,7 +305,7 @@ jobs: uses: actions/cache@v2 with: path: external/vcpkg/installed - key: dev-vcpkg-${{ env.VCPKG_TRIPLET }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }} + key: dev-vcpkg-${{ env.VCPKG_TRIPLET }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}-2 - name: Cache ccache files uses: actions/cache@v2 with: diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index eaaf4441f4..560a1d7877 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -239,7 +239,7 @@ jobs: uses: actions/cache@v2 with: path: external/vcpkg/installed - key: dev-vcpkg-${{ env.VCPKG_TRIPLET }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }} + key: dev-vcpkg-${{ env.VCPKG_TRIPLET }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}-2 - name: Setup python uses: actions/setup-python@v2 with: From 37e99ee19a18318374c14d1387162a6546e8c121 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 12:28:15 -0800 Subject: [PATCH 02/42] Add some debugging output to bootstap-vcpkg --- scripts/gha/build_desktop.py | 2 +- scripts/gha/utils.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index aaa4829d22..4f2921a632 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -94,7 +94,7 @@ def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl if not found_vcpkg_executable: script_absolute_path = utils.get_vcpkg_installation_script_path() # Example: ./external/vcpkg/bootstrap-sh - utils.run_command([script_absolute_path]) + utils.run_command([script_absolute_path], merge_stderr=True) # Copy any of our custom defined vcpkg data to vcpkg submodule directory utils.copy_vcpkg_custom_data() diff --git a/scripts/gha/utils.py b/scripts/gha/utils.py index 9201fed012..406e674666 100644 --- a/scripts/gha/utils.py +++ b/scripts/gha/utils.py @@ -23,11 +23,12 @@ import platform import shutil import subprocess +import sys import os import urllib.request def run_command(cmd, capture_output=False, cwd=None, check=False, as_root=False, - print_cmd=True): + print_cmd=True, merge_stderr=False): """Run a command. Args: @@ -39,6 +40,7 @@ def run_command(cmd, capture_output=False, cwd=None, check=False, as_root=False, check (bool): Raises a CalledProcessError if True and the command errored out as_root (bool): Run command as root user with admin priveleges (supported on mac and linux). print_cmd (bool): Print the command we are running to stdout. + merge_stderr(bool): If this is true and capture_output=False, merge stderr to stdout. Raises: (subprocess.CalledProcessError): If command errored out and `text=True` @@ -57,7 +59,8 @@ def run_command(cmd, capture_output=False, cwd=None, check=False, as_root=False, # If capture_output is requested, we also set text=True to store the returned value of the # command as a string instead of bytes object return subprocess.run(cmd, capture_output=capture_output, cwd=cwd, - check=check, text=capture_output) + check=check, text=capture_output, + stderr=(subprocess.STDOUT if (merge_stderr and not capture_output) else None)) def is_command_installed(tool): From b1bad6802f7fb77ce2915976b43d718b91be6258 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 14:18:44 -0800 Subject: [PATCH 03/42] Redirect all stderr to stdout --- .github/workflows/desktop.yml | 2 +- scripts/gha/build_desktop.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 27f940d821..bfdeae96eb 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -175,7 +175,7 @@ jobs: - name: Build SDK shell: bash run: | - python scripts/gha/build_desktop.py --build_tests --arch "${{ matrix.architecture }}" --config "${{ matrix.build_type }}" --msvc_runtime_library "${{ matrix.msvc_runtime }}" --gha_build + python scripts/gha/build_desktop.py --build_tests --arch "${{ matrix.architecture }}" --config "${{ matrix.build_type }}" --msvc_runtime_library "${{ matrix.msvc_runtime }}" --gha_build 2>&1 - name: Stats for ccache (mac and linux) if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 4f2921a632..aaa4829d22 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -94,7 +94,7 @@ def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl if not found_vcpkg_executable: script_absolute_path = utils.get_vcpkg_installation_script_path() # Example: ./external/vcpkg/bootstrap-sh - utils.run_command([script_absolute_path], merge_stderr=True) + utils.run_command([script_absolute_path]) # Copy any of our custom defined vcpkg data to vcpkg submodule directory utils.copy_vcpkg_custom_data() From 442b6c9af3874fc9ece7f8ded6fb2759e24f7395 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 14:25:13 -0800 Subject: [PATCH 04/42] Check return code of vcpkg commands. --- scripts/gha/build_desktop.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index aaa4829d22..93456d2e00 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -94,7 +94,10 @@ def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl if not found_vcpkg_executable: script_absolute_path = utils.get_vcpkg_installation_script_path() # Example: ./external/vcpkg/bootstrap-sh - utils.run_command([script_absolute_path]) + retval = utils.run_command([script_absolute_path], merge_stderr=True) + if retval.returncode != 0: + print("vcpkg bootstrap failed!") + exit(1) # Copy any of our custom defined vcpkg data to vcpkg submodule directory utils.copy_vcpkg_custom_data() @@ -112,8 +115,13 @@ def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl # Eg: ./external/vcpkg/vcpkg install @external/vcpkg_x64-osx_response_file.txt # --disable-metrics - utils.run_command([vcpkg_executable_file_path, 'install', - '@' + vcpkg_response_file_path, '--disable-metrics']) + retval = utils.run_command([vcpkg_executable_file_path, 'install', + '@' + vcpkg_response_file_path, '--disable-metrics'], + merge_stderr=True) + if retval.returncode != 0: + print("vcpkg bootstrap failed!") + exit(2) + def install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, cleanup=True, use_openssl=False): From 0b81ff28bbcdeff246ec5272e8ad53d8c3d814f9 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 14:34:15 -0800 Subject: [PATCH 05/42] Let's see what's in this log. --- scripts/gha/build_desktop.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 93456d2e00..cf807e27cb 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -97,6 +97,10 @@ def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl retval = utils.run_command([script_absolute_path], merge_stderr=True) if retval.returncode != 0: print("vcpkg bootstrap failed!") + print("out log:") + utils.run_command(['cat', '/home/runner/work/firebase-cpp-sdk/firebase-cpp-sdk/external/vcpkg/buildtrees/detect_compiler/config-x86-linux-rel-out.log']) + print("err log:") + utils.run_command(['cat', '/home/runner/work/firebase-cpp-sdk/firebase-cpp-sdk/external/vcpkg/buildtrees/detect_compiler/config-x86-linux-rel-err.log']) exit(1) # Copy any of our custom defined vcpkg data to vcpkg submodule directory From 8e74cfee378811b542a8759077de04c333d1aaf8 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 14:40:18 -0800 Subject: [PATCH 06/42] Print log. --- .github/workflows/desktop.yml | 2 +- scripts/gha/build_desktop.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index bfdeae96eb..bd7af44464 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -175,7 +175,7 @@ jobs: - name: Build SDK shell: bash run: | - python scripts/gha/build_desktop.py --build_tests --arch "${{ matrix.architecture }}" --config "${{ matrix.build_type }}" --msvc_runtime_library "${{ matrix.msvc_runtime }}" --gha_build 2>&1 + python scripts/gha/build_desktop.py --build_tests --arch "${{ matrix.architecture }}" --config "${{ matrix.build_type }}" --msvc_runtime_library "${{ matrix.msvc_runtime }}" --gha_build || (cat external/vcpkg/buildtrees/detect_compiler/config-x86-linux-rel-*.log && false) - name: Stats for ccache (mac and linux) if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index cf807e27cb..93456d2e00 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -97,10 +97,6 @@ def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl retval = utils.run_command([script_absolute_path], merge_stderr=True) if retval.returncode != 0: print("vcpkg bootstrap failed!") - print("out log:") - utils.run_command(['cat', '/home/runner/work/firebase-cpp-sdk/firebase-cpp-sdk/external/vcpkg/buildtrees/detect_compiler/config-x86-linux-rel-out.log']) - print("err log:") - utils.run_command(['cat', '/home/runner/work/firebase-cpp-sdk/firebase-cpp-sdk/external/vcpkg/buildtrees/detect_compiler/config-x86-linux-rel-err.log']) exit(1) # Copy any of our custom defined vcpkg data to vcpkg submodule directory From b6eef01a78c7b5e931c9c4cfc47ace3a8a1c6084 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 14:47:20 -0800 Subject: [PATCH 07/42] Add additional x86 libs. --- scripts/gha/build_desktop.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 93456d2e00..3c6058983f 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -61,7 +61,8 @@ def install_x86_support_libraries(): if utils.is_linux_os(): packages = ['gcc-multilib', 'g++-multilib', 'libglib2.0-dev:i386', 'libsecret-1-dev:i386', 'libpthread-stubs0-dev:i386', - 'libssl-dev:i386'] + 'libssl-dev:i386', 'libglib2.0-0:i386', 'libmount-dev:i386', + 'libselinux1-dev:i386', 'libsecret-1-0:i386', 'gir1.2-secret-1:i386'] # First check if these packages exist on the machine already devnull = open(os.devnull, "w") From 81204e3b3a5716eb7f0ccecba5def4573af0be9c Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 14:51:22 -0800 Subject: [PATCH 08/42] Restore code back to normal - check for errors in apt. --- scripts/gha/build_desktop.py | 22 ++++++++-------------- scripts/gha/utils.py | 7 ++----- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 3c6058983f..f28fc9f874 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -71,9 +71,9 @@ def install_x86_support_libraries(): if process.returncode != 0: # This implies not all of the required packages are already installed on user's machine # Install them. - utils.run_command(['dpkg', '--add-architecture', 'i386'], as_root=True) - utils.run_command(['apt', 'update'], as_root=True) - utils.run_command(['apt', 'install', '-y'] + packages, as_root=True) + utils.run_command(['dpkg', '--add-architecture', 'i386'], as_root=True, check=True) + utils.run_command(['apt', 'update'], as_root=True, check=True) + utils.run_command(['apt', 'install', '-y'] + packages, as_root=True, check=True) def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl=False): @@ -95,10 +95,7 @@ def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl if not found_vcpkg_executable: script_absolute_path = utils.get_vcpkg_installation_script_path() # Example: ./external/vcpkg/bootstrap-sh - retval = utils.run_command([script_absolute_path], merge_stderr=True) - if retval.returncode != 0: - print("vcpkg bootstrap failed!") - exit(1) + retval = utils.run_command([script_absolute_path], check=True) # Copy any of our custom defined vcpkg data to vcpkg submodule directory utils.copy_vcpkg_custom_data() @@ -118,11 +115,8 @@ def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl # --disable-metrics retval = utils.run_command([vcpkg_executable_file_path, 'install', '@' + vcpkg_response_file_path, '--disable-metrics'], - merge_stderr=True) - if retval.returncode != 0: - print("vcpkg bootstrap failed!") - exit(2) - + check=True) + def install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, cleanup=True, use_openssl=False): @@ -252,8 +246,8 @@ def main(): # Ensure that the submodules are initialized and updated # Example: vcpkg is a submodule (external/vcpkg) if not args.disable_vcpkg: - utils.run_command(['git', 'submodule', 'init']) - utils.run_command(['git', 'submodule', 'update']) + utils.run_command(['git', 'submodule', 'init'], check=True) + utils.run_command(['git', 'submodule', 'update'], check=True) # To build x86 on x86_64 linux hosts, we also need x86 support libraries if args.arch == 'x86' and utils.is_linux_os(): diff --git a/scripts/gha/utils.py b/scripts/gha/utils.py index 406e674666..9201fed012 100644 --- a/scripts/gha/utils.py +++ b/scripts/gha/utils.py @@ -23,12 +23,11 @@ import platform import shutil import subprocess -import sys import os import urllib.request def run_command(cmd, capture_output=False, cwd=None, check=False, as_root=False, - print_cmd=True, merge_stderr=False): + print_cmd=True): """Run a command. Args: @@ -40,7 +39,6 @@ def run_command(cmd, capture_output=False, cwd=None, check=False, as_root=False, check (bool): Raises a CalledProcessError if True and the command errored out as_root (bool): Run command as root user with admin priveleges (supported on mac and linux). print_cmd (bool): Print the command we are running to stdout. - merge_stderr(bool): If this is true and capture_output=False, merge stderr to stdout. Raises: (subprocess.CalledProcessError): If command errored out and `text=True` @@ -59,8 +57,7 @@ def run_command(cmd, capture_output=False, cwd=None, check=False, as_root=False, # If capture_output is requested, we also set text=True to store the returned value of the # command as a string instead of bytes object return subprocess.run(cmd, capture_output=capture_output, cwd=cwd, - check=check, text=capture_output, - stderr=(subprocess.STDOUT if (merge_stderr and not capture_output) else None)) + check=check, text=capture_output) def is_command_installed(tool): From 342ea15898749fcc9d0baf73bd2aa70bb4ea540d Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 14:54:05 -0800 Subject: [PATCH 09/42] Let apt try to fix the deps. --- scripts/gha/build_desktop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index f28fc9f874..4522f11997 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -73,7 +73,7 @@ def install_x86_support_libraries(): # Install them. utils.run_command(['dpkg', '--add-architecture', 'i386'], as_root=True, check=True) utils.run_command(['apt', 'update'], as_root=True, check=True) - utils.run_command(['apt', 'install', '-y'] + packages, as_root=True, check=True) + utils.run_command(['apt', 'install', '-y', '-f'] + packages, as_root=True, check=True) def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl=False): From 821d4ed15428829597f91cb0c88c75e7382001e2 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 14:56:17 -0800 Subject: [PATCH 10/42] Remove unneeded dependencies - let apt fix. --- scripts/gha/build_desktop.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 4522f11997..c5e4b6d34d 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -61,8 +61,7 @@ def install_x86_support_libraries(): if utils.is_linux_os(): packages = ['gcc-multilib', 'g++-multilib', 'libglib2.0-dev:i386', 'libsecret-1-dev:i386', 'libpthread-stubs0-dev:i386', - 'libssl-dev:i386', 'libglib2.0-0:i386', 'libmount-dev:i386', - 'libselinux1-dev:i386', 'libsecret-1-0:i386', 'gir1.2-secret-1:i386'] + 'libssl-dev:i386'] # First check if these packages exist on the machine already devnull = open(os.devnull, "w") From 55a1f0e7842eac7ccae00771a6a041c6626c0d30 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:05:46 -0800 Subject: [PATCH 11/42] Use apt-get instead of apt. --- scripts/gha/build_desktop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index c5e4b6d34d..daa0f793b5 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -72,7 +72,7 @@ def install_x86_support_libraries(): # Install them. utils.run_command(['dpkg', '--add-architecture', 'i386'], as_root=True, check=True) utils.run_command(['apt', 'update'], as_root=True, check=True) - utils.run_command(['apt', 'install', '-y', '-f'] + packages, as_root=True, check=True) + utils.run_command(['apt-get', 'install', '-y', '-f'] + packages, as_root=True, check=True) def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl=False): From b512071d785e2f339a87e7d22bab66b089fc531f Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:07:44 -0800 Subject: [PATCH 12/42] Try apt upgrading first. --- scripts/gha/build_desktop.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index daa0f793b5..5a12c5e12b 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -72,7 +72,8 @@ def install_x86_support_libraries(): # Install them. utils.run_command(['dpkg', '--add-architecture', 'i386'], as_root=True, check=True) utils.run_command(['apt', 'update'], as_root=True, check=True) - utils.run_command(['apt-get', 'install', '-y', '-f'] + packages, as_root=True, check=True) + utils.run_command(['apt', 'upgrade', '-y'], as_root=True, check=True) + utils.run_command(['apt', 'install', '-y'] + packages, as_root=True, check=True) def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl=False): From 7c15e832f3eacfd7c996f590090b4817a8b82265 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:10:42 -0800 Subject: [PATCH 13/42] Add additional deps back in --- scripts/gha/build_desktop.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 5a12c5e12b..f28fc9f874 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -61,7 +61,8 @@ def install_x86_support_libraries(): if utils.is_linux_os(): packages = ['gcc-multilib', 'g++-multilib', 'libglib2.0-dev:i386', 'libsecret-1-dev:i386', 'libpthread-stubs0-dev:i386', - 'libssl-dev:i386'] + 'libssl-dev:i386', 'libglib2.0-0:i386', 'libmount-dev:i386', + 'libselinux1-dev:i386', 'libsecret-1-0:i386', 'gir1.2-secret-1:i386'] # First check if these packages exist on the machine already devnull = open(os.devnull, "w") @@ -72,7 +73,6 @@ def install_x86_support_libraries(): # Install them. utils.run_command(['dpkg', '--add-architecture', 'i386'], as_root=True, check=True) utils.run_command(['apt', 'update'], as_root=True, check=True) - utils.run_command(['apt', 'upgrade', '-y'], as_root=True, check=True) utils.run_command(['apt', 'install', '-y'] + packages, as_root=True, check=True) From ac2572a1b39d05e9350363042f9538fb3e4c8e80 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:13:33 -0800 Subject: [PATCH 14/42] Add more explicit deps. --- scripts/gha/build_desktop.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index f28fc9f874..1b3ee549c4 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -62,8 +62,9 @@ def install_x86_support_libraries(): packages = ['gcc-multilib', 'g++-multilib', 'libglib2.0-dev:i386', 'libsecret-1-dev:i386', 'libpthread-stubs0-dev:i386', 'libssl-dev:i386', 'libglib2.0-0:i386', 'libmount-dev:i386', - 'libselinux1-dev:i386', 'libsecret-1-0:i386', 'gir1.2-secret-1:i386'] - + 'libselinux1-dev:i386', 'libsecret-1-0:i386', 'gir1.2-secret-1:i386', + 'libmount1:i386', 'libselinux1:i386', 'libselinux1:i386', + 'libpcre2-dev:i386'] # First check if these packages exist on the machine already devnull = open(os.devnull, "w") process = subprocess.run(["dpkg", "-s"] + packages, stdout=devnull, stderr=subprocess.STDOUT) From b018448e97e9153aeb997c18f83a97f63176c3d1 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:15:22 -0800 Subject: [PATCH 15/42] Yet more deps. --- scripts/gha/build_desktop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 1b3ee549c4..dd2868a567 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -64,7 +64,7 @@ def install_x86_support_libraries(): 'libssl-dev:i386', 'libglib2.0-0:i386', 'libmount-dev:i386', 'libselinux1-dev:i386', 'libsecret-1-0:i386', 'gir1.2-secret-1:i386', 'libmount1:i386', 'libselinux1:i386', 'libselinux1:i386', - 'libpcre2-dev:i386'] + 'libpcre2-dev:i386', 'libpcre2-8-0:i386', 'libpcre2-posix2:i386'] # First check if these packages exist on the machine already devnull = open(os.devnull, "w") process = subprocess.run(["dpkg", "-s"] + packages, stdout=devnull, stderr=subprocess.STDOUT) From c8e84ebc0428da4349dc3699e1a924e2d3fab458 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:18:16 -0800 Subject: [PATCH 16/42] More deps. --- scripts/gha/build_desktop.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index dd2868a567..fc1cef4928 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -64,7 +64,9 @@ def install_x86_support_libraries(): 'libssl-dev:i386', 'libglib2.0-0:i386', 'libmount-dev:i386', 'libselinux1-dev:i386', 'libsecret-1-0:i386', 'gir1.2-secret-1:i386', 'libmount1:i386', 'libselinux1:i386', 'libselinux1:i386', - 'libpcre2-dev:i386', 'libpcre2-8-0:i386', 'libpcre2-posix2:i386'] + 'libpcre2-dev:i386', 'libpcre2-8-0:i386', 'libpcre2-posix2:i386', + 'pkg-config:i386'] + # First check if these packages exist on the machine already devnull = open(os.devnull, "w") process = subprocess.run(["dpkg", "-s"] + packages, stdout=devnull, stderr=subprocess.STDOUT) From 3b36bef2e9d1d3263fff2d279b3a7fe5e0dab698 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:22:15 -0800 Subject: [PATCH 17/42] Show held packages --- scripts/gha/build_desktop.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index fc1cef4928..f80e90df6f 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -76,6 +76,7 @@ def install_x86_support_libraries(): # Install them. utils.run_command(['dpkg', '--add-architecture', 'i386'], as_root=True, check=True) utils.run_command(['apt', 'update'], as_root=True, check=True) + utils.run_command(['apt-mark', 'showhold'], as_root=True, check=True) utils.run_command(['apt', 'install', '-y'] + packages, as_root=True, check=True) From cf51693db11cca923bb77a06ad9b8dc9d22405ea Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:24:51 -0800 Subject: [PATCH 18/42] Install one at a time. --- scripts/gha/build_desktop.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index f80e90df6f..81094b9e9d 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -61,11 +61,12 @@ def install_x86_support_libraries(): if utils.is_linux_os(): packages = ['gcc-multilib', 'g++-multilib', 'libglib2.0-dev:i386', 'libsecret-1-dev:i386', 'libpthread-stubs0-dev:i386', - 'libssl-dev:i386', 'libglib2.0-0:i386', 'libmount-dev:i386', - 'libselinux1-dev:i386', 'libsecret-1-0:i386', 'gir1.2-secret-1:i386', - 'libmount1:i386', 'libselinux1:i386', 'libselinux1:i386', - 'libpcre2-dev:i386', 'libpcre2-8-0:i386', 'libpcre2-posix2:i386', - 'pkg-config:i386'] + 'libssl-dev:i386'] + #, 'libglib2.0-0:i386', 'libmount-dev:i386', + #'libselinux1-dev:i386', 'libsecret-1-0:i386', 'gir1.2-secret-1:i386', + #'libmount1:i386', 'libselinux1:i386', 'libselinux1:i386', + #'libpcre2-dev:i386', 'libpcre2-8-0:i386', 'libpcre2-posix2:i386', + #'pkg-config:i386'] # First check if these packages exist on the machine already devnull = open(os.devnull, "w") @@ -77,7 +78,9 @@ def install_x86_support_libraries(): utils.run_command(['dpkg', '--add-architecture', 'i386'], as_root=True, check=True) utils.run_command(['apt', 'update'], as_root=True, check=True) utils.run_command(['apt-mark', 'showhold'], as_root=True, check=True) - utils.run_command(['apt', 'install', '-y'] + packages, as_root=True, check=True) + for package in packages: + utils.run_command(['apt', 'install', '-y', package], as_root=True, check=True) + #utils.run_command(['apt', 'install', '-y'] + packages, as_root=True, check=True) def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl=False): From d6aee77210d1a599a9c5c32c12f482ec2c90ed10 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:29:06 -0800 Subject: [PATCH 19/42] Try allowing overriding held packages --- scripts/gha/build_desktop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 81094b9e9d..5e77dc037a 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -79,7 +79,7 @@ def install_x86_support_libraries(): utils.run_command(['apt', 'update'], as_root=True, check=True) utils.run_command(['apt-mark', 'showhold'], as_root=True, check=True) for package in packages: - utils.run_command(['apt', 'install', '-y', package], as_root=True, check=True) + utils.run_command(['apt-get', 'install', '-V', '-y', '--allow-change-held-packages', package], as_root=True, check=True) #utils.run_command(['apt', 'install', '-y'] + packages, as_root=True, check=True) From fc0f87b955cf568a496fd17567c37454fffb2e98 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:32:24 -0800 Subject: [PATCH 20/42] Try doing an upgrade rather than a regular install. --- scripts/gha/build_desktop.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 5e77dc037a..236f09c381 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -78,9 +78,10 @@ def install_x86_support_libraries(): utils.run_command(['dpkg', '--add-architecture', 'i386'], as_root=True, check=True) utils.run_command(['apt', 'update'], as_root=True, check=True) utils.run_command(['apt-mark', 'showhold'], as_root=True, check=True) - for package in packages: - utils.run_command(['apt-get', 'install', '-V', '-y', '--allow-change-held-packages', package], as_root=True, check=True) + #for package in packages: + # utils.run_command(['apt-get', '-y', 'upgrade', '--with-new-pkgs', package], as_root=True, check=True) #utils.run_command(['apt', 'install', '-y'] + packages, as_root=True, check=True) + utils.run_command(['apt-get', '-f', '-y', 'upgrade', '--with-new-pkgs'] + packages, as_root=True, check=True) def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl=False): From 4fb64007249e6106461f62cba20ba6a857fde0ae Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:34:31 -0800 Subject: [PATCH 21/42] Enable allow-change-held-packages --- scripts/gha/build_desktop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 236f09c381..c5228df7bf 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -81,7 +81,7 @@ def install_x86_support_libraries(): #for package in packages: # utils.run_command(['apt-get', '-y', 'upgrade', '--with-new-pkgs', package], as_root=True, check=True) #utils.run_command(['apt', 'install', '-y'] + packages, as_root=True, check=True) - utils.run_command(['apt-get', '-f', '-y', 'upgrade', '--with-new-pkgs'] + packages, as_root=True, check=True) + utils.run_command(['apt-get', '-V', '-f', '-y', 'upgrade', '--allow-change-held-packages', '--with-new-pkgs'] + packages, as_root=True, check=True) def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl=False): From c1336e6ca984d01928c12b62dfc6705ea258fb9b Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:36:30 -0800 Subject: [PATCH 22/42] Try dist-upgrade. --- scripts/gha/build_desktop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index c5228df7bf..21c84d1bdf 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -81,7 +81,7 @@ def install_x86_support_libraries(): #for package in packages: # utils.run_command(['apt-get', '-y', 'upgrade', '--with-new-pkgs', package], as_root=True, check=True) #utils.run_command(['apt', 'install', '-y'] + packages, as_root=True, check=True) - utils.run_command(['apt-get', '-V', '-f', '-y', 'upgrade', '--allow-change-held-packages', '--with-new-pkgs'] + packages, as_root=True, check=True) + utils.run_command(['apt-get', '-V', '-f', '-y', 'dist-upgrade', '--with-new-pkgs'] + packages, as_root=True, check=True) def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl=False): From cdc256e973e51c09e2e6fab7cf3f4906d42147ad Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:38:53 -0800 Subject: [PATCH 23/42] Put prereqs back --- scripts/gha/build_desktop.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 21c84d1bdf..a682572d89 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -61,12 +61,12 @@ def install_x86_support_libraries(): if utils.is_linux_os(): packages = ['gcc-multilib', 'g++-multilib', 'libglib2.0-dev:i386', 'libsecret-1-dev:i386', 'libpthread-stubs0-dev:i386', - 'libssl-dev:i386'] - #, 'libglib2.0-0:i386', 'libmount-dev:i386', - #'libselinux1-dev:i386', 'libsecret-1-0:i386', 'gir1.2-secret-1:i386', - #'libmount1:i386', 'libselinux1:i386', 'libselinux1:i386', - #'libpcre2-dev:i386', 'libpcre2-8-0:i386', 'libpcre2-posix2:i386', - #'pkg-config:i386'] + 'libssl-dev:i386' #] + , 'libglib2.0-0:i386', 'libmount-dev:i386', + 'libselinux1-dev:i386', 'libsecret-1-0:i386', 'gir1.2-secret-1:i386', + 'libmount1:i386', 'libselinux1:i386', 'libselinux1:i386', + 'libpcre2-dev:i386', 'libpcre2-8-0:i386', 'libpcre2-posix2:i386', + 'pkg-config:i386'] # First check if these packages exist on the machine already devnull = open(os.devnull, "w") @@ -80,8 +80,8 @@ def install_x86_support_libraries(): utils.run_command(['apt-mark', 'showhold'], as_root=True, check=True) #for package in packages: # utils.run_command(['apt-get', '-y', 'upgrade', '--with-new-pkgs', package], as_root=True, check=True) - #utils.run_command(['apt', 'install', '-y'] + packages, as_root=True, check=True) - utils.run_command(['apt-get', '-V', '-f', '-y', 'dist-upgrade', '--with-new-pkgs'] + packages, as_root=True, check=True) + utils.run_command(['apt', 'install', '-V', '-f', '-y', '--allow-change-held-packages'] + packages, as_root=True, check=True) + #utils.run_command(['apt-get', '-V', '-f', '-y', 'upgrade', '--with-new-pkgs'] + packages, as_root=True, check=True) def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl=False): From 2f801c353e4835b620c7cc1466ac74017cb5b17d Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:42:51 -0800 Subject: [PATCH 24/42] Add additional deps --- scripts/gha/build_desktop.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index a682572d89..086f6e674a 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -66,8 +66,8 @@ def install_x86_support_libraries(): 'libselinux1-dev:i386', 'libsecret-1-0:i386', 'gir1.2-secret-1:i386', 'libmount1:i386', 'libselinux1:i386', 'libselinux1:i386', 'libpcre2-dev:i386', 'libpcre2-8-0:i386', 'libpcre2-posix2:i386', - 'pkg-config:i386'] - + 'pkg-config:i386', 'libglib2.0-dev-bin:i386', 'libdpkg-perl:i386'] + #libgssapi-krb5-2 openssl debconf libselinux1 fontconfig-config libglib2.0-dev-bin:i386 # First check if these packages exist on the machine already devnull = open(os.devnull, "w") process = subprocess.run(["dpkg", "-s"] + packages, stdout=devnull, stderr=subprocess.STDOUT) From 7e4f98b7d5aa8f711d8e2398f546f407665ba8e4 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:45:50 -0800 Subject: [PATCH 25/42] Add ridiculous number of deps, just to see --- scripts/gha/build_desktop.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 086f6e674a..0fdd0a356c 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -66,8 +66,9 @@ def install_x86_support_libraries(): 'libselinux1-dev:i386', 'libsecret-1-0:i386', 'gir1.2-secret-1:i386', 'libmount1:i386', 'libselinux1:i386', 'libselinux1:i386', 'libpcre2-dev:i386', 'libpcre2-8-0:i386', 'libpcre2-posix2:i386', - 'pkg-config:i386', 'libglib2.0-dev-bin:i386', 'libdpkg-perl:i386'] - #libgssapi-krb5-2 openssl debconf libselinux1 fontconfig-config libglib2.0-dev-bin:i386 + 'pkg-config:i386', 'libglib2.0-dev-bin:i386', 'libdpkg-perl:i386', + 'libgssapi-krb5-2','openssl','debconf', 'libselinux1', 'fontconfig-config', + 'python3-distutils:i386', 'libgd3', 'libxslt1.1', 'libxml2'] # First check if these packages exist on the machine already devnull = open(os.devnull, "w") process = subprocess.run(["dpkg", "-s"] + packages, stdout=devnull, stderr=subprocess.STDOUT) From 1c02fe45eab9d616cef9f5fb8e548d2a67fab9a1 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:49:46 -0800 Subject: [PATCH 26/42] Allow downgrading packages --- scripts/gha/build_desktop.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 0fdd0a356c..0961cc1850 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -78,10 +78,9 @@ def install_x86_support_libraries(): # Install them. utils.run_command(['dpkg', '--add-architecture', 'i386'], as_root=True, check=True) utils.run_command(['apt', 'update'], as_root=True, check=True) - utils.run_command(['apt-mark', 'showhold'], as_root=True, check=True) #for package in packages: # utils.run_command(['apt-get', '-y', 'upgrade', '--with-new-pkgs', package], as_root=True, check=True) - utils.run_command(['apt', 'install', '-V', '-f', '-y', '--allow-change-held-packages'] + packages, as_root=True, check=True) + utils.run_command(['apt', 'install', '-V', '-f', '-y', '--allow-downgrades'] + packages, as_root=True, check=True) #utils.run_command(['apt-get', '-V', '-f', '-y', 'upgrade', '--with-new-pkgs'] + packages, as_root=True, check=True) From c0959bda0cf2e69411042cc357c5d3673c6736fc Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 15:59:39 -0800 Subject: [PATCH 27/42] Try downgrading libpcre --- scripts/gha/build_desktop.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 0961cc1850..9ec7c572e9 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -68,7 +68,8 @@ def install_x86_support_libraries(): 'libpcre2-dev:i386', 'libpcre2-8-0:i386', 'libpcre2-posix2:i386', 'pkg-config:i386', 'libglib2.0-dev-bin:i386', 'libdpkg-perl:i386', 'libgssapi-krb5-2','openssl','debconf', 'libselinux1', 'fontconfig-config', - 'python3-distutils:i386', 'libgd3', 'libxslt1.1', 'libxml2'] + 'python3-distutils:i386', 'libgd3', 'libxslt1.1', 'libxml2', + 'libpcre2-8-0=10.34-7'] # First check if these packages exist on the machine already devnull = open(os.devnull, "w") process = subprocess.run(["dpkg", "-s"] + packages, stdout=devnull, stderr=subprocess.STDOUT) @@ -78,10 +79,8 @@ def install_x86_support_libraries(): # Install them. utils.run_command(['dpkg', '--add-architecture', 'i386'], as_root=True, check=True) utils.run_command(['apt', 'update'], as_root=True, check=True) - #for package in packages: - # utils.run_command(['apt-get', '-y', 'upgrade', '--with-new-pkgs', package], as_root=True, check=True) - utils.run_command(['apt', 'install', '-V', '-f', '-y', '--allow-downgrades'] + packages, as_root=True, check=True) - #utils.run_command(['apt-get', '-V', '-f', '-y', 'upgrade', '--with-new-pkgs'] + packages, as_root=True, check=True) + utils.run_command(['apt', 'install', '-V', '-f', '-y', '--allow-downgrades'] + + packages, as_root=True, check=True) def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl=False): From 21d196ea4084eaa116f52b28d9127889e4b5b7fc Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 16:05:40 -0800 Subject: [PATCH 28/42] Make workaround only used on gha_build runners. --- scripts/gha/build_desktop.py | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 9ec7c572e9..20cae03a1c 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -56,20 +56,19 @@ def append_line_to_file(path, line): file.write("\n" + line + "\n") -def install_x86_support_libraries(): +def install_x86_support_libraries(gha_build=False): """Install support libraries needed to build x86 on x86_64 hosts.""" if utils.is_linux_os(): packages = ['gcc-multilib', 'g++-multilib', 'libglib2.0-dev:i386', 'libsecret-1-dev:i386', 'libpthread-stubs0-dev:i386', - 'libssl-dev:i386' #] - , 'libglib2.0-0:i386', 'libmount-dev:i386', - 'libselinux1-dev:i386', 'libsecret-1-0:i386', 'gir1.2-secret-1:i386', - 'libmount1:i386', 'libselinux1:i386', 'libselinux1:i386', - 'libpcre2-dev:i386', 'libpcre2-8-0:i386', 'libpcre2-posix2:i386', - 'pkg-config:i386', 'libglib2.0-dev-bin:i386', 'libdpkg-perl:i386', - 'libgssapi-krb5-2','openssl','debconf', 'libselinux1', 'fontconfig-config', - 'python3-distutils:i386', 'libgd3', 'libxslt1.1', 'libxml2', - 'libpcre2-8-0=10.34-7'] + 'libssl-dev:i386'] + if gha_build: + # Workaround for GitHub runners - they have an incompatibility between the 64-bit + # and 32-bit versions of libpcre2-8-0. Downgrade the installed 64-bit version + # of the library to get around this issue. This will presumably be fixed in a future + # Ubuntu update. + packages = ['--allow-downgrades'] + packages + ['libpcre2-8-0=10.34-7'] + # First check if these packages exist on the machine already devnull = open(os.devnull, "w") process = subprocess.run(["dpkg", "-s"] + packages, stdout=devnull, stderr=subprocess.STDOUT) @@ -79,8 +78,7 @@ def install_x86_support_libraries(): # Install them. utils.run_command(['dpkg', '--add-architecture', 'i386'], as_root=True, check=True) utils.run_command(['apt', 'update'], as_root=True, check=True) - utils.run_command(['apt', 'install', '-V', '-f', '-y', '--allow-downgrades'] - + packages, as_root=True, check=True) + utils.run_command(['apt', 'install', '-y'] + packages, as_root=True, check=True) def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl=False): @@ -258,7 +256,7 @@ def main(): # To build x86 on x86_64 linux hosts, we also need x86 support libraries if args.arch == 'x86' and utils.is_linux_os(): - install_x86_support_libraries() + install_x86_support_libraries(args.gha_build) # Install C++ dependencies using vcpkg if not args.disable_vcpkg: @@ -303,7 +301,7 @@ def parse_cmdline_args(): parser.add_argument('--target', nargs='+', help='A list of CMake build targets (eg: firebase_app firebase_auth)') parser.add_argument('--target_format', default=None, help='(Mac only) whether to output frameworks (default) or libraries.') parser.add_argument('--use_openssl', action='store_true', default=None, help='Use openssl for build instead of boringssl') - parser.add_argument('--gha_build', action='store_true', default=None, help='Set to true when building on GitHub, for metric tracking purposes') + parser.add_argument('--gha_build', action='store_true', default=None, help='Set to true when building on GitHub, for metric tracking purposes (also changes some prereq installing behavior)') args = parser.parse_args() return args From 5276f701af670b48ef9deecd772fbdea384308ca Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 16:06:15 -0800 Subject: [PATCH 29/42] Remove extra logging. --- .github/workflows/desktop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index bd7af44464..27f940d821 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -175,7 +175,7 @@ jobs: - name: Build SDK shell: bash run: | - python scripts/gha/build_desktop.py --build_tests --arch "${{ matrix.architecture }}" --config "${{ matrix.build_type }}" --msvc_runtime_library "${{ matrix.msvc_runtime }}" --gha_build || (cat external/vcpkg/buildtrees/detect_compiler/config-x86-linux-rel-*.log && false) + python scripts/gha/build_desktop.py --build_tests --arch "${{ matrix.architecture }}" --config "${{ matrix.build_type }}" --msvc_runtime_library "${{ matrix.msvc_runtime }}" --gha_build - name: Stats for ccache (mac and linux) if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') From 179208bae06c4f52cfd33d3c549845fd091df201 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 16:10:26 -0800 Subject: [PATCH 30/42] Fix comment. --- scripts/gha/build_desktop.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 20cae03a1c..1cceb0d725 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -57,7 +57,13 @@ def append_line_to_file(path, line): def install_x86_support_libraries(gha_build=False): - """Install support libraries needed to build x86 on x86_64 hosts.""" + """Install support libraries needed to build x86 on x86_64 hosts. + + Args: + gha_build: Pass in True if running on a GitHub runner; this will workarounds + that might be undesirable on a personal system (e.g. downgrading + packages). + """ if utils.is_linux_os(): packages = ['gcc-multilib', 'g++-multilib', 'libglib2.0-dev:i386', 'libsecret-1-dev:i386', 'libpthread-stubs0-dev:i386', @@ -301,7 +307,7 @@ def parse_cmdline_args(): parser.add_argument('--target', nargs='+', help='A list of CMake build targets (eg: firebase_app firebase_auth)') parser.add_argument('--target_format', default=None, help='(Mac only) whether to output frameworks (default) or libraries.') parser.add_argument('--use_openssl', action='store_true', default=None, help='Use openssl for build instead of boringssl') - parser.add_argument('--gha_build', action='store_true', default=None, help='Set to true when building on GitHub, for metric tracking purposes (also changes some prereq installing behavior)') + parser.add_argument('--gha_build', action='store_true', default=None, help='Set to true when building on GitHub, for metric tracking purposes (also changes some prerequisite installation behavior).') args = parser.parse_args() return args From 7fd719c1bf7d6bea85a4cba2d5bb7adef296fd5b Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 16:11:35 -0800 Subject: [PATCH 31/42] Remove extra return vars --- scripts/gha/build_desktop.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 1cceb0d725..04cc761d98 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -106,7 +106,7 @@ def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl if not found_vcpkg_executable: script_absolute_path = utils.get_vcpkg_installation_script_path() # Example: ./external/vcpkg/bootstrap-sh - retval = utils.run_command([script_absolute_path], check=True) + utils.run_command([script_absolute_path], check=True) # Copy any of our custom defined vcpkg data to vcpkg submodule directory utils.copy_vcpkg_custom_data() @@ -124,9 +124,9 @@ def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl # Eg: ./external/vcpkg/vcpkg install @external/vcpkg_x64-osx_response_file.txt # --disable-metrics - retval = utils.run_command([vcpkg_executable_file_path, 'install', - '@' + vcpkg_response_file_path, '--disable-metrics'], - check=True) + utils.run_command([vcpkg_executable_file_path, 'install', + '@' + vcpkg_response_file_path, '--disable-metrics'], + check=True) def install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, cleanup=True, From 64a18152264c565fa043cbc937dbab0a674dfa64 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 16:12:34 -0800 Subject: [PATCH 32/42] Restore the ccache keys to the previous value. --- .github/workflows/cpp-packaging.yml | 2 +- .github/workflows/desktop.yml | 4 ++-- .github/workflows/integration_tests.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cpp-packaging.yml b/.github/workflows/cpp-packaging.yml index bea434de30..7b630174ce 100644 --- a/.github/workflows/cpp-packaging.yml +++ b/.github/workflows/cpp-packaging.yml @@ -383,7 +383,7 @@ jobs: uses: actions/cache@v2 with: path: external/vcpkg/installed - key: dev-vcpkg-${{ matrix.architecture }}-${{ matrix.vcpkg_triplet_suffix }}-${{ matrix.msvc_runtime }}-${{ matrix.linux_abi }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}${{env.VCPKG_EXTRA_HASH}}-2 + key: dev-vcpkg-${{ matrix.architecture }}-${{ matrix.vcpkg_triplet_suffix }}-${{ matrix.msvc_runtime }}-${{ matrix.linux_abi }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}${{env.VCPKG_EXTRA_HASH}} - name: Cache ccache files if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 27f940d821..291ab1cac2 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -140,7 +140,7 @@ jobs: uses: actions/cache@v2 with: path: external/vcpkg/installed - key: dev-vcpkg-${{ matrix.architecture }}-${{ env.VCPKG_SUFFIX }}-${{ matrix.msvc_runtime }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}${{ env.VCPKG_EXTRA_HASH }}-2 + key: dev-vcpkg-${{ matrix.architecture }}-${{ env.VCPKG_SUFFIX }}-${{ matrix.msvc_runtime }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}${{ env.VCPKG_EXTRA_HASH }} - name: Cache ccache files if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') @@ -305,7 +305,7 @@ jobs: uses: actions/cache@v2 with: path: external/vcpkg/installed - key: dev-vcpkg-${{ env.VCPKG_TRIPLET }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}-2 + key: dev-vcpkg-${{ env.VCPKG_TRIPLET }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }} - name: Cache ccache files uses: actions/cache@v2 with: diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 560a1d7877..eaaf4441f4 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -239,7 +239,7 @@ jobs: uses: actions/cache@v2 with: path: external/vcpkg/installed - key: dev-vcpkg-${{ env.VCPKG_TRIPLET }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}-2 + key: dev-vcpkg-${{ env.VCPKG_TRIPLET }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }} - name: Setup python uses: actions/setup-python@v2 with: From f8f8d98a1d359d087cf16b9c82274fbebcf5b64c Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 16:16:57 -0800 Subject: [PATCH 33/42] Fix comment. --- scripts/gha/build_desktop.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 04cc761d98..c8cac5a317 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -60,9 +60,9 @@ def install_x86_support_libraries(gha_build=False): """Install support libraries needed to build x86 on x86_64 hosts. Args: - gha_build: Pass in True if running on a GitHub runner; this will workarounds - that might be undesirable on a personal system (e.g. downgrading - packages). + gha_build: Pass in True if running on a GitHub runner; this will activate + workarounds that might be undesirable on a personal system (e.g. + downgrading Ubuntu packages). """ if utils.is_linux_os(): packages = ['gcc-multilib', 'g++-multilib', 'libglib2.0-dev:i386', From 213918218570247f1b511908127ead314b716320 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 16:37:02 -0800 Subject: [PATCH 34/42] Ensure 64-bit libsecret stays installed. --- scripts/gha/build_desktop.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index c8cac5a317..c4d8ee6cd2 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -66,8 +66,8 @@ def install_x86_support_libraries(gha_build=False): """ if utils.is_linux_os(): packages = ['gcc-multilib', 'g++-multilib', 'libglib2.0-dev:i386', - 'libsecret-1-dev:i386', 'libpthread-stubs0-dev:i386', - 'libssl-dev:i386'] + 'libsecret-1-dev:i386', 'libsecret-1-dev', + 'libpthread-stubs0-dev:i386', 'libssl-dev:i386'] if gha_build: # Workaround for GitHub runners - they have an incompatibility between the 64-bit # and 32-bit versions of libpcre2-8-0. Downgrade the installed 64-bit version From 67ae3abc71f6989dcf1ce468e6485e82e9e1ecfe Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 16:39:04 -0800 Subject: [PATCH 35/42] Ensure libsecret 64-bit is installed only when we downgrade --- scripts/gha/build_desktop.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index c4d8ee6cd2..973ea04108 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -66,14 +66,17 @@ def install_x86_support_libraries(gha_build=False): """ if utils.is_linux_os(): packages = ['gcc-multilib', 'g++-multilib', 'libglib2.0-dev:i386', - 'libsecret-1-dev:i386', 'libsecret-1-dev', - 'libpthread-stubs0-dev:i386', 'libssl-dev:i386'] + 'libsecret-1-dev:i386', 'libpthread-stubs0-dev:i386', + 'libssl-dev:i386'] if gha_build: - # Workaround for GitHub runners - they have an incompatibility between the 64-bit - # and 32-bit versions of libpcre2-8-0. Downgrade the installed 64-bit version - # of the library to get around this issue. This will presumably be fixed in a future - # Ubuntu update. - packages = ['--allow-downgrades'] + packages + ['libpcre2-8-0=10.34-7'] + # Workaround for GitHub runners, which have an incompatibility between the + # 64-bit and 32-bit versions of libpcre2-8-0. Downgrade the installed + # 64-bit version of the library to get around this issue. This will + # presumably be fixed in a future Ubuntu update. (Also include + # libsecret-1-dev (64-bit) here to ensure it stays installed, otherwise + # the downgrade can remove it.) + packages = ['--allow-downgrades'] + packages + ['libpcre2-8-0=10.34-7', + 'libsecret-1-dev'] # First check if these packages exist on the machine already devnull = open(os.devnull, "w") From c807009d87fbcca4550025c0b73acaee380aa42b Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 16:44:17 -0800 Subject: [PATCH 36/42] Force libsecret to a specific version too. --- scripts/gha/build_desktop.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 973ea04108..5117c4ac44 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -75,8 +75,8 @@ def install_x86_support_libraries(gha_build=False): # presumably be fixed in a future Ubuntu update. (Also include # libsecret-1-dev (64-bit) here to ensure it stays installed, otherwise # the downgrade can remove it.) - packages = ['--allow-downgrades'] + packages + ['libpcre2-8-0=10.34-7', - 'libsecret-1-dev'] + packages = (['--allow-downgrades'] + packages + + ['libpcre2-8-0=10.34-7', 'libsecret-1-dev=0.20.2-1']) # First check if these packages exist on the machine already devnull = open(os.devnull, "w") @@ -87,7 +87,7 @@ def install_x86_support_libraries(gha_build=False): # Install them. utils.run_command(['dpkg', '--add-architecture', 'i386'], as_root=True, check=True) utils.run_command(['apt', 'update'], as_root=True, check=True) - utils.run_command(['apt', 'install', '-y'] + packages, as_root=True, check=True) + utils.run_command(['apt', 'install', '-V', '-y'] + packages, as_root=True, check=True) def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl=False): From 04db8826581cef54125464aaa6908b6a86967144 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 16:45:12 -0800 Subject: [PATCH 37/42] Change comment and pin libsecret version --- scripts/gha/build_desktop.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 5117c4ac44..085503c8f3 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -70,11 +70,10 @@ def install_x86_support_libraries(gha_build=False): 'libssl-dev:i386'] if gha_build: # Workaround for GitHub runners, which have an incompatibility between the - # 64-bit and 32-bit versions of libpcre2-8-0. Downgrade the installed - # 64-bit version of the library to get around this issue. This will - # presumably be fixed in a future Ubuntu update. (Also include - # libsecret-1-dev (64-bit) here to ensure it stays installed, otherwise - # the downgrade can remove it.) + # 64-bit and 32-bit versions of the Ubuntu packages libpcre2-8-0 and + # libsecret-1-dev. Downgrade the installed 64-bit versions of the libraries + # to get around this issue. This will presumably be fixed in a future + # Ubuntu update. packages = (['--allow-downgrades'] + packages + ['libpcre2-8-0=10.34-7', 'libsecret-1-dev=0.20.2-1']) From 4c963a31efab2850620b89c1ac6f1e236611021a Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 16:47:49 -0800 Subject: [PATCH 38/42] Update libsecret version --- scripts/gha/build_desktop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 085503c8f3..513c308f0d 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -75,7 +75,7 @@ def install_x86_support_libraries(gha_build=False): # to get around this issue. This will presumably be fixed in a future # Ubuntu update. packages = (['--allow-downgrades'] + packages + - ['libpcre2-8-0=10.34-7', 'libsecret-1-dev=0.20.2-1']) + ['libpcre2-8-0=10.34-7', 'libsecret-1-dev=0.20.4-0ubuntu1']) # First check if these packages exist on the machine already devnull = open(os.devnull, "w") From 60f0fba3d7a11c5431711fc8bfaea31a348b1cd6 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 16:52:25 -0800 Subject: [PATCH 39/42] Try re-installing libsecret after it is uninstalled. --- scripts/gha/build_desktop.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 513c308f0d..7225983543 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -75,7 +75,7 @@ def install_x86_support_libraries(gha_build=False): # to get around this issue. This will presumably be fixed in a future # Ubuntu update. packages = (['--allow-downgrades'] + packages + - ['libpcre2-8-0=10.34-7', 'libsecret-1-dev=0.20.4-0ubuntu1']) + ['libpcre2-8-0=10.34-7']) # First check if these packages exist on the machine already devnull = open(os.devnull, "w") @@ -87,6 +87,8 @@ def install_x86_support_libraries(gha_build=False): utils.run_command(['dpkg', '--add-architecture', 'i386'], as_root=True, check=True) utils.run_command(['apt', 'update'], as_root=True, check=True) utils.run_command(['apt', 'install', '-V', '-y'] + packages, as_root=True, check=True) + utils.run_command(['apt', 'install', '-f', '-V', '-y', 'libsecret-1-dev'], + as_root=True, check=True) def _install_cpp_dependencies_with_vcpkg(arch, msvc_runtime_library, use_openssl=False): From e2e9900462bf6029efade85daca7bb056988f192 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 17:09:42 -0800 Subject: [PATCH 40/42] Add additional workaround for linux x86 build. --- scripts/gha/build_desktop.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index 7225983543..ee24424a2f 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -70,10 +70,10 @@ def install_x86_support_libraries(gha_build=False): 'libssl-dev:i386'] if gha_build: # Workaround for GitHub runners, which have an incompatibility between the - # 64-bit and 32-bit versions of the Ubuntu packages libpcre2-8-0 and - # libsecret-1-dev. Downgrade the installed 64-bit versions of the libraries - # to get around this issue. This will presumably be fixed in a future - # Ubuntu update. + # 64-bit and 32-bit versions of the Ubuntu package libpcre2-8-0. Downgrade + # the installed 64-bit version of the library to get around this + # issue. This will presumably be fixed in a future Ubuntu update. (If you + # remove it, remove the workaround further down this function as well.) packages = (['--allow-downgrades'] + packages + ['libpcre2-8-0=10.34-7']) @@ -87,6 +87,14 @@ def install_x86_support_libraries(gha_build=False): utils.run_command(['dpkg', '--add-architecture', 'i386'], as_root=True, check=True) utils.run_command(['apt', 'update'], as_root=True, check=True) utils.run_command(['apt', 'install', '-V', '-y'] + packages, as_root=True, check=True) + + if gha_build: + # One more workaround: downgrading libpcre2-8-0 above may have uninstalled + # libsecret, which is required for the Linux build. Force it to be + # reinstalled, but do it as a separate command to ensure that held + # packages aren't modified. (Once the workaround above is removed, this can + # be removed as well.) + # Note: "-f" = "fix" - let apt do what it needs to do to fix dependencies. utils.run_command(['apt', 'install', '-f', '-V', '-y', 'libsecret-1-dev'], as_root=True, check=True) From 8f7e2ef1b96af6339607106488bbcd8a8885e698 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 17:11:43 -0800 Subject: [PATCH 41/42] Format code --- scripts/gha/build_desktop.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index ee24424a2f..b4f3a0c14f 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -74,8 +74,7 @@ def install_x86_support_libraries(gha_build=False): # the installed 64-bit version of the library to get around this # issue. This will presumably be fixed in a future Ubuntu update. (If you # remove it, remove the workaround further down this function as well.) - packages = (['--allow-downgrades'] + packages + - ['libpcre2-8-0=10.34-7']) + packages = ['--allow-downgrades'] + packages + ['libpcre2-8-0=10.34-7'] # First check if these packages exist on the machine already devnull = open(os.devnull, "w") From 54ef75a357ef82e0b38e1ed448781387b0c3f7b4 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 29 Nov 2021 17:13:59 -0800 Subject: [PATCH 42/42] Format comment --- scripts/gha/build_desktop.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/gha/build_desktop.py b/scripts/gha/build_desktop.py index b4f3a0c14f..bedd14867c 100644 --- a/scripts/gha/build_desktop.py +++ b/scripts/gha/build_desktop.py @@ -71,9 +71,9 @@ def install_x86_support_libraries(gha_build=False): if gha_build: # Workaround for GitHub runners, which have an incompatibility between the # 64-bit and 32-bit versions of the Ubuntu package libpcre2-8-0. Downgrade - # the installed 64-bit version of the library to get around this - # issue. This will presumably be fixed in a future Ubuntu update. (If you - # remove it, remove the workaround further down this function as well.) + # the installed 64-bit version of the library to get around this issue. + # This will presumably be fixed in a future Ubuntu update. (If you remove + # it, remove the workaround further down this function as well.) packages = ['--allow-downgrades'] + packages + ['libpcre2-8-0=10.34-7'] # First check if these packages exist on the machine already