From 86c2982568de1ad4d4cc12a65b19231331484405 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 10 Feb 2022 18:00:59 -0800 Subject: Run patches thru `manage-packages -P` This refreshes the line numbers, removes any fuzz (which would make any future forward ports easier) and standardizes the patch/file headers (which makes them easier to read). Signed-off-by: Alexey Neyman --- packages/strace/4.26/0000-mips-o32-fix-build.patch | 13 +- .../0000-Avoid-relying-on-presence-of-ipx.h.patch | 135 +++++++++++++++++++ .../0001-Avoid-relying-on-presence-of-ipx.h.patch | 148 --------------------- 3 files changed, 142 insertions(+), 154 deletions(-) create mode 100644 packages/strace/5.14/0000-Avoid-relying-on-presence-of-ipx.h.patch delete mode 100644 packages/strace/5.14/0001-Avoid-relying-on-presence-of-ipx.h.patch (limited to 'packages/strace') diff --git a/packages/strace/4.26/0000-mips-o32-fix-build.patch b/packages/strace/4.26/0000-mips-o32-fix-build.patch index d3c828ec..afb1f40a 100644 --- a/packages/strace/4.26/0000-mips-o32-fix-build.patch +++ b/packages/strace/4.26/0000-mips-o32-fix-build.patch @@ -17,11 +17,14 @@ Date: Tue Jan 8 19:23:44 2019 +0000 Reported-by: Baruch Siach Fixes: v4.26~61 "Refactor stack pointers" -diff --git a/linux/mips/get_syscall_args.c b/linux/mips/get_syscall_args.c -index 387aa852..e2889f98 100644 +--- + linux/mips/get_syscall_args.c | 26 ++++++++++++++++++++++++++ + syscall.c | 27 ++------------------------- + 2 files changed, 28 insertions(+), 25 deletions(-) + --- a/linux/mips/get_syscall_args.c +++ b/linux/mips/get_syscall_args.c -@@ -37,3 +37,29 @@ arch_get_syscall_args(struct tcb *tcp) +@@ -37,3 +37,29 @@ #endif return 1; } @@ -51,11 +54,9 @@ index 387aa852..e2889f98 100644 + } +} +#endif /* SYS_syscall_subcall */ -diff --git a/syscall.c b/syscall.c -index d78f51dd..51fcc721 100644 --- a/syscall.c +++ b/syscall.c -@@ -349,31 +349,8 @@ decode_ipc_subcall(struct tcb *tcp) +@@ -349,31 +349,8 @@ #endif /* SYS_ipc_subcall */ #ifdef SYS_syscall_subcall diff --git a/packages/strace/5.14/0000-Avoid-relying-on-presence-of-ipx.h.patch b/packages/strace/5.14/0000-Avoid-relying-on-presence-of-ipx.h.patch new file mode 100644 index 00000000..69421a51 --- /dev/null +++ b/packages/strace/5.14/0000-Avoid-relying-on-presence-of-ipx.h.patch @@ -0,0 +1,135 @@ +From d8eb6a06192d982977b3ff12b6d1ca69beaa7bb3 Mon Sep 17 00:00:00 2001 +From: Eugene Syromyatnikov +Date: Wed, 3 Nov 2021 00:48:59 +0100 +Subject: [PATCH] Avoid relying on presence of ipx.h + +After Linux has broken UAPI in commit v5.15-rc1~157^2~207, it is well +possible that neither kernel nor libc (such as musl, for example) +provides an IPX-related header. Avoid relying on its presence +in the strace's code and conditionalise the relevant checks in the tests. + +* configure.ac (AC_CHECK_HEADERS): Add linux/ipx.h. +* src/net.c: Remove / includes. +* src/sockaddr.c: Likewise. +(IPX_NODE_LEN): New macro constant. +(struct sockaddr_ipx): New type definition. +* src/xlat/sock_ipx_options.in (IPX_TYPE): Provide a fallback value. +* tests/net-sockaddr.c [!HAVE_LINUX_IPX_H]: Do not include +. +[!HAVE_LINUX_IPX_H && HAVE_NETIPX_IPX_H]: Include . +[!(HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H)] (check_ipx): Do not +define. +(main) [!(HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H)]: Do not call +check_ipx. + +Closes: https://github.com/strace/strace/issues/201 +--- + configure.ac | 1 + + src/net.c | 5 ----- + src/sockaddr.c | 16 ++++++++++------ + src/xlat/sock_ipx_options.in | 2 +- + tests/net-sockaddr.c | 10 +++++++++- + 5 files changed, 21 insertions(+), 13 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -423,6 +423,7 @@ + elf.h + gcov.h + iconv.h ++ linux/ipx.h + mqueue.h + netinet/sctp.h + netipx/ipx.h +--- a/src/net.c ++++ b/src/net.c +@@ -28,11 +28,6 @@ + #include + #include + #include +-#ifdef HAVE_NETIPX_IPX_H +-# include +-#else +-# include +-#endif + + #include + #include "netlink.h" +--- a/src/sockaddr.c ++++ b/src/sockaddr.c +@@ -24,12 +24,6 @@ + #include + #include + +-#ifdef HAVE_NETIPX_IPX_H +-# include +-#else +-# include +-#endif +- + #include "xlat/addrfams.h" + #include "xlat/arp_hardware_types.h" + #include "xlat/ethernet_protocols.h" +@@ -42,6 +36,16 @@ + + #define SIZEOF_SA_FAMILY sizeof_field(struct sockaddr, sa_family) + ++#define IPX_NODE_LEN 6 ++struct sockaddr_ipx { ++ uint16_t sipx_family; ++ uint16_t sipx_port; ++ uint32_t sipx_network; ++ unsigned char sipx_node[IPX_NODE_LEN]; ++ uint8_t sipx_type; ++ unsigned char sipx_zero; ++}; ++ + const size_t arp_hardware_types_size = ARRAY_SIZE(arp_hardware_types) - 1; + const size_t ethernet_protocols_size = ARRAY_SIZE(ethernet_protocols) - 1; + +--- a/src/xlat/sock_ipx_options.in ++++ b/src/xlat/sock_ipx_options.in +@@ -1 +1 @@ +-IPX_TYPE ++IPX_TYPE 1 +--- a/tests/net-sockaddr.c ++++ b/tests/net-sockaddr.c +@@ -24,7 +24,11 @@ + #include + #include + #include +-#include ++#if defined HAVE_LINUX_IPX_H ++# include ++#elif defined HAVE_NETIPX_IPX_H ++# include ++#endif + #ifdef HAVE_BLUETOOTH_BLUETOOTH_H + # include + # include +@@ -269,6 +273,7 @@ + printf("connect(-1, %p, %u) = %d EBADF (%m)\n", in6, len, ret); + } + ++#if defined HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H + static void + check_ipx(void) + { +@@ -295,6 +300,7 @@ + c_ipx.sipx_node[4], c_ipx.sipx_node[5], + c_ipx.sipx_type, len, ret); + } ++#endif /* HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H */ + + /* for a bit more compact AX.25 address definitions */ + #define AX25_ADDR(c_, s_) \ +@@ -773,7 +779,9 @@ + check_un(); + check_in(); + check_in6(); ++#if defined HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H + check_ipx(); ++#endif + check_ax25(); + check_x25(); + check_nl(); diff --git a/packages/strace/5.14/0001-Avoid-relying-on-presence-of-ipx.h.patch b/packages/strace/5.14/0001-Avoid-relying-on-presence-of-ipx.h.patch deleted file mode 100644 index 93955ebb..00000000 --- a/packages/strace/5.14/0001-Avoid-relying-on-presence-of-ipx.h.patch +++ /dev/null @@ -1,148 +0,0 @@ -From d8eb6a06192d982977b3ff12b6d1ca69beaa7bb3 Mon Sep 17 00:00:00 2001 -From: Eugene Syromyatnikov -Date: Wed, 3 Nov 2021 00:48:59 +0100 -Subject: [PATCH] Avoid relying on presence of ipx.h - -After Linux has broken UAPI in commit v5.15-rc1~157^2~207, it is well -possible that neither kernel nor libc (such as musl, for example) -provides an IPX-related header. Avoid relying on its presence -in the strace's code and conditionalise the relevant checks in the tests. - -* configure.ac (AC_CHECK_HEADERS): Add linux/ipx.h. -* src/net.c: Remove / includes. -* src/sockaddr.c: Likewise. -(IPX_NODE_LEN): New macro constant. -(struct sockaddr_ipx): New type definition. -* src/xlat/sock_ipx_options.in (IPX_TYPE): Provide a fallback value. -* tests/net-sockaddr.c [!HAVE_LINUX_IPX_H]: Do not include -. -[!HAVE_LINUX_IPX_H && HAVE_NETIPX_IPX_H]: Include . -[!(HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H)] (check_ipx): Do not -define. -(main) [!(HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H)]: Do not call -check_ipx. - -Closes: https://github.com/strace/strace/issues/201 ---- - configure.ac | 1 + - src/net.c | 5 ----- - src/sockaddr.c | 16 ++++++++++------ - src/xlat/sock_ipx_options.in | 2 +- - tests/net-sockaddr.c | 10 +++++++++- - 5 files changed, 21 insertions(+), 13 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 2771c0f82..3c7fcb91e 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -423,6 +423,7 @@ AC_CHECK_HEADERS(m4_normalize([ - elf.h - gcov.h - iconv.h -+ linux/ipx.h - mqueue.h - netinet/sctp.h - netipx/ipx.h -diff --git a/src/net.c b/src/net.c -index b23911a97..bbc52e15f 100644 ---- a/src/net.c -+++ b/src/net.c -@@ -28,11 +28,6 @@ - #include - #include - #include --#ifdef HAVE_NETIPX_IPX_H --# include --#else --# include --#endif - - #include - #include "netlink.h" -diff --git a/src/sockaddr.c b/src/sockaddr.c -index 8b2b0afaf..66aa04d59 100644 ---- a/src/sockaddr.c -+++ b/src/sockaddr.c -@@ -24,12 +24,6 @@ - #include - #include - --#ifdef HAVE_NETIPX_IPX_H --# include --#else --# include --#endif -- - #include "xlat/addrfams.h" - #include "xlat/arp_hardware_types.h" - #include "xlat/ethernet_protocols.h" -@@ -42,6 +36,16 @@ - - #define SIZEOF_SA_FAMILY sizeof_field(struct sockaddr, sa_family) - -+#define IPX_NODE_LEN 6 -+struct sockaddr_ipx { -+ uint16_t sipx_family; -+ uint16_t sipx_port; -+ uint32_t sipx_network; -+ unsigned char sipx_node[IPX_NODE_LEN]; -+ uint8_t sipx_type; -+ unsigned char sipx_zero; -+}; -+ - const size_t arp_hardware_types_size = ARRAY_SIZE(arp_hardware_types) - 1; - const size_t ethernet_protocols_size = ARRAY_SIZE(ethernet_protocols) - 1; - -diff --git a/src/xlat/sock_ipx_options.in b/src/xlat/sock_ipx_options.in -index eba97fd71..b09be117e 100644 ---- a/src/xlat/sock_ipx_options.in -+++ b/src/xlat/sock_ipx_options.in -@@ -1 +1 @@ --IPX_TYPE -+IPX_TYPE 1 -diff --git a/tests/net-sockaddr.c b/tests/net-sockaddr.c -index f1f9b01cd..c8049fd68 100644 ---- a/tests/net-sockaddr.c -+++ b/tests/net-sockaddr.c -@@ -24,7 +24,11 @@ - #include - #include - #include --#include -+#if defined HAVE_LINUX_IPX_H -+# include -+#elif defined HAVE_NETIPX_IPX_H -+# include -+#endif - #ifdef HAVE_BLUETOOTH_BLUETOOTH_H - # include - # include -@@ -269,6 +273,7 @@ check_in6(void) - printf("connect(-1, %p, %u) = %d EBADF (%m)\n", in6, len, ret); - } - -+#if defined HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H - static void - check_ipx(void) - { -@@ -295,6 +300,7 @@ check_ipx(void) - c_ipx.sipx_node[4], c_ipx.sipx_node[5], - c_ipx.sipx_type, len, ret); - } -+#endif /* HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H */ - - /* for a bit more compact AX.25 address definitions */ - #define AX25_ADDR(c_, s_) \ -@@ -773,7 +779,9 @@ main(void) - check_un(); - check_in(); - check_in6(); -+#if defined HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H - check_ipx(); -+#endif - check_ax25(); - check_x25(); - check_nl(); --- -2.33.1 - -- cgit v1.2.3