Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Side by Side Diff: chrome/installer/linux/debian/build.sh

Issue 2913103003: Revert of M59: Linux: Make manual libnss3 version dependency work again. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # TODO(mmoss) This currently only works with official builds, since non-official 7 # TODO(mmoss) This currently only works with official builds, since non-official
8 # builds don't add the "${BUILDDIR}/installer/" files needed for packaging. 8 # builds don't add the "${BUILDDIR}/installer/" files needed for packaging.
9 9
10 set -e 10 set -e
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 PROVIDES="www-browser" 106 PROVIDES="www-browser"
107 gen_changelog 107 gen_changelog
108 process_template "${SCRIPTDIR}/control.template" "${DEB_CONTROL}" 108 process_template "${SCRIPTDIR}/control.template" "${DEB_CONTROL}"
109 export DEB_HOST_ARCH="${ARCHITECTURE}" 109 export DEB_HOST_ARCH="${ARCHITECTURE}"
110 if [ -f "${DEB_CONTROL}" ]; then 110 if [ -f "${DEB_CONTROL}" ]; then
111 gen_control 111 gen_control
112 fi 112 fi
113 fakeroot dpkg-deb -Zxz -z9 -b "${STAGEDIR}" . 113 fakeroot dpkg-deb -Zxz -z9 -b "${STAGEDIR}" .
114 } 114 }
115 115
116 verify_package() {
117 DEPENDS="${COMMON_DEPS}" # This needs to match do_package() above.
118 echo ${DEPENDS} | sed 's/, /\n/g' | LANG=C sort > expected_deb_depends
119 dpkg -I "${PACKAGE}-${CHANNEL}_${VERSIONFULL}_${ARCHITECTURE}.deb" | \
120 grep '^ Depends: ' | sed 's/^ Depends: //' | sed 's/, /\n/g' | \
121 LANG=C sort > actual_deb_depends
122 BAD_DIFF=0
123 diff -u expected_deb_depends actual_deb_depends || BAD_DIFF=1
124 if [ $BAD_DIFF -ne 0 ] && [ -z "${IGNORE_DEPS_CHANGES:-}" ]; then
125 echo
126 echo "ERROR: bad dpkg dependencies!"
127 echo
128 exit $BAD_DIFF
129 fi
130 }
131
132 # Remove temporary files and unwanted packaging output. 116 # Remove temporary files and unwanted packaging output.
133 cleanup() { 117 cleanup() {
134 echo "Cleaning..." 118 echo "Cleaning..."
135 rm -rf "${STAGEDIR}" 119 rm -rf "${STAGEDIR}"
136 rm -rf "${TMPFILEDIR}" 120 rm -rf "${TMPFILEDIR}"
137 } 121 }
138 122
139 usage() { 123 usage() {
140 echo "usage: $(basename $0) [-c channel] [-a target_arch] [-o 'dir'] " 124 echo "usage: $(basename $0) [-c channel] [-a target_arch] [-o 'dir'] "
141 echo " [-b 'dir'] -d branding" 125 echo " [-b 'dir'] -d branding"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 echo 298 echo
315 exit $BAD_DIFF 299 exit $BAD_DIFF
316 fi 300 fi
317 301
318 # Additional dependencies not in the dpkg-shlibdeps output. 302 # Additional dependencies not in the dpkg-shlibdeps output.
319 # ca-certificates: Make sure users have SSL certificates. 303 # ca-certificates: Make sure users have SSL certificates.
320 # fonts-liberation: Make sure users have compatible fonts for viewing PDFs. 304 # fonts-liberation: Make sure users have compatible fonts for viewing PDFs.
321 # libappindicator1: Make systray icons work in Unity. 305 # libappindicator1: Make systray icons work in Unity.
322 # libnss3: Pull a more recent version of NSS than required by runtime linking, 306 # libnss3: Pull a more recent version of NSS than required by runtime linking,
323 # for security and stability updates in NSS. 307 # for security and stability updates in NSS.
308 # libstdc++6: For C++11 support.
324 # lsb-base: Implies many other dependencies. 309 # lsb-base: Implies many other dependencies.
325 # xdg-utils: For OS integration. 310 # xdg-utils: For OS integration.
326 # wget: For uploading crash reports with Breakpad. 311 # wget: For uploading crash reports with Breakpad.
327 ADDITIONAL_DEPS="ca-certificates, fonts-liberation, libappindicator1, \ 312 ADDITION_DEPS="ca-certificates, fonts-liberation, libappindicator1, \
328 libnss3 (>= 3.17.2), lsb-base (>=4.1), xdg-utils (>= 1.0.2), wget" 313 libnss3 (>= 3.17.2), libstdc++6 (>=4.8.0), lsb-base (>=4.1), \
314 xdg-utils (>= 1.0.2), wget"
329 315
330 # Fix-up libnspr dependency due to renaming in Ubuntu (the old package still 316 # Fix-up libnspr dependency due to renaming in Ubuntu (the old package still
331 # exists, but it was moved to "universe" repository, which isn't installed by 317 # exists, but it was moved to "universe" repository, which isn't installed by
332 # default). 318 # default).
333 # TODO(thestig): This is probably no longer needed. Verify and remove.
334 DPKG_SHLIB_DEPS=$(sed \ 319 DPKG_SHLIB_DEPS=$(sed \
335 's/\(libnspr4-0d ([^)]*)\), /\1 | libnspr4 (>= 4.9.5-0ubuntu0), /g' \ 320 's/\(libnspr4-0d ([^)]*)\), /\1 | libnspr4 (>= 4.9.5-0ubuntu0), /g' \
336 <<< $DPKG_SHLIB_DEPS) 321 <<< $DPKG_SHLIB_DEPS)
337 322
338 # Remove libnss dependency so the one in $ADDITIONAL_DEPS can supercede it. 323 COMMON_DEPS="${DPKG_SHLIB_DEPS}, ${ADDITION_DEPS}"
339 DPKG_SHLIB_DEPS=$(sed 's/\(libnss3 ([^)]*)\), //g' <<< $DPKG_SHLIB_DEPS)
340
341 COMMON_DEPS="${DPKG_SHLIB_DEPS}, ${ADDITIONAL_DEPS}"
342 COMMON_PREDEPS="dpkg (>= 1.14.0)" 324 COMMON_PREDEPS="dpkg (>= 1.14.0)"
343 325
344 326
345 # Make everything happen in the OUTPUTDIR. 327 # Make everything happen in the OUTPUTDIR.
346 cd "${OUTPUTDIR}" 328 cd "${OUTPUTDIR}"
347 329
348 case "$TARGETARCH" in 330 case "$TARGETARCH" in
349 ia32 ) 331 ia32 )
350 export ARCHITECTURE="i386" 332 export ARCHITECTURE="i386"
351 ;; 333 ;;
(...skipping 11 matching lines...) Expand all
363 # Only use the default REPOCONFIG if it's unset (e.g. verify_channel might have 345 # Only use the default REPOCONFIG if it's unset (e.g. verify_channel might have
364 # set it to an empty string) 346 # set it to an empty string)
365 REPOCONFIG="${REPOCONFIG-deb [arch=${ARCHITECTURE}] http://${BASEREPOCONFIG}}" 347 REPOCONFIG="${REPOCONFIG-deb [arch=${ARCHITECTURE}] http://${BASEREPOCONFIG}}"
366 # Allowed configs include optional HTTPS support and explicit multiarch 348 # Allowed configs include optional HTTPS support and explicit multiarch
367 # platforms. 349 # platforms.
368 REPOCONFIGREGEX="deb (\\\\[arch=[^]]*\\\\b${ARCHITECTURE}\\\\b[^]]*\\\\]" 350 REPOCONFIGREGEX="deb (\\\\[arch=[^]]*\\\\b${ARCHITECTURE}\\\\b[^]]*\\\\]"
369 REPOCONFIGREGEX+="[[:space:]]*) https?://${BASEREPOCONFIG}" 351 REPOCONFIGREGEX+="[[:space:]]*) https?://${BASEREPOCONFIG}"
370 stage_install_debian 352 stage_install_debian
371 353
372 do_package 354 do_package
373 verify_package
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698