Re: [OE-core] [PATCH v5 01/22] gstreamer1.0: Fix reproducibility issue around libcap

Jose Quaresma
2020-10-29T16:13:39Z

It looks for setcap in /usr/sbin and /sbin but needs libcap as wheel.
when we have libcaps on DEPENDS as with version 1.16 and the host
system has setcap binary, it introduces a dependency on the host
system.
The patch fixes this situation.

But libcap is only needed if we need to use the setcap
So remove libcap from DEPENDS will fail to use
'ptp-helper-permissions=capabilities' even if setcap is found on the
host.

In my opinion this a better description can be used in this
PACKAGECONFIG, something like this:

-PACKAGECONFIG[setcap] = ",,libcap libcap-native"
+PACKAGECONFIG[capabilities] =
"-Dptp-helper-permissions=capabilities,,libcap libcap-native"

Richard Purdie <richard.purdie@linuxfoundation.org> escreveu no dia
quinta, 29/10/2020 à(s) 15:32:
>
> On Thu, 2020-10-29 at 14:27 +0000, Jose Quaresma wrote:
> > Currently gstreamer configuration depends libcap and on whether
> > setcap is found on the host system.
> >
> > Removing libcap from DEPENDS and only use it when the 'setcap' is enabled.
> >
> > * capfix.patch
> > Removed as the same goals can be achieved only with the PACKAGECONFIG 'setcap'
> >
> > Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
> > ---
> > .../gstreamer/gstreamer1.0/capfix.patch | 37 -------------------
> > .../gstreamer/gstreamer1.0_1.16.2.bb | 5 +--
> > 2 files changed, 2 insertions(+), 40 deletions(-)
> > delete 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
> > deleted file mode 100644
> > index 7ca3d5ad4a..0000000000
> > --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch
> > +++ /dev/null
> > @@ -1,37 +0,0 @@
> > -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@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 did have a question about this. I think the problem this patch was
> fixing was that <PATH>/setcap was being coded into the headers and
> hence the output regardless of whether setcap was enabled or disabled.
> Since its looking directly at /usr/sbin/ and /sbin/, this made it
> depend on the host system it was built on.
>
> Are you saying that is no longer encoded in the output?
>
> Cheers,
>
> Richard
>

--
best regards,
José Quaresma