diff mbox series

[bug#63499,gnome-team,1/3] gnu: gst-plugins-base: Fix build.

Message ID 2c36d93661d5cf9d3a7c60068571225716f129bd.1684060546.git.liliana.prikler@gmail.com
State New
Headers show
Series To GTK and beyond | expand

Commit Message

Liliana Marie Prikler April 16, 2023, 5:47 a.m. UTC
* gnu/packages/patches/gst-plugins-base-fix-broken-test.patch: New file.
* gnu/packages/gstreamer.scm (gst-plugins-base)[patches]: Use it here.
* gnu/local.mk (dist_patch_DATA): Register it here.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/gstreamer.scm                    |  3 ++-
 .../gst-plugins-base-fix-broken-test.patch    | 22 +++++++++++++++++++
 3 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/gst-plugins-base-fix-broken-test.patch

Comments

Maxim Cournoyer May 15, 2023, 1:46 p.m. UTC | #1
Hi Liliana,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> * gnu/packages/patches/gst-plugins-base-fix-broken-test.patch: New file.
> * gnu/packages/gstreamer.scm (gst-plugins-base)[patches]: Use it here.
> * gnu/local.mk (dist_patch_DATA): Register it here.
> ---
>  gnu/local.mk                                  |  1 +
>  gnu/packages/gstreamer.scm                    |  3 ++-
>  .../gst-plugins-base-fix-broken-test.patch    | 22 +++++++++++++++++++
>  3 files changed, 25 insertions(+), 1 deletion(-)
>  create mode 100644 gnu/packages/patches/gst-plugins-base-fix-broken-test.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 43d6077943..0ff787e8f3 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1316,6 +1316,7 @@ dist_patch_DATA =						\
>    %D%/packages/patches/guile-present-coding.patch		\
>    %D%/packages/patches/guile-rsvg-pkgconfig.patch		\
>    %D%/packages/patches/guile-emacs-fix-configure.patch		\
> +  %D%/packages/patches/gst-plugins-base-fix-broken-test.patch		\
>    %D%/packages/patches/gtk2-fix-builder-test.patch		\
>    %D%/packages/patches/gtk2-harden-list-store.patch		\
>    %D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch	\
> diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
> index 8971c11479..f7e5b397fd 100644
> --- a/gnu/packages/gstreamer.scm
> +++ b/gnu/packages/gstreamer.scm
> @@ -550,7 +550,8 @@ (define-public gst-plugins-base
>                            name "-" version ".tar.xz"))
>        (sha256
>         (base32
> -        "0jcxcx4mgfjvfb3ixibwhx8j330mq3ap469w7hapm6z79q614rgb"))))
> +        "0jcxcx4mgfjvfb3ixibwhx8j330mq3ap469w7hapm6z79q614rgb"))
> +      (patches (search-patches "gst-plugins-base-fix-broken-test.patch"))))
>      (build-system meson-build-system)
>      (propagated-inputs
>       (list glib                     ;required by gstreamer-sdp-1.0.pc
> diff --git a/gnu/packages/patches/gst-plugins-base-fix-broken-test.patch b/gnu/packages/patches/gst-plugins-base-fix-broken-test.patch
> new file mode 100644
> index 0000000000..2785983d8d
> --- /dev/null
> +++ b/gnu/packages/patches/gst-plugins-base-fix-broken-test.patch
> @@ -0,0 +1,22 @@
> +Index: gst-plugins-base-1.22.1/tests/check/libs/allocators.c
> +===================================================================
> +--- gst-plugins-base-1.22.1.orig/tests/check/libs/allocators.c
> ++++ gst-plugins-base-1.22.1/tests/check/libs/allocators.c
> +@@ -80,7 +80,7 @@ GST_START_TEST (test_fdmem)
> + 
> +   alloc = gst_fd_allocator_new ();
> +   fail_unless (alloc);
> +-  mem = gst_fd_allocator_alloc (alloc, fd, 10, GST_FD_MEMORY_FLAG_KEEP_MAPPED);
> ++  mem = gst_fd_allocator_alloc (alloc, fd, 10, GST_FD_MEMORY_FLAG_KEEP_MAPPED | GST_FD_MEMORY_FLAG_DONT_CLOSE);
> + 
> +   fail_unless (gst_memory_map (mem, &info, GST_MAP_READ));
> +   fail_unless (info.data[5] == '5');
> +@@ -95,7 +95,7 @@ GST_START_TEST (test_fdmem)
> +   gst_memory_unmap (mem, &info);
> + 
> +   gst_memory_unref (mem);
> +-  fail_unless (g_close (fd, NULL) == 0);
> ++  fail_unless (g_close (fd, NULL));
> +   gst_object_unref (alloc);
> + }
> + 

The patch should be annotated with metadata concerning its origin, with
a link to track the status upstream (not yet released upstream patch?
custom patch?).  If it wasn't reported to upstream, it should be.

Thanks!

Maxim
Liliana Marie Prikler May 15, 2023, 7:32 p.m. UTC | #2
Am Montag, dem 15.05.2023 um 09:46 -0400 schrieb Maxim Cournoyer:
> Hi Liliana,
> 
> [...]
> 
> The patch should be annotated with metadata concerning its origin,
> with a link to track the status upstream (not yet released upstream
> patch? custom patch?).  If it wasn't reported to upstream, it should
> be.
Independently discovered and fixed in [1].  For clarity, I will prefer
that one or wait for 1.22.3.

Cheers


[1]
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4381
diff mbox series

Patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 43d6077943..0ff787e8f3 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1316,6 +1316,7 @@  dist_patch_DATA =						\
   %D%/packages/patches/guile-present-coding.patch		\
   %D%/packages/patches/guile-rsvg-pkgconfig.patch		\
   %D%/packages/patches/guile-emacs-fix-configure.patch		\
+  %D%/packages/patches/gst-plugins-base-fix-broken-test.patch		\
   %D%/packages/patches/gtk2-fix-builder-test.patch		\
   %D%/packages/patches/gtk2-harden-list-store.patch		\
   %D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch	\
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 8971c11479..f7e5b397fd 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -550,7 +550,8 @@  (define-public gst-plugins-base
                           name "-" version ".tar.xz"))
       (sha256
        (base32
-        "0jcxcx4mgfjvfb3ixibwhx8j330mq3ap469w7hapm6z79q614rgb"))))
+        "0jcxcx4mgfjvfb3ixibwhx8j330mq3ap469w7hapm6z79q614rgb"))
+      (patches (search-patches "gst-plugins-base-fix-broken-test.patch"))))
     (build-system meson-build-system)
     (propagated-inputs
      (list glib                     ;required by gstreamer-sdp-1.0.pc
diff --git a/gnu/packages/patches/gst-plugins-base-fix-broken-test.patch b/gnu/packages/patches/gst-plugins-base-fix-broken-test.patch
new file mode 100644
index 0000000000..2785983d8d
--- /dev/null
+++ b/gnu/packages/patches/gst-plugins-base-fix-broken-test.patch
@@ -0,0 +1,22 @@ 
+Index: gst-plugins-base-1.22.1/tests/check/libs/allocators.c
+===================================================================
+--- gst-plugins-base-1.22.1.orig/tests/check/libs/allocators.c
++++ gst-plugins-base-1.22.1/tests/check/libs/allocators.c
+@@ -80,7 +80,7 @@ GST_START_TEST (test_fdmem)
+ 
+   alloc = gst_fd_allocator_new ();
+   fail_unless (alloc);
+-  mem = gst_fd_allocator_alloc (alloc, fd, 10, GST_FD_MEMORY_FLAG_KEEP_MAPPED);
++  mem = gst_fd_allocator_alloc (alloc, fd, 10, GST_FD_MEMORY_FLAG_KEEP_MAPPED | GST_FD_MEMORY_FLAG_DONT_CLOSE);
+ 
+   fail_unless (gst_memory_map (mem, &info, GST_MAP_READ));
+   fail_unless (info.data[5] == '5');
+@@ -95,7 +95,7 @@ GST_START_TEST (test_fdmem)
+   gst_memory_unmap (mem, &info);
+ 
+   gst_memory_unref (mem);
+-  fail_unless (g_close (fd, NULL) == 0);
++  fail_unless (g_close (fd, NULL));
+   gst_object_unref (alloc);
+ }
+