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-11-03 19:13:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nodejs-electron (Old)
 and      /work/SRC/openSUSE:Factory/.nodejs-electron.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nodejs-electron"

Thu Nov  3 19:13:52 2022 rev:41 rq:1032857 version:21.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/nodejs-electron/nodejs-electron.changes  
2022-10-30 18:29:25.166573549 +0100
+++ 
/work/SRC/openSUSE:Factory/.nodejs-electron.new.2275/nodejs-electron.changes    
    2022-11-03 19:14:17.208043608 +0100
@@ -1,0 +2,14 @@
+Tue Nov  1 20:51:32 UTC 2022 - Bruno Pitrus <brunopit...@hotmail.com>
+- New upstream release 21.2.1
+  * Fixed spurious promise rejection in webContents.loadURL when navigating to 
a hash.
+  * Updated Chromium to 106.0.5249.165.
+- Add electron-version-from-env.patch to fix build error
+- Add upstreamable patches fixing various erroneous C++ constructs
+  * ipcz-safe_math-Wuninitialized.patch
+  * passwords_counter-Wsubobject-linkage.patch
+  * static_constructors-Wstrict-aliasing.patch
+  * vector_math_impl-Wstrict-aliasing.patch
+  * webgl_image_conversion-Wstrict-aliasing.patch
+  * xr_cube_map-Wstrict-aliasing.patch
+
+-------------------------------------------------------------------

Old:
----
  electron-21.2.0.tar.xz

New:
----
  electron-21.2.1.tar.xz
  electron-version-from-env.patch
  ipcz-safe_math-Wuninitialized.patch
  passwords_counter-Wsubobject-linkage.patch
  static_constructors-Wstrict-aliasing.patch
  vector_math_impl-Wstrict-aliasing.patch
  webgl_image_conversion-Wstrict-aliasing.patch
  xr_cube_map-Wstrict-aliasing.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nodejs-electron.spec ++++++
--- /var/tmp/diff_new_pack.Lys5LE/_old  2022-11-03 19:14:24.192084675 +0100
+++ /var/tmp/diff_new_pack.Lys5LE/_new  2022-11-03 19:14:24.196084700 +0100
@@ -206,7 +206,7 @@
 
 
 Name:           nodejs-electron
-Version:        21.2.0
+Version:        21.2.1
 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
@@ -254,6 +254,7 @@
 Patch69:        nasm-generate-debuginfo.patch
 Patch70:        disable-fuses.patch
 Patch71:        enable-jxl.patch
+Patch72:        electron-version-from-env.patch
 
 # PATCHES to use system libs
 Patch1002:      chromium-system-libusb.patch
@@ -340,6 +341,12 @@
 Patch3086:      unzip-Wsubobject-linkage.patch
 Patch3087:      v8_initializer-PageAllocator-fpermissive.patch
 Patch3088:      fix-no-ppapi-build.patch
+Patch3089:      ipcz-safe_math-Wuninitialized.patch
+Patch3090:      passwords_counter-Wsubobject-linkage.patch
+Patch3091:      vector_math_impl-Wstrict-aliasing.patch
+Patch3092:      webgl_image_conversion-Wstrict-aliasing.patch
+Patch3093:      xr_cube_map-Wstrict-aliasing.patch
+Patch3094:      static_constructors-Wstrict-aliasing.patch
 
 %if %{with clang}
 BuildRequires:  clang
@@ -692,6 +699,8 @@
 # GN sets lto on its own and we need just ldflag options, not cflags
 %define _lto_cflags %{nil}
 
+# see electron-version-from-env.patch
+export SUSE_ELECTRON_VERSION=%{version}
 
 # Make sure python is python3
 install -d -m 0755 python3-path
@@ -1199,6 +1208,7 @@
 #Build the supplementary stuff first to notice errors earlier bc building 
electron itself takes several hours.
 ninja -v %{?_smp_mflags} -C out/Release chromium_licenses
 ninja -v %{?_smp_mflags} -C out/Release copy_headers
+ninja -v %{?_smp_mflags} -C out/Release version
 
 # dump the linker command line (if any) in case of failure
 ninja -v %{?_smp_mflags} -C out/Release electron || (cat out/Release/*.rsp | 
sed 's/ /\n/g' && false)
@@ -1234,10 +1244,11 @@
 install -pm 0755 libGLESv2.so            -t %{buildroot}%{_libdir}/electron/
 install -pm 0755 libvk_swiftshader.so    -t %{buildroot}%{_libdir}/electron/
 install -pm 0644 vk_swiftshader_icd.json -t %{buildroot}%{_libdir}/electron/
+install -pm 0644 version                 -t %{buildroot}%{_libdir}/electron/
 popd
 
 
-install -pTm644 electron/ELECTRON_VERSION  
%{buildroot}%{_libdir}/electron/version
+
 
 # Install folders required for webapps
 mkdir -p "%{buildroot}%{_sysconfdir}/webapps"

++++++ electron-21.2.0.tar.xz -> electron-21.2.1.tar.xz ++++++
/work/SRC/openSUSE:Factory/nodejs-electron/electron-21.2.0.tar.xz 
/work/SRC/openSUSE:Factory/.nodejs-electron.new.2275/electron-21.2.1.tar.xz 
differ: char 15, line 1


++++++ electron-version-from-env.patch ++++++
Do not try to get version from git repository tags. We are not building from a 
git checkout.

--- src/electron/script/lib/get-version.js.old  2022-11-01 16:48:22.401632400 
+0000
+++ src/electron/script/lib/get-version.js      2022-11-01 20:04:47.283620900 
+0000
@@ -11,12 +11,5 @@
   // The only difference in the "git describe" technique is that technically a 
commit can "change" it's version
   // number if a tag is created / removed retroactively.  i.e. the first time 
a commit is pushed it will be 1.2.3
   // and after the tag is made rebuilding the same commit will result in it 
being 1.2.4
-  const output = spawnSync('git', ['describe', '--tags', '--abbrev=0'], {
-    cwd: path.resolve(__dirname, '..', '..')
-  });
-  if (output.status !== 0) {
-    console.error(output.stderr);
-    throw new Error('Failed to get current electron version');
-  }
-  return output.stdout.toString().trim().replace(/^v/g, '');
+  return process.env.SUSE_ELECTRON_VERSION
 };
--- src/electron/BUILD.gn.old   2022-11-01 16:48:22.313588400 +0000
+++ src/electron/BUILD.gn       2022-11-01 20:50:40.467344500 +0000
@@ -111,8 +111,6 @@
                                [],
                                "trim string",
                                [
-                                 ".git/packed-refs",
-                                 ".git/HEAD",
                                  "script/lib/get-version.js",
                                ])
 

++++++ ipcz-safe_math-Wuninitialized.patch ++++++
Do not put an expression with side effects inside an assert,
as the assert gets entirely removed in an optimized build.

See it for yourself: https://godbolt.org/z/GeG4zefK9

Very safe math, indeed.

--- src/third_party/ipcz/src/util/safe_math.h.old       2022-10-20 
19:00:41.567140300 +0200
+++ src/third_party/ipcz/src/util/safe_math.h   2022-10-29 22:46:07.312067200 
+0200
@@ -17,24 +17,24 @@
   // This throws a compile-time error on evaluating the constexpr if it can be
   // determined at compile-time as failing, otherwise it will fail an
   // assertion at runtime.
-  ABSL_HARDENING_ASSERT(
-      ABSL_PREDICT_TRUE(value <= std::numeric_limits<Dst>::max()));
+  auto ass=ABSL_PREDICT_TRUE(value <= std::numeric_limits<Dst>::max());
+  ABSL_HARDENING_ASSERT(ass);
   return static_cast<Dst>(value);
 }
 
 template <typename T>
 constexpr T CheckAdd(T a, T b) {
   T result;
-  ABSL_HARDENING_ASSERT(
-      !ABSL_PREDICT_FALSE(__builtin_add_overflow(a, b, &result)));
+  auto ass=!ABSL_PREDICT_FALSE(__builtin_add_overflow(a, b, &result));
+  ABSL_HARDENING_ASSERT(ass);
   return result;
 }
 
 template <typename T>
 constexpr T CheckMul(T a, T b) {
   T result;
-  ABSL_HARDENING_ASSERT(
-      !ABSL_PREDICT_FALSE(__builtin_mul_overflow(a, b, &result)));
+  auto ass=!ABSL_PREDICT_FALSE(__builtin_mul_overflow(a, b, &result));
+  ABSL_HARDENING_ASSERT(ass);
   return result;
 }
 

++++++ passwords_counter-Wsubobject-linkage.patch ++++++
--- src/components/browsing_data/core/counters/passwords_counter.cc.old 
2022-10-20 19:00:23.009865700 +0200
+++ src/components/browsing_data/core/counters/passwords_counter.cc     
2022-10-29 22:29:38.660589600 +0200
@@ -34,6 +34,8 @@
   }
 }
 
+}  // namespace
+
 // PasswordStoreFetcher ----------------------------------
 
 // Fetches passswords and observes a PasswordStoreInterface.
@@ -168,8 +170,6 @@
   weak_ptr_factory_.InvalidateWeakPtrs();
 }
 
-}  // namespace
-
 // PasswordsCounter::PasswordsResult ----------------------------------
 PasswordsCounter::PasswordsResult::PasswordsResult(
     const BrowsingDataCounter* source,
--- src/components/browsing_data/core/counters/passwords_counter.h.old  
2022-10-20 19:00:23.009865700 +0200
+++ src/components/browsing_data/core/counters/passwords_counter.h      
2022-10-29 22:28:42.288402800 +0200
@@ -18,9 +18,7 @@
 }
 
 namespace browsing_data {
-namespace {
 class PasswordStoreFetcher;
-}
 class PasswordsCounter : public browsing_data::BrowsingDataCounter {
  public:
   // A subclass of SyncResult that stores the result value, a boolean

++++++ static_constructors-Wstrict-aliasing.patch ++++++
Make DEFINE_GLOBAL C++17 compliant.

The pointer to an object is not interconvertible with the pointer to its 
underlying storage,
and GCC raises a Wstrict-aliasing warning about UB resulting from the 
dereference.
(This is really a pointer provenance issue, not a type aliasing issue, as the 
underlying
void*[] is never actually directly used)
Additionally, void* potentially has a too-small alignment for some types (eg. 
long double).

We fix the fist issue by memory laundering, and the second by switching to 
aligned_storage_t.

--- src/third_party/blink/renderer/platform/wtf/static_constructors.h.old       
2022-10-20 19:00:30.237477900 +0200
+++ src/third_party/blink/renderer/platform/wtf/static_constructors.h   
2022-10-29 21:48:44.336995700 +0200
@@ -21,8 +21,11 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_STATIC_CONSTRUCTORS_H_
 #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_STATIC_CONSTRUCTORS_H_
 
+#include <new>
+#include <type_traits>
+
 // We need to avoid having static constructors. This is accomplished by 
defining
-// a static array of the appropriate size and alignment, and defining a const
+// a buffer of the appropriate size and alignment, and defining a const
 // reference that points to the buffer. During initialization, the object will
 // be constructed with placement new into the buffer. This works with MSVC, 
GCC,
 // and Clang without producing dynamic initialization code even at -O0. The 
only
@@ -33,7 +36,7 @@
 // Use an array of pointers instead of an array of char in case there is some
 // alignment issue.
 #define DEFINE_GLOBAL(type, name)                                          \
-  void* name##Storage[(sizeof(type) + sizeof(void*) - 1) / sizeof(void*)]; \
-  const type& name = *reinterpret_cast<type*>(&name##Storage)
+  std::aligned_storage_t<sizeof(type), alignof(type)> name##Storage; \
+  const type& name = *std::launder(reinterpret_cast<type*>(&name##Storage))
 
 #endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_STATIC_CONSTRUCTORS_H_

++++++ vector_math_impl-Wstrict-aliasing.patch ++++++
--- 
src/third_party/blink/renderer/platform/audio/cpu/x86/vector_math_impl.h.old    
    2022-10-20 19:00:30.057387900 +0200
+++ src/third_party/blink/renderer/platform/audio/cpu/x86/vector_math_impl.h    
2022-10-29 23:03:21.785150600 +0200
@@ -13,6 +13,7 @@
 
 #include <algorithm>
 #include <cmath>
+#include <cstring>
 
 #include "base/check_op.h"
 #include "third_party/blink/renderer/platform/audio/audio_array.h"
@@ -208,13 +209,14 @@
 // source_max = max(abs(source[k])) for all k
 void Vmaxmgv(const float* source_p, float* max_p, uint32_t frames_to_process) {
   constexpr uint32_t kMask = 0x7FFFFFFFu;
-
+  float kMask_float;
+  std::memcpy(&kMask_float, &kMask, 4);
   const float* const source_end_p = source_p + frames_to_process;
 
   DCHECK(IsAligned(source_p));
   DCHECK_EQ(0u, frames_to_process % kPackedFloatsPerRegister);
 
-  MType m_mask = MM_PS(set1)(*reinterpret_cast<const float*>(&kMask));
+  MType m_mask = MM_PS(set1)(kMask_float);
   MType m_max = MM_PS(setzero)();
 
   while (source_p < source_end_p) {

++++++ webgl_image_conversion-Wstrict-aliasing.patch ++++++
--- 
src/third_party/blink/renderer/platform/graphics/gpu/webgl_image_conversion.cc.old
  2022-10-20 19:00:30.113415900 +0200
+++ 
src/third_party/blink/renderer/platform/graphics/gpu/webgl_image_conversion.cc  
    2022-10-29 22:19:57.652611900 +0200
@@ -4,6 +4,7 @@
 
 #include 
"third_party/blink/renderer/platform/graphics/gpu/webgl_image_conversion.h"
 
+#include <cstring>
 #include <limits>
 #include <memory>
 
@@ -416,7 +417,8 @@
     24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 13};
 
 uint16_t ConvertFloatToHalfFloat(float f) {
-  unsigned temp = *(reinterpret_cast<unsigned*>(&f));
+  unsigned temp;
+  std::memcpy(&temp, &f, 4);
   uint16_t signexp = (temp >> 23) & 0x1ff;
   return g_base_table[signexp] +
          ((temp & 0x007fffff) >> g_shift_table[signexp]);
@@ -834,7 +836,9 @@
   uint32_t temp =
       g_mantissa_table[g_offset_table[half >> 10] + (half & 0x3ff)] +
       g_exponent_table[half >> 10];
-  return *(reinterpret_cast<float*>(&temp));
+  float ret;
+  std::memcpy(&ret, &temp, 4);
+  return ret;
 }
 
 /* BEGIN CODE SHARED WITH MOZILLA FIREFOX */

++++++ xr_cube_map-Wstrict-aliasing.patch ++++++
--- src/third_party/blink/renderer/modules/xr/xr_cube_map.cc.old        
2022-10-20 19:00:30.045381900 +0200
+++ src/third_party/blink/renderer/modules/xr/xr_cube_map.cc    2022-10-29 
22:07:43.236052800 +0200
@@ -4,6 +4,8 @@
 
 #include "third_party/blink/renderer/modules/xr/xr_cube_map.h"
 
+#include <cstring>
+
 #include "base/cxx17_backports.h"
 #include "device/vr/public/mojom/vr_service.mojom-blink.h"
 #include 
"third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h"
@@ -19,7 +21,8 @@
 // This is an inversion of FloatToHalfFloat in ui/gfx/half_float.cc
 float HalfFloatToFloat(const uint16_t input) {
   uint32_t tmp = (input & 0x7fff) << 13 | (input & 0x8000) << 16;
-  float tmp2 = *reinterpret_cast<float*>(&tmp);
+  float tmp2;
+  std::memcpy(&tmp2, &tmp, 4);
   return tmp2 / 1.9259299444e-34f;
 }
 

Reply via email to