From 44e40e05abd9a2c8aec404ab99620fac7de665fe Mon Sep 17 00:00:00 2001 From: Sam James Date: Fri, 22 Apr 2022 00:06:18 +0100 Subject: [PATCH] sys-apps/bubblewrap: fix build with Clang Closes: https://bugs.gentoo.org/834912 Signed-off-by: Sam James --- sys-apps/bubblewrap/bubblewrap-0.6.1.ebuild | 4 +++ .../files/bubblewrap-0.6.1-clang-printf.patch | 30 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 sys-apps/bubblewrap/files/bubblewrap-0.6.1-clang-printf.patch diff --git a/sys-apps/bubblewrap/bubblewrap-0.6.1.ebuild b/sys-apps/bubblewrap/bubblewrap-0.6.1.ebuild index cc06208a257ac..388a422db4d4c 100644 --- a/sys-apps/bubblewrap/bubblewrap-0.6.1.ebuild +++ b/sys-apps/bubblewrap/bubblewrap-0.6.1.ebuild @@ -30,6 +30,10 @@ BDEPEND=" # tests require root priviledge RESTRICT="test" +PATCHES=( + "${FILESDIR}"/${P}-clang-printf.patch +) + pkg_setup() { if [[ ${MERGE_TYPE} != buildonly ]]; then CONFIG_CHECK="~UTS_NS ~IPC_NS ~USER_NS ~PID_NS ~NET_NS" diff --git a/sys-apps/bubblewrap/files/bubblewrap-0.6.1-clang-printf.patch b/sys-apps/bubblewrap/files/bubblewrap-0.6.1-clang-printf.patch new file mode 100644 index 0000000000000..7c7e0ff29988d --- /dev/null +++ b/sys-apps/bubblewrap/files/bubblewrap-0.6.1-clang-printf.patch @@ -0,0 +1,30 @@ +https://github.com/containers/bubblewrap/commit/08dc2bb54658e003724f570224541a674645d87f.patch +https://bugs.gentoo.org/834912 + +From 08dc2bb54658e003724f570224541a674645d87f Mon Sep 17 00:00:00 2001 +From: Marc-Antoine Perennou +Date: Fri, 18 Mar 2022 10:25:51 +0100 +Subject: [PATCH] tests: properly tag ok as being printf-like + +Avoids breaking warning with clang + +Fixes #478 + +Signed-off-by: Marc-Antoine Perennou +--- + tests/test-utils.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/test-utils.c b/tests/test-utils.c +index c9b859d2..41874a15 100644 +--- a/tests/test-utils.c ++++ b/tests/test-utils.c +@@ -25,6 +25,8 @@ + + /* A small implementation of TAP */ + static unsigned int test_number = 0; ++ ++__attribute__((format(printf, 1, 2))) + static void + ok (const char *format, ...) + {