[OE-core] [PATCH] gstreamer: Fix reproducibility issue around libcap

Richard Purdie richard.purdie at linuxfoundation.org
Thu Feb 20 12:00:08 UTC 2020


On Thu, 2020-02-20 at 12:56 +0100, Martin Hundebøll wrote:
> On 19/02/2020 16.23, Richard Purdie wrote:
> > Add an option to avoid builds depending on the presence of setcap
> > from the host system.
> > 
> > Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> > ---
> >   .../gstreamer/gstreamer1.0/capfix.patch       | 37 +++++++++++++++++++
> >   .../gstreamer/gstreamer1.0_1.16.1.bb          |  2 +
> >   2 files changed, 39 insertions(+)
> >   create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch
> > 
> > diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch
> > new file mode 100644
> > index 00000000000..7ca3d5ad4a6
> > --- /dev/null
> > +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch
> > @@ -0,0 +1,37 @@
> > +Currently gstreamer configuration depends on whether setcap is found on the host
> > +system. Turn this into a configure option to make builds deterinistic.
> > +
> > +RP 2020/2/19
> > +Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> > +Upstream-Status: Pending
> > +
> > +Index: gstreamer-1.16.1/libs/gst/helpers/meson.build
> > +===================================================================
> > +--- gstreamer-1.16.1.orig/libs/gst/helpers/meson.build
> > ++++ gstreamer-1.16.1/libs/gst/helpers/meson.build
> > +@@ -73,7 +73,12 @@ if have_ptp
> > +     endif
> > +   endif
> > +
> > +-  setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false)
> > ++  setcap_feature = get_option('setcap')
> > ++  if setcap_feature.disabled()
> > ++    setcap = find_program('dontexist', required : false)
> > ++  else
> > ++    setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false)
> > ++  endif
> 
> I think this can be simplified by using get_option() directly for the 
> "required" argument:
> 
> setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', 
> required : get_option('setcap'))

Yes, that looks better. I'm no meson expert, this is the first time
I've touched it.

I'd love if it someone was able to get this resolved with upstream. 

I've been trying to work on getting various things fixed upstream (e.g.
some of the perl changes) but I'm having to take a practical view in
some areas. Getting the autobuilder stable/working sanely is currently
more of a priority than getting involved in a discussion with upstream
on something I know little about :/.

I've merged this patch but if anyone wants to improve it, I'm fine with
that.

Cheers,

Richard











More information about the Openembedded-core mailing list