Merge pull request #132678 from primeos/chromiumDev

chromiumDev: Fix the build
This commit is contained in:
Michael Weiss 2021-08-04 18:35:54 +02:00 committed by GitHub
commit 71df9ebd46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 19 deletions

View File

@ -267,7 +267,6 @@ let
clang_use_chrome_plugins = false;
blink_symbol_level = 0;
symbol_level = 0;
fieldtrial_testing_like_official_build = true;
# Google API key, see: https://www.chromium.org/developers/how-tos/api-keys
# Note: The API key is for NixOS/nixpkgs use ONLY.
@ -288,6 +287,10 @@ let
enable_widevine = true;
# Provides the enable-webrtc-pipewire-capturer flag to support Wayland screen capture:
rtc_use_pipewire = true;
} // optionalAttrs (!chromiumVersionAtLeast "94") {
fieldtrial_testing_like_official_build = true;
} // optionalAttrs (chromiumVersionAtLeast "94") {
disable_fieldtrial_testing_config = true;
} // optionalAttrs proprietaryCodecs {
# enable support for the H.264 codec
proprietary_codecs = true;

View File

@ -1,5 +1,5 @@
{ newScope, config, stdenv, fetchurl, makeWrapper
, llvmPackages_11, llvmPackages_12, ed, gnugrep, coreutils, xdg-utils
, llvmPackages_12, llvmPackages_13, ed, gnugrep, coreutils, xdg-utils
, glib, gtk3, gnome, gsettings-desktop-schemas, gn, fetchgit
, libva, pipewire, wayland
, gcc, nspr, nss, runCommand
@ -19,7 +19,7 @@
}:
let
llvmPackages = llvmPackages_11;
llvmPackages = llvmPackages_12;
stdenv = llvmPackages.stdenv;
callPackage = newScope chromium;
@ -38,9 +38,9 @@ let
inherit (upstream-info.deps.gn) url rev sha256;
};
});
} // lib.optionalAttrs (lib.versionAtLeast upstream-info.version "90") {
llvmPackages = llvmPackages_12;
stdenv = llvmPackages_12.stdenv;
} // lib.optionalAttrs (lib.versionAtLeast upstream-info.version "94") rec {
llvmPackages = llvmPackages_13;
stdenv = llvmPackages.stdenv;
});
browser = callPackage ./browser.nix { inherit channel enableWideVine ungoogled; };

View File

@ -2,8 +2,10 @@
#!nix-shell -i python3 -p python3Packages.feedparser python3Packages.requests
# This script prints the Git commit message for stable channel updates.
# Usage: ./get-commit-message.py [version]
import re
import sys
import textwrap
from collections import OrderedDict
@ -13,19 +15,29 @@ import requests
feed = feedparser.parse('https://chromereleases.googleblog.com/feeds/posts/default')
html_tags = re.compile(r'<[^>]+>')
target_version = sys.argv[1] if len(sys.argv) == 2 else None
for entry in feed.entries:
if entry.title != 'Stable Channel Update for Desktop':
continue
url = requests.get(entry.link).url.split('?')[0]
if entry.title != 'Stable Channel Update for Desktop':
if target_version and entry.title == '':
# Workaround for a special case (Chrome Releases bug?):
if not 'the-stable-channel-has-been-updated-to' in url:
continue
else:
continue
content = entry.content[0].value
content = html_tags.sub('', content) # Remove any HTML tags
if re.search(r'Linux', content) is None:
continue
#print(url) # For debugging purposes
version = re.search(r'\d+(\.\d+){3}', content).group(0)
print('chromium: TODO -> ' + version)
print('\n' + url)
if target_version:
if version != target_version:
continue
else:
print('chromium: TODO -> ' + version + '\n')
print(url)
if fixes := re.search(r'This update includes .+ security fixes\.', content).group(0):
zero_days = re.search(r'Google is aware( of reports)? that .+ in the wild\.', content)
if zero_days:
@ -35,4 +47,7 @@ for entry in feed.entries:
cve_list = list(OrderedDict.fromkeys(cve_list)) # Remove duplicates but preserve the order
cve_string = ' '.join(cve_list)
print("\nCVEs:\n" + '\n'.join(textwrap.wrap(cve_string, width=72)))
break # We only care about the most recent stable channel update
sys.exit(0) # We only care about the most recent stable channel update
print("Error: No match.")
sys.exit(1)

View File

@ -222,14 +222,8 @@ if len(sys.argv) == 2 and sys.argv[1] == '--commit':
attr_name = channel_name_to_attr_name(channel_name)
commit_message = f'{attr_name}: {version_old} -> {version_new}'
if channel_name == 'stable':
body = subprocess.check_output([COMMIT_MESSAGE_SCRIPT]).decode('utf-8')
prefix = f'chromium: TODO -> {version_new}'
if not body.startswith(prefix):
print("Error: Couldn't fetch the the release notes for the following update:")
print(commit_message)
sys.exit(1)
body = body.removeprefix(prefix)
commit_message += body
body = subprocess.check_output([COMMIT_MESSAGE_SCRIPT, version_new]).decode('utf-8')
commit_message += '\n\n' + body
subprocess.run(['git', 'add', JSON_PATH], check=True)
subprocess.run(['git', 'commit', '--file=-'], input=commit_message.encode(), check=True)
else: