diff --git a/create_tarball.sh b/create_tarball.sh index 6319e00..66604a8 100644 --- a/create_tarball.sh +++ b/create_tarball.sh @@ -78,7 +78,7 @@ echo ">>>>>> Create LASTCHANGE(.committime) file" echo -n "LASTCHANGE=$(git log -1 --format=format:%H HEAD)" > build/util/LASTCHANGE # shellcheck disable=1091 source build/util/LASTCHANGE -echo -n "$(git log -1 --date=unix --format=format:%cd "$LASTCHANGE")" > build/util/LASTCHANGE.committime +echo -n "$(git log -1 --date=unix --format=format:%cd $LASTCHANGE)" > build/util/LASTCHANGE.committime @@ -213,8 +213,7 @@ keeplibs=( third_party/electron_node #Integral part of electron 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/harfbuzz-ng/utils #There are new google files within this directory. third_party/highway #Not in Leap third_party/hunspell #heavily forked version third_party/iccjpeg #not in any distro @@ -229,7 +228,7 @@ keeplibs=( 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/libavif #leap too old 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 @@ -311,8 +310,8 @@ keeplibs=( 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/mesa #egl-wayland-devel (Fedora) / libnvidia-egl-wayland1 (Tumbleweed). 15.4 has an old version that misses the file we need. + third_party/wayland-protocols/src #pkgconfig(wayland-protocols) — 15.4 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 @@ -371,6 +370,7 @@ 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 "*.wasm" -print -delete find . -type f -name "*.jar" -print -delete find . -type f -name "*.exe" -print -delete find . -type f -name "*.node" -print -delete @@ -394,8 +394,7 @@ echo ">>>>>> Hardlink duplicate files to reduce extraction time" fdupes -Sr src echo ">>>>>> Create tarball" -#I would like to use zst, as it decompresses MUCH faster, but unfortunately it is not supported by OBS diff view yet -XZ_OPT="-T$(nproc) -e9 -vv" tar -vvcJf "${ELECTRON_PKGDIR}/${ELECTRON_PKGNAME}-${ELECTRON_PKGVERSION}.tar.xz" src +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 cf failed" cleanup_and_exit 1 diff --git a/disable-devtools-tests.patch b/disable-devtools-tests.patch new file mode 100644 index 0000000..8c7f84c --- /dev/null +++ b/disable-devtools-tests.patch @@ -0,0 +1,10 @@ +--- a/third_party/devtools-frontend/src/BUILD.gn ++++ b/third_party/devtools-frontend/src/BUILD.gn +@@ -13,7 +13,6 @@ import("./third_party/blink/public/publi + + devtools_frontend_resources_deps = [ + "front_end", +- "test", + ] + + group("devtools_all_files") { diff --git a/electron-21.3.2.tar.xz b/electron-21.3.2.tar.xz deleted file mode 100644 index 3f82949..0000000 --- a/electron-21.3.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:465f392c124347f7e4f49f702d9a51578cc852274848a5a8a2a4867e7c74e9d3 -size 527213452 diff --git a/electron-21.3.4.tar.zst b/electron-21.3.4.tar.zst new file mode 100644 index 0000000..29e7c03 --- /dev/null +++ b/electron-21.3.4.tar.zst @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c58855c6b65744c393fabb306fa2f1b3e3ac13e140e7353aec4b0a52436164c0 +size 571726326 diff --git a/nodejs-electron.changes b/nodejs-electron.changes index 93945da..7af01a1 100644 --- a/nodejs-electron.changes +++ b/nodejs-electron.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Wed Jan 11 22:08:14 UTC 2023 - Bruno Pitrus +- New upstream release 21.3.4 + * Changed HTML5 Notifications created with the requireInteraction option to not timeout + * Fixed a BrowserWindow maxWidth or maxHeight of 0 causing strange resizing behavior. + * Added node-api: handle no support for external buffers. + * Security fixes: CVE-2022-4174, CVE-2022-4179, CVE-2022-4181, CVE-2022-4190, + CVE-2022-4436, CVE-2022-4437, CVE-2022-4438, CVE-2022-4439, + CVE-2022-4262. +- Remove non-free WASM binaries from tarball + and add disable-devtools-tests.patch to fix resultant build error. +- Add remove-date-reproducible-builds.patch to fix build nondeterminism +- Add backported shim_headers-fix-ninja.patch +- Drop Leap 15.3 support + ------------------------------------------------------------------- Mon Dec 19 16:16:22 UTC 2022 - Bruno Pitrus - Pass --gc-sections to linker. Upstream build process expects this to be done, diff --git a/nodejs-electron.spec b/nodejs-electron.spec index c31bf1f..e7e6df3 100644 --- a/nodejs-electron.spec +++ b/nodejs-electron.spec @@ -203,13 +203,13 @@ BuildArch: i686 Name: nodejs-electron -Version: 21.3.2 +Version: 21.3.4 Release: 0 Summary: Build cross platform desktop apps with JavaScript, HTML, and CSS License: AFL-2.0 AND Apache-2.0 AND blessing AND BSD-2-Clause AND BSD-3-Clause AND BSD-Protection AND BSD-Source-Code AND bzip2-1.0.6 AND IJG AND ISC AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND MIT AND MIT-CMU AND MIT-open-group AND (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND MPL-2.0 AND OpenSSL AND SGI-B-2.0 AND SUSE-Public-Domain AND X11 Group: Development/Languages/NodeJS 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 @@ -256,6 +256,8 @@ Patch72: electron-version-from-env.patch Patch73: disable-webspeech.patch Patch74: common.gypi-remove-fno-omit-frame-pointer.patch Patch75: gcc-asmflags.patch +# https://sources.debian.org/patches/chromium/108.0.5359.124-1/disable/tests.patch/ +Patch76: disable-devtools-tests.patch # PATCHES to use system libs Patch1002: chromium-system-libusb.patch @@ -352,6 +354,8 @@ Patch3092: webgl_image_conversion-Wstrict-aliasing.patch Patch3093: xr_cube_map-Wstrict-aliasing.patch Patch3094: static_constructors-Wstrict-aliasing.patch Patch3095: CVE-2022-43548.patch +Patch3096: remove-date-reproducible-builds.patch +Patch3097: shim_headers-fix-ninja.patch %if %{with clang} BuildRequires: clang @@ -445,6 +449,7 @@ 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) @@ -692,7 +697,10 @@ patch -R -p1 < %SOURCE420 # Link system wayland-protocols-devel into where chrome expects them mkdir -p third_party/wayland-protocols/kde/src +#mkdir -p third_party/wayland-protocols/mesa + #ln -svfT %{_datadir}/wayland-protocols third_party/wayland-protocols/src +#ln -svfT %{_datadir}/wayland-eglstream third_party/wayland-protocols/mesa/wayland-drm ln -svfT %{_datadir}/plasma-wayland-protocols third_party/wayland-protocols/kde/src/protocols # Shim generators for replace_gn_files.py @@ -1128,6 +1136,7 @@ myconf_gn+=" enable_xz_extractor=false" myconf_gn+=" enable_feed_v2=false" myconf_gn+=" ozone_platform_headless=false" myconf_gn+=" angle_enable_gl_null=false" +myconf_gn+=" enable_paint_preview=false" @@ -1236,6 +1245,7 @@ myconf_gn+=" rtc_use_pipewire=true rtc_link_pipewire=true" myconf_gn+=" use_qt=true" %endif + # Do not build WebGPU support. It is huge and not used by ANY known apps (we would know if it was — it's hidden behind an experimental flag). myconf_gn+=" use_dawn=false" diff --git a/remove-date-reproducible-builds.patch b/remove-date-reproducible-builds.patch new file mode 100644 index 0000000..1e9d289 --- /dev/null +++ b/remove-date-reproducible-builds.patch @@ -0,0 +1,62 @@ +--- a/tools/json_schema_compiler/cpp_util.py ++++ b/tools/json_schema_compiler/cpp_util.py +@@ -13,9 +13,9 @@ + import re + + CHROMIUM_LICENSE = ( +-"""// Copyright %d The Chromium Authors. All rights reserved. ++"""// Copyright 2022 The Chromium Authors. All rights reserved. + // Use of this source code is governed by a BSD-style license that can be +-// found in the LICENSE file.""" % datetime.now().year ++// found in the LICENSE file.""" + ) + GENERATED_FILE_MESSAGE = """// GENERATED FROM THE API DEFINITION IN + // %s +--- a/tools/json_to_struct/json_to_struct.py ++++ b/tools/json_to_struct/json_to_struct.py +@@ -74,7 +74,7 @@ + import struct_generator + import element_generator + +-HEAD = u"""// Copyright %d The Chromium Authors. All rights reserved. ++HEAD = u"""// Copyright 2022 The Chromium Authors. All rights reserved. + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + +@@ -227,7 +227,7 @@ + year: Year to display next to the copy-right in the header. + """ + year = int(year) if year else datetime.now().year +- head = HEAD % (year, schema_filename, description_filename) ++ head = HEAD % (schema_filename, description_filename) + _GenerateH(basepath, output_root, head, namespace, schema, description) + _GenerateCC(basepath, output_root, head, namespace, schema, description) + +--- src/tools/json_schema_compiler/feature_compiler.py.old 2022-12-02 23:49:17.031737400 +0100 ++++ src/tools/json_schema_compiler/feature_compiler.py 2023-01-04 06:47:07.764551600 +0100 +@@ -19,7 +19,7 @@ + + # The template for the header file of the generated FeatureProvider. + HEADER_FILE_TEMPLATE = """ +-// Copyright %(year)s The Chromium Authors. All rights reserved. ++// Copyright 2022 The Chromium Authors. All rights reserved. + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + +@@ -43,7 +43,7 @@ + + # The beginning of the .cc file for the generated FeatureProvider. + CC_FILE_BEGIN = """ +-// Copyright %(year)s The Chromium Authors. All rights reserved. ++// Copyright 2022 The Chromium Authors. All rights reserved. + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + +@@ -899,7 +899,6 @@ + replace('.', '_').upper()), + 'method_name': self._method_name, + 'source_files': str([ToPosixPath(f) for f in self._source_files]), +- 'year': str(datetime.now().year) + }) + if not os.path.exists(self._out_root): + os.makedirs(self._out_root) diff --git a/shim_headers-fix-ninja.patch b/shim_headers-fix-ninja.patch new file mode 100644 index 0000000..c083065 --- /dev/null +++ b/shim_headers-fix-ninja.patch @@ -0,0 +1,18 @@ +Correct output path of ninja shim_headers rule +This is not needed for a succesful build on OBS but makes building it manually way easier + +--- src/build/shim_headers.gni.orig ++++ src/build/shim_headers.gni +@@ -28,8 +28,10 @@ + } + args += invoker.headers + +- outputs = process_file_template(invoker.headers, +- "${shim_headers_path}/{{source_file_part}}") ++ outputs = [] ++ foreach(h, invoker.headers) { ++ outputs += [ shim_headers_path + "/" + rebase_path(invoker.root_path,"//") + "/" + h ] ++ } + } + + group(target_name) {