Chromium Code Reviews| Index: chrome/installer/linux/debian/build.sh |
| diff --git a/chrome/installer/linux/debian/build.sh b/chrome/installer/linux/debian/build.sh |
| index f619576a3db90765bc6943c8052671ebeaa32d97..cba244ca364ab484901ce9b833c30f5afd90cd12 100755 |
| --- a/chrome/installer/linux/debian/build.sh |
| +++ b/chrome/installer/linux/debian/build.sh |
| @@ -113,6 +113,22 @@ do_package() { |
| fakeroot dpkg-deb -Zxz -z9 -b "${STAGEDIR}" . |
| } |
| +verify_package() { |
| + DEPENDS="${COMMON_DEPS}" # This needs to match do_package() above. |
| + echo ${DEPENDS} | sed 's/, /\n/g' | LANG=C sort > expected_deb_depends |
| + dpkg -I "${PACKAGE}-${CHANNEL}_${VERSIONFULL}_${ARCHITECTURE}.deb" | \ |
| + grep '^ Depends: ' | sed 's/^ Depends: //' | sed 's/, /\n/g' | \ |
| + LANG=C sort > actual_deb_depends |
| + BAD_DIFF=0 |
| + diff -u expected_deb_depends actual_deb_depends || BAD_DIFF=1 |
| + if [ $BAD_DIFF -ne 0 ] && [ -z "${IGNORE_DEPS_CHANGES:-}" ]; then |
| + echo |
| + echo "ERROR: bad dpkg dependencies!" |
| + echo |
| + exit $BAD_DIFF |
| + fi |
| +} |
| + |
| # Remove temporary files and unwanted packaging output. |
| cleanup() { |
| echo "Cleaning..." |
| @@ -305,22 +321,24 @@ fi |
| # libappindicator1: Make systray icons work in Unity. |
| # libnss3: Pull a more recent version of NSS than required by runtime linking, |
| # for security and stability updates in NSS. |
| -# libstdc++6: For C++11 support. |
| # lsb-base: Implies many other dependencies. |
| # xdg-utils: For OS integration. |
| # wget: For uploading crash reports with Breakpad. |
| -ADDITION_DEPS="ca-certificates, fonts-liberation, libappindicator1, \ |
| - libnss3 (>= 3.17.2), libstdc++6 (>=4.8.0), lsb-base (>=4.1), \ |
| - xdg-utils (>= 1.0.2), wget" |
| +ADDITIONAL_DEPS="ca-certificates, fonts-liberation, libappindicator1, \ |
| + libnss3 (>= 3.17.2), lsb-base (>=4.1), xdg-utils (>= 1.0.2), wget" |
|
Tom Anderson
2017/05/31 05:43:13
I guess ">=4.1" should have been ">= 4.1" for lsb-
|
| # Fix-up libnspr dependency due to renaming in Ubuntu (the old package still |
| # exists, but it was moved to "universe" repository, which isn't installed by |
| # default). |
| +# TODO(thestig): This is probably no longer needed. Verify and remove. |
| DPKG_SHLIB_DEPS=$(sed \ |
| 's/\(libnspr4-0d ([^)]*)\), /\1 | libnspr4 (>= 4.9.5-0ubuntu0), /g' \ |
| <<< $DPKG_SHLIB_DEPS) |
| -COMMON_DEPS="${DPKG_SHLIB_DEPS}, ${ADDITION_DEPS}" |
| +# Remove libnss dependency so the one in $ADDITIONAL_DEPS can supercede it. |
| +DPKG_SHLIB_DEPS=$(sed 's/\(libnss3 ([^)]*)\), //g' <<< $DPKG_SHLIB_DEPS) |
| + |
| +COMMON_DEPS="${DPKG_SHLIB_DEPS}, ${ADDITIONAL_DEPS}" |
| COMMON_PREDEPS="dpkg (>= 1.14.0)" |
| @@ -352,3 +370,4 @@ REPOCONFIGREGEX+="[[:space:]]*) https?://${BASEREPOCONFIG}" |
| stage_install_debian |
| do_package |
| +verify_package |