Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package nodejs-electron for openSUSE:Factory checked in at 2022-08-09 15:27:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nodejs-electron (Old) and /work/SRC/openSUSE:Factory/.nodejs-electron.new.1521 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nodejs-electron" Tue Aug 9 15:27:04 2022 rev:30 rq:993728 version:19.0.11 Changes: -------- --- /work/SRC/openSUSE:Factory/nodejs-electron/nodejs-electron.changes 2022-08-02 22:09:06.217757216 +0200 +++ /work/SRC/openSUSE:Factory/.nodejs-electron.new.1521/nodejs-electron.changes 2022-08-09 15:27:29.833478582 +0200 @@ -1,0 +2,33 @@ +Fri Aug 5 13:52:55 UTC 2022 - Bruno Pitrus <brunopit...@hotmail.com> +- New upstream release 19.0.11 + * Fixed webContents.getUserAgent() incorrectly returning an empty string unless previously set. + * Disabled GPU acceleration on VMware on Linux. +- New upstream release 19.0.10 + * Added support for --ozone-platform-hint flag. + * Fixed inertial scroll is broken when the scrollable element has an overlay with pointer-events: none. +- Do not use non-free closure compiler JAR during compilation. +- Use system jpeg-xl and XNVCtrl also on Tumbleweed. +- Use system libyuv on Tumbleweed. + * libyuv.gn +- Make nodejs-electron-devel require zlib-devel instead of shipping own headers. + * no-zlib-headers.patch + * add -lz to LDFLAGS in electron-16-system-node-headers.patch +- Use system toolchain, incl. nasm, ply, flatc + * flatbuffers.gn + * system-nasm.patch + * system-pydeps.patch +- Thorough cleanup of various other third party libraries from source tarball. + * do-not-build-libvulkan.so.patch + * libsecret.gn + * node-system-icu.patch + * skia-system-vulkan-headers.patch + * system-six.patch + * system-usb_ids.patch + * Adjust system-gtest.patch to also account for the second googletest copy in electron_node +- Re-enable full debuginfo on x64 for everything except Blink and v8, which fails to build due to heavy template use. + * adjust chromium-102-compiler.patch + * nasm-generate-debuginfo.patch +- Fix build of EXPERIMENTAL ix86 and arm7hf ports by using the LLVM linker (lld) on these platforms. + * Note that ix86 requires SSE2 instructions (that means Pentium 4 / Pentium M / Atom or equivalent) + +------------------------------------------------------------------- Old: ---- electron-19.0.9.tar.xz New: ---- do-not-build-libvulkan.so.patch electron-19.0.11.tar.zst flatbuffers.gn libsecret.gn libyuv.gn nasm-generate-debuginfo.patch no-zlib-headers.patch node-system-icu.patch skia-system-vulkan-headers.patch system-nasm.patch system-pydeps.patch system-six.patch system-usb_ids.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nodejs-electron.spec ++++++ --- /var/tmp/diff_new_pack.3NjaBk/_old 2022-08-09 15:27:39.649506629 +0200 +++ /var/tmp/diff_new_pack.3NjaBk/_new 2022-08-09 15:27:39.653506641 +0200 @@ -26,12 +26,10 @@ # Do not provide libEGL.so, etc??? %define __provides_exclude ^lib.*\\.so.*$ +# Double DWZ memory limits +%define _dwz_low_mem_die_limit 20000000 +%define _dwz_max_die_limit 100000000 -# These ports now assemble correctly as of 19.0.5, -# but the linker gets out of memory (32-bit) -# causing build failure near the end -# Remove this block if you wish to fix it -ExcludeArch: %ix86 %arm #x86 requires SSE2 %ifarch %ix86 @@ -47,8 +45,10 @@ %bcond_without pipewire -%ifarch x86_64 %ix86 %arm +%ifarch x86_64 %arm #Use subzero as swiftshader backend instead of LLVM +#ix86 is also supposed to support subzero, but as of 19.0.9 we're getting linker error +#undefined symbol: void Ice::X8632::emitIASRegOpTyGPR<true, true>(Ice::Cfg const*, Ice::Type, Ice::Variable const*, Ice::Operand const*, Ice::X8632::AssemblerX8632::GPREmitterRegOp const&) %bcond_without subzero %else %bcond_with subzero @@ -76,7 +76,25 @@ %bcond_with clang +# Linker selection. GCC only. Default is BFD. +# arm64 reports relocation errors with BFD. +%ifarch x86_64 aarch64 %bcond_without gold +%else +%bcond_with gold +%endif + +# Both BFD and Gold run out of memory on 32-bit. +%ifarch %ix86 %arm +%bcond_without lld +%else +%bcond_with lld +%endif + +#Mold succeeds on ix86 but seems to produce corrupt binaries (no build-id) +%bcond_with mold + + %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150400 || 0%{?fedora} %bcond_without system_harfbuzz @@ -95,8 +113,14 @@ %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500 || 0%{?fedora_version} %bcond_without system_crc32c +%bcond_without system_nghttp2 +%bcond_without system_jxl +%bcond_without system_nvctrl %else %bcond_with system_crc32c +%bcond_with system_nghttp2 +%bcond_with system_jxl +%bcond_with system_nvctrl %endif %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500 || 0%{?fedora} >= 37 @@ -107,14 +131,9 @@ %bcond_without system_double_conversion %bcond_without system_jsoncpp -%bcond_without system_cares %bcond_without system_woff2 -%if 0%{?fedora} -%bcond_without system_nvctrl -%else -%bcond_with system_nvctrl -%endif + %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500 || 0%{?fedora} >= 37 %bcond_without system_spirv @@ -128,20 +147,21 @@ %bcond_with system_llvm %endif -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500 || 0%{?fedora_version} -%bcond_without system_nghttp2 +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500 +%bcond_without system_yuv %else -%bcond_with system_nghttp2 +%bcond_with system_yuv %endif %bcond_without system_tiff + %if 0%{?fedora} -%bcond_without system_jxl + %bcond_without system_llhttp %bcond_without system_histogram %else -%bcond_with system_jxl + %bcond_with system_llhttp %bcond_with system_histogram %endif @@ -175,18 +195,18 @@ # sqlite | third_party/sqlite | Fork. # srtp / srtp2 | third_party/libsrtp | Api matches neither version 1 nor 2 of this library. # uv | third_party/electron_node/deps/uv | Heavily modified version which is exposed as part of Electron's public ABI. -# yuv | third_party/libyuv | Version in Fedora (0-0.43.20201024git19d71f6) is too old. + Name: nodejs-electron -Version: 19.0.9 +Version: 19.0.11 Release: 0 Summary: Build cross platform desktop apps with JavaScript, HTML, and CSS License: MIT AND BSD-3-Clause AND LGPL-2.1-or-later Group: Productivity/Networking/Web/Browsers URL: https://github.com/electron/electron -Source0: %{mod_name}-%{version}.tar.xz +Source0: %{mod_name}-%{version}.tar.zst Source1: create_tarball.sh Source10: electron-launcher.sh Source11: electron.desktop @@ -224,6 +244,9 @@ Source47: vulkan-SPIRV-Headers.gn Source48: vulkan-SPIRV-Tools.gn Source49: woff2.gn +Source50: flatbuffers.gn +Source51: libsecret.gn +Source52: libyuv.gn # Reverse upstream changes to be able to build against system ffmpeg @@ -245,6 +268,8 @@ Patch49: abseil-remove-unused-targets.patch # from https://sources.debian.org/patches/chromium/103.0.5060.53-1/disable/catapult.patch/ Patch67: disable-catapult.patch +Patch68: do-not-build-libvulkan.so.patch +Patch69: nasm-generate-debuginfo.patch # PATCHES to use system libs Patch1002: chromium-system-libusb.patch @@ -277,6 +302,13 @@ Patch1065: base-system-nspr.patch Patch1066: system-gtest.patch Patch1067: breakpad-system-curl.patch +Patch1068: system-six.patch +Patch1069: system-usb_ids.patch +Patch1070: skia-system-vulkan-headers.patch +Patch1071: system-pydeps.patch +Patch1072: node-system-icu.patch +Patch1073: system-nasm.patch +Patch1074: no-zlib-headers.patch # PATCHES to fix interaction with third-party software Patch2004: chromium-gcc11.patch @@ -347,6 +379,10 @@ %endif BuildRequires: desktop-file-utils BuildRequires: fdupes +%if 0%{?fedora} +BuildRequires: flatbuffers-compiler +%endif +BuildRequires: flatbuffers-devel BuildRequires: git-core BuildRequires: gn >= 0.1807 BuildRequires: gperf @@ -354,8 +390,7 @@ BuildRequires: HdrHistogram_c-devel %endif BuildRequires: hicolor-icon-theme -# Java used during build -BuildRequires: java-openjdk-headless +BuildRequires: hwdata %if 0%{?fedora} BuildRequires: libatomic %endif @@ -373,10 +408,17 @@ %if %{with system_llhttp} BuildRequires: llhttp-devel %endif +%if %{with lld} +BuildRequires: lld +%endif %if %{with system_llvm} BuildRequires: llvm-devel %endif BuildRequires: memory-constraints +%if %{with mold} +BuildRequires: mold +%endif +BuildRequires: nasm %if 0%{?suse_version} BuildRequires: ninja >= 1.7.2 %else @@ -390,6 +432,10 @@ BuildRequires: npm %endif BuildRequires: pkgconfig +BuildRequires: plasma-wayland-protocols +BuildRequires: python3-json5 +BuildRequires: python3-mako +BuildRequires: python3-ply BuildRequires: python3-six BuildRequires: rsync BuildRequires: snappy-devel @@ -397,6 +443,8 @@ BuildRequires: update-desktop-files %endif BuildRequires: util-linux +BuildRequires: vulkan-headers +BuildRequires: zstd %if %{with system_abseil} BuildRequires: pkgconfig(absl_algorithm_container) >= 20211000 BuildRequires: pkgconfig(absl_base) @@ -472,9 +520,7 @@ %endif BuildRequires: pkgconfig(libbrotlidec) BuildRequires: pkgconfig(libbrotlienc) -%if %{with system_cares} BuildRequires: pkgconfig(libcares) -%endif BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libevent) @@ -489,6 +535,7 @@ BuildRequires: pkgconfig(libopenjp2) BuildRequires: pkgconfig(libpci) BuildRequires: pkgconfig(libpulse) +BuildRequires: pkgconfig(libsecret-1) BuildRequires: pkgconfig(libva) BuildRequires: pkgconfig(libwebp) >= 0.4.0 %if %{with system_woff2} @@ -497,11 +544,11 @@ BuildRequires: pkgconfig(libxml-2.0) >= 2.9.5 BuildRequires: pkgconfig(libxslt) BuildRequires: pkgconfig(libxxhash) +%if %{with system_yuv} +BuildRequires: pkgconfig(libyuv) +%endif %if 0%{?fedora} BuildRequires: minizip-compat-devel -# help decide for dependency -# BuildRequires: pipewire-jack-audio-connection-kit-devel -# BuildRequires: nodejs-devel >= 17 %else BuildRequires: pkgconfig(minizip) %endif @@ -566,7 +613,8 @@ %package devel Summary: Electron development headers Group: Development/Libraries/C and C++ -Requires: nodejs-electron = %{version} +Requires: nodejs-electron%{?_isa} = %{version} +Requires: pkgconfig(zlib) %description devel Development headers for Electron projects. @@ -580,6 +628,13 @@ + + +# Link system wayland-protocols-devel into where chrome expects them +mkdir -p third_party/wayland-protocols/kde/src +#ln -svfT %{_datadir}/wayland-protocols third_party/wayland-protocols/src +ln -svfT %{_datadir}/plasma-wayland-protocols third_party/wayland-protocols/kde/src/protocols + # Shim generators for replace_gn_files.py cp -lv %{_sourcedir}/*.gn build/linux/unbundle/ @@ -609,7 +664,8 @@ ln -sf %{_bindir}/python3 "$(pwd)/python3-path/python" export PATH="$(pwd)/python3-path:${PATH}" -ARCH_FLAGS="%optflags" +#some Fedora ports still try to build with LTO +ARCH_FLAGS=$(echo "%optflags"|sed 's/-f[^ ]*lto[^ ]*//g' ) @@ -635,8 +691,12 @@ # This is an Electron-specific problem that does not appear in Chromium. export CXXFLAGS="${CXXFLAGS} -fpermissive" -# REDUCE DEBUG for C++ as it gets TOO large due to ???heavy hemplate use in Blink??? -export CXXFLAGS="$(echo ${CXXFLAGS} | sed -e 's/-g /-g1 /g' -e 's/-g$/-g1/g')" +# REDUCE DEBUG for C++ as it gets TOO large due to ???heavy hemplate use in Blink???. See symbol_level below and chromium-102-compiler.patch +export CXXFLAGS="$(echo ${CXXFLAGS} | sed -e 's/-g / /g' -e 's/-g$//g')" + +%ifarch %ix86 %arm +export CFLAGS="$(echo ${CFLAGS} | sed -e 's/-g /-g1 /g' -e 's/-g$/-g1/g')" +%endif export LDFLAGS="%{?build_ldflags}" @@ -687,18 +747,31 @@ %endif +%if %{with lld} +export LDFLAGS="${LDFLAGS} -Wl,--as-needed -fuse-ld=lld" +%endif +%if %{with mold} +export LDFLAGS="${LDFLAGS} -Wl,--as-needed -fuse-ld=mold" +%endif + # do not eat all memory +%ifarch %ix86 %arm +%limit_build -m 1200 +%else %limit_build -m 2600 +%endif gn_system_libraries=( brotli ffmpeg flac + flatbuffers fontconfig libdrm libevent libjpeg libpng + libsecret libusb libwebp libxml @@ -710,8 +783,7 @@ ) %if %{with system_abseil} -find third_party/abseil-cpp -name *.[ch] -delete -find third_party/abseil-cpp -name *.cc -delete +find third_party/abseil-cpp -type f ! -name "*.gn" -a ! -name "*.gni" -delete gn_system_libraries+=( absl_algorithm absl_base @@ -736,49 +808,48 @@ %if %{with system_aom} -find third_party/libaom -name *.[ch] -delete -find third_party/libaom -name *.cc -delete +find third_party/libaom -type f ! -name "*.gn" -a ! -name "*.gni" -delete gn_system_libraries+=( libaom ) %endif %if %{with system_avif} -find third_party/libavif -name *.[ch] -delete +find third_party/libavif -type f ! -name "*.gn" -a ! -name "*.gni" -delete gn_system_libraries+=( libavif ) %endif %if %{with system_crc32c} -find third_party/crc32c -name *.[ch] -delete +find third_party/crc32c -type f ! -name "*.gn" -a ! -name "*.gni" -delete gn_system_libraries+=( crc32c ) %endif %if %{with system_jxl} -find third_party/libjxl -name *.[ch] -delete +find third_party/highway -type f ! -name "*.gn" -a ! -name "*.gni" -delete +find third_party/libjxl -type f ! -name "*.gn" -a ! -name "*.gni" -delete gn_system_libraries+=( libjxl ) %endif %if %{with system_dav1d} -find third_party/dav1d -name *.[ch] -delete +find third_party/dav1d -type f ! -name "*.gn" -a ! -name "*.gni" -delete gn_system_libraries+=( dav1d ) %endif %if %{with system_double_conversion} -find base/third_party/double_conversion -name *.[ch] -delete +find base/third_party/double_conversion -type f ! -name "*.gn" -a ! -name "*.gni" -delete gn_system_libraries+=( double-conversion ) %endif %if %{with system_nvctrl} -find third_party/angle/src/third_party/libXNVCtrl/ -name *.[ch] -delete +find third_party/angle/src/third_party/libXNVCtrl/ -type f ! -name "*.gn" -a ! -name "*.gni" -delete gn_system_libraries+=( libXNVCtrl ) %endif %if %{with system_spirv} -rm -rv third_party/swiftshader/third_party/SPIRV-Headers/include -find third_party/swiftshader/third_party/SPIRV-Tools/ -name *.[ch] -delete -find third_party/swiftshader/third_party/SPIRV-Tools/ -name *.[ch]pp -delete -rm -rv third_party/vulkan-deps/spirv-headers/src/include -find third_party/vulkan-deps/spirv-tools/ -name *.[ch] -delete -find third_party/vulkan-deps/spirv-tools/ -name *.[ch]pp -delete +rm -rf third_party/swiftshader/third_party/SPIRV-Headers/include +find third_party/swiftshader/third_party/SPIRV-Tools/ -type f ! -name "*.gn" -a ! -name "*.gni" -delete + +rm -rf third_party/vulkan-deps/spirv-headers/src/include +find third_party/vulkan-deps/spirv-tools/ -type f ! -name "*.gn" -a ! -name "*.gni" -delete gn_system_libraries+=( swiftshader-SPIRV-Headers @@ -790,14 +861,12 @@ %endif %if %{with system_harfbuzz} -find third_party/harfbuzz-ng -name *.[ch] \! -path "third_party/harfbuzz-ng/utils/hb_scoped.h" -delete -find third_party/harfbuzz-ng -name *.cc -delete -find third_party/harfbuzz-ng -name *.hh -delete +find third_party/harfbuzz-ng -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -path "third_party/harfbuzz-ng/utils/hb_scoped.h" -delete gn_system_libraries+=( harfbuzz-ng ) %endif %if %{with system_freetype} -find third_party/freetype -name *.[ch] -delete +find third_party/freetype -type f ! -name "*.gn" -a ! -name "*.gni" -delete gn_system_libraries+=( freetype ) %endif @@ -806,32 +875,34 @@ %endif %if %{with system_vpx} -find third_party/libvpx -name *.[ch] -delete +find third_party/libvpx -type f ! -name "*.gn" -a ! -name "*.gni" -delete gn_system_libraries+=( libvpx ) %endif %if %{with system_woff2} -find third_party/woff2 -name *.[ch] -delete -find third_party/woff2 -name *.cc -delete +find third_party/woff2 -type f ! -name "*.gn" -a ! -name "*.gni" -delete gn_system_libraries+=( woff2 ) %endif +%if %{with system_yuv} +find third_party/libyuv -type f ! -name "*.gn" -a ! -name "*.gni" -delete +gn_system_libraries+=( libyuv ) +%endif + build/linux/unbundle/replace_gn_files.py --system-libraries ${gn_system_libraries[@]} -%if %{with system_cares} -find third_party/electron_node/deps/cares -name *.[ch] -delete -%endif + %if %{with system_nghttp2} -find third_party/electron_node/deps/nghttp2 -name *.[ch] -delete +find third_party/electron_node/deps/nghttp2 -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete %endif %if %{with system_llhttp} -find third_party/electron_node/deps/llhttp -name *.[ch] -delete +find third_party/electron_node/deps/llhttp -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete %endif %if %{with system_histogram} -find third_party/electron_node/deps/histogram -name *.[ch] -delete +find third_party/electron_node/deps/histogram -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete %endif %if %{with system_llvm} @@ -873,13 +944,31 @@ myconf_gn+=" use_cups=true" myconf_gn+=" use_aura=true" +# This requires the non-free closure_compiler.jar. If we ever need to build chrome with JS typecheck, +# we would need to package it separately and compile it from sources, since the chrome git repo +# provides only a compiled binary. +myconf_gn+=" enable_js_type_check=false" -# These options have been disabled, see chromium-102-compiler.patch +# The option below get overriden by whatever is in CFLAGS/CXXFLAGS, so they affect only C++ code. # symbol_level=2 is full debug # symbol_level=1 is enough info for stacktraces # symbol_level=0 disable debug -#myconf_gn+=" symbol_level=2" -#myconf_gn+=" blink_symbol_level=1" +# blink (HTML engine) and v8 (js engine) are template-heavy, trying to compile them with full debug leads to linker errors +%ifnarch %ix86 %arm aarch64 +myconf_gn+=" symbol_level=2" +myconf_gn+=" blink_symbol_level=1" +myconf_gn+=" v8_symbol_level=1" +%endif +%ifarch %ix86 %arm +myconf_gn+=" symbol_level=0" #Sorry, no debug on 32bit for now. +myconf_gn+=" blink_symbol_level=0" #Sorry, no debug on 32bit for now. +myconf_gn+=" v8_symbol_level=0" #Sorry, no debug on 32bit for now. +%endif +%ifarch aarch64 #???No space left on device??? with symbol level 2 +myconf_gn+=" symbol_level=1" +myconf_gn+=" blink_symbol_level=1" +myconf_gn+=" v8_symbol_level=1" +%endif myconf_gn+=" use_kerberos=true" myconf_gn+=" enable_vr=false" @@ -922,15 +1011,14 @@ myconf_gn+=" use_system_libpng=true" myconf_gn+=" use_system_lcms2=true" myconf_gn+=" use_system_libopenjpeg2=true" +myconf_gn+=" use_system_wayland_scanner=true" %if %{with system_harfbuzz} myconf_gn+=" use_system_harfbuzz=true" %endif %if %{with system_freetype} myconf_gn+=" use_system_freetype=true" %endif -%if %{with system_cares} myconf_gn+=" use_system_cares=true" -%endif %if %{with system_nghttp2} myconf_gn+=" use_system_nghttp2=true" %endif @@ -964,6 +1052,21 @@ # endif with lto %endif +%ifarch %arm +# Bundled libaom is broken on ARMv7 +%if %{without system_aom} +# [74796s] FAILED: v8_context_snapshot_generator +# [74796s] python3 "../../build/toolchain/gcc_link_wrapper.py" --output="./v8_context_snapshot_generator" -- g++ -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -rdynamic -Wl,-z,defs -Wl,--as-needed -pie -Wl,--disable-new-dtags -Wl,-rpath=\$ORIGIN -Wl,--as-needed -fuse-ld=lld -o "./v8_context_snapshot_generator" -Wl,--start-group @"./v8_context_snapshot_generator.rsp" -Wl,--end-group -latomic -ldl -lpthread -lrt -lgmodule-2.0 -lglib-2.0 -lgobject-2.0 -lgthread-2.0 -ljsoncpp -labsl_base -labsl_raw_logging_internal -labsl_log_severity -labsl_spinlock_wait -labsl_cord -labsl_cordz_info -labsl_cord_internal -labsl_cordz_functions -labsl_exponential_biased -labsl_cordz_handle -labsl_synchronization -labsl_graphcycles_internal -labsl_stacktrace -labsl_symbolize -labsl_debugging_internal -labsl_demangle_internal -labsl_malloc_internal -labsl_time -labsl_civil_time -labsl_time_zone -labsl_bad_optional_access -labsl_strings -labsl_strings_internal -labsl_int128 -labsl _throw_delegate -labsl_hash -labsl_city -labsl_bad_variant_access -labsl_low_level_hash -labsl_raw_hash_set -labsl_hashtablez_sampler -labsl_failure_signal_handler -labsl_examine_stack -labsl_random_distributions -labsl_random_seed_sequences -labsl_random_internal_pool_urbg -labsl_random_internal_randen -labsl_random_internal_randen_hwaes -labsl_random_internal_randen_hwaes_impl -labsl_random_internal_randen_slow -labsl_random_internal_platform -labsl_random_internal_seed_material -labsl_random_seed_gen_exception -labsl_status -labsl_str_format_internal -labsl_strerror -labsl_statusor -licui18n -licuuc -licudata -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -ldouble-conversion -levent -lz -ljpeg -lpng16 -lxml2 -lxslt -lresolv -lgio-2.0 -lbrotlidec -lwebpdemux -lwebpmux -lwebp -lfreetype -lexpat -lfontconfig -lharfbuzz-subset -lharfbuzz -lyuv -lopus -lvpx -lm -ldav1d -lX11 -lXcomposite -lXdamage -lXext -lXfixes -lXrender -lXrandr -lXtst -lpipewire-0.3 -lgbm -lEGL -ldrm -lcrc32c - lbsd -lxcb -lxkbcommon -lwayland-client -ldbus-1 -lre2 -lpangocairo-1.0 -lpango-1.0 -lcairo -latk-1.0 -latk-bridge-2.0 -lasound -lpulse -lavcodec -lavformat -lavutil -lXi -lpci -lxxhash -lXNVCtrl -lsnappy -lavif -ljxl -lwoff2dec -latspi +# [74796s] ld.lld: error: undefined symbol: aom_arm_cpu_caps +# [74796s] >>> referenced by av1_rtcd.h:1079 (../../third_party/libaom/source/config/linux/arm/config/av1_rtcd.h:1079) +# [74796s] >>> libaom/av1_rtcd.o:(setup_rtcd_internal) in archive obj/third_party/libaom/libaom.a +# [74796s] >>> referenced by aom_dsp_rtcd.h:3560 (../../third_party/libaom/source/config/linux/arm/config/aom_dsp_rtcd.h:3560) +# [74796s] >>> libaom/aom_dsp_rtcd.o:(setup_rtcd_internal) in archive obj/third_party/libaom/libaom.a +# [74796s] >>> referenced by aom_scale_rtcd.h:162 (../../third_party/libaom/source/config/linux/arm/config/aom_scale_rtcd.h:162) +# [74796s] >>> libaom/aom_scale_rtcd.o:(setup_rtcd_internal) in archive obj/third_party/libaom/libaom.a +myconf_gn+=" enable_libaom=false" +%endif +%endif %if %{with pipewire} myconf_gn+=" rtc_use_pipewire=true rtc_link_pipewire=true" ++++++ _constraints ++++++ --- /var/tmp/diff_new_pack.3NjaBk/_old 2022-08-09 15:27:39.705506789 +0200 +++ /var/tmp/diff_new_pack.3NjaBk/_new 2022-08-09 15:27:39.709506801 +0200 @@ -5,12 +5,9 @@ <size unit="G">24</size> </disk> <memory> - <size unit="G">16</size> + <size unit="G">8</size> </memory> - <physicalmemory> - <size unit="G">12</size> - </physicalmemory> - <processors>8</processors> + <jobs>6</jobs> </hardware> <overwrite> <conditions> @@ -19,9 +16,9 @@ </conditions> <hardware> <memory> - <size unit="G">32</size> + <size unit="G">27</size> </memory> - <processors>16</processors> + <jobs>12</jobs> </hardware> </overwrite> <overwrite> ++++++ chromium-102-compiler.patch ++++++ --- /var/tmp/diff_new_pack.3NjaBk/_old 2022-08-09 15:27:39.933507441 +0200 +++ /var/tmp/diff_new_pack.3NjaBk/_new 2022-08-09 15:27:39.937507452 +0200 @@ -216,7 +216,7 @@ # Full symbols. -config("symbols") { -+config("symbols") { } ++config("symbols") { cflags = ["-g2"] } +config("xsymbols") { if (is_win) { if (is_clang) { @@ -226,7 +226,7 @@ # This config guarantees to hold symbol for stack trace which are shown to user # when crash happens in unittests running on buildbot. -config("minimal_symbols") { -+config("minimal_symbols") { } ++config("minimal_symbols") { cflags = ["-g1"] } +config("xminimal_symbols") { if (is_win) { # Functions, files, and line tables only. @@ -236,7 +236,7 @@ # told to not generate debug information and the linker then just puts function # names in the final debug information. -config("no_symbols") { -+config("no_symbols") { } ++config("no_symbols") { cflags = ["-g0"]} +config("xno_symbols") { if (is_win) { ldflags = [ "/DEBUG" ] ++++++ create_tarball.sh ++++++ --- /var/tmp/diff_new_pack.3NjaBk/_old 2022-08-09 15:27:39.997507624 +0200 +++ /var/tmp/diff_new_pack.3NjaBk/_new 2022-08-09 15:27:39.997507624 +0200 @@ -4,7 +4,7 @@ # Copyright (c) 2021 Andreas Schneider <a...@cryptomilk.org> # License: GPLv3 # -# dnf install python3-base git-core npm16 yarn python2-base +# dnf install python3-base git-core npm16 yarn python2-base moreutils ELECTRON_PKGVERSION="$(rpmspec -P ./*.spec | grep ^\s*Version | sed -e 's/Version:[ ]*//g')" ELECTRON_PKGNAME="electron" @@ -132,7 +132,7 @@ echo ">>>>>> Get node modules for electron" pushd src/electron || cleanup_and_exit 1 -yarn install --frozen-lockfile +yarn install --frozen-lockfile --ignore-scripts if [ $? -ne 0 ]; then echo "ERROR: yarn install failed" cleanup_and_exit 1 @@ -143,10 +143,11 @@ pushd "${ELECTRON_PATH}" || cleanup_and_exit 1 -# TODO: Go through every entry on this list and either remove it, or add an explanation why it's needed. +# For every entry on this list either remove it, or add an explanation why it's needed. echo ">>>>>> Remove bundled libs" keeplibs=( base/third_party/cityhash #Derived code, not vendored dependency. + base/third_party/cityhash_v103 #Derived code, not vendored dep base/third_party/dynamic_annotations #Derived code, not vendored dependency. base/third_party/icu #Derived code, not vendored dependency. base/third_party/superfasthash #Not a shared library. @@ -158,28 +159,25 @@ courgette/third_party #Derived code, not vendored dependency. net/third_party/mozilla_security_manager #Derived code, not vendored dependency. net/third_party/nss #Derived code, not vendored dependency. - net/third_party/quic #Not available as a shared library yet. An old version is in Factory (google-quiche-source) + net/third_party/quiche #Not available as a shared library yet. An old version is in Factory (google-quiche-source) net/third_party/uri_template #Derived code, not vendored dependency. third_party/abseil-cpp #15.4 and fc36 too old. - # ANGLE is an integral part of chrome and is not available as a shared library. - third_party/angle - third_party/angle/src/common/third_party/base - third_party/angle/src/common/third_party/smhasher - # + third_party/angle # ANGLE is an integral part of chrome and is not available as a shared library. + third_party/angle/src/common/third_party/base #Derived code, not vendored dependency. + third_party/angle/src/common/third_party/smhasher ##Derived code, not vendored dependency. third_party/angle/src/third_party/libXNVCtrl #Not in Factory yet third_party/angle/src/third_party/trace_event #Does not seem to be a separate library. - third_party/angle/src/third_party/volk #Not in Factory or Rawhide. Debian has it as vulkan-volk - third_party/axe-core + third_party/angle/src/third_party/volk #Not in Factory or Rawhide. Debian has it as vulkan-volk, CONSIDER UNBUNDLING when we have it third_party/blink #Integral part of chrome third_party/boringssl #Factory has an ancient version, but upstream seems to have gave up on making it a shared library - third_party/boringssl/src/third_party/fiat + third_party/boringssl/src/third_party/fiat #Not in any distro third_party/breakpad #Integral part of chrome # We don't need it (disable-catapult.patch) #third_party/catapult #third_party/catapult/common/py_vulcanize/third_party/rcssmin #third_party/catapult/common/py_vulcanize/third_party/rjsmin #third_party/catapult/third_party/beautifulsoup4 - #third_party/catapult/third_party/html5lib-1.1/ + #third_party/catapult/third_party/html5lib-1.1 #third_party/catapult/third_party/html5lib-python #third_party/catapult/third_party/polymer #third_party/catapult/third_party/six @@ -190,20 +188,17 @@ #third_party/catapult/tracing/third_party/mannwhitneyu #third_party/catapult/tracing/third_party/oboe #third_party/catapult/tracing/third_party/pako - third_party/ced - third_party/cld_3 - third_party/closure_compiler + third_party/ced #not in any distro + third_party/cld_3 #not in any distro. We have cld2 but not cld3 + third_party/closure_compiler #the python scripts are not available separately third_party/crashpad #Integral part of chrome third_party/crashpad/crashpad/third_party/lss #Derived code, not vendored dependency. third_party/crashpad/crashpad/third_party/zlib #Derived code, not vendored dependency. third_party/crc32c #Not in Leap third_party/cros_system_api #Integral part of Chrome. Needed. third_party/dav1d #Leap and fc36 too old - third_party/dawn #Integral part of chrome - third_party/dawn/third_party - third_party/depot_tools #Integral part of chrome - third_party/depot_tools/third_party/six - third_party/devscripts + third_party/dawn #Integral part of chrome, Needed even if you're building chrome without webgpu + third_party/dawn/third_party/gn/webgpu-cts #Integral part of chrome, Needed even if you're building chrome without webgpu #Javascript code, integral part of chrome third_party/devtools-frontend third_party/devtools-frontend/src/front_end/third_party @@ -223,152 +218,165 @@ third_party/devtools-frontend/src/third_party third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n # - third_party/distributed_point_functions - third_party/dom_distiller_js + third_party/distributed_point_functions #not in any distro + third_party/dom_distiller_js #javascript #third_party/eigen3 #Used only by tflite which is not used in electron third_party/electron_node #Integral part of electron - third_party/emoji-segmenter - third_party/farmhash - third_party/fdlibm - third_party/fft2d - third_party/flatbuffers #TODO: Consider unbundling this - third_party/fusejs/dist - third_party/gemmlowp + third_party/emoji-segmenter #not available as a shared library + third_party/fdlibm #derived code, not vendored dep third_party/harfbuzz-ng #There are new google files within this directory. third_party/harfbuzz-ng/utils - third_party/highway #Used only by libjxl. Consider unbundling this. + third_party/highway #Not in Leap third_party/hunspell #heavily forked version - third_party/iccjpeg - third_party/inspector_protocol - third_party/jinja2 - third_party/jstemplate - third_party/khronos + third_party/iccjpeg #not in any distro + third_party/inspector_protocol #integral part of chrome + third_party/jinja2 #Patch for deterministic builds. CONSIDER UNBUNDLING this when chrome switches to jinja 3.x + third_party/jstemplate #javascript + third_party/khronos #Modified to add ANGLE definitions third_party/leveldatabase #use of private headers - third_party/libaddressinput + third_party/libaddressinput #seems not to be available as a separate library third_party/libaom #version in Factory is too old third_party/libaom/source/libaom/third_party/fastfeat third_party/libaom/source/libaom/third_party/vector third_party/libaom/source/libaom/third_party/x86inc third_party/libavif #not availabe on 15.3 - third_party/libgav1 #not in Factory yet - third_party/libgifcodec - third_party/libjxl #not in Factory yet - third_party/libphonenumber #depends on protobuf - third_party/libsecret #TODO: Consider unbundling this + third_party/libgav1 #not in Factory yet, but available in unofficial repos. CONSIDER UNBUNDLING when any distro has it. + third_party/libjxl #not in Leap + third_party/libphonenumber #Depends on protobuf which cannot be unbundled third_party/libsrtp #Use of private headers - third_party/libsync/src - third_party/libudev - third_party/liburlpattern - third_party/libva_protected_content + third_party/libsync #not yet in any distro + third_party/libudev #Headers for a optional delay-loaded dependency + third_party/liburlpattern #Derived code, not vendored dep. + third_party/libva_protected_content #ChromeOS header not available separately. needed for build. third_party/libvpx #Use of private headers third_party/libvpx/source/libvpx/third_party/x86inc - third_party/libwebm - third_party/libx11/src - third_party/libxcb-keysyms/keysyms - third_party/libxml/chromium + third_party/libwebm #not in Factory or Rawhide. Is in Debian + third_party/libx11 #Derived code, not vendored dep + third_party/libxcb-keysyms #Derived code, not vendored dep + third_party/libxml/chromium #added chromium code third_party/libyuv #The version in Fedora is too old - third_party/libzip - third_party/lottie - third_party/lss - third_party/mako + third_party/lottie #javascript + third_party/lss #Wrapper for linux ABI #third_party/maldoca #integral part of chrome, but not used in electron. #third_party/maldoca/src/third_party - third_party/markupsafe - third_party/mesa - third_party/metrics_proto - third_party/modp_b64 - third_party/nasm #TODO: Check how forked is this and if we can use the system version + third_party/markupsafe #ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/lib64/python3.10/site-packages/markupsafe/__init__.py). CONSIDER UNBUNDLING when jinja is fixed + third_party/mesa_headers #ui/gl/gl_bindings.cc depends on GL_KHR_robustness not being defined. + third_party/metrics_proto #integral part of chrome + third_party/modp_b64 #not in any distro third_party/node #javascript code - third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2 - third_party/one_euro_filter - third_party/openscreen - third_party/openscreen/src/third_party/mozilla - third_party/openscreen/src/third_party/tinycbor/src/src - third_party/ots - third_party/pdfium - third_party/pdfium/third_party/agg23 - third_party/pdfium/third_party/base - third_party/pdfium/third_party/bigint - third_party/pdfium/third_party/freetype - third_party/pdfium/third_party/skia_shared - third_party/perfetto - third_party/perfetto/protos/third_party/chromium - third_party/pffft - third_party/ply - third_party/polymer - third_party/private-join-and-compute - third_party/private_membership - third_party/protobuf #Heavily forked. - third_party/protobuf/third_party/six - third_party/pyjson5 - third_party/qcms + third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2/ + third_party/one_euro_filter #not in any distro + third_party/openscreen #Integral part of chrome, needed even if you're building without. + third_party/openscreen/src/third_party/mozilla #derived code, not vendored dependency + third_party/openscreen/src/third_party/tinycbor/src/src #not in any distro + third_party/ots #not available as a shared library. Fedora has the cli version as opentype-sanitizer + third_party/pdfium #Integral part of chrome + third_party/pdfium/third_party/agg23 #Heavily patched version. Fedora has it as agg + third_party/pdfium/third_party/base #derived code, not vendored dependency + third_party/pdfium/third_party/bigint #not on any distro + third_party/pdfium/third_party/freetype #Copy of private headers + third_party/pdfium/third_party/skia_shared #Skia is not available as a shared library yet. + third_party/perfetto #Seems not to be available as a shared library, despite the presence of a `debian` directory. + third_party/perfetto/protos/third_party/chromium #derived code, not vendored dep + third_party/pffft #not in any distro, also heavily patched + third_party/polymer #javascript + third_party/private-join-and-compute #not in any distro, also heavily patched + third_party/private_membership #derived code, not vendored dep + third_party/protobuf #Heavily forked. Apparently was officially unbundlable back in the GYP days, and may be again in the future. third_party/rnnoise #use of private headers - third_party/ruy - third_party/s2cellid - third_party/securemessage - third_party/shell-encryption - third_party/simplejson + third_party/shell-encryption #not available on any distro, also heavily patched third_party/skia #integral part of chrome - third_party/skia/include/third_party/skcms/ - third_party/skia/include/third_party/vulkan/ - third_party/skia/third_party/skcms - third_party/skia/third_party/vulkan - third_party/smhasher - third_party/speech-dispatcher #stub header for a dlopened library + third_party/skia/include/third_party/skcms #part of skia, not available as a separate library + third_party/skia/third_party/skcms #part of skia, not available as a separate library + third_party/smhasher #not in Rawhide or Factory. AltLinux has it (libsmhasher) CONSIDER UNBUNDLING if we have it + third_party/speech-dispatcher #Headers for a delay-loaded optional dependency third_party/sqlite #heavily forked version - third_party/swiftshader + third_party/swiftshader #not available as a shared library + third_party/swiftshader/third_party/astc-encoder #not in rawhide or factory. Debian has it (astc-encoder) + third_party/swiftshader/third_party/llvm-subzero #heavily forked version of libLLVM for use in subzero + third_party/swiftshader/third_party/marl #not on any distro third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1 #FC36 too old third_party/swiftshader/third_party/SPIRV-Tools #FC36 too old - third_party/swiftshader/third_party/astc-encoder - third_party/swiftshader/third_party/llvm-subzero - third_party/swiftshader/third_party/marl - third_party/swiftshader/third_party/subzero + third_party/swiftshader/third_party/subzero #integral part of swiftshader #third_party/tflite #Not used by electron, but chrome needs it. #third_party/tflite/src/third_party/eigen3 #third_party/tflite/src/third_party/fft2d - third_party/ukey2 - third_party/usb_ids #TODO: Consider unbundling this, the version in chrome is ancient - third_party/utf - third_party/vulkan - third_party/wayland - third_party/web-animations-js - third_party/webdriver - third_party/webgpu-cts + third_party/vulkan-deps/spirv-headers #FC36 too old + third_party/vulkan-deps/spirv-tools #FC36 too old + third_party/vulkan-deps/vulkan-headers #FC36 too old. CONSIDER UNBUNDLING when all distros have new enough vulkan sdk + third_party/vulkan-deps/vulkan-tools #The mock ICD seems to be used during build, but is not shipped (see https://github.com/electron/electron/pull/18596) + third_party/vulkan_memory_allocator #not in any distro + third_party/webgpu-cts #Javascript code. Needed even if you're building chrome without webgpu third_party/webrtc #Integral part of chrome - third_party/webrtc/common_audio/third_party/ooura - third_party/webrtc/common_audio/third_party/spl_sqrt_floor - third_party/webrtc/modules/third_party/fft - third_party/webrtc/modules/third_party/g711 - third_party/webrtc/modules/third_party/g722 - third_party/webrtc/rtc_base/third_party/base64 - third_party/webrtc/rtc_base/third_party/sigslot + third_party/webrtc/common_audio/third_party/ooura #derived code, not vendored dep + third_party/webrtc/common_audio/third_party/spl_sqrt_floor #derived code, not vendored dep + third_party/webrtc/modules/third_party/fft #derived code, not vendored dep + third_party/webrtc/modules/third_party/g711 #derived code, not vendored dep + third_party/webrtc/modules/third_party/g722 #derived code, not vendored dep + third_party/webrtc/rtc_base/third_party/base64 #derived code, not vendored dep + third_party/webrtc/rtc_base/third_party/sigslot #derived code, not vendored dep + third_party/webrtc_overrides #Integral part of chrome third_party/widevine #Integral part of chrome. Needed. - third_party/wuffs - third_party/x11proto - third_party/xcbproto - third_party/zlib/google - third_party/zxcvbn-cpp - url/third_party/mozilla - v8/src/third_party/siphash - v8/src/third_party/utf8-decoder - v8/src/third_party/valgrind - v8/third_party/inspector_protocol - v8/third_party/v8/builtins + third_party/wayland/protocol #added chromium code + third_party/wayland/stubs #added chromium code + third_party/wayland/wayland_scanner_wrapper.py #wrapper script + third_party/wayland-protocols/gtk/gdk/wayland/protocol #Imagine downloading 100MB of gtk source just to get one file. + third_party/wayland-protocols/mesa #egl-wayland-devel (Fedora) / libnvidia-egl-wayland1 (SUSE). Not in 15.3 CONSIDER UNBUNDLING when all distros have this + third_party/wayland-protocols/src #pkgconfig(wayland-protocols) ??? 15.3 too old CONSIDER UNBUNDLING once we drop it + third_party/wayland-protocols/unstable #unknown origin. not in wayland-protocol-devel or elsewhere + third_party/wuffs #not in any distro + third_party/x11proto #derived code, not vendored dep + third_party/zlib/google #derived code, not vendored dep + third_party/zxcvbn-cpp #not in any distro, also heavily patched + url/third_party/mozilla #derived code, not vendored dep + v8/src/third_party/siphash #derived code, not vendored dep + v8/src/third_party/utf8-decoder #derived code, not vendored dep + v8/src/third_party/valgrind #incompatible definition of VALGRIND_DISCARD_TRANSLATIONS + v8/third_party/inspector_protocol #integral part of chrome + v8/third_party/v8 #derived code, not vendored dep ) build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove if [ $? -ne 0 ]; then echo "ERROR: remove_bundled_libraries.py failed" cleanup_and_exit 1 fi - +# Now remove additional bundled/duplicate libraries in node/deps +rm -rf third_party/electron_node/deps/{googletest/{include,src},icu-small} #292MB and vendored +find third_party/electron_node/deps/brotli -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete +find third_party/electron_node/deps/cares -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete +find third_party/electron_node/deps/openssl -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete +find third_party/electron_node/deps/v8 -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete +find third_party/electron_node/deps/zlib -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete + + +#Some more chonkers +rm -rf components/test/data #21MB +rm -rf docs #30MB +rm -rf media/test/data #62MB +rm -rf native_client_sdk/doc_generated #21MB +rm -rf third_party/blink/{manual,perf}_tests #70MB +rm -rf third_party/electron_node/{doc,test} #42MB +rm -rf third_party/libaom/fuzz #44MB +rm -rf third_party/perfetto/docs #11MB +rm -rf third_party/protobuf/{csharp,java,js,objectivec,php,ruby} #22MB +rm -rf third_party/skia/{bench,docs,gm,platform_tools,resources,site,test,tools} #67MB +rm -rf third_party/sqlite/fuzz #61MB +rm -rf third_party/swiftshader/tests/regres #381MB +rm -rf third_party/webrtc/data #27MB +rm -rf tools/disable_tests #6MB +rm -rf tools/perf/{page_sets,testdata} #55MB rm -rf third_party/blink/web_tests # 1.6GB rm -rf third_party/catapult/tracing/test_data # 200MB + + find . -type d -name .git -print0 | xargs -0 rm -rf # Remove generatted python bytecode find . -type d -name __pycache__ -print0 | xargs -0 rm -rvf find . -type f -name '*.pyc' -print -delete echo ">>>>>> Remove non-free binaries" +find . -type f -name "*.jar" -print -delete +find . -type f -name "*.exe" -print -delete find . -type f -name "*.node" -print -delete find . -type f -name "*.dll" -print -delete find . -type f -name "*.dylib" -print -delete @@ -376,7 +384,8 @@ find . -type f -name "*.o" -print -delete find . -type f -name "*.a" -print -delete -find -type f | xargs -P$(nproc) -- sh -c 'file "$@" | grep -v '\'' .*script'\'' | grep '\'' .*executable'\'' | tee /dev/stderr | sed '\''s/: .*//'\'' | xargs rm -fv' +#We use sponge to avoid a race condition between find and rm +find -type f | sponge | xargs -P$(nproc) -- sh -c 'file "$@" | grep -v '\'' .*script'\'' | grep '\'' .*executable'\'' | tee /dev/stderr | sed '\''s/: .*//'\'' | xargs rm -fv' # Remove empty directories @@ -384,9 +393,10 @@ popd || cleanup_and_exit 1 echo ">>>>>> Create tarball" -XZ_OPT="-T$(nproc) -e9 -vv" tar -vvcJf "${ELECTRON_PKGDIR}/${ELECTRON_PKGNAME}-${ELECTRON_PKGVERSION}.tar.xz" src +#Use zst, it decompresses faster. +ZSTD_CLEVEL=19 ZSTD_NBTHREADS="$(nproc)" tar --zstd -vvcf "${ELECTRON_PKGDIR}/${ELECTRON_PKGNAME}-${ELECTRON_PKGVERSION}.tar.zst" src if [ $? -ne 0 ]; then - echo "ERROR: tar cJf failed" + echo "ERROR: tar cf failed" cleanup_and_exit 1 fi ++++++ do-not-build-libvulkan.so.patch ++++++ Do not try to build a private copy of a DLL which is already available on every modern linux system. --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -1789,8 +1790,9 @@ deps = [ "//third_party/angle:libGLESv2" ] } - if (!is_chromeos) { + source_set("angle_libvulkan_symbols") {} + if (false) { extract_symbols("angle_libvulkan_symbols") { binary = "$root_out_dir/libvulkan.so.1" if (current_cpu == "x86") { --- a/third_party/vulkan-deps/vulkan-loader/src/BUILD.gn +++ b/third_party/vulkan-deps/vulkan-loader/src/BUILD.gn @@ -99,7 +99,8 @@ library_type = "static_library" } - target(library_type, "libvulkan") { + source_set("libvulkan") {} + target(library_type, "xlibvulkan") { sources = [ "loader/adapters.h", "loader/allocation.c", ++++++ electron-16-system-node-headers.patch ++++++ --- /var/tmp/diff_new_pack.3NjaBk/_old 2022-08-09 15:27:40.061507806 +0200 +++ /var/tmp/diff_new_pack.3NjaBk/_new 2022-08-09 15:27:40.065507818 +0200 @@ -2,12 +2,13 @@ =================================================================== --- electron-17.1.0.orig/third_party/electron_node/common.gypi 2022-03-07 17:39:13.557371769 +0100 +++ electron-17.1.0/third_party/electron_node/common.gypi 2022-03-09 08:29:08.214665848 +0100 -@@ -405,6 +405,9 @@ +@@ -405,6 +405,10 @@ 'BUILDING_UV_SHARED=1', ], }], + [ 'OS in "linux"', { + 'cflags': [ '-I/usr/include/electron' ], ++ 'ldflags': [ '-lz' ], + }], [ 'OS in "linux freebsd openbsd solaris aix"', { 'cflags': [ '-pthread' ], ++++++ flatbuffers.gn ++++++ import("//build/shim_headers.gni") config("flatbuffers_config") { include_dirs = [ "src/include" ] # Required to prevent static initialization of locale # in util.cpp defines = [ "FLATBUFFERS_LOCALE_INDEPENDENT=0" ] } shim_headers("flatbuffers_shim") { root_path = "src/include" headers = [ "flatbuffers/base.h", "flatbuffers/flatbuffers.h", "flatbuffers/stl_emulation.h", "flatbuffers/flexbuffers.h", "flatbuffers/util.h", ] } source_set("flatbuffers") { deps = [ ":flatbuffers_shim" ] libs = [ "flatbuffers" ] public_configs = [ ":flatbuffers_config" ] } copy("flatc") { sources = [ "/usr/bin/flatc" ] outputs = [ "$root_out_dir/flatc" ] } source_set("flatbuffers_unittests") {} (No newline at EOF) ++++++ libsecret.gn ++++++ import("//build/config/linux/pkg_config.gni") pkg_config("libsecret_config") { packages = [ "libsecret-1" ] } source_set("libsecret") { public_configs = [ ":libsecret_config" ] } ++++++ libyuv.gn ++++++ import("//build/config/linux/pkg_config.gni") import("//build/shim_headers.gni") pkg_config("system_yuv") { packages = [ "libyuv" ] } shim_headers("libyuv_shim") { root_path = "include" headers = [ "libyuv.h", "libyuv/basic_types.h", "libyuv/compare.h", "libyuv/convert.h", "libyuv/convert_argb.h", "libyuv/convert_from.h", "libyuv/convert_from_argb.h", "libyuv/cpu_id.h", "libyuv/mjpeg_decoder.h", "libyuv/planar_functions.h", "libyuv/rotate.h", "libyuv/rotate_argb.h", "libyuv/rotate_row.h", "libyuv/row.h", "libyuv/scale.h", "libyuv/scale_argb.h", "libyuv/scale_row.h", "libyuv/scale_uv.h", "libyuv/version.h", "libyuv/video_common.h", ] } source_set("libyuv") { deps = [ ":libyuv_shim" ] public_configs = [ ":system_yuv" ] } (No newline at EOF) ++++++ nasm-generate-debuginfo.patch ++++++ --- a/third_party/nasm/nasm_assemble.gni +++ b/third_party/nasm/nasm_assemble.gni @@ -114,7 +114,7 @@ ]) # Flags. - args = _nasm_flags + args = _nasm_flags + [ "-g", "-Fdwarf" ] if (defined(invoker.nasm_flags)) { args += invoker.nasm_flags } ++++++ no-zlib-headers.patch ++++++ Do not ship bundled zlib headers. Electron uses the system zlib, and anyone compiling against it should also. --- a/third_party/electron_node/BUILD.gn +++ b/third_party/electron_node/BUILD.gn @@ -417,7 +417,6 @@ group("copy_headers") { public_deps = header_groups + [ - ":zlib_headers", ":node_gypi_headers", ":node_version_header", ] ++++++ node-system-icu.patch ++++++ Do not try to configure electron's node against vendored ICU headers --- a/electron/script/generate-config-gypi.py +++ b/electron/script/generate-config-gypi.py @@ -14,6 +14,7 @@ def run_node_configure(target_cpu): configure = os.path.join(NODE_DIR, 'configure.py') args = ['--dest-cpu', target_cpu] + args+= ['--with-intl=system-icu'] # Enabled in Chromium's V8. if target_cpu in ('arm64', 'x64'): args += ['--experimental-enable-pointer-compression'] ++++++ replace_gn_files-system-libs.patch ++++++ --- /var/tmp/diff_new_pack.3NjaBk/_old 2022-08-09 15:27:40.249508344 +0200 +++ /var/tmp/diff_new_pack.3NjaBk/_new 2022-08-09 15:27:40.249508344 +0200 @@ -1,6 +1,6 @@ --- chromium-79.0.3945.29/build/linux/unbundle/replace_gn_files.py.system-dav1d 2019-11-09 14:30:17.297016975 +0100 +++ chromium-79.0.3945.29/build/linux/unbundle/replace_gn_files.py 2019-11-10 09:40:19.694662891 +0100 -@@ -17,12 +17,37 @@ import sys +@@ -17,12 +17,40 @@ import sys REPLACEMENTS = { @@ -27,6 +27,7 @@ + 'double-conversion': 'base/third_party/double_conversion/BUILD.gn', 'ffmpeg': 'third_party/ffmpeg/BUILD.gn', 'flac': 'third_party/flac/BUILD.gn', ++ 'flatbuffers': 'third_party/flatbuffers/BUILD.gn', 'fontconfig': 'third_party/fontconfig/BUILD.gn', 'freetype': 'build/config/freetype/freetype.gni', 'harfbuzz-ng': 'third_party/harfbuzz-ng/harfbuzz.gni', @@ -35,10 +36,12 @@ + 'libaom' : 'third_party/libaom/BUILD.gn', + 'libavif' : 'third_party/libavif/BUILD.gn', + 'libjxl' : 'third_party/libjxl/BUILD.gn', ++ 'libsecret' : 'third_party/libsecret/BUILD.gn', ++ 'libyuv' : 'third_party/libyuv/BUILD.gn', 'libdrm': 'third_party/libdrm/BUILD.gn', 'libevent': 'base/third_party/libevent/BUILD.gn', 'libjpeg': 'third_party/libjpeg.gni', -@@ -33,6 +61,11 @@ +@@ -33,6 +64,11 @@ 'opus': 'third_party/opus/BUILD.gn', 're2': 'third_party/re2/BUILD.gn', 'snappy': 'third_party/snappy/BUILD.gn', ++++++ skia-system-vulkan-headers.patch ++++++ Unbundle only Skia's vulkan headers. ANGLE needs the bleeding-edge ones in vulkan-deps --- a/third_party/skia/include/gpu/vk/GrVkVulkan.h +++ b/third_party/skia/include/gpu/vk/GrVkVulkan.h @@ -11,7 +11,7 @@ #include "include/core/SkTypes.h" #if SKIA_IMPLEMENTATION || !defined(SK_VULKAN) -#include "include/third_party/vulkan/vulkan/vulkan_core.h" +#include <vulkan/vulkan_core.h> #else // For google3 builds we don't set SKIA_IMPLEMENTATION so we need to make sure that the vulkan // headers stay up to date for our needs @@ -21,7 +21,7 @@ #ifdef SK_BUILD_FOR_ANDROID // This is needed to get android extensions for external memory #if SKIA_IMPLEMENTATION || !defined(SK_VULKAN) -#include "include/third_party/vulkan/vulkan/vulkan_android.h" +#include <vulkan/vulkan_android.h> #else // For google3 builds we don't set SKIA_IMPLEMENTATION so we need to make sure that the vulkan // headers stay up to date for our needs ++++++ system-gtest.patch ++++++ --- /var/tmp/diff_new_pack.3NjaBk/_old 2022-08-09 15:27:40.293508469 +0200 +++ /var/tmp/diff_new_pack.3NjaBk/_new 2022-08-09 15:27:40.297508481 +0200 @@ -11,4 +11,73 @@ #endif // TESTING_GTEST_INCLUDE_GTEST_GTEST_PROD_H_ \ No newline at end of file +--- a/third_party/electron_node/deps/googletest/BUILD.gn 2022-07-22 14:56:38.984761919 +0200 ++++ b/third_party/electron_node/deps/googletest/BUILD.gn 2022-07-29 19:21:57.655767809 +0200 +@@ -1,61 +1,11 @@ +-config("gtest_config") { +- include_dirs = [ "include" ] +- defines = [ "UNIT_TEST" ] +-} ++import("//build/config/linux/pkg_config.gni") + +-static_library("gtest") { +- include_dirs = [ +- "include", +- "." # src +- ] ++pkg_config("gtest_config") { ++ packages = [ "gtest" ] ++} + ++source_set("gtest") { + public_configs = [ ":gtest_config" ] +- +- cflags_cc = [ +- "-Wno-c++98-compat-extra-semi", +- "-Wno-unused-const-variable", +- "-Wno-unreachable-code-return", +- ] +- +- defines = [ +- "GTEST_HAS_POSIX_RE=0", +- "GTEST_LANG_CXX11=1", +- ] +- +- sources = [ +- "include/gtest/gtest_pred_impl.h", +- "include/gtest/gtest_prod.h", +- "include/gtest/gtest-death-test.h", +- "include/gtest/gtest-matchers.h", +- "include/gtest/gtest-message.h", +- "include/gtest/gtest-param-test.h", +- "include/gtest/gtest-printers.h", +- "include/gtest/gtest-spi.h", +- "include/gtest/gtest-test-part.h", +- "include/gtest/gtest-typed-test.h", +- "include/gtest/gtest.h", +- "include/gtest/internal/gtest-death-test-internal.h", +- "include/gtest/internal/gtest-filepath.h", +- "include/gtest/internal/gtest-internal.h", +- "include/gtest/internal/gtest-param-util.h", +- "include/gtest/internal/gtest-port-arch.h", +- "include/gtest/internal/gtest-port.h", +- "include/gtest/internal/gtest-string.h", +- "include/gtest/internal/gtest-type-util.h", +- "include/gtest/internal/custom/gtest-port.h", +- "include/gtest/internal/custom/gtest-printers.h", +- "include/gtest/internal/custom/gtest.h", +- "src/gtest-all.cc", +- "src/gtest-death-test.cc", +- "src/gtest-filepath.cc", +- "src/gtest-internal-inl.h", +- "src/gtest-matchers.cc", +- "src/gtest-port.cc", +- "src/gtest-printers.cc", +- "src/gtest-test-part.cc", +- "src/gtest-typed-test.cc", +- "src/gtest.cc", +- ] + } + + static_library("gtest_main") { ++++++ system-nasm.patch ++++++ --- a/third_party/nasm/BUILD.gn +++ b/third_party/nasm/BUILD.gn @@ -105,7 +105,11 @@ } if (current_toolchain == host_toolchain) { + copy("nasm") { + sources = [ "/usr/bin/nasm" ] + outputs = [ "$root_out_dir/nasm" ] + } - executable("nasm") { + executable("xnasm") { sources = nasmlib_sources + nasm_sources sources += [ "config/config-linux.h", ++++++ system-pydeps.patch ++++++ Unbundle assorted lexing/parsing/transpiling tools written in Python. Notably NOT including jinja2 due to https://bugs.chromium.org/p/chromium/issues/detail?id=1194274 Also excluding markupsafe, because jinja2 needs an ancient version. ???ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/lib64/python3.10/site-packages/markupsafe/__init__.py)??? --- a/mojo/public/tools/mojom/mojom/BUILD.gn +++ b/mojo/public/tools/mojom/mojom/BUILD.gn @@ -21,7 +21,6 @@ # Third-party module dependencies "//third_party/jinja2/", - "//third_party/ply/", ] } --- a/third_party/blink/renderer/bindings/scripts/build_web_idl_database.pydeps +++ b/third_party/blink/renderer/bindings/scripts/build_web_idl_database.pydeps @@ -1,9 +1,5 @@ # Generated by running: # build/print_python_deps.py --root third_party/blink/renderer/bindings/scripts --output third_party/blink/renderer/bindings/scripts/build_web_idl_database.pydeps third_party/blink/renderer/bindings/scripts/build_web_idl_database.py -../../../../pyjson5/src/json5/__init__.py -../../../../pyjson5/src/json5/lib.py -../../../../pyjson5/src/json5/parser.py -../../../../pyjson5/src/json5/version.py ../../build/scripts/blinkbuild/__init__.py ../../build/scripts/blinkbuild/name_style_converter.py build_web_idl_database.py --- a/third_party/blink/renderer/bindings/scripts/collect_idl_files.pydeps +++ b/third_party/blink/renderer/bindings/scripts/collect_idl_files.pydeps @@ -4,13 +4,6 @@ ../../../../../tools/idl_parser/idl_lexer.py ../../../../../tools/idl_parser/idl_node.py ../../../../../tools/idl_parser/idl_parser.py -../../../../ply/__init__.py -../../../../ply/lex.py -../../../../ply/yacc.py -../../../../pyjson5/src/json5/__init__.py -../../../../pyjson5/src/json5/lib.py -../../../../pyjson5/src/json5/parser.py -../../../../pyjson5/src/json5/version.py ../../build/scripts/blinkbuild/__init__.py ../../build/scripts/blinkbuild/name_style_converter.py collect_idl_files.py --- a/third_party/blink/renderer/bindings/scripts/generate_bindings.pydeps +++ b/third_party/blink/renderer/bindings/scripts/generate_bindings.pydeps @@ -1,28 +1,8 @@ # Generated by running: # build/print_python_deps.py --root third_party/blink/renderer/bindings/scripts --output third_party/blink/renderer/bindings/scripts/generate_bindings.pydeps third_party/blink/renderer/bindings/scripts/generate_bindings.py -../../../../mako/mako/__init__.py -../../../../mako/mako/_ast_util.py -../../../../mako/mako/ast.py -../../../../mako/mako/cache.py -../../../../mako/mako/codegen.py -../../../../mako/mako/compat.py -../../../../mako/mako/exceptions.py -../../../../mako/mako/ext/__init__.py -../../../../mako/mako/filters.py -../../../../mako/mako/lexer.py -../../../../mako/mako/parsetree.py -../../../../mako/mako/pygen.py -../../../../mako/mako/pyparser.py -../../../../mako/mako/runtime.py -../../../../mako/mako/template.py -../../../../mako/mako/util.py ../../../../markupsafe/__init__.py ../../../../markupsafe/_compat.py ../../../../markupsafe/_native.py -../../../../pyjson5/src/json5/__init__.py -../../../../pyjson5/src/json5/lib.py -../../../../pyjson5/src/json5/parser.py -../../../../pyjson5/src/json5/version.py ../../build/scripts/blinkbuild/__init__.py ../../build/scripts/blinkbuild/name_style_converter.py bind_gen/__init__.py ++++++ system-six.patch ++++++ Do not ship a vendored copy of python-six and make python able to find the system copy. The `-w` parameter to gen_share_targets_proto.py and several other scripts removes site-packages from PYTHONPATH. This patch disables it. --- a/components/resources/protobufs/binary_proto_generator.py +++ b/components/resources/protobufs/binary_proto_generator.py @@ -156,7 +156,8 @@ def Run(self): parser = optparse.OptionParser() # TODO(crbug.com/614082): Remove this once the bug is fixed. - parser.add_option('-w', '--wrap', action="store_true", default=False, + parser.add_option('-w', '--fake-option', action="store_true", default=False) + parser.add_option('--wrap', action="store_true", default=False, help='Wrap this script in another python ' 'execution to disable site-packages. This is a ' 'fix for http://crbug.com/605592') --- a/third_party/protobuf/BUILD.gn +++ b/third_party/protobuf/BUILD.gn @@ -696,7 +696,6 @@ ":copy_google", ":copy_google_protobuf", ":copy_google_protobuf_internal", - ":copy_six", ] } @@ -707,7 +706,6 @@ # Targets that depend on this should depend on the copied data files. data = get_target_outputs(":copy_google") - data += get_target_outputs(":copy_six") data += get_target_outputs(":copy_google_protobuf") data += get_target_outputs(":copy_google_protobuf_internal") } ++++++ system-usb_ids.patch ++++++ Chrome compiles an ancient copy of the usb ids database into the binary. Use the system copy for compilation instead. --- a/services/device/public/cpp/usb/BUILD.gn +++ b/services/device/public/cpp/usb/BUILD.gn @@ -2,16 +2,15 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -source_ids = "//third_party/usb_ids/usb.ids" +source_ids = "/usr/share/hwdata/usb.ids" generated_ids = "$target_gen_dir/usb_ids_gen.cc" action("usb_device_ids") { script = "//services/device/public/cpp/usb/tools/usb_ids.py" - inputs = [ source_ids ] outputs = [ generated_ids ] args = [ "-i", - rebase_path(source_ids, root_build_dir), + source_ids, "-o", rebase_path(generated_ids, root_build_dir), ]