Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gjs for openSUSE:Factory checked in 
at 2021-10-12 21:47:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gjs (Old)
 and      /work/SRC/openSUSE:Factory/.gjs.new.2443 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gjs"

Tue Oct 12 21:47:46 2021 rev:100 rq:923578 version:1.70.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/gjs/gjs.changes  2021-09-29 20:17:40.474803741 
+0200
+++ /work/SRC/openSUSE:Factory/.gjs.new.2443/gjs.changes        2021-10-12 
21:47:48.715739323 +0200
@@ -1,0 +2,13 @@
+Mon Oct  4 17:12:28 UTC 2021 - Bj??rn Lie <[email protected]>
+
+- Add upstream crash fixer patches from stable branch:
+  + b9e122044a7ccc1e2a3374c680b6ea82066bfa59.patch: arg: Replace
+    gsize with size_t
+  + 62025d4a2738a36ea5f1a7cebef08b22b5eef613.patch: Handle optional
+    out parameters in callbacks
+- Stop disabling lto: Following this, stop passing dtrace=true and
+  systemtap=true to meson, aswell as dropping systemtap-sdt-devel
+  BuildRequires, follow upstream default.
+- Add optional pkgconfig(gtk4) BuildRequires: meson checks for it.
+
+-------------------------------------------------------------------

New:
----
  62025d4a2738a36ea5f1a7cebef08b22b5eef613.patch
  b9e122044a7ccc1e2a3374c680b6ea82066bfa59.patch

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

Other differences:
------------------
++++++ gjs.spec ++++++
--- /var/tmp/diff_new_pack.AbpfZT/_old  2021-10-12 21:47:49.223740051 +0200
+++ /var/tmp/diff_new_pack.AbpfZT/_new  2021-10-12 21:47:49.223740051 +0200
@@ -24,13 +24,16 @@
 Group:          Development/Libraries/GNOME
 URL:            https://wiki.gnome.org/Projects/Gjs
 Source0:        
https://download.gnome.org/sources/gjs/1.70/%{name}-%{version}.tar.xz
+# PATCH-FIX-UPSTREAM b9e122044a7ccc1e2a3374c680b6ea82066bfa59.patch -- arg: 
Replace gsize with size_t
+Patch0:         b9e122044a7ccc1e2a3374c680b6ea82066bfa59.patch
+# PATCH-FIX-UPSTREAM 62025d4a2738a36ea5f1a7cebef08b22b5eef613.patch -- Handle 
optional out parameters in callbacks
+Patch1:         62025d4a2738a36ea5f1a7cebef08b22b5eef613.patch
 
 BuildRequires:  c++_compiler
 BuildRequires:  git
 BuildRequires:  meson >= 0.52.0
 BuildRequires:  pkgconfig
 BuildRequires:  readline-devel
-BuildRequires:  systemtap-sdt-devel
 %if 0%{?sle_version} && 0%{?sle_version} <= 150400
 BuildRequires:  xorg-x11-Xvfb
 %else
@@ -46,6 +49,7 @@
 BuildRequires:  pkgconfig(gobject-introspection-1.0) >= 1.53.4
 BuildRequires:  pkgconfig(gthread-2.0) >= 2.50.0
 BuildRequires:  pkgconfig(gtk+-3.0) >= 3.20
+BuildRequires:  pkgconfig(gtk4)
 BuildRequires:  pkgconfig(libffi)
 BuildRequires:  pkgconfig(mozjs-78)
 # Hack - fix sysprof static devel requires instead
@@ -98,12 +102,7 @@
 %autosetup -p1
 
 %build
-# FIXME # Doesn't play well with systemtap -- lets test this during 3.37 
unstable round, do we still needed?
-%global _lto_cflags %{nil}
-
 %meson \
-       -Ddtrace=true \
-       -Dsystemtap=true \
        -Dinstalled_tests=false \
        %{nil}
 %meson_build
@@ -111,7 +110,7 @@
 %install
 %meson_install
 
-# FIXME # Try again on next versionbump
+# FIXME # Try again on next versionbump -- version 1.70.0: does anyone know 
what this fixme is about?
 %check
 export DISPLAY=:98
 Xvfb :98 >& Xvfb.log & trap "kill $! || true" EXIT
@@ -141,6 +140,5 @@
 %{_libdir}/*.so
 %{_libdir}/pkgconfig/*.pc
 %{_datadir}/%{name}-1.0/
-%{_datadir}/systemtap/tapset/*.stp
 
 %changelog

++++++ 62025d4a2738a36ea5f1a7cebef08b22b5eef613.patch ++++++
>From 62025d4a2738a36ea5f1a7cebef08b22b5eef613 Mon Sep 17 00:00:00 2001
From: Evan Welsh <[email protected]>
Date: Fri, 24 Sep 2021 22:17:04 +0000
Subject: [PATCH] Handle optional out parameters in callbacks

Fixes #439
---
 gi/arg.cpp      | 26 ++++++++++++++++++++------
 gi/arg.h        |  6 ++----
 gi/function.cpp | 14 ++++++++------
 3 files changed, 30 insertions(+), 16 deletions(-)

diff --git a/gi/arg.cpp b/gi/arg.cpp
index 0b8af141..49f36d76 100644
--- a/gi/arg.cpp
+++ b/gi/arg.cpp
@@ -1861,17 +1861,31 @@ void gjs_gi_argument_init_default(GITypeInfo* 
type_info, GIArgument* arg) {
     }
 }
 
-bool
-gjs_value_to_arg(JSContext      *context,
-                 JS::HandleValue value,
-                 GIArgInfo      *arg_info,
-                 GIArgument     *arg)
-{
+bool gjs_value_to_callback_out_arg(JSContext* context, JS::HandleValue value,
+                                   GIArgInfo* arg_info, GIArgument* arg) {
+    GIDirection direction [[maybe_unused]] = 
g_arg_info_get_direction(arg_info);
+    g_assert(
+        (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) &&
+        "gjs_value_to_callback_out_arg does not handle in arguments.");
+
     GjsArgumentFlags flags = GjsArgumentFlags::NONE;
     GITypeInfo type_info;
 
     g_arg_info_load_type(arg_info, &type_info);
 
+    // If the argument is optional and we're passed nullptr,
+    // ignore the GJS value.
+    if (g_arg_info_is_optional(arg_info) && !arg)
+        return true;
+
+    // Otherwise, throw an error to prevent a segfault.
+    if (!arg) {
+        gjs_throw(context,
+                  "Return value %s is not optional but was passed NULL",
+                  g_base_info_get_name(arg_info));
+        return false;
+    }
+
     if (g_arg_info_may_be_null(arg_info))
         flags |= GjsArgumentFlags::MAY_BE_NULL;
     if (g_arg_info_is_caller_allocates(arg_info))
diff --git a/gi/arg.h b/gi/arg.h
index c81c2979..c5c81760 100644
--- a/gi/arg.h
+++ b/gi/arg.h
@@ -44,10 +44,8 @@ enum class GjsArgumentFlags : uint8_t {
                                               GjsArgumentType arg_type);
 
 GJS_JSAPI_RETURN_CONVENTION
-bool gjs_value_to_arg(JSContext      *context,
-                      JS::HandleValue value,
-                      GIArgInfo      *arg_info,
-                      GIArgument     *arg);
+bool gjs_value_to_callback_out_arg(JSContext* context, JS::HandleValue value,
+                                   GIArgInfo* arg_info, GIArgument* arg);
 
 GJS_JSAPI_RETURN_CONVENTION
 bool gjs_array_to_explicit_array(JSContext* cx, JS::HandleValue value,
diff --git a/gi/function.cpp b/gi/function.cpp
index 25fea26f..da060607 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -532,9 +532,10 @@ bool GjsCallbackTrampoline::callback_closure_inner(
             if (g_arg_info_get_direction(&arg_info) == GI_DIRECTION_IN)
                 continue;
 
-            if (!gjs_value_to_arg(context, rval, &arg_info,
-                                  get_argument_for_arg_info(&arg_info, args,
-                                                            i + 
c_args_offset)))
+            if (!gjs_value_to_callback_out_arg(
+                    context, rval, &arg_info,
+                    get_argument_for_arg_info(&arg_info, args,
+                                              i + c_args_offset)))
                 return false;
 
             break;
@@ -587,9 +588,10 @@ bool GjsCallbackTrampoline::callback_closure_inner(
             if (!JS_GetElement(context, out_array, elem_idx, &elem))
                 return false;
 
-            if (!gjs_value_to_arg(context, elem, &arg_info,
-                                  get_argument_for_arg_info(&arg_info, args,
-                                                            i + 
c_args_offset)))
+            if (!gjs_value_to_callback_out_arg(
+                    context, elem, &arg_info,
+                    get_argument_for_arg_info(&arg_info, args,
+                                              i + c_args_offset)))
                 return false;
 
             elem_idx++;
-- 
GitLab

++++++ b9e122044a7ccc1e2a3374c680b6ea82066bfa59.patch ++++++
>From b9e122044a7ccc1e2a3374c680b6ea82066bfa59 Mon Sep 17 00:00:00 2001
From: Evan Miller <[email protected]>
Date: Sun, 12 Sep 2021 15:22:22 -0400
Subject: [PATCH] arg: Replace gsize with size_t

This is causing problems on 32-bit ppc architecture; see
https://gitlab.gnome.org/GNOME/glib/-/issues/2493
---
 gi/arg.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gi/arg.cpp b/gi/arg.cpp
index cff40e10..0b8af141 100644
--- a/gi/arg.cpp
+++ b/gi/arg.cpp
@@ -1706,7 +1706,7 @@ bool gjs_value_to_g_argument(JSContext* context, 
JS::HandleValue value,
 
     case GI_TYPE_TAG_ARRAY: {
         GjsAutoPointer<void> data;
-        gsize length;
+        size_t length;
         GIArrayType array_type = g_type_info_get_array_type(type_info);
 
         /* First, let's handle the case where we're passed an instance
-- 
GitLab

Reply via email to