Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gstreamer for openSUSE:Factory 
checked in at 2024-03-13 22:16:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gstreamer (Old)
 and      /work/SRC/openSUSE:Factory/.gstreamer.new.1770 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gstreamer"

Wed Mar 13 22:16:42 2024 rev:96 rq:1157152 version:1.24.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/gstreamer/gstreamer.changes      2024-03-11 
15:27:34.464382074 +0100
+++ /work/SRC/openSUSE:Factory/.gstreamer.new.1770/gstreamer.changes    
2024-03-13 22:17:08.969117368 +0100
@@ -1,0 +2,19 @@
+Tue Mar 12 09:16:23 UTC 2024 - Antonio Larrosa <[email protected]>
+
+- Replace the quick fix for boo#1221150 with the version submitted
+  to upstream at
+  https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6322:
+  * 0001-Canonicalize-the-library-path-returned-by-dladdr.patch
+- Remove previous version of the fix for boo#1221150:
+  * force-find-gst-plugin-scanner.patch
+- Fix sed command to set the gst-plugin-scanner suffix correctly
+- Add preventive checks for the sed commands that set the binary
+  suffix so that they don't silently fail anymore.
+
+-------------------------------------------------------------------
+Mon Mar 11 13:55:53 UTC 2024 - Antonio Larrosa <[email protected]>
+
+- Add patch from upstream to not install ptp-helper test executable
+  * 0001-ptp-Dont-install-test-executable.patch 
+
+-------------------------------------------------------------------

Old:
----
  force-find-gst-plugin-scanner.patch

New:
----
  0001-Canonicalize-the-library-path-returned-by-dladdr.patch
  0001-ptp-Dont-install-test-executable.patch

BETA DEBUG BEGIN:
  Old:- Remove previous version of the fix for boo#1221150:
  * force-find-gst-plugin-scanner.patch
- Fix sed command to set the gst-plugin-scanner suffix correctly
BETA DEBUG END:

BETA DEBUG BEGIN:
  New:  
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6322:
  * 0001-Canonicalize-the-library-path-returned-by-dladdr.patch
- Remove previous version of the fix for boo#1221150:
  New:- Add patch from upstream to not install ptp-helper test executable
  * 0001-ptp-Dont-install-test-executable.patch 
BETA DEBUG END:

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

Other differences:
------------------
++++++ gstreamer.spec ++++++
--- /var/tmp/diff_new_pack.qi2QDR/_old  2024-03-13 22:17:10.441171523 +0100
+++ /var/tmp/diff_new_pack.qi2QDR/_new  2024-03-13 22:17:10.445171671 +0100
@@ -34,8 +34,10 @@
 Patch1:         gstreamer-rpm-prov.patch
 # PATCH-FIX-OPENSUSE gstreamer-pie.patch [email protected] -- create 
position-independent executables.
 Patch2:         gstreamer-pie.patch
-# PATCH-FIX-OPENSUSE force-find-gst-plugin-scanner.patch [email protected] -- 
Part of the fix for boo#1221150
-Patch3:         force-find-gst-plugin-scanner.patch
+# PATCH-FIX-UPSTREAM 
0001-Canonicalize-the-library-path-returned-by-dladdr.patch [email protected] 
-- (boo#1221150) 
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6322
+Patch3:         0001-Canonicalize-the-library-path-returned-by-dladdr.patch
+# PATCH-FIX-UPSTREAM
+Patch4:         0001-ptp-Dont-install-test-executable.patch
 
 
 BuildRequires:  bison >= 2.4
@@ -142,8 +144,11 @@
 %build
 export PYTHON=%{_bindir}/python3
 sed -i "s/'gst-plugin-scanner': /'gst-plugin-scanner-%{_target_cpu}': /" 
libs/gst/helpers/meson.build
+grep "'gst-plugin-scanner-%{_target_cpu}': " libs/gst/helpers/meson.build || 
(echo "Couldn't set executable suffix in libs/gst/helpers/meson.build" ; exit 1)
 sed -i "s/'gst-plugin-scanner'/'gst-plugin-scanner-%{_target_cpu}'/" 
meson.build
-sed -i 's/^#define EXESUFFIX$/#define EXESUFFIX "-%{_target_cpu}"/' 
gst/gstpluginloader.c
+grep "'gst-plugin-scanner-%{_target_cpu}'" meson.build || (echo "Couldn't set 
executable suffix in meson.build" ; exit 1)
+sed -i 's/"gst-plugin-scanner"/"gst-plugin-scanner-%{_target_cpu}"/' 
gst/gstpluginloader.c
+grep '"gst-plugin-scanner-%{_target_cpu}"' gst/gstpluginloader.c || (echo 
"Couldn't set executable suffix in gst/gstpluginloader.c" ; exit 1)
 # TODO: enable dbghelp
 %meson \
        -Dptp-helper-permissions=capabilities \
@@ -232,7 +237,6 @@
 %{_libdir}/*.so
 %{_libdir}/pkgconfig/*.pc
 %{_libexecdir}/gstreamer-%{gst_branch}/gst-plugins-doc-cache-generator
-%{_libexecdir}/gstreamer-%{gst_branch}/gst-ptp-helper-test
 %{_rpmconfigdir}/gstreamer-provides
 %{_fileattrsdir}/gstreamer.attr
 %{_datadir}/gir-1.0/*.gir

++++++ 0001-Canonicalize-the-library-path-returned-by-dladdr.patch ++++++
>From 8d17e447da1bb2b55186b24d6aa217551e2ea9a4 Mon Sep 17 00:00:00 2001
From: Antonio Larrosa <[email protected]>
Date: Mon, 11 Mar 2024 15:10:25 +0100
Subject: [PATCH] Canonicalize the library path returned by dladdr

On systems using UsrMerge (like openSUSE or Fedora), /lib64 is
a symlink to /usr/lib64. So dladdr is returning the path to
the gstreamer library in /lib64 in priv_gst_get_relocated_libgstreamer.
Later gst_plugin_loader_spawn tries to build the path to the
gst-plugin-scanner helper from /lib64 and ends up trying to use
/lib64/../libexec/gstreamer-1.0/gst-plugin-scanner which doesn't exist.

By canonicalizing the path with a call to realpath, gst-plugin-scanner
is found correctly under
/usr/lib64/../libexec/gstreamer-1.0/gst-plugin-scanner

Similar change applied to gstreamer/libs/gst/net/gstptpclock.c
---
 subprojects/gstreamer/gst/gstregistry.c       | 21 ++++++++++++++++++-
 .../gstreamer/libs/gst/net/gstptpclock.c      | 20 +++++++++++++++++-
 2 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/gst/gstregistry.c b/gst/gstregistry.c
index c84de1d7f62..191d101e5ea 100644
--- a/gst/gstregistry.c
+++ b/gst/gstregistry.c
@@ -1599,6 +1599,8 @@ priv_gst_get_relocated_libgstreamer (void)
 #elif defined(HAVE_DLADDR)
   {
     Dl_info info;
+    char *real_fname = NULL;
+    long path_max = 0;
 
     GST_DEBUG ("attempting to retrieve libgstreamer-1.0 location using "
         "dladdr()");
@@ -1610,7 +1612,24 @@ priv_gst_get_relocated_libgstreamer (void)
         return NULL;
       }
 
-      dir = g_path_get_dirname (info.dli_fname);
+#ifdef PATH_MAX
+      path_max = PATH_MAX;
+#else
+      path_max = pathconf (info.dli_fname, _PC_PATH_MAX);
+      if (path_max <= 0)
+        path_max = 4096;
+#endif
+
+      real_fname = g_malloc (path_max);
+      if (realpath (info.dli_fname, real_fname)) {
+        dir = g_path_get_dirname (real_fname);
+        GST_DEBUG ("real directory location: %s", dir);
+      } else {
+        GST_ERROR ("could not canonicalize path %s: %s", info.dli_fname, 
g_strerror (errno));
+        dir = g_path_get_dirname (info.dli_fname);
+      }
+      g_free (real_fname);
+
     } else {
       GST_LOG ("dladdr() failed");
       return NULL;
diff --git a/libs/gst/net/gstptpclock.c b/libs/gst/net/gstptpclock.c
index 0b69eb61cf2..c43b5d1e8a6 100644
--- a/libs/gst/net/gstptpclock.c
+++ b/libs/gst/net/gstptpclock.c
@@ -2569,6 +2569,8 @@ get_relocated_libgstnet (void)
 #elif defined(HAVE_DLADDR)
   {
     Dl_info info;
+    char * real_fname = NULL;
+    long path_max = 0;
 
     GST_DEBUG ("attempting to retrieve libgstnet-1.0 location using "
         "dladdr()");
@@ -2580,7 +2582,23 @@ get_relocated_libgstnet (void)
         return NULL;
       }
 
-      dir = g_path_get_dirname (info.dli_fname);
+#ifdef PATH_MAX
+      path_max = PATH_MAX;
+#else
+      path_max = pathconf (info.dli_fname, _PC_PATH_MAX);
+      if (path_max <= 0)
+        path_max = 4096;
+#endif
+      real_fname = g_malloc (path_max);
+      if (realpath (info.dli_fname, real_fname)) {
+        dir = g_path_get_dirname (real_fname);
+        GST_DEBUG ("real directory location: %s", dir);
+      } else {
+        GST_ERROR ("could not canonicalize path %s: %s", info.dli_fname, 
g_strerror (errno));
+        dir = g_path_get_dirname (info.dli_fname);
+      }
+      g_free (real_fname);
+
     } else {
       GST_LOG ("dladdr() failed");
       return NULL;
-- 
GitLab


++++++ 0001-ptp-Dont-install-test-executable.patch ++++++
>From 8859f257c2e4468875665d8782812b83f8ca741f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <[email protected]>
Date: Tue, 5 Mar 2024 15:10:45 +0200
Subject: [PATCH] ptp: Don't install test executable

And handle it like all our other test executables.

Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6262>
---
 subprojects/gstreamer/libs/gst/helpers/ptp/meson.build | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libs/gst/helpers/ptp/meson.build 
b/subprojects/gstreamer/libs/gst/helpers/ptp/meson.build
index 55f1c6a106e..e12ca3fe73d 100644
--- a/libs/gst/helpers/ptp/meson.build
+++ b/libs/gst/helpers/ptp/meson.build
@@ -112,9 +112,7 @@ exe_test = executable('gst-ptp-helper-test', 'main.rs',
   override_options : ['rust_std=2018'],
   rust_args : ['--test', rust_args],
   dependencies : [cap_dep],
-  link_with : conf,
-  install_dir : helpers_install_dir,
-  install : true)
+  link_with : conf)
 
 test('gst-ptp-helper-test', exe_test, protocol : 'rust')
 
-- 
GitLab

Reply via email to