summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrich Ölmann <u.oelmann@pengutronix.de>2021-04-20 11:57:01 +0200
committerKhem Raj <raj.khem@gmail.com>2021-04-21 08:27:01 -0700
commit1debafbfd0e1d77f708d51cbf0432df37ba4e6c3 (patch)
treeb2de453995a09f72a38904b1f57fa960d3812298
parent69dea331296e49cf0fb751b51f3c1d6ddade4bff (diff)
downloadmeta-openembedded-1debafbfd0e1d77f708d51cbf0432df37ba4e6c3.tar.gz
v4l-utils: fix reproducibility
Add upstream patches [1] & [2] to automatically detect the availability of systemd and (currently) never install '50-rc_keymap.conf' at all as the prerequisite would be the ability to compile BPF programs which is not supported in this recipe (at least not now). Previously if your distro was not systemd based the existance of the host system's path "/lib/systemd/system" decided if '50-rc_keymap.conf' was installed or not. [1] https://git.linuxtv.org/v4l-utils.git/commit/?id=3f61e353424fb9ea3dce742022b94dfd7ea1ed9f [2] https://git.linuxtv.org/v4l-utils.git/commit/?id=01f2c6c58e6f4441df7df8e27eb7919f1f01e310 Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0008-configure.ac-autodetect-availability-of-systemd.patch47
-rw-r--r--meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0009-keytable-restrict-installation-of-50-rc_keymap.conf.patch40
-rw-r--r--meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb11
3 files changed, 93 insertions, 5 deletions
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0008-configure.ac-autodetect-availability-of-systemd.patch b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0008-configure.ac-autodetect-availability-of-systemd.patch
new file mode 100644
index 0000000000..5aec3c5747
--- /dev/null
+++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0008-configure.ac-autodetect-availability-of-systemd.patch
@@ -0,0 +1,47 @@
1From 3f61e353424fb9ea3dce742022b94dfd7ea1ed9f Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Ulrich=20=C3=96lmann?= <u.oelmann@pengutronix.de>
3Date: Thu, 4 Mar 2021 14:23:39 +0100
4Subject: [PATCH] configure.ac: autodetect availability of systemd
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Import systemd's official suggestion [1] how this should be handled in packages
10using autoconf. A side effect of this is the removal of the hardcoded fallback
11path "/lib/systemd/system" which leaks build host information when cross
12compiling v4l-utils and therefore defeats reproducible builds.
13
14[1] https://www.freedesktop.org/software/systemd/man/daemon.html#Installing%20systemd%20Service%20Files
15
16Upstream-Status: Backport [https://git.linuxtv.org/v4l-utils.git/commit/?id=3f61e353424fb9ea3dce742022b94dfd7ea1ed9f]
17
18Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
19Signed-off-by: Sean Young <sean@mess.org>
20---
21 configure.ac | 10 +++++++++-
22 1 file changed, 9 insertions(+), 1 deletion(-)
23
24diff --git a/configure.ac b/configure.ac
25index 727730c5ccf4..8470116df4b1 100644
26--- a/configure.ac
27+++ b/configure.ac
28@@ -388,7 +388,15 @@ AC_ARG_WITH(udevdir,
29 AC_ARG_WITH(systemdsystemunitdir,
30 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [set systemd system unit directory]),
31 [],
32- [with_systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd || echo /lib/systemd/system`])
33+ [with_systemdsystemunitdir=auto])
34+AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"],
35+ [def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
36+ AS_IF([test "x$def_systemdsystemunitdir" = "x"],
37+ [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
38+ [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
39+ with_systemdsystemunitdir=no],
40+ [with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
41+AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"])
42
43 # Generic check: works with most distributions
44 def_gconv_dir=`for i in /lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib; do if @<:@ -d \$i/gconv @:>@; then echo \$i/gconv; break; fi; done`
45--
462.29.2
47
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0009-keytable-restrict-installation-of-50-rc_keymap.conf.patch b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0009-keytable-restrict-installation-of-50-rc_keymap.conf.patch
new file mode 100644
index 0000000000..63a695f8f9
--- /dev/null
+++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0009-keytable-restrict-installation-of-50-rc_keymap.conf.patch
@@ -0,0 +1,40 @@
1From 01f2c6c58e6f4441df7df8e27eb7919f1f01e310 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Ulrich=20=C3=96lmann?= <u.oelmann@pengutronix.de>
3Date: Thu, 4 Mar 2021 14:23:40 +0100
4Subject: [PATCH] keytable: restrict installation of 50-rc_keymap.conf
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9It is only needed if BPF is effectively used and the package is compiled for a
10systemd based target.
11
12Upstream-Status: Backport [https://git.linuxtv.org/v4l-utils.git/commit/?id=01f2c6c58e6f4441df7df8e27eb7919f1f01e310]
13
14Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
15Signed-off-by: Sean Young <sean@mess.org>
16---
17 utils/keytable/Makefile.am | 4 ++++
18 1 file changed, 4 insertions(+)
19
20diff --git a/utils/keytable/Makefile.am b/utils/keytable/Makefile.am
21index c5eb414acf2f..eee61f0e0551 100644
22--- a/utils/keytable/Makefile.am
23+++ b/utils/keytable/Makefile.am
24@@ -3,9 +3,13 @@ man_MANS = ir-keytable.1 rc_keymap.5
25 sysconf_DATA = rc_maps.cfg
26 keytablesystem_DATA = $(srcdir)/rc_keymaps/*
27 udevrules_DATA = 70-infrared.rules
28+if WITH_BPF
29+if HAVE_SYSTEMD
30 if HAVE_UDEVDSYSCALLFILTER
31 systemdsystemunit_DATA = 50-rc_keymap.conf
32 endif
33+endif
34+endif
35
36 ir_keytable_SOURCES = keytable.c parse.h ir-encode.c ir-encode.h toml.c toml.h keymap.c keymap.h
37
38--
392.29.2
40
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb
index 3e92d49b4f..2261feb56c 100644
--- a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb
+++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb
@@ -5,7 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=48da9957849056017dc568bbc43d8975 \
5PROVIDES = "libv4l media-ctl" 5PROVIDES = "libv4l media-ctl"
6 6
7DEPENDS = "jpeg \ 7DEPENDS = "jpeg \
8 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}" 8 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)} \
9 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
9DEPENDS_append_libc-musl = " argp-standalone" 10DEPENDS_append_libc-musl = " argp-standalone"
10DEPENDS_append_class-target = " udev" 11DEPENDS_append_class-target = " udev"
11LDFLAGS_append = " -pthread" 12LDFLAGS_append = " -pthread"
@@ -21,13 +22,14 @@ SRC_URI = "http://linuxtv.org/downloads/v4l-utils/v4l-utils-${PV}.tar.bz2 \
21 file://export-mediactl-headers.patch \ 22 file://export-mediactl-headers.patch \
22 file://0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch \ 23 file://0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch \
23 file://0007-Do-not-use-getsubopt.patch \ 24 file://0007-Do-not-use-getsubopt.patch \
25 file://0008-configure.ac-autodetect-availability-of-systemd.patch \
26 file://0009-keytable-restrict-installation-of-50-rc_keymap.conf.patch \
24 " 27 "
25SRC_URI[md5sum] = "46f9e2c0b2fdccd009da2f7e1aa87894" 28SRC_URI[md5sum] = "46f9e2c0b2fdccd009da2f7e1aa87894"
26SRC_URI[sha256sum] = "956118713f7ccb405c55c7088a6a2490c32d54300dd9a30d8d5008c28d3726f7" 29SRC_URI[sha256sum] = "956118713f7ccb405c55c7088a6a2490c32d54300dd9a30d8d5008c28d3726f7"
27 30
28EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev \ 31EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev \
29 --disable-v4l2-compliance-32 --disable-v4l2-ctl-32 \ 32 --disable-v4l2-compliance-32 --disable-v4l2-ctl-32"
30 --with-systemdsystemunitdir=${systemd_system_unitdir}"
31 33
32VIRTUAL-RUNTIME_ir-keytable-keymaps ?= "rc-keymaps" 34VIRTUAL-RUNTIME_ir-keytable-keymaps ?= "rc-keymaps"
33 35
@@ -37,8 +39,7 @@ RPROVIDES_${PN}-dbg += "libv4l-dbg"
37 39
38FILES_media-ctl = "${bindir}/media-ctl ${libdir}/libmediactl.so.*" 40FILES_media-ctl = "${bindir}/media-ctl ${libdir}/libmediactl.so.*"
39 41
40FILES_ir-keytable = "${bindir}/ir-keytable ${base_libdir}/udev/rules.d/*-infrared.rules \ 42FILES_ir-keytable = "${bindir}/ir-keytable ${base_libdir}/udev/rules.d/*-infrared.rules"
41 ${systemd_system_unitdir}/systemd-udevd.service.d/50-rc_keymap.conf"
42RDEPENDS_ir-keytable += "${VIRTUAL-RUNTIME_ir-keytable-keymaps}" 43RDEPENDS_ir-keytable += "${VIRTUAL-RUNTIME_ir-keytable-keymaps}"
43 44
44FILES_rc-keymaps = "${sysconfdir}/rc* ${base_libdir}/udev/rc*" 45FILES_rc-keymaps = "${sysconfdir}/rc* ${base_libdir}/udev/rc*"