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

Side by Side Diff: build/linux/sysroot_scripts/sysroot-creator.sh

Issue 2645693002: Add libxkbcommon packages to precise sysroot (Closed)
Patch Set: Created 3 years, 11 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
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 # 4 #
5 # This script should not be run directly but sourced by the other 5 # This script should not be run directly but sourced by the other
6 # scripts (e.g. sysroot-creator-trusty.sh). Its up to the parent scripts 6 # scripts (e.g. sysroot-creator-trusty.sh). Its up to the parent scripts
7 # to define certain environment variables: e.g. 7 # to define certain environment variables: e.g.
8 # DISTRO=ubuntu 8 # DISTRO=ubuntu
9 # DIST=trusty 9 # DIST=trusty
10 # DIST_UPDATES=trusty-updates 10 # DIST_UPDATES=trusty-updates # optional
11 # REPO_EXTRA="universe restricted multiverse" # optional
11 # APT_REPO=http://archive.ubuntu.com/ubuntu 12 # APT_REPO=http://archive.ubuntu.com/ubuntu
12 # KEYRING_FILE=/usr/share/keyrings/ubuntu-archive-keyring.gpg 13 # KEYRING_FILE=/usr/share/keyrings/ubuntu-archive-keyring.gpg
13 # DEBIAN_PACKAGES="gcc libz libssl" 14 # DEBIAN_PACKAGES="gcc libz libssl"
14 15
15 #@ This script builds Debian/Ubuntu sysroot images for building Google Chrome. 16 #@ This script builds Debian/Ubuntu sysroot images for building Google Chrome.
16 #@ 17 #@
17 #@ Generally this script is invoked as: 18 #@ Generally this script is invoked as:
18 #@ sysroot-creator-<flavour>.sh <mode> <args>* 19 #@ sysroot-creator-<flavour>.sh <mode> <args>*
19 #@ Available modes are shown below. 20 #@ Available modes are shown below.
20 #@ 21 #@
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 ExtractPackageBz2() { 188 ExtractPackageBz2() {
188 if [ "${PACKAGES_EXT}" = "bz2" ]; then 189 if [ "${PACKAGES_EXT}" = "bz2" ]; then
189 bzcat "$1" | egrep '^(Package:|Filename:|SHA256:) ' > "$2" 190 bzcat "$1" | egrep '^(Package:|Filename:|SHA256:) ' > "$2"
190 else 191 else
191 xzcat "$1" | egrep '^(Package:|Filename:|SHA256:) ' > "$2" 192 xzcat "$1" | egrep '^(Package:|Filename:|SHA256:) ' > "$2"
192 fi 193 fi
193 } 194 }
194 195
195 GeneratePackageListDist() { 196 GeneratePackageListDist() {
196 local arch="$1" 197 local arch="$1"
197 local apt_repo="$2" 198 local apt_url="$2"
198 local dist="$3" 199 local dist="$3"
200 local repo_name="$4"
199 201
200 TMP_PACKAGE_LIST="${BUILD_DIR}/Packages.${dist}_${arch}" 202 TMP_PACKAGE_LIST="${BUILD_DIR}/Packages.${dist}_${repo_name}_${arch}"
201 local repo_basedir="${apt_repo}/dists/${dist}" 203 local repo_basedir="${apt_url}/dists/${dist}"
202 local package_list="${BUILD_DIR}/Packages.${dist}_${arch}.${PACKAGES_EXT}" 204 local package_list="${BUILD_DIR}/Packages.${dist}_${repo_name}_${arch}.${PACKA GES_EXT}"
203 local package_file_arch="main/binary-${arch}/Packages.${PACKAGES_EXT}" 205 local package_file_arch="${repo_name}/binary-${arch}/Packages.${PACKAGES_EXT}"
204 local package_list_arch="${repo_basedir}/${package_file_arch}" 206 local package_list_arch="${repo_basedir}/${package_file_arch}"
205 207
206 DownloadOrCopy "${package_list_arch}" "${package_list}" 208 DownloadOrCopy "${package_list_arch}" "${package_list}"
207 VerifyPackageListing "${package_file_arch}" "${package_list}" ${dist} 209 VerifyPackageListing "${package_file_arch}" "${package_list}" ${dist}
208 ExtractPackageBz2 "${package_list}" "${TMP_PACKAGE_LIST}" 210 ExtractPackageBz2 "${package_list}" "${TMP_PACKAGE_LIST}"
209 } 211 }
210 212
211 GeneratePackageListCommon() { 213 GeneratePackageListCommon() {
212 GeneratePackageListDist "$2" "$3" ${DIST}
213 local output_file="$1" 214 local output_file="$1"
215 local arch="$2"
216 local apt_url="$3"
214 local packages="$4" 217 local packages="$4"
215 local list_base="${TMP_PACKAGE_LIST}" 218
216 if [ ! -z ${DIST_UPDATES:-} ]; then 219 local dists="${DIST} ${DIST_UPDATES:-}"
217 GeneratePackageListDist "$2" "$3" ${DIST_UPDATES} 220 local repos="main ${REPO_EXTRA:-}"
221
222 local list_base="${BUILD_DIR}/Packages.${DIST}_${arch}"
223 > "${list_base}"
224 for dist in ${dists}; do
225 for repo in ${repos}; do
226 GeneratePackageListDist "${arch}" "${apt_url}" "${dist}" "${repo}"
218 cat "${TMP_PACKAGE_LIST}" | ./merge-package-lists.py "${list_base}" 227 cat "${TMP_PACKAGE_LIST}" | ./merge-package-lists.py "${list_base}"
219 fi 228 done
229 done
230
220 GeneratePackageList "${list_base}" "${output_file}" "${packages}" 231 GeneratePackageList "${list_base}" "${output_file}" "${packages}"
221 } 232 }
222 233
223 GeneratePackageListAmd64() { 234 GeneratePackageListAmd64() {
224 GeneratePackageListCommon "$1" amd64 ${APT_REPO} "${DEBIAN_PACKAGES} 235 GeneratePackageListCommon "$1" amd64 ${APT_REPO} "${DEBIAN_PACKAGES}
225 ${DEBIAN_PACKAGES_X86:=} ${DEBIAN_PACKAGES_AMD64:=}" 236 ${DEBIAN_PACKAGES_X86:=} ${DEBIAN_PACKAGES_AMD64:=}"
226 } 237 }
227 238
228 GeneratePackageListI386() { 239 GeneratePackageListI386() {
229 GeneratePackageListCommon "$1" i386 ${APT_REPO} "${DEBIAN_PACKAGES} 240 GeneratePackageListCommon "$1" i386 ${APT_REPO} "${DEBIAN_PACKAGES}
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 echo " $0 help" 882 echo " $0 help"
872 exit 1 883 exit 1
873 else 884 else
874 ChangeDirectory 885 ChangeDirectory
875 if echo $1 | grep -qs --regexp='\(^Print\)\|\(All$\)'; then 886 if echo $1 | grep -qs --regexp='\(^Print\)\|\(All$\)'; then
876 "$@" 887 "$@"
877 else 888 else
878 RunCommand "$@" 889 RunCommand "$@"
879 fi 890 fi
880 fi 891 fi
OLDNEW
« no previous file with comments | « build/linux/sysroot_scripts/packagelist.trusty.arm ('k') | build/linux/sysroot_scripts/sysroot-creator-precise.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698