[arch-commits] Commit in chromium/trunk (PKGBUILD fetch-chromium-release)

Evangelos Foutras foutrelis at gemini.archlinux.org
Tue Jul 5 08:42:23 UTC 2022


    Date: Tuesday, July 5, 2022 @ 08:42:23
  Author: foutrelis
Revision: 449898

upgpkg: chromium 103.0.5060.114-1: new upstream release

Add (and use) script to fetch Chromium sources from Git to work around
unavailability of official source tarballs (https://crbug.com/1341418).

Added:
  chromium/trunk/fetch-chromium-release
Modified:
  chromium/trunk/PKGBUILD

------------------------+
 PKGBUILD               |   21 +++++++++++++++------
 fetch-chromium-release |   42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-07-05 07:01:35 UTC (rev 449897)
+++ PKGBUILD	2022-07-05 08:42:23 UTC (rev 449898)
@@ -4,10 +4,11 @@
 # Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
 
 pkgname=chromium
-pkgver=103.0.5060.53
+pkgver=103.0.5060.114
 pkgrel=1
 _launcher_ver=8
 _gcc_patchset=4
+_manual_clone=1
 pkgdesc="A web browser built for speed, simplicity, and security"
 arch=('x86_64')
 url="https://www.chromium.org/Home"
@@ -22,7 +23,7 @@
             'org.freedesktop.secrets: password storage backend on GNOME / Xfce'
             'kwallet: support for storing passwords in KWallet on Plasma')
 options=('debug' '!lto') # Chromium adds its own flags for ThinLTO
-source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz
+source=(https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$pkgver.tar.xz
         https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz
         https://github.com/stha09/chromium-patches/releases/download/chromium-${pkgver%%.*}-patchset-$_gcc_patchset/chromium-${pkgver%%.*}-patchset-$_gcc_patchset.tar.xz
         enable-GlobalMediaControlsCastStartStop.patch
@@ -30,7 +31,7 @@
         sql-make-VirtualCursor-standard-layout-type.patch
         remove-no-opaque-pointers-flag.patch
         use-oauth2-client-switches-as-default.patch)
-sha256sums=('0ecbae14670506da90c8bf744f83f52a64a5fff0765c2e2e066b0e68b805b101'
+sha256sums=('d359a415eca7beceddd1b06bb5b5b6a09da9c778ca37cfa4efeaeaa8691bfd52'
             '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a'
             'fed11a8987d9f9baa04457fb114f8f7fdb800300a3780927020865bcc43e4f52'
             '779fb13f2494209d3a7f1f23a823e59b9dded601866d3ab095937a1a04e19ac6'
@@ -39,6 +40,11 @@
             '00c16ce83ea4ca924a50fa0cfc2b2a4d744c722f363b065323e6ba0fcbac45a5'
             'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711')
 
+if (( _manual_clone )); then
+  source[0]=fetch-chromium-release
+  makedepends+=('python-httplib2' 'python-pyparsing' 'python-six')
+fi
+
 # Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
 # Keys are the names in the above script; values are the dependencies in Arch
 declare -gA _system_libs=(
@@ -74,7 +80,10 @@
 _google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
 
 prepare() {
-  cd "$srcdir/$pkgname-$pkgver"
+  if (( _manual_clone )); then
+    ./fetch-chromium-release $pkgver
+  fi
+  cd chromium-$pkgver
 
   # Allow building against system libraries in official builds
   sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
@@ -134,7 +143,7 @@
 build() {
   make -C chromium-launcher-$_launcher_ver
 
-  cd "$srcdir/$pkgname-$pkgver"
+  cd chromium-$pkgver
 
   export CC=clang
   export CXX=clang++
@@ -205,7 +214,7 @@
   install -Dm644 LICENSE \
     "$pkgdir/usr/share/licenses/chromium/LICENSE.launcher"
 
-  cd "$srcdir/$pkgname-$pkgver"
+  cd ../chromium-$pkgver
 
   install -D out/Release/chrome "$pkgdir/usr/lib/chromium/chromium"
   install -D out/Release/chromedriver.unstripped "$pkgdir/usr/bin/chromedriver"

Added: fetch-chromium-release
===================================================================
--- fetch-chromium-release	                        (rev 0)
+++ fetch-chromium-release	2022-07-05 08:42:23 UTC (rev 449898)
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+set -e
+
+readonly VERSION=$1
+if [[ -z $VERSION ]]; then
+  echo >&2 'No version given as an argument'
+  exit 1
+fi
+
+mkdir chromium-checkout
+cd chromium-checkout
+cat >.gclient <<EOF
+solutions = [
+  {
+    "name": "src",
+    "url": "https://chromium.googlesource.com/chromium/src.git",
+    "managed": False,
+    "custom_deps": {},
+    "custom_vars": {},
+  },
+]
+EOF
+
+git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools
+export PATH+=":$PWD/depot_tools" DEPOT_TOOLS_UPDATE=0
+export VPYTHON_BYPASS='manually managed python not supported by chrome operations'
+
+git clone -b $VERSION --depth=2 https://chromium.googlesource.com/chromium/src
+gclient sync --no-history --nohooks
+src/build/util/lastchange.py -o src/build/util/LASTCHANGE
+src/build/util/lastchange.py -m SKIA_COMMIT_HASH \
+  -s src/third_party/skia --header src/skia/ext/skia_commit_hash.h
+src/build/util/lastchange.py -m GPU_LISTS_VERSION \
+  --revision-id-only --header src/gpu/config/gpu_lists_version.h
+src/tools/update_pgo_profiles.py --target=linux update \
+  --gs-url-base=chromium-optimization-profiles/pgo_profiles
+download_from_google_storage.py --no_resume --extract --no_auth \
+  --bucket chromium-nodejs -s src/third_party/node/node_modules.tar.gz.sha1
+
+find src/third_party/jdk/{current,extras} -type f -delete
+mv src ../chromium-$VERSION


Property changes on: chromium/trunk/fetch-chromium-release
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property


More information about the arch-commits mailing list