diff options
author | Olivier Tilloy <olivier.tilloy@canonical.com> | 2020-07-17 13:33:08 +0200 |
---|---|---|
committer | Olivier Tilloy <olivier.tilloy@canonical.com> | 2020-07-17 13:33:08 +0200 |
commit | 68b0c233132126c1d7b07297a56557872fd56fb1 (patch) | |
tree | c3066672fd933b72fc48283ad7fa24b4534366ae | |
parent | d8f8bf958810e0b48a1dd9e480fbe2def7e8f9f1 (diff) | |
parent | 7006e1380ec753e98ce3f066c5a0e642842dd515 (diff) |
Merge branch 'stable' into enable-vaapi
-rw-r--r-- | build/patches/build-script-fix-bootstrap-targets.patch | 2 | ||||
-rw-r--r-- | build/patches/build-script-predownload-pgo-training-source.patch | 6 | ||||
-rw-r--r-- | build/patches/clang-build-only-needed-targets.patch | 2 | ||||
-rw-r--r-- | build/patches/default-allocator | 2 | ||||
-rw-r--r-- | build/patches/search-credit.patch | 8 | ||||
-rw-r--r-- | build/patches/series | 1 | ||||
-rw-r--r-- | build/patches/set-rpath-on-chromium-executables.patch | 12 | ||||
-rw-r--r-- | build/patches/snap_useragent.patch | 28 | ||||
-rw-r--r-- | build/patches/title-bar-default-system.patch-v35 | 2 | ||||
-rw-r--r-- | build/patches/widevine-enable-version-string.patch | 6 | ||||
-rwxr-xr-x | launcher/chromium.launcher | 8 | ||||
-rw-r--r-- | snapcraft.yaml | 12 | ||||
-rw-r--r-- | tests/data/chromium-version.html | 2 |
13 files changed, 30 insertions, 61 deletions
diff --git a/build/patches/build-script-fix-bootstrap-targets.patch b/build/patches/build-script-fix-bootstrap-targets.patch index 29173f9..eb307b3 100644 --- a/build/patches/build-script-fix-bootstrap-targets.patch +++ b/build/patches/build-script-fix-bootstrap-targets.patch @@ -3,7 +3,7 @@ Author: Olivier Tilloy <olivier.tilloy@canonical.com> --- a/tools/clang/scripts/build.py +++ b/tools/clang/scripts/build.py -@@ -529,9 +529,7 @@ def main(): +@@ -578,9 +578,7 @@ def main(): projects += ';libcxx;compiler-rt' bootstrap_targets = 'X86' diff --git a/build/patches/build-script-predownload-pgo-training-source.patch b/build/patches/build-script-predownload-pgo-training-source.patch index 8b31380..a46d1f8 100644 --- a/build/patches/build-script-predownload-pgo-training-source.patch +++ b/build/patches/build-script-predownload-pgo-training-source.patch @@ -3,7 +3,7 @@ Author: Olivier Tilloy <olivier.tilloy@canonical.com> --- a/tools/clang/scripts/build.py +++ b/tools/clang/scripts/build.py -@@ -321,6 +321,15 @@ def CopyLibstdcpp(args, build_dir): +@@ -366,6 +366,15 @@ def CopyLibstdcpp(args, build_dir): CopyFile(libstdcpp, os.path.join(build_dir, d)) @@ -19,7 +19,7 @@ Author: Olivier Tilloy <olivier.tilloy@canonical.com> def gn_arg(v): if v == 'True': return True -@@ -390,6 +399,9 @@ def main(): +@@ -435,6 +444,9 @@ def main(): print('for general Fuchsia build instructions.') return 1 @@ -29,7 +29,7 @@ Author: Olivier Tilloy <olivier.tilloy@canonical.com> # Don't buffer stdout, so that print statements are immediately flushed. sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) -@@ -655,8 +667,7 @@ def main(): +@@ -704,8 +716,7 @@ def main(): # from PGO as well. Perhaps the training could be done asynchronously by # dedicated buildbots that upload profiles to the cloud. training_source = 'pgo_training-1.ii' diff --git a/build/patches/clang-build-only-needed-targets.patch b/build/patches/clang-build-only-needed-targets.patch index aa194c0..a55b93a 100644 --- a/build/patches/clang-build-only-needed-targets.patch +++ b/build/patches/clang-build-only-needed-targets.patch @@ -3,7 +3,7 @@ Author: Olivier Tilloy <olivier.tilloy@canonical.com> --- a/tools/clang/scripts/build.py +++ b/tools/clang/scripts/build.py -@@ -447,7 +447,7 @@ def main(): +@@ -492,7 +492,7 @@ def main(): targets = 'AArch64;ARM;Mips;PowerPC;SystemZ;WebAssembly;X86' diff --git a/build/patches/default-allocator b/build/patches/default-allocator index 8eb5927..39e326a 100644 --- a/build/patches/default-allocator +++ b/build/patches/default-allocator @@ -10,7 +10,7 @@ # The debug CRT on Windows has some debug features that are incompatible with @@ -20,7 +20,7 @@ if (is_android || is_mac || is_ios || is - if ((is_linux || is_android || is_mac || + if ((is_linux || is_android || is_mac || is_ios || (is_win && !is_component_build && !is_debug)) && !is_asan && !is_hwasan && !is_lsan && !is_tsan && !is_msan) { - _default_use_allocator_shim = true diff --git a/build/patches/search-credit.patch b/build/patches/search-credit.patch index 6de3af4..aaa5029 100644 --- a/build/patches/search-credit.patch +++ b/build/patches/search-credit.patch @@ -23,7 +23,7 @@ Author: Chad Miller <chad.miller@canonical.com> "type": "SEARCH_ENGINE_DUCKDUCKGO", --- a/components/search_engines/template_url.cc +++ b/components/search_engines/template_url.cc -@@ -958,6 +958,9 @@ std::string TemplateURLRef::HandleReplac +@@ -959,6 +959,9 @@ std::string TemplateURLRef::HandleReplac std::string url = parsed_url_; @@ -33,7 +33,7 @@ Author: Chad Miller <chad.miller@canonical.com> // replacements_ is ordered in ascending order, as such we need to iterate // from the back. for (auto i = replacements_.rbegin(); i != replacements_.rend(); ++i) { -@@ -1028,6 +1031,7 @@ std::string TemplateURLRef::HandleReplac +@@ -1029,6 +1032,7 @@ std::string TemplateURLRef::HandleReplac case GOOGLE_BASE_URL: DCHECK(!i->is_post_param); @@ -41,7 +41,7 @@ Author: Chad Miller <chad.miller@canonical.com> HandleReplacement( std::string(), search_terms_data.GoogleBaseURLValue(), *i, &url); break; -@@ -1122,7 +1126,8 @@ std::string TemplateURLRef::HandleReplac +@@ -1123,7 +1127,8 @@ std::string TemplateURLRef::HandleReplac case GOOGLE_SEARCH_CLIENT: { DCHECK(!i->is_post_param); @@ -51,7 +51,7 @@ Author: Chad Miller <chad.miller@canonical.com> if (!client.empty()) HandleReplacement("client", client, *i, &url); break; -@@ -1251,6 +1256,13 @@ std::string TemplateURLRef::HandleReplac +@@ -1252,6 +1257,13 @@ std::string TemplateURLRef::HandleReplac } } diff --git a/build/patches/series b/build/patches/series index 02ec160..d2460ac 100644 --- a/build/patches/series +++ b/build/patches/series @@ -1,6 +1,5 @@ title-bar-default-system.patch-v35 search-credit.patch -snap_useragent.patch #configuration-directory.patch disable-sse2 widevine-enable-version-string.patch diff --git a/build/patches/set-rpath-on-chromium-executables.patch b/build/patches/set-rpath-on-chromium-executables.patch index 0e54991..ff3416e 100644 --- a/build/patches/set-rpath-on-chromium-executables.patch +++ b/build/patches/set-rpath-on-chromium-executables.patch @@ -4,15 +4,15 @@ Bug-Ubuntu: https://launchpad.net/bugs/1718885 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -281,6 +281,8 @@ if (!is_android && !is_mac) { +@@ -257,6 +257,8 @@ if (!is_android && !is_mac) { + ldflags += [ "-Wl,--version-script=" + rebase_path(version_script, root_build_dir) ] } - -+ configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] + - if (use_x11) { - configs += [ - "//build/config/linux:x11", ++ configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] + } + + if (is_chromeos || is_win) { --- a/tools/v8_context_snapshot/BUILD.gn +++ b/tools/v8_context_snapshot/BUILD.gn @@ -100,6 +100,10 @@ if (use_v8_context_snapshot) { diff --git a/build/patches/snap_useragent.patch b/build/patches/snap_useragent.patch deleted file mode 100644 index e6e0bd5..0000000 --- a/build/patches/snap_useragent.patch +++ /dev/null @@ -1,28 +0,0 @@ -Description: Add "Chromium" and "snap" to the user-agent text. -Author: Olivier Tilloy <olivier.tilloy@canonical.com> - ---- a/content/common/user_agent.cc -+++ b/content/common/user_agent.cc -@@ -236,13 +236,21 @@ std::string BuildUserAgentFromOSAndProdu - // Derived from Safari's UA string. - // This is done to expose our product name in a manner that is maximally - // compatible with Safari, we hope!! -+ -+ // We want to also add Chromium -+ std::string realproduct = product.c_str(); -+ size_t pos; -+ if ((pos = realproduct.find("/")) != std::string::npos) -+ realproduct.replace(0, pos, "Chromium"); -+ - std::string user_agent; - base::StringAppendF( - &user_agent, -- "Mozilla/5.0 (%s) AppleWebKit/%d.%d (KHTML, like Gecko) %s Safari/%d.%d", -+ "Mozilla/5.0 (%s) AppleWebKit/%d.%d (KHTML, like Gecko) snap %s %s Safari/%d.%d", - os_info.c_str(), - WEBKIT_VERSION_MAJOR, - WEBKIT_VERSION_MINOR, -+ realproduct.c_str(), - product.c_str(), - WEBKIT_VERSION_MAJOR, - WEBKIT_VERSION_MINOR); diff --git a/build/patches/title-bar-default-system.patch-v35 b/build/patches/title-bar-default-system.patch-v35 index 3ed3f40..ed27d0c 100644 --- a/build/patches/title-bar-default-system.patch-v35 +++ b/build/patches/title-bar-default-system.patch-v35 @@ -3,7 +3,7 @@ Description: Never default to using the custom title bar. Chromium should --- a/ui/base/x/x11_util.cc +++ b/ui/base/x/x11_util.cc -@@ -1008,6 +1008,8 @@ bool HasWMSpecProperty(const base::flat_ +@@ -951,6 +951,8 @@ bool HasWMSpecProperty(const base::flat_ } bool GetCustomFramePrefDefault() { diff --git a/build/patches/widevine-enable-version-string.patch b/build/patches/widevine-enable-version-string.patch index 98270e8..338e3ee 100644 --- a/build/patches/widevine-enable-version-string.patch +++ b/build/patches/widevine-enable-version-string.patch @@ -13,7 +13,7 @@ Author: Olivier Tilloy <olivier.tilloy@canonical.com> #endif // WIDEVINE_CDM_VERSION_H_ --- a/chrome/common/chrome_content_client.cc +++ b/chrome/common/chrome_content_client.cc -@@ -387,7 +387,7 @@ std::unique_ptr<content::CdmInfo> Create +@@ -388,7 +388,7 @@ std::unique_ptr<content::CdmInfo> Create #endif // (BUILDFLAG(BUNDLE_WIDEVINE_CDM) || // BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)) && defined(OS_LINUX) @@ -22,7 +22,7 @@ Author: Olivier Tilloy <olivier.tilloy@canonical.com> // On Linux/ChromeOS we have to preload the CDM since it uses the zygote // sandbox. On Windows and Mac, the bundled CDM is handled by the component // updater. -@@ -455,7 +455,7 @@ content::CdmInfo* GetBundledWidevine() { +@@ -456,7 +456,7 @@ content::CdmInfo* GetBundledWidevine() { }()); return s_cdm_info->get(); } @@ -31,7 +31,7 @@ Author: Olivier Tilloy <olivier.tilloy@canonical.com> #if BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) && defined(OS_LINUX) // This code checks to see if a component updated Widevine CDM can be found. If -@@ -613,7 +613,7 @@ void ChromeContentClient::AddContentDecr +@@ -614,7 +614,7 @@ void ChromeContentClient::AddContentDecr // case both versions will be the same and point to the same directory, so // it doesn't matter which one is loaded. content::CdmInfo* bundled_widevine = nullptr; diff --git a/launcher/chromium.launcher b/launcher/chromium.launcher index 7efa992..0e0de2d 100755 --- a/launcher/chromium.launcher +++ b/launcher/chromium.launcher @@ -53,14 +53,8 @@ fi # default password store for the current desktop environment. # Ref: https://launchpad.net/bugs/1763829 PASSWORD_STORE=basic -dbus-send --session --dest=org.freedesktop.secrets /org/freedesktop/secrets --print-reply org.freedesktop.DBus.Properties.GetAll string:'org.freedesktop.Secret.Service' >/dev/null 2>&1 -if [ "$?" -eq "0" ]; then +if snapctl is-connected password-manager-service; then PASSWORD_STORE= # an empty string means detect the store based on the current DE (os_crypt::SelectBackend()) -else - dbus-send --session --dest=org.kde.kwalletd5 /modules/kwalletd5 --print-reply org.freedesktop.DBus.Properties.GetAll string:'org.kde.KWallet' >/dev/null 2>&1 - if [ "$?" -eq "0" ]; then - PASSWORD_STORE= # an empty string means detect the store based on the current DE (os_crypt::SelectBackend()) - fi fi # Allow chromium to look for the flash player plugin inside the snap's diff --git a/snapcraft.yaml b/snapcraft.yaml index c4d687c..3c82cfc 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -6,6 +6,8 @@ description: | stable way for all Internet users to experience the web. confinement: strict base: core18 +assumes: + - snapd2.43 # for 'snapctl is-connected', used in chromium.launcher apps: chromium: @@ -19,6 +21,7 @@ apps: plugs: - audio-playback - audio-record + - bluez # for Web Bluetooth (https://launchpad.net/bugs/1887201) - camera - cups-control - desktop @@ -34,7 +37,6 @@ apps: - raw-usb # for WebUSB (https://launchpad.net/bugs/1780678) - removable-media - screen-inhibit-control - - system-packages-doc - u2f-devices - unity7 # required for xdg-open to work - upower-observe @@ -49,6 +51,7 @@ apps: # executes chromium it inherits the correct set of permissions - audio-playback - audio-record + - bluez - camera - cups-control - desktop @@ -64,7 +67,6 @@ apps: - raw-usb - removable-media - screen-inhibit-control - - system-packages-doc - u2f-devices - unity7 - upower-observe @@ -113,8 +115,8 @@ parts: chromium: plugin: nil - source: https://commondatastorage.googleapis.com/chromium-browser-official/chromium-83.0.4103.116.tar.xz - source-checksum: sha512/dbd92fb04183ec1402401388f70b18b95040083c9ea8bf2ea6b1692fddc375b090968b13afb010ebf412b480b34747eb2c82709adbeb386cccf60b972f23254f + source: https://commondatastorage.googleapis.com/chromium-browser-official/chromium-84.0.4147.89.tar.xz + source-checksum: sha512/cc207a5f09a89e42bc12fd491d5d0ef11c04daaa324aa696d2f8a37679b8f2171d3b265296968c3312e158b0fd2c059e12727a7463d3bd2f640d5bbd43c4f676 after: - chromium-build - gtk3-locales @@ -169,6 +171,8 @@ parts: - libpam0g-dev - libffi-dev - libgbm-dev + - python-xcbgen + - xcb-proto - uuid-dev - chrpath - yasm diff --git a/tests/data/chromium-version.html b/tests/data/chromium-version.html index ad88327..3917a7c 100644 --- a/tests/data/chromium-version.html +++ b/tests/data/chromium-version.html @@ -3,7 +3,7 @@ <div id="chromium_version"></div> <script> document.getElementById("chromium_version").innerHTML = - /Chromium\/([0-9.]+)/.exec(navigator.userAgent)[1]; + /Chrome\/([0-9.]+)/.exec(navigator.userAgent)[1]; </script> </body> </html> |