From 97d3c529a3ac1495d38e0d8c428897037352d510 Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Thu, 22 Jul 2021 14:06:23 +0200 Subject: [PATCH] Rebase to strace 5.13 - Add "tests: disable sockopt-timestamp on new glibc with __TIMESIZE!=64 altogether" to work around mangling of SO_TIMESTAMP* setsockopt calls introduced in glibc-2.33.9000-707-g13c51549e2077f2f3bf84e8fd0b46d8b0c615912. * .gitignore (/strace-5.10.tar.xz): Remove. (/strace-5.13.tar.xz): New record. * 0141-tests-disable-sockopt-timestamp-on-new-glibc-with-__.patch: New file. * sources (strace-5.10.tar.xz): Replace with... (strace-5.13.tar.xz): ...this version. * strace.spec: Sync with strace.spec.in from the source tree. (Version): Bump to 5.13. (Patch141): New patch. (%prep): Apply it. (%changelog): New record about 5.13-1. Resolves: #1925722 Resolves: #1925967 Resolves: #1928305 Resolves: #1973048 Signed-off-by: Eugene Syromiatnikov --- .gitignore | 2 +- ...ckopt-timestamp-on-new-glibc-with-__.patch | 214 ++++++++++++++++++ sources | 2 +- strace.spec | 24 +- 4 files changed, 232 insertions(+), 10 deletions(-) create mode 100644 0141-tests-disable-sockopt-timestamp-on-new-glibc-with-__.patch diff --git a/.gitignore b/.gitignore index 678bfab..77a9600 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/strace-5.10.tar.xz +/strace-5.13.tar.xz diff --git a/0141-tests-disable-sockopt-timestamp-on-new-glibc-with-__.patch b/0141-tests-disable-sockopt-timestamp-on-new-glibc-with-__.patch new file mode 100644 index 0000000..efc6a97 --- /dev/null +++ b/0141-tests-disable-sockopt-timestamp-on-new-glibc-with-__.patch @@ -0,0 +1,214 @@ +From c766a2cb430ae6e382855859048f4ce2055ef0a4 Mon Sep 17 00:00:00 2001 +From: Eugene Syromyatnikov +Date: Tue, 20 Jul 2021 20:29:18 +0200 +Subject: [PATCH] tests: disable sockopt-timestamp on new glibc with + __TIMESIZE!=64 altogether + +--- + tests/sockopt-timestamp.c | 23 +++++++---------------- + 1 file changed, 7 insertions(+), 16 deletions(-) + +diff --git a/tests/sockopt-timestamp.c b/tests/sockopt-timestamp.c +index 33e0c1a..50ab867 100644 +--- a/tests/sockopt-timestamp.c ++++ b/tests/sockopt-timestamp.c +@@ -26,27 +26,23 @@ + # include "xlat/sock_options.h" + #undef XLAT_MACROS_ONLY + +-#undef TEST_OLD_SCM_TIMESTAMPS ++#undef TEST_SCM_TIMESTAMPS + + /* + * Sadly, starting with commit + * glibc-2.33.9000-707-g13c51549e2077f2f3bf84e8fd0b46d8b0c615912, on every + * 32-bit architecture where 32-bit time_t support is enabled, +- * glibc mangles old scm timestamps. ++ * glibc mangles scm timestamps. + */ + #if GLIBC_PREREQ_GE(2, 33) && defined __TIMESIZE && __TIMESIZE != 64 +-# define TEST_OLD_SCM_TIMESTAMPS 0 ++# define TEST_SCM_TIMESTAMPS 0 + #endif + +-#ifndef TEST_OLD_SCM_TIMESTAMPS +-# define TEST_OLD_SCM_TIMESTAMPS 1 ++#ifndef TEST_SCM_TIMESTAMPS ++# define TEST_SCM_TIMESTAMPS 1 + #endif + +-#if TEST_OLD_SCM_TIMESTAMPS \ +- || defined HAVE_STRUCT___KERNEL_TIMESPEC \ +- || defined HAVE_STRUCT___KERNEL_SOCK_TIMEVAL +- +-# if TEST_OLD_SCM_TIMESTAMPS ++#if TEST_SCM_TIMESTAMPS + static void + print_timestamp_old(const struct cmsghdr *c) + { +@@ -84,7 +80,6 @@ print_timestampns_old(const struct cmsghdr *c) + printf("{tv_sec=%lld, tv_nsec=%lld}", + (long long) ts.tv_sec, (long long) ts.tv_nsec); + } +-# endif /* TEST_OLD_SCM_TIMESTAMPS */ + + # ifdef HAVE_STRUCT___KERNEL_SOCK_TIMEVAL + static void +@@ -212,10 +207,8 @@ main(void) + const char *str; + void (*fun)(const struct cmsghdr *); + } tests[] = { +-# if TEST_OLD_SCM_TIMESTAMPS + { SO_TIMESTAMP_OLD, "SO_TIMESTAMP_OLD", print_timestamp_old }, + { SO_TIMESTAMPNS_OLD, "SO_TIMESTAMPNS_OLD", print_timestampns_old }, +-# endif + # ifdef HAVE_STRUCT___KERNEL_SOCK_TIMEVAL + { SO_TIMESTAMP_NEW, "SO_TIMESTAMP_NEW", print_timestamp_new }, + # endif +@@ -237,8 +230,6 @@ main(void) + + #else + +-SKIP_MAIN_UNDEFINED("TEST_OLD_SCM_TIMESTAMPS" +- " || HAVE_STRUCT___KERNEL_TIMESPEC" +- " || HAVE_STRUCT___KERNEL_SOCK_TIMEVAL") ++SKIP_MAIN_UNDEFINED("TEST_SCM_TIMESTAMPS") + + #endif +diff --git a/tests-m32/sockopt-timestamp.c b/tests-m32/sockopt-timestamp.c +index 33e0c1a..50ab867 100644 +--- a/tests-m32/sockopt-timestamp.c ++++ b/tests-m32/sockopt-timestamp.c +@@ -26,27 +26,23 @@ + # include "xlat/sock_options.h" + #undef XLAT_MACROS_ONLY + +-#undef TEST_OLD_SCM_TIMESTAMPS ++#undef TEST_SCM_TIMESTAMPS + + /* + * Sadly, starting with commit + * glibc-2.33.9000-707-g13c51549e2077f2f3bf84e8fd0b46d8b0c615912, on every + * 32-bit architecture where 32-bit time_t support is enabled, +- * glibc mangles old scm timestamps. ++ * glibc mangles scm timestamps. + */ + #if GLIBC_PREREQ_GE(2, 33) && defined __TIMESIZE && __TIMESIZE != 64 +-# define TEST_OLD_SCM_TIMESTAMPS 0 ++# define TEST_SCM_TIMESTAMPS 0 + #endif + +-#ifndef TEST_OLD_SCM_TIMESTAMPS +-# define TEST_OLD_SCM_TIMESTAMPS 1 ++#ifndef TEST_SCM_TIMESTAMPS ++# define TEST_SCM_TIMESTAMPS 1 + #endif + +-#if TEST_OLD_SCM_TIMESTAMPS \ +- || defined HAVE_STRUCT___KERNEL_TIMESPEC \ +- || defined HAVE_STRUCT___KERNEL_SOCK_TIMEVAL +- +-# if TEST_OLD_SCM_TIMESTAMPS ++#if TEST_SCM_TIMESTAMPS + static void + print_timestamp_old(const struct cmsghdr *c) + { +@@ -84,7 +80,6 @@ print_timestampns_old(const struct cmsghdr *c) + printf("{tv_sec=%lld, tv_nsec=%lld}", + (long long) ts.tv_sec, (long long) ts.tv_nsec); + } +-# endif /* TEST_OLD_SCM_TIMESTAMPS */ + + # ifdef HAVE_STRUCT___KERNEL_SOCK_TIMEVAL + static void +@@ -212,10 +207,8 @@ main(void) + const char *str; + void (*fun)(const struct cmsghdr *); + } tests[] = { +-# if TEST_OLD_SCM_TIMESTAMPS + { SO_TIMESTAMP_OLD, "SO_TIMESTAMP_OLD", print_timestamp_old }, + { SO_TIMESTAMPNS_OLD, "SO_TIMESTAMPNS_OLD", print_timestampns_old }, +-# endif + # ifdef HAVE_STRUCT___KERNEL_SOCK_TIMEVAL + { SO_TIMESTAMP_NEW, "SO_TIMESTAMP_NEW", print_timestamp_new }, + # endif +@@ -237,8 +230,6 @@ main(void) + + #else + +-SKIP_MAIN_UNDEFINED("TEST_OLD_SCM_TIMESTAMPS" +- " || HAVE_STRUCT___KERNEL_TIMESPEC" +- " || HAVE_STRUCT___KERNEL_SOCK_TIMEVAL") ++SKIP_MAIN_UNDEFINED("TEST_SCM_TIMESTAMPS") + + #endif +diff --git a/tests-mx32/sockopt-timestamp.c b/tests-mx32/sockopt-timestamp.c +index 33e0c1a..50ab867 100644 +--- a/tests-mx32/sockopt-timestamp.c ++++ b/tests-mx32/sockopt-timestamp.c +@@ -26,27 +26,23 @@ + # include "xlat/sock_options.h" + #undef XLAT_MACROS_ONLY + +-#undef TEST_OLD_SCM_TIMESTAMPS ++#undef TEST_SCM_TIMESTAMPS + + /* + * Sadly, starting with commit + * glibc-2.33.9000-707-g13c51549e2077f2f3bf84e8fd0b46d8b0c615912, on every + * 32-bit architecture where 32-bit time_t support is enabled, +- * glibc mangles old scm timestamps. ++ * glibc mangles scm timestamps. + */ + #if GLIBC_PREREQ_GE(2, 33) && defined __TIMESIZE && __TIMESIZE != 64 +-# define TEST_OLD_SCM_TIMESTAMPS 0 ++# define TEST_SCM_TIMESTAMPS 0 + #endif + +-#ifndef TEST_OLD_SCM_TIMESTAMPS +-# define TEST_OLD_SCM_TIMESTAMPS 1 ++#ifndef TEST_SCM_TIMESTAMPS ++# define TEST_SCM_TIMESTAMPS 1 + #endif + +-#if TEST_OLD_SCM_TIMESTAMPS \ +- || defined HAVE_STRUCT___KERNEL_TIMESPEC \ +- || defined HAVE_STRUCT___KERNEL_SOCK_TIMEVAL +- +-# if TEST_OLD_SCM_TIMESTAMPS ++#if TEST_SCM_TIMESTAMPS + static void + print_timestamp_old(const struct cmsghdr *c) + { +@@ -84,7 +80,6 @@ print_timestampns_old(const struct cmsghdr *c) + printf("{tv_sec=%lld, tv_nsec=%lld}", + (long long) ts.tv_sec, (long long) ts.tv_nsec); + } +-# endif /* TEST_OLD_SCM_TIMESTAMPS */ + + # ifdef HAVE_STRUCT___KERNEL_SOCK_TIMEVAL + static void +@@ -212,10 +207,8 @@ main(void) + const char *str; + void (*fun)(const struct cmsghdr *); + } tests[] = { +-# if TEST_OLD_SCM_TIMESTAMPS + { SO_TIMESTAMP_OLD, "SO_TIMESTAMP_OLD", print_timestamp_old }, + { SO_TIMESTAMPNS_OLD, "SO_TIMESTAMPNS_OLD", print_timestampns_old }, +-# endif + # ifdef HAVE_STRUCT___KERNEL_SOCK_TIMEVAL + { SO_TIMESTAMP_NEW, "SO_TIMESTAMP_NEW", print_timestamp_new }, + # endif +@@ -237,8 +230,6 @@ main(void) + + #else + +-SKIP_MAIN_UNDEFINED("TEST_OLD_SCM_TIMESTAMPS" +- " || HAVE_STRUCT___KERNEL_TIMESPEC" +- " || HAVE_STRUCT___KERNEL_SOCK_TIMEVAL") ++SKIP_MAIN_UNDEFINED("TEST_SCM_TIMESTAMPS") + + #endif +-- +2.1.4 + diff --git a/sources b/sources index 97516ac..1faa765 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (strace-5.10.tar.xz) = 1baa41b6d52f2e40e42a22850beee1ae278fafe712796694631898f06a7540d8f2c3fa70807e0062734f0976ebbd0824457c733ccda248f017c218387366ed48 +SHA512 (strace-5.13.tar.xz) = ba8b0eae396fa2b762bf17cbcdcd84b0660b2a5d5e7e9caf098ef3414a87fd28d4140dd10136483f35904560e5044e40be2bf6117462868a360306d62887c8ed diff --git a/strace.spec b/strace.spec index d9ed031..8fbea25 100644 --- a/strace.spec +++ b/strace.spec @@ -1,7 +1,7 @@ Summary: Tracks and displays system calls associated with a running process Name: strace -Version: 5.10 -Release: 2%{?dist} +Version: 5.13 +Release: 1%{?dist} # The test suite is GPLv2+, all the rest is LGPLv2.1+. License: LGPL-2.1+ and GPL-2.0+ # Some distros require Group tag to be present, @@ -18,7 +18,7 @@ BuildRequires: xz %else Source: strace-%{version}.tar.gz %endif -BuildRequires: gcc gzip +BuildRequires: gcc gzip make # Install Bluetooth headers for AF_BLUETOOTH sockets decoding. %if 0%{?fedora} >= 18 || 0%{?centos} >= 6 || 0%{?rhel} >= 8 || 0%{?suse_version} >= 1200 @@ -29,16 +29,21 @@ BuildRequires: pkgconfig(bluez) # Install binutils-devel to enable symbol demangling. %if 0%{?fedora} >= 20 || 0%{?centos} >= 6 || 0%{?rhel} >= 6 %define buildrequires_stacktrace BuildRequires: elfutils-devel binutils-devel +%define buildrequires_selinux BuildRequires: libselinux-devel %endif %if 0%{?suse_version} >= 1100 %define buildrequires_stacktrace BuildRequires: libdw-devel binutils-devel +%define buildrequires_selinux BuildRequires: libselinux-devel %endif %{?buildrequires_stacktrace} +%{?buildrequires_selinux} # OBS compatibility %{?!buildroot:BuildRoot: %_tmppath/buildroot-%name-%version-%release} %define maybe_use_defattr %{?suse_version:%%defattr(-,root,root)} +Patch141: 0141-tests-disable-sockopt-timestamp-on-new-glibc-with-__.patch + # Fallback definitions for make_build/make_install macros %{?!__make: %global __make %_bindir/make} %{?!__install: %global __install %_bindir/install} @@ -57,9 +62,12 @@ received by a process. %prep %setup -q + +%patch141 -p1 + echo -n %version-%release > .tarball-version -echo -n 2020 > .year -echo -n 2020-11-29 > .strace.1.in.date +echo -n 2021 > .year +echo -n 2021-07-20 > doc/.strace.1.in.date %build echo 'BEGIN OF BUILD ENVIRONMENT INFORMATION' @@ -80,9 +88,6 @@ CFLAGS_FOR_BUILD="$RPM_OPT_FLAGS"; export CFLAGS_FOR_BUILD %install %make_install -# remove unpackaged files from the buildroot -rm -f %{buildroot}%{_bindir}/strace-graph - # some say uncompressed changelog files are too big for f in ChangeLog ChangeLog-CVS; do gzip -9n < "$f" > "$f".gz & @@ -106,6 +111,9 @@ echo 'END OF TEST SUITE INFORMATION' %{_mandir}/man1/* %changelog +* Tue Jul 20 2021 Eugene Syromiatnikov - 5.13-1 +- Rebase to v5.13 (#1925722, #1925967, #1928305, #1973048). + * Fri Apr 16 2021 Mohan Boddu - 5.10-2 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937