OLD | NEW |
---|---|
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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
210 DEB_CHANGELOG="${TMPFILEDIR}/changelog" | 210 DEB_CHANGELOG="${TMPFILEDIR}/changelog" |
211 DEB_FILES="${TMPFILEDIR}/files" | 211 DEB_FILES="${TMPFILEDIR}/files" |
212 DEB_CONTROL="${TMPFILEDIR}/control" | 212 DEB_CONTROL="${TMPFILEDIR}/control" |
213 CHANNEL="trunk" | 213 CHANNEL="trunk" |
214 # Default target architecture to same as build host. | 214 # Default target architecture to same as build host. |
215 if [ "$(uname -m)" = "x86_64" ]; then | 215 if [ "$(uname -m)" = "x86_64" ]; then |
216 TARGETARCH="x64" | 216 TARGETARCH="x64" |
217 else | 217 else |
218 TARGETARCH="ia32" | 218 TARGETARCH="ia32" |
219 fi | 219 fi |
220 if [[ "$(lsb_release -c)" == *"precise" ]]; then | |
Lei Zhang
2016/10/06 20:41:29
Single equal?
Tom (Use chromium acct)
2016/10/06 22:53:41
Done.
| |
221 HOSTENVIRONMENT="precise" | |
Sam Clegg
2016/10/06 20:26:24
Perhaps call this DISTRO or RELEASE or LSB_RELEASE
Lei Zhang
2016/10/06 20:41:29
Or at least HOST_ENVIRONMENT?
Tom (Use chromium acct)
2016/10/06 22:53:41
Done.
| |
222 elif [[ "$(lsb_release -c)" == *"trusty" ]]; then | |
223 HOSTENVIRONMENT="trusty" | |
224 else | |
225 echo "Debian package can only be build on Ubuntu Precise or Trusty" | |
226 exit 1 | |
227 fi | |
220 | 228 |
221 # call cleanup() on exit | 229 # call cleanup() on exit |
222 trap cleanup 0 | 230 trap cleanup 0 |
223 process_opts "$@" | 231 process_opts "$@" |
224 BUILDDIR=${BUILDDIR:=$(readlink -f "${SCRIPTDIR}/../../../../out/Release")} | 232 BUILDDIR=${BUILDDIR:=$(readlink -f "${SCRIPTDIR}/../../../../out/Release")} |
225 | 233 |
226 source ${BUILDDIR}/installer/common/installer.include | 234 source ${BUILDDIR}/installer/common/installer.include |
227 | 235 |
228 get_version_info | 236 get_version_info |
229 VERSIONFULL="${VERSION}-${PACKAGE_RELEASE}" | 237 VERSIONFULL="${VERSION}-${PACKAGE_RELEASE}" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
270 LD_LIBRARY_PATH=$SAVE_LDLP | 278 LD_LIBRARY_PATH=$SAVE_LDLP |
271 fi | 279 fi |
272 | 280 |
273 # Format it nicely and save it for comparison. | 281 # Format it nicely and save it for comparison. |
274 # The grep -v is for a duplicate libc6 dep caused by Lucid glibc silliness. | 282 # The grep -v is for a duplicate libc6 dep caused by Lucid glibc silliness. |
275 echo "$DPKG_SHLIB_DEPS" | sed 's/, /\n/g' | \ | 283 echo "$DPKG_SHLIB_DEPS" | sed 's/, /\n/g' | \ |
276 grep -v '^libc6 (>= 2.3.6-6~)$' | LANG=C sort > actual | 284 grep -v '^libc6 (>= 2.3.6-6~)$' | LANG=C sort > actual |
277 | 285 |
278 # Compare the expected dependency list to the generate list. | 286 # Compare the expected dependency list to the generate list. |
279 BAD_DIFF=0 | 287 BAD_DIFF=0 |
280 diff -u "$SCRIPTDIR/expected_deps_$TARGETARCH" actual || BAD_DIFF=1 | 288 diff -u "$SCRIPTDIR/expected_deps_${TARGETARCH}_${HOSTENVIRONMENT}" actual || \ |
289 BAD_DIFF=1 | |
281 if [ $BAD_DIFF -ne 0 ] && [ -z "${IGNORE_DEPS_CHANGES:-}" ]; then | 290 if [ $BAD_DIFF -ne 0 ] && [ -z "${IGNORE_DEPS_CHANGES:-}" ]; then |
282 echo | 291 echo |
283 echo "ERROR: Shared library dependencies changed!" | 292 echo "ERROR: Shared library dependencies changed!" |
284 echo "If this is intentional, please update:" | 293 echo "If this is intentional, please update:" |
285 echo "chrome/installer/linux/debian/expected_deps_ia32" | 294 echo "chrome/installer/linux/debian/expected_deps_ia32_precise" |
286 echo "chrome/installer/linux/debian/expected_deps_x64" | 295 echo "chrome/installer/linux/debian/expected_deps_ia32_trusty" |
296 echo "chrome/installer/linux/debian/expected_deps_x64_precise" | |
297 echo "chrome/installer/linux/debian/expected_deps_x64_trusty" | |
287 echo | 298 echo |
288 exit $BAD_DIFF | 299 exit $BAD_DIFF |
289 fi | 300 fi |
290 rm -rf "$DUMMY_STAGING_DIR" | 301 rm -rf "$DUMMY_STAGING_DIR" |
291 | 302 |
292 # Additional dependencies not in the dpkg-shlibdeps output. | 303 # Additional dependencies not in the dpkg-shlibdeps output. |
293 # ca-certificates: Make sure users have SSL certificates. | 304 # ca-certificates: Make sure users have SSL certificates. |
294 # fonts-liberation: Make sure users have compatible fonts for viewing PDFs. | 305 # fonts-liberation: Make sure users have compatible fonts for viewing PDFs. |
295 # libappindicator1: Make systray icons work in Unity. | 306 # libappindicator1: Make systray icons work in Unity. |
296 # libnss3: Pull a more recent version of NSS than required by runtime linking, | 307 # libnss3: Pull a more recent version of NSS than required by runtime linking, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
335 # Only use the default REPOCONFIG if it's unset (e.g. verify_channel might have | 346 # Only use the default REPOCONFIG if it's unset (e.g. verify_channel might have |
336 # set it to an empty string) | 347 # set it to an empty string) |
337 REPOCONFIG="${REPOCONFIG-deb [arch=${ARCHITECTURE}] http://${BASEREPOCONFIG}}" | 348 REPOCONFIG="${REPOCONFIG-deb [arch=${ARCHITECTURE}] http://${BASEREPOCONFIG}}" |
338 # Allowed configs include optional HTTPS support and explicit multiarch | 349 # Allowed configs include optional HTTPS support and explicit multiarch |
339 # platforms. | 350 # platforms. |
340 REPOCONFIGREGEX="deb (\\\\[arch=[^]]*\\\\b${ARCHITECTURE}\\\\b[^]]*\\\\]" | 351 REPOCONFIGREGEX="deb (\\\\[arch=[^]]*\\\\b${ARCHITECTURE}\\\\b[^]]*\\\\]" |
341 REPOCONFIGREGEX+="[[:space:]]*) https?://${BASEREPOCONFIG}" | 352 REPOCONFIGREGEX+="[[:space:]]*) https?://${BASEREPOCONFIG}" |
342 stage_install_debian | 353 stage_install_debian |
343 | 354 |
344 do_package | 355 do_package |
OLD | NEW |