gstreamer1.0: Fix reproducibility issue around libcap

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'

(From OE-Core rev: 7fc8f6a6c8c7c2c23689749084170a0bd9721841)

Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Jose Quaresma
2020-10-29 14:27:45 +00:00
committed by Richard Purdie
parent 43e3a19c19
commit 6d4707d56d
2 changed files with 2 additions and 40 deletions

View File

@@ -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
# user/group to change to in gst-ptp-helper
ptp_helper_setuid_user = get_option('ptp-helper-setuid-user')
Index: gstreamer-1.16.1/meson_options.txt
===================================================================
--- gstreamer-1.16.1.orig/meson_options.txt
+++ gstreamer-1.16.1/meson_options.txt
@@ -26,6 +26,7 @@ option('libunwind', type : 'feature', va
option('libdw', type : 'feature', value : 'auto', description : 'Use libdw to generate better backtraces from libunwind')
option('dbghelp', type : 'feature', value : 'auto', description : 'Use dbghelp to generate backtraces')
option('bash-completion', type : 'feature', value : 'auto', description : 'Install bash completion files')
+option('setcap', type : 'feature', value : 'auto', description : 'Use setcap')
# Common feature options
option('examples', type : 'feature', value : 'auto', yield : true)

View File

@@ -6,7 +6,7 @@ BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer"
SECTION = "multimedia"
LICENSE = "LGPLv2+"
DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native"
DEPENDS = "glib-2.0 glib-2.0-native libxml2 bison-native flex-native"
inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc
@@ -21,7 +21,6 @@ SRC_URI = " \
file://0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch \
file://0003-meson-Add-valgrind-feature.patch \
file://0004-meson-Add-option-for-installed-tests.patch \
file://capfix.patch \
"
SRC_URI[md5sum] = "0e661ed5bdf1d8996e430228d022628e"
SRC_URI[sha256sum] = "e3f044246783fd685439647373fa13ba14f7ab0b346eadd06437092f8419e94e"
@@ -40,7 +39,7 @@ PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils"
PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion"
PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled"
PACKAGECONFIG[setcap] = "-Dsetcap=enabled,-Dsetcap=disabled,libcap libcap-native"
PACKAGECONFIG[setcap] = ",,libcap libcap-native"
# TODO: put this in a gettext.bbclass patch
def gettext_oemeson(d):