diff --git a/build/linux/debian/calculate-deps.js b/build/linux/debian/calculate-deps.js index 2bff40cf1d2..ecdb01f541c 100644 --- a/build/linux/debian/calculate-deps.js +++ b/build/linux/debian/calculate-deps.js @@ -65,6 +65,15 @@ function calculatePackageDeps(binaryPath, arch, sysroot) { depsStr = line.substring(shlibsDependsPrefix.length); } } - const requires = new Set(depsStr.split(', ').sort()); + // Refs https://chromium-review.googlesource.com/c/chromium/src/+/3572926 + // Chromium depends on libgcc_s, is from the package libgcc1. However, in + // Bullseye, the package was renamed to libgcc-s1. To avoid adding a dep + // on the newer package, this hack skips the dep. This is safe because + // libgcc-s1 is a dependency of libc6. This hack can be removed once + // support for Debian Buster and Ubuntu Bionic are dropped. + const filteredDeps = depsStr.split(', ').filter(dependency => { + return !dependency.startsWith('libgcc-s1'); + }).sort(); + const requires = new Set(filteredDeps); return requires; } diff --git a/build/linux/debian/calculate-deps.ts b/build/linux/debian/calculate-deps.ts index 9d6c3a9da80..b13d3cdfaaf 100644 --- a/build/linux/debian/calculate-deps.ts +++ b/build/linux/debian/calculate-deps.ts @@ -70,6 +70,15 @@ function calculatePackageDeps(binaryPath: string, arch: DebianArchString, sysroo depsStr = line.substring(shlibsDependsPrefix.length); } } - const requires = new Set(depsStr.split(', ').sort()); + // Refs https://chromium-review.googlesource.com/c/chromium/src/+/3572926 + // Chromium depends on libgcc_s, is from the package libgcc1. However, in + // Bullseye, the package was renamed to libgcc-s1. To avoid adding a dep + // on the newer package, this hack skips the dep. This is safe because + // libgcc-s1 is a dependency of libc6. This hack can be removed once + // support for Debian Buster and Ubuntu Bionic are dropped. + const filteredDeps = depsStr.split(', ').filter(dependency => { + return !dependency.startsWith('libgcc-s1'); + }).sort(); + const requires = new Set(filteredDeps); return requires; } diff --git a/build/linux/debian/dep-lists.js b/build/linux/debian/dep-lists.js index b355d50f01f..f61968c5170 100644 --- a/build/linux/debian/dep-lists.js +++ b/build/linux/debian/dep-lists.js @@ -36,7 +36,6 @@ exports.referenceGeneratedDepsByArch = { 'libdrm2 (>= 2.4.38)', 'libexpat1 (>= 2.0.1)', 'libgbm1 (>= 8.1~0)', - 'libgcc-s1 (>= 3.0)', 'libglib2.0-0 (>= 2.16.0)', 'libglib2.0-0 (>= 2.39.4)', 'libgtk-3-0 (>= 3.9.10)', @@ -73,8 +72,6 @@ exports.referenceGeneratedDepsByArch = { 'libdrm2 (>= 2.4.38)', 'libexpat1 (>= 2.0.1)', 'libgbm1 (>= 8.1~0)', - 'libgcc-s1 (>= 3.0)', - 'libgcc-s1 (>= 3.5)', 'libglib2.0-0 (>= 2.16.0)', 'libglib2.0-0 (>= 2.39.4)', 'libgtk-3-0 (>= 3.9.10)', diff --git a/build/linux/debian/dep-lists.ts b/build/linux/debian/dep-lists.ts index 80fe3264b09..63b14bf16f0 100644 --- a/build/linux/debian/dep-lists.ts +++ b/build/linux/debian/dep-lists.ts @@ -36,7 +36,6 @@ export const referenceGeneratedDepsByArch = { 'libdrm2 (>= 2.4.38)', 'libexpat1 (>= 2.0.1)', 'libgbm1 (>= 8.1~0)', - 'libgcc-s1 (>= 3.0)', 'libglib2.0-0 (>= 2.16.0)', 'libglib2.0-0 (>= 2.39.4)', 'libgtk-3-0 (>= 3.9.10)', @@ -73,8 +72,6 @@ export const referenceGeneratedDepsByArch = { 'libdrm2 (>= 2.4.38)', 'libexpat1 (>= 2.0.1)', 'libgbm1 (>= 8.1~0)', - 'libgcc-s1 (>= 3.0)', - 'libgcc-s1 (>= 3.5)', 'libglib2.0-0 (>= 2.16.0)', 'libglib2.0-0 (>= 2.39.4)', 'libgtk-3-0 (>= 3.9.10)',