From cfcb1a22866e9075a6d0d64fa567d140bef66f2a Mon Sep 17 00:00:00 2001 From: wangmy Date: Wed, 22 Jun 2022 15:48:49 +0800 Subject: strace: upgrade 5.17 -> 5.18 0001-landlock-update-expected-string.patch removed since it's not available in 5.18. skip-load.patch refreshed for new version. Signed-off-by: Wang Mingyu Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie --- .../0001-landlock-update-expected-string.patch | 67 ---------------------- .../recipes-devtools/strace/strace/skip-load.patch | 40 ++++++------- meta/recipes-devtools/strace/strace_5.17.bb | 55 ------------------ meta/recipes-devtools/strace/strace_5.18.bb | 54 +++++++++++++++++ 4 files changed, 71 insertions(+), 145 deletions(-) delete mode 100644 meta/recipes-devtools/strace/strace/0001-landlock-update-expected-string.patch delete mode 100644 meta/recipes-devtools/strace/strace_5.17.bb create mode 100644 meta/recipes-devtools/strace/strace_5.18.bb diff --git a/meta/recipes-devtools/strace/strace/0001-landlock-update-expected-string.patch b/meta/recipes-devtools/strace/strace/0001-landlock-update-expected-string.patch deleted file mode 100644 index 9d67d68331..0000000000 --- a/meta/recipes-devtools/strace/strace/0001-landlock-update-expected-string.patch +++ /dev/null @@ -1,67 +0,0 @@ -From d0dae2fb30b907bc9bf70382f37c9e00207ae036 Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield -Date: Sat, 30 Apr 2022 01:09:42 -0400 -Subject: [PATCH] landlock: update expected string -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Kernel commit: - - commit 3d4b396a616d0d67bf95d6823ad1197f6247292e - Author: Christian Brauner - Date: Mon Oct 11 15:37:04 2021 +0200 - - landlock: Use square brackets around "landlock-ruleset" - - commit aea0b9f2486da8497f35c7114b764bf55e17c7ea upstream. - - Make the name of the anon inode fd "[landlock-ruleset]" instead of - "landlock-ruleset". This is minor but most anon inode fds already - carry square brackets around their name: - - [eventfd] - [eventpoll] - [fanotify] - [fscontext] - [io_uring] - [pidfd] - [signalfd] - [timerfd] - [userfaultfd] - - For the sake of consistency lets do the same for the landlock-ruleset anon - inode fd that comes with landlock. We did the same in - 1cdc415f1083 ("uapi, fsopen: use square brackets around "fscontext" [ver #2]") - for the new mount api. - - Cc: linux-security-module@vger.kernel.org - Signed-off-by: Christian Brauner - Link: https://lore.kernel.org/r/20211011133704.1704369-1-brauner@kernel.org - Cc: stable@vger.kernel.org - Signed-off-by: Mickaël Salaün - Signed-off-by: Greg Kroah-Hartman - -Changed the format of the landlock tracing. We need to update the strace -expected string to match. - -Upstream-Status: Submitted [https://lists.strace.io/pipermail/strace-devel/2022-April/011064.html] - -Signed-off-by: Bruce Ashfield ---- - tests/landlock_create_ruleset-y.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/landlock_create_ruleset-y.c b/tests/landlock_create_ruleset-y.c -index a30966b..50e19c2 100644 ---- a/tests/landlock_create_ruleset-y.c -+++ b/tests/landlock_create_ruleset-y.c -@@ -1,4 +1,4 @@ --#define FD_PATH "" -+#define FD_PATH "" - #define SKIP_IF_PROC_IS_UNAVAILABLE skip_if_unavailable("/proc/self/fd/") - - #include "landlock_create_ruleset.c" --- -2.19.1 - diff --git a/meta/recipes-devtools/strace/strace/skip-load.patch b/meta/recipes-devtools/strace/strace/skip-load.patch index fa3ddb8ddc..b1acfda5d8 100644 --- a/meta/recipes-devtools/strace/strace/skip-load.patch +++ b/meta/recipes-devtools/strace/strace/skip-load.patch @@ -4,6 +4,12 @@ care about timing. Upstream-Status: Inappropriate Signed-off-by: Ross Burton +--- + tests/clock_nanosleep.gen.test | 1 + + tests/delay.test | 1 + + tests/strace-r.test | 1 + + 3 files changed, 3 insertions(+) + diff --git a/tests/clock_nanosleep.gen.test b/tests/clock_nanosleep.gen.test index 7a6025b..f0e6dbb 100755 --- a/tests/clock_nanosleep.gen.test @@ -15,41 +21,29 @@ index 7a6025b..f0e6dbb 100755 +skip_ "Test not reliable under load" run_strace_match_diff -e trace=clock_nanosleep,clock_gettime diff --git a/tests/delay.test b/tests/delay.test -index f74e27f..328087e 100755 +index f74e27f..6172c04 100755 --- a/tests/delay.test +++ b/tests/delay.test -@@ -9,6 +9,8 @@ +@@ -8,6 +8,7 @@ + # SPDX-License-Identifier: GPL-2.0-or-later . "${srcdir=.}/init.sh" - +skip_ "Test not reliable under load" -+ + while read -r denter dexit denter_us dexit_us; do [ -n "$denter" ] || continue - -diff --git a/tests/strace-T.test b/tests/strace-T.test -index adca3e8..d4acfe9 100755 ---- a/tests/strace-T.test -+++ b/tests/strace-T.test -@@ -9,6 +9,8 @@ - - . "${srcdir=.}/init.sh" - -+skip_ "Test not reliable under load" -+ - T_opt="${1:--T}" - - run_prog ../sleep 0 diff --git a/tests/strace-r.test b/tests/strace-r.test -index 8299737..c360344 100755 +index 8299737..d89c7df 100755 --- a/tests/strace-r.test +++ b/tests/strace-r.test -@@ -9,6 +9,8 @@ +@@ -8,6 +8,7 @@ + # SPDX-License-Identifier: GPL-2.0-or-later . "${srcdir=.}/init.sh" - +skip_ "Test not reliable under load" -+ + r_opt="${1:--r}" - run_prog ../sleep 0 +-- +2.25.1 + diff --git a/meta/recipes-devtools/strace/strace_5.17.bb b/meta/recipes-devtools/strace/strace_5.17.bb deleted file mode 100644 index c7fd9edf40..0000000000 --- a/meta/recipes-devtools/strace/strace_5.17.bb +++ /dev/null @@ -1,55 +0,0 @@ -SUMMARY = "System call tracing tool" -HOMEPAGE = "http://strace.io" -DESCRIPTION = "strace is a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state." -SECTION = "console/utils" -LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=59a33f0a3e6122d67c0b3befccbdaa6b" - -SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \ - file://update-gawk-paths.patch \ - file://Makefile-ptest.patch \ - file://run-ptest \ - file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \ - file://ptest-spacesave.patch \ - file://0001-strace-fix-reproducibilty-issues.patch \ - file://skip-load.patch \ - file://0001-landlock-update-expected-string.patch \ - " -SRC_URI[sha256sum] = "5fb298dbd1331fd1e1bc94c5c32395860d376101b87c6cd3d1ba9f9aa15c161f" - -inherit autotools ptest - -PACKAGECONFIG:class-target ??= "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ -" - -PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,bluez5" -PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind" - -EXTRA_OECONF += "--enable-mpers=no --disable-gcc-Werror" - -CFLAGS:append:libc-musl = " -Dsigcontext_struct=sigcontext" - -TESTDIR = "tests" -PTEST_BUILD_HOST_PATTERN = "^(DEB_CHANGELOGTIME|RPM_CHANGELOGTIME|WARN_CFLAGS_FOR_BUILD|LDFLAGS_FOR_BUILD)" - -do_compile_ptest() { - oe_runmake ${PARALLEL_MAKE} -C ${TESTDIR} buildtest-TESTS -} - -do_install_ptest() { - oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR} - mkdir -p ${D}${PTEST_PATH}/build-aux - mkdir -p ${D}${PTEST_PATH}/src - install -m 755 ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ - install -m 644 ${B}/src/config.h ${D}${PTEST_PATH}/src/ - sed -i -e '/^src/s/strace.*[0-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile -} - -RDEPENDS:${PN}-ptest += "make coreutils grep gawk sed" - -RDEPENDS:${PN}-ptest:append:libc-glibc = "\ - locale-base-en-us.iso-8859-1 \ -" - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-devtools/strace/strace_5.18.bb b/meta/recipes-devtools/strace/strace_5.18.bb new file mode 100644 index 0000000000..3164ebca51 --- /dev/null +++ b/meta/recipes-devtools/strace/strace_5.18.bb @@ -0,0 +1,54 @@ +SUMMARY = "System call tracing tool" +HOMEPAGE = "http://strace.io" +DESCRIPTION = "strace is a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state." +SECTION = "console/utils" +LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=59a33f0a3e6122d67c0b3befccbdaa6b" + +SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \ + file://update-gawk-paths.patch \ + file://Makefile-ptest.patch \ + file://run-ptest \ + file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \ + file://ptest-spacesave.patch \ + file://0001-strace-fix-reproducibilty-issues.patch \ + file://skip-load.patch \ + " +SRC_URI[sha256sum] = "60293ea79ac9253d600cdc9be077ad2988ca22284a439c9e66be5150db3d1187" + +inherit autotools ptest + +PACKAGECONFIG:class-target ??= "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ +" + +PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,bluez5" +PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind" + +EXTRA_OECONF += "--enable-mpers=no --disable-gcc-Werror" + +CFLAGS:append:libc-musl = " -Dsigcontext_struct=sigcontext" + +TESTDIR = "tests" +PTEST_BUILD_HOST_PATTERN = "^(DEB_CHANGELOGTIME|RPM_CHANGELOGTIME|WARN_CFLAGS_FOR_BUILD|LDFLAGS_FOR_BUILD)" + +do_compile_ptest() { + oe_runmake ${PARALLEL_MAKE} -C ${TESTDIR} buildtest-TESTS +} + +do_install_ptest() { + oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR} + mkdir -p ${D}${PTEST_PATH}/build-aux + mkdir -p ${D}${PTEST_PATH}/src + install -m 755 ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ + install -m 644 ${B}/src/config.h ${D}${PTEST_PATH}/src/ + sed -i -e '/^src/s/strace.*[0-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile +} + +RDEPENDS:${PN}-ptest += "make coreutils grep gawk sed" + +RDEPENDS:${PN}-ptest:append:libc-glibc = "\ + locale-base-en-us.iso-8859-1 \ +" + +BBCLASSEXTEND = "native" -- cgit 1.2.3-korg