Accepting request 644351 from home:jirislaby:branches:devel:tools

- fix build with kernel 4.19
  * add 0001-xlat-workaround-V4L2_CID_USER_IMX_BASE-Linux-kernel-.patch
  * add 0002-xlat-update-V4L2_CID_USER_-_BASE-constants.patch

OBS-URL: https://build.opensuse.org/request/show/644351
OBS-URL: https://build.opensuse.org/package/show/devel:tools/strace?expand=0&rev=97
This commit is contained in:
Marcus Meissner 2018-11-07 07:46:22 +00:00 committed by Git OBS Bridge
parent 033582538c
commit 697a17285e
4 changed files with 255 additions and 0 deletions

View File

@ -0,0 +1,97 @@
From: "Dmitry V. Levin" <ldv@altlinux.org>
Date: Sat, 18 Aug 2018 07:22:47 +0000
Subject: xlat: workaround V4L2_CID_USER_IMX_BASE Linux kernel ABI breakage
Patch-mainline: yes
Git-commit: b89a69dec27cf638df0e17db80ed937c3e1abf77
Linux kernel commit v4.18-rc2-106-g421860b9d47053badce4b247576fa48df9ab4c48
has changed the value of V4L2_CID_USER_IMX_BASE constant introduced
by commit v4.13-rc1~141^2~121 because the old value was already used
by V4L2_CID_USER_MAX217X_BASE.
This is of course an ABI breakage that affects Linux kernels starting
with 4.13 and up to 4.18, as well as their LTS derivatives.
Since the imx driver didn't provide any public control ID definitions,
it looks like the best way to handle this situation is to pretend that
the old value of V4L2_CID_USER_IMX_BASE didn't exist.
* xlat/v4l2_control_id_bases.in (V4L2_CID_USER_IMX_BASE): Redefine.
Co-Authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
xlat/v4l2_control_id_bases.in | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/xlat/v4l2_control_id_bases.in b/xlat/v4l2_control_id_bases.in
index a0359be9..f3fd9255 100644
--- a/xlat/v4l2_control_id_bases.in
+++ b/xlat/v4l2_control_id_bases.in
@@ -2,7 +2,22 @@ V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900)
V4L2_CID_USER_MEYE_BASE (V4L2_CID_BASE + 0x1000)
V4L2_CID_USER_BTTV_BASE (V4L2_CID_BASE + 0x1010)
V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_BASE + 0x1050)
-V4L2_CID_USER_IMX_BASE (V4L2_CID_BASE + 0x1090)
+#ifndef STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE
+# define STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE
+/*
+ * Linux kernel commit v4.18-rc2-106-g421860b9d47053badce4b247576fa48df9ab4c48
+ * has changed the value of V4L2_CID_USER_IMX_BASE constant introduced
+ * by commit v4.13-rc1~141^2~121 because the old value was already used
+ * by V4L2_CID_USER_MAX217X_BASE.
+ * This is of course an ABI breakage that affects Linux kernels starting
+ * with 4.13 and up to 4.18, as well as their LTS derivatives.
+ * Since the imx driver didn't provide any public control ID definitions,
+ * it looks like the best way to handle this situation is to pretend that
+ * the old value of V4L2_CID_USER_IMX_BASE didn't exist.
+ */
+# undef V4L2_CID_USER_IMX_BASE
+#endif
+V4L2_CID_USER_IMX_BASE (V4L2_CID_BASE + 0x10b0)
V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
V4L2_CID_MPEG_MFC51_BASE (V4L2_CTRL_CLASS_MPEG | 0x1100)
--- a/xlat/v4l2_control_id_bases.h.old 2018-08-14 02:44:25.000000000 +0200
+++ b/xlat/v4l2_control_id_bases.h 2018-10-24 16:36:26.090699789 +0200
@@ -31,12 +31,16 @@
#else
# define V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_BASE + 0x1050)
#endif
+#ifndef STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE
+# define STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE
+# undef V4L2_CID_USER_IMX_BASE
+#endif
#if defined(V4L2_CID_USER_IMX_BASE) || (defined(HAVE_DECL_V4L2_CID_USER_IMX_BASE) && HAVE_DECL_V4L2_CID_USER_IMX_BASE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
-static_assert((V4L2_CID_USER_IMX_BASE) == ((V4L2_CID_BASE + 0x1090)), "V4L2_CID_USER_IMX_BASE != (V4L2_CID_BASE + 0x1090)");
+static_assert((V4L2_CID_USER_IMX_BASE) == ((V4L2_CID_BASE + 0x10b0)), "V4L2_CID_USER_IMX_BASE != (V4L2_CID_BASE + 0x10b0)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
-# define V4L2_CID_USER_IMX_BASE (V4L2_CID_BASE + 0x1090)
+# define V4L2_CID_USER_IMX_BASE (V4L2_CID_BASE + 0x10b0)
#endif
#if defined(V4L2_CID_MPEG_BASE) || (defined(HAVE_DECL_V4L2_CID_MPEG_BASE) && HAVE_DECL_V4L2_CID_MPEG_BASE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
@@ -146,6 +150,21 @@
XLAT(V4L2_CID_USER_MEYE_BASE),
XLAT(V4L2_CID_USER_BTTV_BASE),
XLAT(V4L2_CID_USER_TI_VPE_BASE),
+#ifndef STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE
+# define STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE
+/*
+* Linux kernel commit v4.18-rc2-106-g421860b9d47053badce4b247576fa48df9ab4c48
+* has changed the value of V4L2_CID_USER_IMX_BASE constant introduced
+* by commit v4.13-rc1~141^2~121 because the old value was already used
+* by V4L2_CID_USER_MAX217X_BASE.
+* This is of course an ABI breakage that affects Linux kernels starting
+* with 4.13 and up to 4.18, as well as their LTS derivatives.
+* Since the imx driver didn't provide any public control ID definitions,
+* it looks like the best way to handle this situation is to pretend that
+* the old value of V4L2_CID_USER_IMX_BASE didn't exist.
+*/
+# undef V4L2_CID_USER_IMX_BASE
+#endif
XLAT(V4L2_CID_USER_IMX_BASE),
XLAT(V4L2_CID_MPEG_BASE),
XLAT(V4L2_CID_MPEG_CX2341X_BASE),

View File

@ -0,0 +1,148 @@
From: "Dmitry V. Levin" <ldv@altlinux.org>
Date: Sat, 18 Aug 2018 07:22:47 +0000
Subject: xlat: update V4L2_CID_USER_*_BASE constants
Patch-mainline: yes
Git-commit: 0f09267db00468b9204395c6990fc8816fd3c0e5
* xlat/v4l2_control_id_bases.in (V4L2_CID_USER_S2255_BASE,
V4L2_CID_USER_SI476X_BASE, V4L2_CID_USER_SAA7134_BASE,
V4L2_CID_USER_ADV7180_BASE, V4L2_CID_USER_TC358743_BASE,
V4L2_CID_USER_MAX217X_BASE): New constants.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
xlat/v4l2_control_id_bases.in | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/xlat/v4l2_control_id_bases.in b/xlat/v4l2_control_id_bases.in
index f3fd9255..a0f9ccae 100644
--- a/xlat/v4l2_control_id_bases.in
+++ b/xlat/v4l2_control_id_bases.in
@@ -1,7 +1,13 @@
V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900)
-V4L2_CID_USER_MEYE_BASE (V4L2_CID_BASE + 0x1000)
-V4L2_CID_USER_BTTV_BASE (V4L2_CID_BASE + 0x1010)
-V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_BASE + 0x1050)
+V4L2_CID_USER_MEYE_BASE (V4L2_CID_BASE | 0x1000)
+V4L2_CID_USER_BTTV_BASE (V4L2_CID_BASE | 0x1010)
+V4L2_CID_USER_S2255_BASE (V4L2_CID_BASE | 0x1030)
+V4L2_CID_USER_SI476X_BASE (V4L2_CID_BASE | 0x1040)
+V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_BASE | 0x1050)
+V4L2_CID_USER_SAA7134_BASE (V4L2_CID_BASE | 0x1060)
+V4L2_CID_USER_ADV7180_BASE (V4L2_CID_BASE | 0x1070)
+V4L2_CID_USER_TC358743_BASE (V4L2_CID_BASE | 0x1080)
+V4L2_CID_USER_MAX217X_BASE (V4L2_CID_BASE | 0x1090)
#ifndef STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE
# define STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE
/*
@@ -17,7 +23,7 @@ V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_BASE + 0x1050)
*/
# undef V4L2_CID_USER_IMX_BASE
#endif
-V4L2_CID_USER_IMX_BASE (V4L2_CID_BASE + 0x10b0)
+V4L2_CID_USER_IMX_BASE (V4L2_CID_BASE | 0x10b0)
V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
V4L2_CID_MPEG_MFC51_BASE (V4L2_CTRL_CLASS_MPEG | 0x1100)
--- a/xlat/v4l2_control_id_bases.h 2018-10-24 16:38:06.020604843 +0200
+++ b/xlat/v4l2_control_id_bases.h 2018-10-24 16:38:21.752904814 +0200
@@ -12,24 +12,66 @@
#endif
#if defined(V4L2_CID_USER_MEYE_BASE) || (defined(HAVE_DECL_V4L2_CID_USER_MEYE_BASE) && HAVE_DECL_V4L2_CID_USER_MEYE_BASE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
-static_assert((V4L2_CID_USER_MEYE_BASE) == ((V4L2_CID_BASE + 0x1000)), "V4L2_CID_USER_MEYE_BASE != (V4L2_CID_BASE + 0x1000)");
+static_assert((V4L2_CID_USER_MEYE_BASE) == ((V4L2_CID_BASE | 0x1000)), "V4L2_CID_USER_MEYE_BASE != (V4L2_CID_BASE | 0x1000)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
-# define V4L2_CID_USER_MEYE_BASE (V4L2_CID_BASE + 0x1000)
+# define V4L2_CID_USER_MEYE_BASE (V4L2_CID_BASE | 0x1000)
#endif
#if defined(V4L2_CID_USER_BTTV_BASE) || (defined(HAVE_DECL_V4L2_CID_USER_BTTV_BASE) && HAVE_DECL_V4L2_CID_USER_BTTV_BASE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
-static_assert((V4L2_CID_USER_BTTV_BASE) == ((V4L2_CID_BASE + 0x1010)), "V4L2_CID_USER_BTTV_BASE != (V4L2_CID_BASE + 0x1010)");
+static_assert((V4L2_CID_USER_BTTV_BASE) == ((V4L2_CID_BASE | 0x1010)), "V4L2_CID_USER_BTTV_BASE != (V4L2_CID_BASE | 0x1010)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
-# define V4L2_CID_USER_BTTV_BASE (V4L2_CID_BASE + 0x1010)
+# define V4L2_CID_USER_BTTV_BASE (V4L2_CID_BASE | 0x1010)
+#endif
+#if defined(V4L2_CID_USER_S2255_BASE) || (defined(HAVE_DECL_V4L2_CID_USER_S2255_BASE) && HAVE_DECL_V4L2_CID_USER_S2255_BASE)
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_CID_USER_S2255_BASE) == ((V4L2_CID_BASE | 0x1030)), "V4L2_CID_USER_S2255_BASE != (V4L2_CID_BASE | 0x1030)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+#else
+# define V4L2_CID_USER_S2255_BASE (V4L2_CID_BASE | 0x1030)
+#endif
+#if defined(V4L2_CID_USER_SI476X_BASE) || (defined(HAVE_DECL_V4L2_CID_USER_SI476X_BASE) && HAVE_DECL_V4L2_CID_USER_SI476X_BASE)
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_CID_USER_SI476X_BASE) == ((V4L2_CID_BASE | 0x1040)), "V4L2_CID_USER_SI476X_BASE != (V4L2_CID_BASE | 0x1040)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+#else
+# define V4L2_CID_USER_SI476X_BASE (V4L2_CID_BASE | 0x1040)
#endif
#if defined(V4L2_CID_USER_TI_VPE_BASE) || (defined(HAVE_DECL_V4L2_CID_USER_TI_VPE_BASE) && HAVE_DECL_V4L2_CID_USER_TI_VPE_BASE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
-static_assert((V4L2_CID_USER_TI_VPE_BASE) == ((V4L2_CID_BASE + 0x1050)), "V4L2_CID_USER_TI_VPE_BASE != (V4L2_CID_BASE + 0x1050)");
+static_assert((V4L2_CID_USER_TI_VPE_BASE) == ((V4L2_CID_BASE | 0x1050)), "V4L2_CID_USER_TI_VPE_BASE != (V4L2_CID_BASE | 0x1050)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+#else
+# define V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_BASE | 0x1050)
+#endif
+#if defined(V4L2_CID_USER_SAA7134_BASE) || (defined(HAVE_DECL_V4L2_CID_USER_SAA7134_BASE) && HAVE_DECL_V4L2_CID_USER_SAA7134_BASE)
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_CID_USER_SAA7134_BASE) == ((V4L2_CID_BASE | 0x1060)), "V4L2_CID_USER_SAA7134_BASE != (V4L2_CID_BASE | 0x1060)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+#else
+# define V4L2_CID_USER_SAA7134_BASE (V4L2_CID_BASE | 0x1060)
+#endif
+#if defined(V4L2_CID_USER_ADV7180_BASE) || (defined(HAVE_DECL_V4L2_CID_USER_ADV7180_BASE) && HAVE_DECL_V4L2_CID_USER_ADV7180_BASE)
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_CID_USER_ADV7180_BASE) == ((V4L2_CID_BASE | 0x1070)), "V4L2_CID_USER_ADV7180_BASE != (V4L2_CID_BASE | 0x1070)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+#else
+# define V4L2_CID_USER_ADV7180_BASE (V4L2_CID_BASE | 0x1070)
+#endif
+#if defined(V4L2_CID_USER_TC358743_BASE) || (defined(HAVE_DECL_V4L2_CID_USER_TC358743_BASE) && HAVE_DECL_V4L2_CID_USER_TC358743_BASE)
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_CID_USER_TC358743_BASE) == ((V4L2_CID_BASE | 0x1080)), "V4L2_CID_USER_TC358743_BASE != (V4L2_CID_BASE | 0x1080)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+#else
+# define V4L2_CID_USER_TC358743_BASE (V4L2_CID_BASE | 0x1080)
+#endif
+#if defined(V4L2_CID_USER_MAX217X_BASE) || (defined(HAVE_DECL_V4L2_CID_USER_MAX217X_BASE) && HAVE_DECL_V4L2_CID_USER_MAX217X_BASE)
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_CID_USER_MAX217X_BASE) == ((V4L2_CID_BASE | 0x1090)), "V4L2_CID_USER_MAX217X_BASE != (V4L2_CID_BASE | 0x1090)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
-# define V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_BASE + 0x1050)
+# define V4L2_CID_USER_MAX217X_BASE (V4L2_CID_BASE | 0x1090)
#endif
#ifndef STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE
# define STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE
@@ -37,10 +79,10 @@
#endif
#if defined(V4L2_CID_USER_IMX_BASE) || (defined(HAVE_DECL_V4L2_CID_USER_IMX_BASE) && HAVE_DECL_V4L2_CID_USER_IMX_BASE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
-static_assert((V4L2_CID_USER_IMX_BASE) == ((V4L2_CID_BASE + 0x10b0)), "V4L2_CID_USER_IMX_BASE != (V4L2_CID_BASE + 0x10b0)");
+static_assert((V4L2_CID_USER_IMX_BASE) == ((V4L2_CID_BASE | 0x10b0)), "V4L2_CID_USER_IMX_BASE != (V4L2_CID_BASE | 0x10b0)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
-# define V4L2_CID_USER_IMX_BASE (V4L2_CID_BASE + 0x10b0)
+# define V4L2_CID_USER_IMX_BASE (V4L2_CID_BASE | 0x10b0)
#endif
#if defined(V4L2_CID_MPEG_BASE) || (defined(HAVE_DECL_V4L2_CID_MPEG_BASE) && HAVE_DECL_V4L2_CID_MPEG_BASE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
@@ -149,7 +191,13 @@
XLAT(V4L2_CID_BASE),
XLAT(V4L2_CID_USER_MEYE_BASE),
XLAT(V4L2_CID_USER_BTTV_BASE),
+ XLAT(V4L2_CID_USER_S2255_BASE),
+ XLAT(V4L2_CID_USER_SI476X_BASE),
XLAT(V4L2_CID_USER_TI_VPE_BASE),
+ XLAT(V4L2_CID_USER_SAA7134_BASE),
+ XLAT(V4L2_CID_USER_ADV7180_BASE),
+ XLAT(V4L2_CID_USER_TC358743_BASE),
+ XLAT(V4L2_CID_USER_MAX217X_BASE),
#ifndef STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE
# define STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE
/*

View File

@ -21,6 +21,13 @@ Tue Oct 30 18:56:17 UTC 2018 - schwab@linux-m68k.org
* Fixed test suite for the case when mlockall and unimplemented syscalls
are explicitly disabled by a seccomp filter.
-------------------------------------------------------------------
Wed Oct 24 14:41:50 UTC 2018 - Jiri Slaby <jslaby@suse.cz>
- fix build with kernel 4.19
* add 0001-xlat-workaround-V4L2_CID_USER_IMX_BASE-Linux-kernel-.patch
* add 0002-xlat-update-V4L2_CID_USER_-_BASE-constants.patch
-------------------------------------------------------------------
Tue Aug 14 06:49:56 UTC 2018 - jslaby@suse.com

View File

@ -29,6 +29,8 @@ Source: https://github.com/strace/strace/releases/download/v%{version}/%
Source2: https://github.com/strace/strace/releases/download/v%{version}/%{name}-%{version}.tar.xz.asc
Source3: %{name}.keyring
Source4: baselibs.conf
Patch0: 0001-xlat-workaround-V4L2_CID_USER_IMX_BASE-Linux-kernel-.patch
Patch1: 0002-xlat-update-V4L2_CID_USER_-_BASE-constants.patch
BuildRequires: haveged
BuildRequires: libacl-devel
BuildRequires: libaio-devel
@ -58,6 +60,7 @@ and processes can be seen. Child processes can also be tracked.
%prep
%setup -q
%autopatch -p1
%build
%configure \