From 7ebd95ea4bca9638cb4d6e6ebc0051b0bc8f37c3 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 3 Oct 2013 14:11:40 +0200 Subject: [PATCH] chromium: update to 30.0.1599.66 (nacl/pnacl enabled again). --- ...ng-copying-in-GetFileNameInWhitelist.patch | 49 ------------ .../chromium/patches/gl_surface_egl.cc.patch | 13 ++++ srcpkgs/chromium/template | 77 +++++++++++++------ 3 files changed, 66 insertions(+), 73 deletions(-) delete mode 100644 srcpkgs/chromium/patches/chromium-28.0.1500.71-avoid-std-string-copying-in-GetFileNameInWhitelist.patch create mode 100644 srcpkgs/chromium/patches/gl_surface_egl.cc.patch diff --git a/srcpkgs/chromium/patches/chromium-28.0.1500.71-avoid-std-string-copying-in-GetFileNameInWhitelist.patch b/srcpkgs/chromium/patches/chromium-28.0.1500.71-avoid-std-string-copying-in-GetFileNameInWhitelist.patch deleted file mode 100644 index 7b6729aa397..00000000000 --- a/srcpkgs/chromium/patches/chromium-28.0.1500.71-avoid-std-string-copying-in-GetFileNameInWhitelist.patch +++ /dev/null @@ -1,49 +0,0 @@ -# Fix deadlock related to the GPU sandbox when tcmalloc isn't used -# https://code.google.com/p/chromium/issues/detail?id=255063 -# https://bugs.gentoo.org/show_bug.cgi?id=471198#c23 - -diff --git a/sandbox/linux/services/broker_process.cc b/sandbox/linux/services/broker_process.cc -index d2302ea098215c8188eb74b0d36da37506ff302a..7999e77fa34fcef4ad8575fa905d66f645df6986 100644 ---- sandbox/linux/services/broker_process.cc -+++ sandbox/linux/services/broker_process.cc -@@ -53,7 +53,7 @@ static const int kCurrentProcessOpenFlagsMask = O_CLOEXEC; - // async signal safe if |file_to_open| is NULL. - // TODO(jln): assert signal safety. - bool GetFileNameInWhitelist(const std::vector& allowed_file_names, -- const std::string& requested_filename, -+ const char* requested_filename, - const char** file_to_open) { - if (file_to_open && *file_to_open) { - // Make sure that callers never pass a non-empty string. In case callers -@@ -62,13 +62,17 @@ bool GetFileNameInWhitelist(const std::vector& allowed_file_names, - RAW_LOG(FATAL, "*file_to_open should be NULL"); - return false; - } -+ -+ // Look for |requested_filename| in |allowed_file_names|. -+ // We don't use ::find() because it takes a std::string and -+ // the conversion allocates memory. - std::vector::const_iterator it; -- it = std::find(allowed_file_names.begin(), allowed_file_names.end(), -- requested_filename); -- if (it < allowed_file_names.end()) { // requested_filename was found? -- if (file_to_open) -- *file_to_open = it->c_str(); -- return true; -+ for (it = allowed_file_names.begin(); it != allowed_file_names.end(); it++) { -+ if (strcmp(requested_filename, it->c_str()) == 0) { -+ if (file_to_open) -+ *file_to_open = it->c_str(); -+ return true; -+ } - } - return false; - } -@@ -393,6 +397,7 @@ void BrokerProcess::AccessFileForIPC(const std::string& requested_filename, - const char* file_to_access = NULL; - const bool safe_to_access_file = GetFileNameIfAllowedToAccess( - requested_filename.c_str(), mode, &file_to_access); -+ - if (safe_to_access_file) { - CHECK(file_to_access); - int access_ret = access(file_to_access, mode); diff --git a/srcpkgs/chromium/patches/gl_surface_egl.cc.patch b/srcpkgs/chromium/patches/gl_surface_egl.cc.patch new file mode 100644 index 00000000000..0d58e342ca9 --- /dev/null +++ b/srcpkgs/chromium/patches/gl_surface_egl.cc.patch @@ -0,0 +1,13 @@ +Fix -fpermissive error: cast GetNativeDisplay() to the type it's expecting. + +--- ui/gl/gl_surface_egl.cc.orig 2013-10-03 10:24:02.101296370 +0200 ++++ ui/gl/gl_surface_egl.cc 2013-10-03 10:24:17.093238232 +0200 +@@ -282,7 +282,7 @@ EGLConfig NativeViewGLSurfaceEGL::GetCon + // Get a config compatible with the window + DCHECK(window_); + XWindowAttributes win_attribs; +- if (!XGetWindowAttributes(GetNativeDisplay(), window_, &win_attribs)) { ++ if (!XGetWindowAttributes((Display *)GetNativeDisplay(), window_, &win_attribs)) { + return NULL; + } + diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template index 5c21d44c17e..767cee5b19f 100644 --- a/srcpkgs/chromium/template +++ b/srcpkgs/chromium/template @@ -1,16 +1,12 @@ # Template file for 'chromium' pkgname=chromium #See http://www.chromium.org/developers/calendar for the latest version -version=29.0.1547.62 +version=30.0.1599.66 revision=1 short_desc="Google's attempt at creating a safer, faster, and more stable browser" maintainer="Juan RP " homepage="http://www.chromium.org/" license="BSD" -_url_base="http://commondatastorage.googleapis.com" -distfiles="${_url_base}/${pkgname}-browser-official/${pkgname}-${version}.tar.xz" -checksum="a651e77f7fc7f3ef89757cc9cd0b19a92e69f77e1c5a97079e54cc834465a751" - long_desc=" Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all Internet users to experience the web. @@ -19,19 +15,59 @@ long_desc=" (name and logo) with very few additions such as usage tracking and an auto-updater system." +_url_base="https://commondatastorage.googleapis.com" +_toolchains_rev=12029 + +create_srcdir=yes + +distfiles=" + ${_url_base}/${pkgname}-browser-official/${pkgname}-${version}.tar.xz + ${_url_base}/nativeclient-archive2/toolchain/${_toolchains_rev}/naclsdk_linux_x86.tgz + ${_url_base}/nativeclient-archive2/toolchain/${_toolchains_rev}/naclsdk_pnacl_linux_x86.tgz + ${_url_base}/nativeclient-archive2/toolchain/${_toolchains_rev}/naclsdk_pnacl_translator.tgz + ${_url_base}/nativeclient-archive2/toolchain/${_toolchains_rev}/naclsdk_pnacl_translator.tgz.sha1hash" +checksum=" + 8fe8262fd69b59c759916d17eaf4225d1d5b64c468629cb9a684144d3cd15724 + 641e2acf0e755bfe052016164e9e0198104130b612a042eacf259a2f2630d6cd + 6ce53b1af8fef34c1557c7fbb764cfbca29cb70b8ee3367746a31976cf115e01 + 0b7afcbad1461336e7062d7c8d64e67e670a1fce07214e24313204af1f3a5a70 + d6c5ed767ee9ee4e92b4de958cd32b0152783f170c1483fe99d2199fc2623813" +skip_extraction=" + naclsdk_linux_x86.tgz + naclsdk_pnacl_linux_x86.tgz + naclsdk_pnacl_translator.tgz + naclsdk_pnacl_translator.tgz.sha1hash" + hostmakedepends="which yasm python pkg-config perl gperf bison" makedepends="libpng-devel>=1.6 gtk+-devel nss-devel GConf-devel pciutils-devel libXi-devel libgcrypt-devel libgnome-keyring-devel cups-devel elfutils-devel libXcomposite-devel speech-dispatcher-devel libXrandr-devel mit-krb5-devel libXScrnSaver-devel alsa-lib-devel icu-devel protobuf-devel snappy-devel libxml2-devel libxslt-devel opus-devel pulseaudio-devel nss-devel - libflac-devel speex-devel libusb-devel libmtp-devel v8-devel>=3.19.18.4 + libXcursor-devel libflac-devel speex-devel libmtp-devel v8-devel>=3.20 libjpeg-turbo-devel libevent-devel json-c-devel re2-devel harfbuzz-devel libwebp-devel minizip-devel jsoncpp-devel zlib-devel hwids" +if [ "$XBPS_MACHINE" = "x86_64" ]; then + makedepends+=" gcc-c++-multilib" +fi + do_configure() { local conf="" + # XXX xtraeme: fix gcc{,-c++}-multilib instead. + ldconfig &>/dev/null + + mkdir native_client/toolchain/{.tars,pnacl_translator} + ln -sf ${XBPS_SRCDISTDIR}/${pkgver%_*}/naclsdk_linux_x86.tgz \ + native_client/toolchain/.tars/naclsdk_linux_x86.tgz + ln -sf ${XBPS_SRCDISTDIR}/${pkgver%_*}/naclsdk_pnacl_linux_x86.tgz \ + native_client/toolchain/.tars/naclsdk_pnacl_linux_x86.tgz + ln -sf ${XBPS_SRCDISTDIR}/${pkgver%_*}/naclsdk_pnacl_translator.tgz \ + native_client/toolchain/.tars/naclsdk_pnacl_translator.tgz + ln -sf ${XBPS_SRCDISTDIR}/${pkgver%_*}/naclsdk_pnacl_translator.tgz.sha1hash \ + native_client/toolchain/pnacl_translator/SOURCE_SHA1 + export LD="$CXX" # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) @@ -44,22 +80,13 @@ do_configure() { # Never tell the build system to "enable" SSE2, it has a few unexpected issues. conf+=" -Ddisable_sse2=1" - # Disable glibc Native Client toolchain, we don't need it (bug #417019). + # Disable glibc Native Client toolchain. conf+=" -Ddisable_glibc=1" - # TODO: disable pnacl - conf+=" -Ddisable_pnacl=1" - - # TODO: disable nacl - conf+=" -Ddisable_nacl=1" - - # It would be awkward for us to tar the toolchain and get it untarred again - # during the build. - conf+=" -Ddisable_newlib_untar=1" - # Use system-provided libraries. # TODO: use_system_hunspell (upstream changes needed). - # TODO: use_system_libsrtp (bug #459932). + # TODO: use_system_libsrtp. + # TODO: use_system_libusb (http://crbug.com/266149). # TODO: use_system_ssl (http://crbug.com/58087). # TODO: use_system_sqlite (http://crbug.com/22208). conf+=" @@ -71,7 +98,6 @@ do_configure() { -Duse_system_libevent=1 -Duse_system_libjpeg=1 -Duse_system_libpng=1 - -Duse_system_libusb=1 -Duse_system_libwebp=1 -Duse_system_libxml=1 -Duse_system_libxslt=1 @@ -105,9 +131,6 @@ do_configure() { # TODO: use the file at run time instead of effectively compiling it in. conf+=" -Dusb_ids_path=/usr/share/hwdata/usb.ids" - # Enable SUID sandbox. - conf+=" -Dlinux_sandbox_path=/usr/lib/chromium/chromium-sandbox" - # Never use bundled gold binary. Disable gold linker flags for now. conf+=" -Dlinux_use_gold_binary=0 -Dlinux_use_gold_flags=0" @@ -125,6 +148,9 @@ do_configure() { # Disable tcmalloc. conf+=" -Dlinux_use_tcmalloc=0" + # Save space by removing DLOG and DCHECK messages (about 6% reduction). + conf+=" -Dlogging_like_official_build=1" + build/linux/unbundle/replace_gyp_files.py ${conf} build/gyp_chromium --depth=. -f make ${conf} -Drelease_extra_cflags="$CFLAGS" } @@ -135,9 +161,11 @@ do_build() { do_install() { vinstall out/Release/chrome 755 usr/lib/${pkgname} ${pkgname} - vinstall out/Release/chrome_sandbox 4755 usr/lib/${pkgname} ${pkgname}-sandbox + vinstall out/Release/chrome_sandbox 4755 usr/lib/${pkgname} chrome-sandbox - cp out/Release/{*.pak,libffmpegsumo.so} ${DESTDIR}/usr/lib/chromium + cp out/Release/{*.pak,libffmpegsumo.so,nacl_helper{,_bootstrap}} \ + out/Release/{libppGoogleNaClPluginChrome.so,nacl_irt_*.nexe} \ + ${DESTDIR}/usr/lib/chromium cp -a out/Release/locales ${DESTDIR}/usr/lib/chromium @@ -159,6 +187,7 @@ do_install() { chromium_package() { depends="desktop-file-utils hicolor-icon-theme" + nostrip_files="nacl_irt_x86_64.nexe nacl_irt_x86_32.nexe" pkg_install() { vmove all }