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

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

Issue 2933573002: Switch Chrome on Linux to libc++ (Closed)
Patch Set: time to laaaand this 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
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 # we use is too old and doesn't provide %{_isa}, so we do this manually. 91 # we use is too old and doesn't provide %{_isa}, so we do this manually.
92 if [ "$ARCHITECTURE" = "x86_64" ] ; then 92 if [ "$ARCHITECTURE" = "x86_64" ] ; then
93 local EMPTY_VERSION="()" 93 local EMPTY_VERSION="()"
94 local PKG_ARCH="(64bit)" 94 local PKG_ARCH="(64bit)"
95 elif [ "$ARCHITECTURE" = "i386" ] ; then 95 elif [ "$ARCHITECTURE" = "i386" ] ; then
96 local EMPTY_VERSION="" 96 local EMPTY_VERSION=""
97 local PKG_ARCH="" 97 local PKG_ARCH=""
98 fi 98 fi
99 99
100 # Use find-requires script to make sure the dependencies are complete 100 # Use find-requires script to make sure the dependencies are complete
101 # (especially libc and libstdc++ versions). 101 # (especially libc versions).
102 DETECTED_DEPENDS="$(echo "${BUILDDIR}/chrome" | /usr/lib/rpm/find-requires)" 102 DETECTED_DEPENDS="$(echo "${BUILDDIR}/chrome" | /usr/lib/rpm/find-requires)"
103 103
104 # Compare the expected dependency list to the generated list. 104 # Compare the expected dependency list to the generated list.
105 # 105 #
106 # In this comparison, we allow ld-linux.so's symbol version "GLIBC_2.3" 106 # In this comparison, we allow ld-linux.so's symbol version "GLIBC_2.3"
107 # to be present but don't require it, because it is hard to predict 107 # to be present but don't require it, because it is hard to predict
108 # whether it will be generated. Referencing a __thread 108 # whether it will be generated. Referencing a __thread
109 # (thread-local/TLS) variable *sometimes* causes the compiler to generate 109 # (thread-local/TLS) variable *sometimes* causes the compiler to generate
110 # a reference to __tls_get_addr() (depending on compiler options such as 110 # a reference to __tls_get_addr() (depending on compiler options such as
111 # -fPIC vs. -fPIE). This function has symbol version "GLIBC_2.3". The 111 # -fPIC vs. -fPIE). This function has symbol version "GLIBC_2.3". The
(...skipping 16 matching lines...) Expand all
128 exit $BAD_DIFF 128 exit $BAD_DIFF
129 fi 129 fi
130 130
131 # lsb implies many dependencies. 131 # lsb implies many dependencies.
132 # 132 #
133 # nss (bundled) is optional in LSB 4.0. Also specify a more recent version 133 # nss (bundled) is optional in LSB 4.0. Also specify a more recent version
134 # for security and stability updates. While we depend on libnss3.so and not 134 # for security and stability updates. While we depend on libnss3.so and not
135 # libssl3.so, force the dependency on libssl3 to ensure the NSS version is 135 # libssl3.so, force the dependency on libssl3 to ensure the NSS version is
136 # 3.28 or later, since libssl3 should always be packaged with libnss3. 136 # 3.28 or later, since libssl3 should always be packaged with libnss3.
137 # 137 #
138 # libstdc++.so.6 is for C++11 support.
139 #
140 # wget is for uploading crash reports with Breakpad. 138 # wget is for uploading crash reports with Breakpad.
141 # 139 #
142 # xdg-utils is still optional in LSB 4.0. 140 # xdg-utils is still optional in LSB 4.0.
143 # 141 #
144 # zlib may not need to be there. It should be included with LSB. 142 # zlib may not need to be there. It should be included with LSB.
145 # TODO(thestig): Figure out why there is an entry for zlib. 143 # TODO(thestig): Figure out why there is an entry for zlib.
146 # 144 #
147 # We want to depend on the system SSL certs so wget can upload crash reports 145 # We want to depend on the system SSL certs so wget can upload crash reports
148 # securely, but there's no common capability between the distros. Bugs filed: 146 # securely, but there's no common capability between the distros. Bugs filed:
149 # https://qa.mandriva.com/show_bug.cgi?id=55714 147 # https://qa.mandriva.com/show_bug.cgi?id=55714
150 # https://bugzilla.redhat.com/show_bug.cgi?id=538158 148 # https://bugzilla.redhat.com/show_bug.cgi?id=538158
151 # https://bugzilla.novell.com/show_bug.cgi?id=556248 149 # https://bugzilla.novell.com/show_bug.cgi?id=556248
152 # 150 #
153 # We want to depend on liberation-fonts as well, but there is no such package 151 # We want to depend on liberation-fonts as well, but there is no such package
154 # for Fedora. https://bugzilla.redhat.com/show_bug.cgi?id=1252564 152 # for Fedora. https://bugzilla.redhat.com/show_bug.cgi?id=1252564
155 # TODO(thestig): Use the liberation-fonts package once its available on all 153 # TODO(thestig): Use the liberation-fonts package once its available on all
156 # supported distros. 154 # supported distros.
157 DEPENDS="lsb >= 4.0, \ 155 DEPENDS="lsb >= 4.0, \
158 libnss3.so(NSS_3.22)${PKG_ARCH}, \ 156 libnss3.so(NSS_3.22)${PKG_ARCH}, \
159 libssl3.so(NSS_3.28)${PKG_ARCH}, \ 157 libssl3.so(NSS_3.28)${PKG_ARCH}, \
160 libstdc++.so.6(GLIBCXX_3.4.18)${PKG_ARCH}, \
161 wget, \ 158 wget, \
162 xdg-utils, \ 159 xdg-utils, \
163 zlib, \ 160 zlib, \
164 $(echo "${DETECTED_DEPENDS}" | tr '\n' ',')" 161 $(echo "${DETECTED_DEPENDS}" | tr '\n' ',')"
165 gen_spec 162 gen_spec
166 163
167 # Create temporary rpmbuild dirs. 164 # Create temporary rpmbuild dirs.
168 RPMBUILD_DIR=$(mktemp -d -t rpmbuild.XXXXXX) || exit 1 165 RPMBUILD_DIR=$(mktemp -d -t rpmbuild.XXXXXX) || exit 1
169 mkdir -p "$RPMBUILD_DIR/BUILD" 166 mkdir -p "$RPMBUILD_DIR/BUILD"
170 mkdir -p "$RPMBUILD_DIR/RPMS" 167 mkdir -p "$RPMBUILD_DIR/RPMS"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 ;; 328 ;;
332 * ) 329 * )
333 echo 330 echo
334 echo "ERROR: Don't know how to build RPMs for '$TARGETARCH'." 331 echo "ERROR: Don't know how to build RPMs for '$TARGETARCH'."
335 echo 332 echo
336 exit 1 333 exit 1
337 ;; 334 ;;
338 esac 335 esac
339 336
340 do_package 337 do_package
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698