diff --git a/_constraints b/_constraints
index 66416bf..76afb9e 100644
--- a/_constraints
+++ b/_constraints
@@ -1,34 +1,45 @@
-
-
- 24
-
-
- 8
-
- 6
-
-
-
- x86_64
- i586
-
-
-
- 27
-
- 12
-
-
-
-
- aarch64
-
-
-
- asimdrdm
-
-
-
+
+
+ 24
+
+
+ 8
+
+ 6
+
+
+
+ aarch64
+
+
+
+ 20
+
+
+
+
+
+ x86_64
+
+
+
+ 30
+
+ 8
+
+
+
+
+ aarch64
+ armv7l
+ armv6l
+
+
+
+ asimdrdm
+
+
+
diff --git a/chromium-99-pdfium-system-libtiff.patch b/chromium-99-pdfium-system-libtiff.patch
deleted file mode 100644
index d8eefb1..0000000
--- a/chromium-99-pdfium-system-libtiff.patch
+++ /dev/null
@@ -1,90 +0,0 @@
---- patch99/third_party/pdfium/core/fxcodec/tiff/tiff_decoder.cpp 2022-02-10 05:21:05.000000000 +0100
-+++ patch99/third_party/pdfium/core/fxcodec/tiff/tiff_decoder.cpp.system-libtiff 2022-02-14 15:21:53.169231723 +0100
-@@ -22,9 +22,7 @@
- #include "third_party/base/notreached.h"
- #include "third_party/base/numerics/safe_conversions.h"
-
--extern "C" {
--#include "third_party/libtiff/tiffiop.h"
--} // extern C
-+#include
-
- namespace {
-
-@@ -190,7 +188,7 @@ TIFF* tiff_open(void* context, const cha
- tiff_write, tiff_seek, tiff_close, tiff_get_size,
- tiff_map, tiff_unmap);
- if (tif) {
-- tif->tif_fd = (int)(intptr_t)context;
-+ (void)TIFFSetFileno(tif, (int)(intptr_t)context);
- }
- return tif;
- }
-diff -up chromium-60.0.3112.40/third_party/pdfium/third_party/BUILD.gn.pdfium-system-libtiff-libpng chromium-60.0.3112.40/third_party/pdfium/third_party/BUILD.gn
---- chromium-60.0.3112.40/third_party/pdfium/third_party/BUILD.gn.pdfium-system-libtiff-libpng 2017-06-22 00:04:10.000000000 +0200
-+++ chromium-60.0.3112.40/third_party/pdfium/third_party/BUILD.gn 2017-06-24 22:25:18.901585830 +0200
-@@ -501,59 +501,13 @@ source_set("fx_lpng") {
- }
- }
-
-+config("fx_tiff_config") {
-+ libs = [ "tiff" ]
-+}
-+
- if (pdf_enable_xfa_tiff) {
- source_set("fx_tiff") {
-- configs -= [ "//build/config/compiler:chromium_code" ]
-- configs += [
-- "//build/config/compiler:no_chromium_code",
-- ":pdfium_third_party_config",
-- ]
-- if (is_win) {
-- # Need to undefine the macro since it is redefined in tif_jpeg.c.
-- configs -= [ "//build/config/win:lean_and_mean" ]
-- }
-- deps = [
-- ":zlib",
-- "../core/fxcrt",
-- "//third_party:jpeg",
-- ]
-- sources = [
-- "libtiff/tif_aux.c",
-- "libtiff/tif_close.c",
-- "libtiff/tif_codec.c",
-- "libtiff/tif_color.c",
-- "libtiff/tif_compress.c",
-- "libtiff/tif_dir.c",
-- "libtiff/tif_dirinfo.c",
-- "libtiff/tif_dirread.c",
-- "libtiff/tif_dirwrite.c",
-- "libtiff/tif_dumpmode.c",
-- "libtiff/tif_error.c",
-- "libtiff/tif_extension.c",
-- "libtiff/tif_fax3.c",
-- "libtiff/tif_fax3sm.c",
-- "libtiff/tif_flush.c",
-- "libtiff/tif_getimage.c",
-- "libtiff/tif_jpeg.c",
-- "libtiff/tif_luv.c",
-- "libtiff/tif_lzw.c",
-- "libtiff/tif_next.c",
-- "libtiff/tif_open.c",
-- "libtiff/tif_packbits.c",
-- "libtiff/tif_pixarlog.c",
-- "libtiff/tif_predict.c",
-- "libtiff/tif_print.c",
-- "libtiff/tif_read.c",
-- "libtiff/tif_strip.c",
-- "libtiff/tif_swab.c",
-- "libtiff/tif_thunder.c",
-- "libtiff/tif_tile.c",
-- "libtiff/tif_version.c",
-- "libtiff/tif_warning.c",
-- "libtiff/tif_write.c",
-- "libtiff/tiffiop.h",
-- "libtiff/tiffvers.h",
-- ]
-+ public_configs = [ ":fx_tiff_config" ]
- }
- }
-
diff --git a/create_tarball.sh b/create_tarball.sh
index 86db3a3..7d8d6c0 100644
--- a/create_tarball.sh
+++ b/create_tarball.sh
@@ -230,7 +230,7 @@ keeplibs=(
third_party/libaom/source/libaom/third_party/vector
third_party/libaom/source/libaom/third_party/x86inc
third_party/libavif #leap too old
- third_party/libgav1 #Usage of private headers (ObuFrameHeader from utils/types.h)
+ #third_party/libgav1 #Usage of private headers (ObuFrameHeader from utils/types.h) in VAAPI code only
third_party/libjxl #not in Leap
third_party/libphonenumber #Depends on protobuf which cannot be unbundled
third_party/libsrtp #Use of private headers. they were public in libsrtp1
@@ -238,8 +238,8 @@ keeplibs=(
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 in VAAPI code only.
- third_party/libvpx/source/libvpx/third_party/x86inc
+ #third_party/libvpx #Use of private headers in VAAPI code only.
+ #third_party/libvpx/source/libvpx/third_party/x86inc
third_party/libwebm #Usage of private headers (mkvparser/mkvmuxer)
third_party/libx11 #Derived code, not vendored dep
third_party/libxcb-keysyms #Derived code, not vendored dep
@@ -257,14 +257,15 @@ keeplibs=(
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/openscreen/src/third_party/tinycbor #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.
+ #we don't build pdf support, removing it from tarball to save space
+ #third_party/pdfium #Part of chrome, not available separately.
+ #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
@@ -355,6 +356,7 @@ rm -rf third_party/blink/web_tests # 1.6GB
rm -rf third_party/catapult/tracing/test_data # 200MB
rm -rf third_party/sqlite/src/test #86MB
find chrome/test/data -type f ! -name "*.gn" -a ! -name "*.gni" -delete #249MB, thanks Mageia
+find third_party/hunspell_dictionaries -type f ! -name "*.gn" -a ! -name "*.gni" -delete #262MB
#see electron/.circleci/config/base.yml
rm -rf android_webview
diff --git a/electron-22.3.21.tar.zst b/electron-22.3.21.tar.zst
deleted file mode 100644
index efc473c..0000000
--- a/electron-22.3.21.tar.zst
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:65436d9ff9ce3c6dbdd48ae839358a27bb61942432fdcf0601e85ce2c83b184a
-size 591310965
diff --git a/electron-22.3.22.tar.zst b/electron-22.3.22.tar.zst
new file mode 100644
index 0000000..e0c3aff
--- /dev/null
+++ b/electron-22.3.22.tar.zst
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:474bba0018b771100e2391c74e737061419aec6d6bcfe8c4ad5ca5a0d84a8825
+size 531579672
diff --git a/nodejs-electron.changes b/nodejs-electron.changes
index f951a65..4a8151d 100644
--- a/nodejs-electron.changes
+++ b/nodejs-electron.changes
@@ -1,3 +1,12 @@
+-------------------------------------------------------------------
+Mon Aug 28 15:59:52 UTC 2023 - Bruno Pitrus
+
+- New upstream release 22.3.22
+ * Fixed decorations for tiled windows on Wayland.
+ * Security fixes for V8 (CVE-2023-4355, CVE-2023-4352), Skia (CVE-2023-4354), ANGLE (CVE-2023-4353), and Network (CVE-2023-4351)
+- Clean up third_party/… in tarball.
+ * drop chromium-99-pdfium-system-libtiff.patch which is dead code
+
-------------------------------------------------------------------
Thu Aug 17 16:28:17 UTC 2023 - Bruno Pitrus
diff --git a/nodejs-electron.spec b/nodejs-electron.spec
index ecd130f..7428d38 100644
--- a/nodejs-electron.spec
+++ b/nodejs-electron.spec
@@ -76,6 +76,11 @@ BuildArch: i686
# Linker selection. GCC only. Default is BFD.
# You can try different ones if it has problems.
# arm64 reports relocation errors with BFD.
+# obj/third_party/electron_node/deps/uv/uv/threadpool.o: in function `init_once':
+# /home/abuild/rpmbuild/BUILD/src/out/Release/../../third_party/electron_node/deps/uv/src/threadpool.c:254:(.text+0x2bc): relocation truncated to fit: R_AARCH64_CALL26 against symbol `pthread_atfork' defined in .text section in /usr/lib64/libc_nonshared.a(pthread_atfork.oS)
+# obj/third_party/electron_node/node_lib/embed_helpers.o: in function `std::__cxx11::basic_string, std::allocator > node::SPrintFImpl(char const*, char const*&&)':
+# /home/abuild/rpmbuild/BUILD/src/out/Release/../../third_party/electron_node/src/debug_utils-inl.h:76:(.text.unlikely._ZN4node11SPrintFImplIPKcJEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_OT_DpOT0_[_ZN4node11SPrintFImplIPKcJEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_OT_DpOT0_]+0x50): relocation truncated to fit: R_AARCH64_CALL26 against symbol `node::Assert(node::AssertionInfo const&)' defined in .text section in obj/third_party/electron_node/node_lib/node_errors.o
+
%if 0%{?suse_version}
%ifarch aarch64
%bcond_without gold
@@ -212,7 +217,7 @@ BuildArch: i686
Name: nodejs-electron
-Version: 22.3.21
+Version: 22.3.22
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
@@ -284,8 +289,6 @@ Patch1040: system-jsoncpp.patch
Patch1041: system-zlib.patch
Patch1044: replace_gn_files-system-libs.patch
Patch1045: angle-system-xxhash.patch
-# https://svnweb.mageia.org/packages/cauldron/chromium-browser-stable/current/SOURCES/chromium-99-pdfium-system-libtiff-libpng.patch
-Patch1046: chromium-99-pdfium-system-libtiff.patch
Patch1047: cares_public_headers.patch
Patch1048: chromium-remove-bundled-roboto-font.patch
Patch1053: swiftshader-use-system-llvm.patch
@@ -900,25 +903,19 @@ export LDFLAGS="${LDFLAGS} -Wl,--as-needed -fuse-ld=mold"
%limit_build -m 2600
%endif
+
%if %{with lto} && %{without clang}
-# reduce the threads for linking even more due to LTO eating ton of memory
-_link_threads=$(((%{jobs} - 2)))
-
%ifarch aarch64
-_link_threads=1
+# reduce the threads for linking even more due to LTO eating ton of memory
+# [This is not used currently — these settings still get us OOM on 20GB memory]
+_link_threads=$(((%{jobs} - 6)))
-%if %{without mold}
-%if %{with gold}
-export LDFLAGS="${LDFLAGS} -Wl,--no-map-whole-files -Wl,--no-keep-memory -Wl,--no-keep-files-mapped"
-%else
-export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--hash-size=30 -Wl,--reduce-memory-overheads"
-%endif
-%endif
-export LDFLAGS="$LDFLAGS --param ggc-min-expand=30 --param ggc-min-heapsize=4096"
-
-%endif
test "$_link_threads" -le 0 && _link_threads=1
-export LDFLAGS="$LDFLAGS -flto=$_link_threads --param lto-max-streaming-parallelism=1"
+export LDFLAGS="$LDFLAGS -flto=$_link_threads --param lto-max-streaming-parallelism=1 -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
+%else
+# x64 is fine with the the default settings (the machines have 30GB+ ram)
+export LDFLAGS="$LDFLAGS -flto=auto"
+%endif
%endif
gn_system_libraries=(
@@ -1388,10 +1385,6 @@ ln -srv third_party/emoji-segmenter/src/emoji_presentation_scanner.rl -t out/Rel
ln -srv third_party/angle/src/compiler/translator/glslang.l -t out/Release
ln -srv third_party/angle/src/compiler/preprocessor/preprocessor.l -t out/Release
ln -srv third_party -t out/Release
-ln -srv third_party/libvpx -t third_party/libvpx/source/libvpx/third_party
-ln -srv third_party -t third_party/libvpx/source/libvpx/vp8
-ln -srv third_party -t third_party/libvpx/source/libvpx/vp9
-ln -srv third_party -t third_party/libvpx/source
%files
%license electron/LICENSE out/Release/LICENSES.chromium.html