From 98bc4decdeab1361bdc585c86591718fb08c8ffb Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sat, 2 Dec 2017 12:44:39 -0800 Subject: Run all patches through renumbering and update Signed-off-by: Alexey Neyman --- .../strace/4.10/0000-aarch64_rt_sigreturn.patch | 23 ++++ packages/strace/4.10/0001-arm_mmap2.patch | 24 ++++ packages/strace/4.10/0002-aarch64_arch_regs.patch | 28 ++++ packages/strace/4.10/0003-stat64-v.test.patch | 89 +++++++++++++ packages/strace/4.10/0004-select_test.patch | 49 +++++++ .../4.10/0005-fix_aarch64_ioctl_decoding.patch | 38 ++++++ packages/strace/4.10/0006-fix_bexecve64_test.patch | 24 ++++ .../4.10/0007-decode_mips_indirect_syscall.patch | 67 ++++++++++ .../strace/4.10/0008-upstream-musl_includes.patch | 63 +++++++++ packages/strace/4.10/0009-use-host-ioctl.patch | 145 ++++++++++++++++++++ .../strace/4.10/001_aarch64_rt_sigreturn.patch | 21 --- packages/strace/4.10/002_arm_mmap2.patch | 22 --- packages/strace/4.10/003_aarch64_arch_regs.patch | 25 ---- packages/strace/4.10/004_stat64-v.test.patch | 87 ------------ packages/strace/4.10/005_select_test.patch | 48 ------- .../4.10/006_fix_aarch64_ioctl_decoding.patch | 39 ------ packages/strace/4.10/007_fix_bexecve64_test.patch | 20 --- .../4.10/008_decode_mips_indirect_syscall.patch | 65 --------- .../strace/4.10/009-upstream-musl_includes.patch | 55 -------- packages/strace/4.10/010-use-host-ioctl.patch | 142 -------------------- packages/strace/4.11/0000-use-host-ioctl.patch | 147 ++++++++++++++++++++ packages/strace/4.11/010-use-host-ioctl.patch | 144 -------------------- packages/strace/4.12/0000-use-host-ioctl.patch | 148 +++++++++++++++++++++ packages/strace/4.12/010-use-host-ioctl.patch | 145 -------------------- packages/strace/4.13/0000-use-host-ioctl.patch | 148 +++++++++++++++++++++ packages/strace/4.13/010-use-host-ioctl.patch | 145 -------------------- packages/strace/4.14/0000-use-host-ioctl.patch | 148 +++++++++++++++++++++ packages/strace/4.14/010-use-host-ioctl.patch | 145 -------------------- packages/strace/4.15/0000-use-host-ioctl.patch | 148 +++++++++++++++++++++ packages/strace/4.15/010-use-host-ioctl.patch | 145 -------------------- packages/strace/4.19/0000-conflicting-decl.patch | 36 +++++ packages/strace/4.19/100-conflicting-decl.patch | 34 ----- .../0000-strace-4.8-glibc_2.18_build_fix-1.patch | 77 +++++++++++ .../001-strace-4.8-glibc_2.18_build_fix-1.patch | 78 ----------- 34 files changed, 1402 insertions(+), 1360 deletions(-) create mode 100644 packages/strace/4.10/0000-aarch64_rt_sigreturn.patch create mode 100644 packages/strace/4.10/0001-arm_mmap2.patch create mode 100644 packages/strace/4.10/0002-aarch64_arch_regs.patch create mode 100644 packages/strace/4.10/0003-stat64-v.test.patch create mode 100644 packages/strace/4.10/0004-select_test.patch create mode 100644 packages/strace/4.10/0005-fix_aarch64_ioctl_decoding.patch create mode 100644 packages/strace/4.10/0006-fix_bexecve64_test.patch create mode 100644 packages/strace/4.10/0007-decode_mips_indirect_syscall.patch create mode 100644 packages/strace/4.10/0008-upstream-musl_includes.patch create mode 100644 packages/strace/4.10/0009-use-host-ioctl.patch delete mode 100644 packages/strace/4.10/001_aarch64_rt_sigreturn.patch delete mode 100644 packages/strace/4.10/002_arm_mmap2.patch delete mode 100644 packages/strace/4.10/003_aarch64_arch_regs.patch delete mode 100644 packages/strace/4.10/004_stat64-v.test.patch delete mode 100644 packages/strace/4.10/005_select_test.patch delete mode 100644 packages/strace/4.10/006_fix_aarch64_ioctl_decoding.patch delete mode 100644 packages/strace/4.10/007_fix_bexecve64_test.patch delete mode 100644 packages/strace/4.10/008_decode_mips_indirect_syscall.patch delete mode 100644 packages/strace/4.10/009-upstream-musl_includes.patch delete mode 100644 packages/strace/4.10/010-use-host-ioctl.patch create mode 100644 packages/strace/4.11/0000-use-host-ioctl.patch delete mode 100644 packages/strace/4.11/010-use-host-ioctl.patch create mode 100644 packages/strace/4.12/0000-use-host-ioctl.patch delete mode 100644 packages/strace/4.12/010-use-host-ioctl.patch create mode 100644 packages/strace/4.13/0000-use-host-ioctl.patch delete mode 100644 packages/strace/4.13/010-use-host-ioctl.patch create mode 100644 packages/strace/4.14/0000-use-host-ioctl.patch delete mode 100644 packages/strace/4.14/010-use-host-ioctl.patch create mode 100644 packages/strace/4.15/0000-use-host-ioctl.patch delete mode 100644 packages/strace/4.15/010-use-host-ioctl.patch create mode 100644 packages/strace/4.19/0000-conflicting-decl.patch delete mode 100644 packages/strace/4.19/100-conflicting-decl.patch create mode 100644 packages/strace/4.8/0000-strace-4.8-glibc_2.18_build_fix-1.patch delete mode 100644 packages/strace/4.8/001-strace-4.8-glibc_2.18_build_fix-1.patch (limited to 'packages/strace') diff --git a/packages/strace/4.10/0000-aarch64_rt_sigreturn.patch b/packages/strace/4.10/0000-aarch64_rt_sigreturn.patch new file mode 100644 index 00000000..e99891de --- /dev/null +++ b/packages/strace/4.10/0000-aarch64_rt_sigreturn.patch @@ -0,0 +1,23 @@ +commit d76d3069526c348e6fe5d40bbbceb2ae4a928d16 +Author: Dmitry V. Levin +Date: Wed Mar 11 14:32:25 2015 +0000 + + aarch64: fix rt_sigreturn decoding + + * sigreturn.c (sys_sigreturn) [AARCH64]: Fix personality check. + +--- + sigreturn.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sigreturn.c ++++ b/sigreturn.c +@@ -23,7 +23,7 @@ + # define OFFSETOF_STRUCT_UCONTEXT_UC_SIGMASK (5 * 4 + SIZEOF_STRUCT_SIGCONTEXT) + const long addr = + # ifdef AARCH64 +- current_personality == 0 ? ++ current_personality == 1 ? + (*aarch64_sp_ptr + SIZEOF_STRUCT_SIGINFO + + offsetof(struct ucontext, uc_sigmask)) : + # endif diff --git a/packages/strace/4.10/0001-arm_mmap2.patch b/packages/strace/4.10/0001-arm_mmap2.patch new file mode 100644 index 00000000..d244c0e0 --- /dev/null +++ b/packages/strace/4.10/0001-arm_mmap2.patch @@ -0,0 +1,24 @@ +commit dbadf7bcc8995612d5ef737047b909e868387e37 +Author: Andreas Schwab +Date: Mon Mar 9 16:55:06 2015 +0100 + + Fix decoding of mmap2 for arm + + * syscallent.h (mmap2): Decode with sys_mmap_4koff, not + sys_mmap_pgoff. + +--- + linux/arm/syscallent.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/linux/arm/syscallent.h ++++ b/linux/arm/syscallent.h +@@ -218,7 +218,7 @@ + [189] = { 5, 0, sys_putpmsg, "putpmsg" }, + [190] = { 0, TP, sys_vfork, "vfork" }, + [191] = { 2, 0, sys_getrlimit, "ugetrlimit" }, +-[192] = { 6, TD|TM|SI, sys_mmap_pgoff, "mmap2" }, ++[192] = { 6, TD|TM|SI, sys_mmap_4koff, "mmap2" }, + [193] = { 4, TF, sys_truncate64, "truncate64" }, + [194] = { 4, TD, sys_ftruncate64, "ftruncate64" }, + [195] = { 2, TF, sys_stat64, "stat64" }, diff --git a/packages/strace/4.10/0002-aarch64_arch_regs.patch b/packages/strace/4.10/0002-aarch64_arch_regs.patch new file mode 100644 index 00000000..e4066d9a --- /dev/null +++ b/packages/strace/4.10/0002-aarch64_arch_regs.patch @@ -0,0 +1,28 @@ +commit 64fc9cedc475b2fc0d940509dc4232b02b5f83ec +Author: Andreas Schwab +Date: Thu Mar 12 11:54:08 2015 +0100 + + Distribute linux/aarch64/arch_regs.h + + * Makefile.am (EXTRA_DIST): Add linux/aarch64/arch_regs.h. + +--- + Makefile.am | 1 + + linux/aarch64/arch_regs.h | 2 ++ + 2 files changed, 3 insertions(+) + +--- a/Makefile.am ++++ b/Makefile.am +@@ -164,6 +164,7 @@ + linux/32/syscallent.h \ + linux/64/ioctls_inc.h \ + linux/64/syscallent.h \ ++ linux/aarch64/arch_regs.h \ + linux/aarch64/errnoent1.h \ + linux/aarch64/ioctls_arch0.h \ + linux/aarch64/ioctls_arch1.h \ +--- /dev/null ++++ b/linux/aarch64/arch_regs.h +@@ -0,0 +1,2 @@ ++extern uint64_t *const aarch64_sp_ptr; ++extern uint32_t *const arm_sp_ptr; diff --git a/packages/strace/4.10/0003-stat64-v.test.patch b/packages/strace/4.10/0003-stat64-v.test.patch new file mode 100644 index 00000000..acb098b0 --- /dev/null +++ b/packages/strace/4.10/0003-stat64-v.test.patch @@ -0,0 +1,89 @@ +commit f79252f072a193bdff435afeaa6b6cd6d5c79947 +Author: Dmitry V. Levin +Date: Mon Mar 16 17:18:40 2015 +0000 + + stat64-v.test: add newfstatat syscall support + + Newer architectures have no stat syscall, so stat() is implemented there + using newfstatat syscall. + + * tests/stat.c (STAT_FNAME): Rename to STAT_PREFIX. Update callers. + [_FILE_OFFSET_BITS == 64] (STAT_PREFIX): Add newfstatat support. + (main) [!NR_stat]: Add newfstatat support. + + Reported-by: Andreas Schwab + +--- + tests/stat.c | 24 ++++++++++++++---------- + 1 file changed, 14 insertions(+), 10 deletions(-) + +--- a/tests/stat.c ++++ b/tests/stat.c +@@ -14,22 +14,22 @@ + # include + #endif + +-#undef STAT_FNAME ++#undef STAT_PREFIX + #undef NR_stat + + #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 + # include +-# define STAT_FNAME "stat(64)?" ++# define STAT_PREFIX "(stat(64)?\\(|newfstatat\\(AT_FDCWD, )" + #else + # include + # if defined __NR_stat + # define NR_stat __NR_stat +-# define STAT_FNAME "stat" ++# define STAT_PREFIX "stat\\(" + # elif defined __NR_newstat + # define NR_stat __NR_newstat +-# define STAT_FNAME "newstat" ++# define STAT_PREFIX "newstat\\(" + # endif +-# ifdef STAT_FNAME ++# ifdef STAT_PREFIX + /* for S_IFMT */ + # define stat libc_stat + # define stat64 libc_stat64 +@@ -57,10 +57,10 @@ + # define off_t __kernel_off_t + # define loff_t __kernel_loff_t + # include +-# endif /* STAT_FNAME */ ++# endif /* STAT_PREFIX */ + #endif /* _FILE_OFFSET_BITS */ + +-#ifdef STAT_FNAME ++#ifdef STAT_PREFIX + + static void + print_ftype(unsigned int mode) +@@ -115,7 +115,7 @@ + assert(stat(av[1], &stb) == 0); + #endif + +- printf(STAT_FNAME "\\(\"%s\", \\{", av[1]); ++ printf(STAT_PREFIX "\"%s\", \\{", av[1]); + printf("st_dev=makedev\\(%u, %u\\)", + (unsigned int) major(stb.st_dev), + (unsigned int) minor(stb.st_dev)); +@@ -159,11 +159,15 @@ + printf("(, st_flags=[0-9]+)?"); + printf("(, st_fstype=[^,]*)?"); + printf("(, st_gen=[0-9]+)?"); +- printf("\\}\\) += 0\n"); ++ printf("\\}"); ++#ifndef NR_stat ++ printf("(, 0)?"); ++#endif ++ printf("\\) += 0\n"); + return 0; + } + +-#else /* !STAT_FNAME */ ++#else /* !STAT_PREFIX */ + int main(void) + { + return 77; diff --git a/packages/strace/4.10/0004-select_test.patch b/packages/strace/4.10/0004-select_test.patch new file mode 100644 index 00000000..a7783921 --- /dev/null +++ b/packages/strace/4.10/0004-select_test.patch @@ -0,0 +1,49 @@ +commit 95336102eb836ba69a2b51a3bbe733abd63bbe77 +Author: Andreas Schwab +Date: Thu Mar 12 16:47:38 2015 +0100 + + tests/select.test: handle architectures using pselect6 syscall + + * tests/select.awk (BEGIN): Update regexps to match both select + and pselect6 syscalls. + * tests/select.test: Probe for both select and pselect6 syscall. + +--- + tests/select.awk | 6 +++--- + tests/select.test | 7 +++++-- + 2 files changed, 8 insertions(+), 5 deletions(-) + +--- a/tests/select.awk ++++ b/tests/select.awk +@@ -1,7 +1,7 @@ + BEGIN { +- r[1] = "^select\\(2, \\[0 1\\], \\[0 1\\], \\[0 1\\], NULL\\) += 1 \\(\\)$" +- r[2] = "^select\\(-1, NULL, 0x[0-9a-f]+, NULL, NULL\\) += -1 " +- r[3] = "^select\\(1025, \\[0\\], \\[\\], NULL, \\{0, 100\\}\\) += 0 \\(Timeout\\)$" ++ r[1] = "^p?select6?\\(2, \\[0 1\\], \\[0 1\\], \\[0 1\\], NULL(, 0)?\\) += 1 \\(\\)$" ++ r[2] = "^p?select6?\\(-1, NULL, 0x[0-9a-f]+, NULL, NULL(, 0)?\\) += -1 " ++ r[3] = "^p?select6?\\(1025, \\[0\\], \\[\\], NULL, \\{0, 100(000)?\\}(, 0)?\\) += 0 \\(Timeout\\)$" + r[4] = "^\\+\\+\\+ exited with 0 \\+\\+\\+$" + lines = 4 + fail = 0 +--- a/tests/select.test ++++ b/tests/select.test +@@ -6,13 +6,16 @@ + + check_prog awk + +-$STRACE -eselect -h > /dev/null || ++syscall= ++$STRACE -epselect6 -h > /dev/null && syscall=$syscall,pselect6 ++$STRACE -eselect -h > /dev/null && syscall=$syscall,select ++test -n "$syscall" || + skip_ 'select syscall is not supported on this architecture' + + ./select || + framework_skip_ 'select syscall does not behave as expected' + +-args='-eselect ./select' ++args="-e$syscall ./select" + $STRACE -o "$LOG" $args || { + cat "$LOG" + fail_ "$STRACE $args failed" diff --git a/packages/strace/4.10/0005-fix_aarch64_ioctl_decoding.patch b/packages/strace/4.10/0005-fix_aarch64_ioctl_decoding.patch new file mode 100644 index 00000000..9f4c0535 --- /dev/null +++ b/packages/strace/4.10/0005-fix_aarch64_ioctl_decoding.patch @@ -0,0 +1,38 @@ +commit 0e3811d7914f209858cf4e445221fd65644cc94b +Author: Andreas Schwab +Date: Thu Mar 12 18:07:00 2015 +0100 + + aarch64: fix ioctl decoding + + * linux/aarch64/ioctls_inc0.h: Rename from ioctls_inc1.h. + * linux/aarch64/ioctls_inc1.h: Rename from ioctls_inc0.h. + * linux/aarch64/ioctls_arch0.h: Rename from ioctls_arch1.h. + * linux/aarch64/ioctls_arch1.h: Rename from ioctls_arch0.h. + +--- + linux/aarch64/ioctls_arch0.h | 2 +- + linux/aarch64/ioctls_arch1.h | 2 +- + linux/aarch64/ioctls_inc0.h | 2 +- + linux/aarch64/ioctls_inc1.h | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +--- a/linux/aarch64/ioctls_arch0.h ++++ b/linux/aarch64/ioctls_arch0.h +@@ -1 +1 @@ +-/* Generated by ioctls_gen.sh from definitions found in $linux/arch/arm64/include/ tree. */ ++#include "arm/ioctls_arch0.h" +--- a/linux/aarch64/ioctls_arch1.h ++++ b/linux/aarch64/ioctls_arch1.h +@@ -1 +1 @@ +-#include "arm/ioctls_arch0.h" ++/* Generated by ioctls_gen.sh from definitions found in $linux/arch/arm64/include/ tree. */ +--- a/linux/aarch64/ioctls_inc0.h ++++ b/linux/aarch64/ioctls_inc0.h +@@ -1 +1 @@ +-#include "64/ioctls_inc.h" ++#include "arm/ioctls_inc0.h" +--- a/linux/aarch64/ioctls_inc1.h ++++ b/linux/aarch64/ioctls_inc1.h +@@ -1 +1 @@ +-#include "arm/ioctls_inc0.h" ++#include "64/ioctls_inc.h" diff --git a/packages/strace/4.10/0006-fix_bexecve64_test.patch b/packages/strace/4.10/0006-fix_bexecve64_test.patch new file mode 100644 index 00000000..f5b255b1 --- /dev/null +++ b/packages/strace/4.10/0006-fix_bexecve64_test.patch @@ -0,0 +1,24 @@ +commit b704e8fbb4d9cf90ac56f3c889de5b779c444db4 +(loosely based on) +--- + tests/bexecve.test | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/tests/bexecve.test ++++ b/tests/bexecve.test +@@ -24,13 +24,14 @@ + } + + pattern='Process [1-9][0-9]* detached' ++pattern_personality='\[ Process PID=[1-9][0-9]* runs in .* mode. \]' + + LC_ALL=C grep -x "$pattern" "$LOG" > /dev/null || { + cat "$LOG" + fail_ "$what: unexpected output" + } + +-if LC_ALL=C grep -v -x "$pattern" "$LOG" > /dev/null; then ++if LC_ALL=C grep -E -v -x "($pattern|$pattern_personality)" "$LOG" > /dev/null; then + cat "$LOG" + fail_ "$what: unexpected output" + fi diff --git a/packages/strace/4.10/0007-decode_mips_indirect_syscall.patch b/packages/strace/4.10/0007-decode_mips_indirect_syscall.patch new file mode 100644 index 00000000..8921dda2 --- /dev/null +++ b/packages/strace/4.10/0007-decode_mips_indirect_syscall.patch @@ -0,0 +1,67 @@ +commit f34b97f89dd3893ef3652a6899487771402fc13c +--- + linux/mips/syscallent-o32.h | 2 +- + linux/syscall.h | 1 + + syscall.c | 24 ++++++++++++++++++++++++ + 3 files changed, 26 insertions(+), 1 deletion(-) + +--- a/linux/mips/syscallent-o32.h ++++ b/linux/mips/syscallent-o32.h +@@ -1,6 +1,6 @@ + #if defined LINUX_MIPSO32 + /* For an O32 strace, decode the o32 syscalls. */ +-[4000] = { MA, 0, printargs, "syscall" }, /* start of Linux o32 */ ++[4000] = { MA, 0, sys_syscall, "syscall" }, /* start of Linux o32 */ + [4001] = { 1, TP|SE, sys_exit, "exit" }, + [4002] = { 0, TP, sys_fork, "fork" }, + [4003] = { 3, TD, sys_read, "read" }, +--- a/syscall.c ++++ b/syscall.c +@@ -606,6 +606,25 @@ + } + #endif + ++#ifdef LINUX_MIPSO32 ++static void ++decode_mips_subcall(struct tcb *tcp) ++{ ++ if (!SCNO_IS_VALID(tcp->u_arg[0])) ++ return; ++ tcp->scno = tcp->u_arg[0]; ++ tcp->qual_flg = qual_flags[tcp->scno]; ++ tcp->s_ent = &sysent[tcp->scno]; ++ memmove(&tcp->u_arg[0], &tcp->u_arg[1], ++ sizeof(tcp->u_arg) - sizeof(tcp->u_arg[0])); ++} ++ ++int sys_syscall(struct tcb *tcp) ++{ ++ return printargs(tcp); ++} ++#endif ++ + int + printargs(struct tcb *tcp) + { +@@ -1774,6 +1793,11 @@ + goto ret; + } + ++#ifdef LINUX_MIPSO32 ++ if (sys_syscall == tcp->s_ent->sys_func) ++ decode_mips_subcall(tcp); ++#endif ++ + if ( sys_execve == tcp->s_ent->sys_func + # if defined(SPARC) || defined(SPARC64) + || sys_execv == tcp->s_ent->sys_func +--- a/linux/syscall.h ++++ b/linux/syscall.h +@@ -277,6 +277,7 @@ + int sys_symlinkat(); + int sys_sync_file_range(); + int sys_sync_file_range2(); ++int sys_syscall(); + int sys_sysctl(); + int sys_sysinfo(); + int sys_syslog(); diff --git a/packages/strace/4.10/0008-upstream-musl_includes.patch b/packages/strace/4.10/0008-upstream-musl_includes.patch new file mode 100644 index 00000000..87717ca8 --- /dev/null +++ b/packages/strace/4.10/0008-upstream-musl_includes.patch @@ -0,0 +1,63 @@ +commit 3460dc486d333231998de0f19918204aacee9ae3 +commit d34e00b293942b1012ddc49ed3ab379a32337611 +--- + evdev.c | 2 ++ + ioctl.c | 2 +- + ioctlsort.c | 2 +- + mknod.c | 1 + + printmode.c | 1 + + 5 files changed, 6 insertions(+), 2 deletions(-) + +--- a/evdev.c ++++ b/evdev.c +@@ -28,6 +28,8 @@ + + #include "defs.h" + ++#include ++ + #ifdef HAVE_LINUX_INPUT_H + #include + #include "xlat/evdev_abs.h" +--- a/ioctl.c ++++ b/ioctl.c +@@ -29,7 +29,7 @@ + */ + + #include "defs.h" +-#include ++#include + #include "xlat/ioctl_dirs.h" + + #ifdef HAVE_LINUX_INPUT_H +--- a/ioctlsort.c ++++ b/ioctlsort.c +@@ -33,7 +33,7 @@ + #include + #include + #include +-#include ++#include + + struct ioctlent { + const char *info; +--- a/mknod.c ++++ b/mknod.c +@@ -1,6 +1,7 @@ + #include "defs.h" + + #include ++#include + + #ifdef MAJOR_IN_SYSMACROS + # include +--- a/printmode.c ++++ b/printmode.c +@@ -1,6 +1,7 @@ + #include "defs.h" + + #include ++#include + + #include "xlat/modetypes.h" + diff --git a/packages/strace/4.10/0009-use-host-ioctl.patch b/packages/strace/4.10/0009-use-host-ioctl.patch new file mode 100644 index 00000000..857c7c03 --- /dev/null +++ b/packages/strace/4.10/0009-use-host-ioctl.patch @@ -0,0 +1,145 @@ +--- + Makefile.am | 14 ++++++++++++-- + Makefile.in | 14 ++++++++++++-- + ioctl_iocdef.c | 43 +++++++++++++++++++++++++++++++++++++++++++ + ioctlsort.c | 3 ++- + 4 files changed, 69 insertions(+), 5 deletions(-) + +--- /dev/null ++++ b/ioctl_iocdef.c +@@ -0,0 +1,43 @@ ++/* ++ * Copyright (c) 2017 Alexey Neyman ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. The name of the author may not be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * This file is *PREPROCESSED*, not *COMPILED* for host and the result ++ * is included into ioctlsort (which is compiled for build). Since some ++ * of these values are used in structure initializers, they cannot be ++ * defined as 'const unsigned int' - instead, they have to be macros. ++ * Hence, the result of preprocessing will be run through sed to change ++ * 'DEFINE' into '#define' ++ */ ++#include ++ ++DEFINE HOST_IOC_NONE _IOC_NONE ++DEFINE HOST_IOC_READ _IOC_READ ++DEFINE HOST_IOC_WRITE _IOC_WRITE ++ ++DEFINE HOST_IOC_SIZESHIFT _IOC_SIZESHIFT ++DEFINE HOST_IOC_DIRSHIFT _IOC_DIRSHIFT +--- a/ioctlsort.c ++++ b/ioctlsort.c +@@ -33,7 +33,8 @@ + #include + #include + #include +-#include ++ ++#include "ioctl_iocdef.h" + + struct ioctlent { + const char *info; +--- a/Makefile.am ++++ b/Makefile.am +@@ -159,6 +159,7 @@ + debian/strace64.manpages \ + debian/watch \ + errnoent.sh \ ++ ioctl_iocdef.c \ + ioctlsort.c \ + linux/32/ioctls_inc.h \ + linux/32/syscallent.h \ +@@ -417,15 +418,24 @@ + ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h) + ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h)) + BUILT_SOURCES += $(ioctlent_h) +-CLEANFILES = $(ioctlent_h) ++CLEANFILES = $(ioctlent_h) ioctl_iocdef.h + + ioctlent%.h: ioctlsort% + ./$< > $@ + ++# Need to pick up definitions *for host* while compiling ++# ioctlsort *for build*, hence this magic. ++ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c ++ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ ++ ++ioctl_iocdef.h: ioctl_iocdef.i ++ sed -n 's/^DEFINE HOST/#define /p' $< > $@ ++ + ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o + $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ + +-ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c ++ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c + $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c + + ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h +--- a/Makefile.in ++++ b/Makefile.in +@@ -687,6 +687,7 @@ + debian/strace64.manpages \ + debian/watch \ + errnoent.sh \ ++ ioctl_iocdef.c \ + ioctlsort.c \ + linux/32/ioctls_inc.h \ + linux/32/syscallent.h \ +@@ -921,7 +922,7 @@ + ioctlsort_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD) + ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h) + ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h)) +-CLEANFILES = $(ioctlent_h) ++CLEANFILES = $(ioctlent_h) ioctl_iocdef.h + @MAINTAINER_MODE_TRUE@gen_changelog_start_date = 2009-07-08 20:00 + all: $(BUILT_SOURCES) config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive +@@ -3414,13 +3415,22 @@ + exit 1; \ + fi + ++# Need to pick up definitions *for host* while compiling ++# ioctlsort *for build*, hence this magic. ++ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c ++ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ ++ ++ioctl_iocdef.h: ioctl_iocdef.i ++ sed -n 's/^DEFINE HOST/#define /p' $< > $@ ++ + ioctlent%.h: ioctlsort% + ./$< > $@ + + ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o + $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ + +-ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c ++ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c + $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c + + ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h diff --git a/packages/strace/4.10/001_aarch64_rt_sigreturn.patch b/packages/strace/4.10/001_aarch64_rt_sigreturn.patch deleted file mode 100644 index 6b7bbe32..00000000 --- a/packages/strace/4.10/001_aarch64_rt_sigreturn.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit d76d3069526c348e6fe5d40bbbceb2ae4a928d16 -Author: Dmitry V. Levin -Date: Wed Mar 11 14:32:25 2015 +0000 - - aarch64: fix rt_sigreturn decoding - - * sigreturn.c (sys_sigreturn) [AARCH64]: Fix personality check. - -diff --git a/sigreturn.c b/sigreturn.c -index 648bd0a..c253a0c 100644 ---- a/sigreturn.c -+++ b/sigreturn.c -@@ -23,7 +23,7 @@ sys_sigreturn(struct tcb *tcp) - # define OFFSETOF_STRUCT_UCONTEXT_UC_SIGMASK (5 * 4 + SIZEOF_STRUCT_SIGCONTEXT) - const long addr = - # ifdef AARCH64 -- current_personality == 0 ? -+ current_personality == 1 ? - (*aarch64_sp_ptr + SIZEOF_STRUCT_SIGINFO + - offsetof(struct ucontext, uc_sigmask)) : - # endif diff --git a/packages/strace/4.10/002_arm_mmap2.patch b/packages/strace/4.10/002_arm_mmap2.patch deleted file mode 100644 index 41953e25..00000000 --- a/packages/strace/4.10/002_arm_mmap2.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit dbadf7bcc8995612d5ef737047b909e868387e37 -Author: Andreas Schwab -Date: Mon Mar 9 16:55:06 2015 +0100 - - Fix decoding of mmap2 for arm - - * syscallent.h (mmap2): Decode with sys_mmap_4koff, not - sys_mmap_pgoff. - -diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h -index 52aed9e..b66a5a2 100644 ---- a/linux/arm/syscallent.h -+++ b/linux/arm/syscallent.h -@@ -218,7 +218,7 @@ - [189] = { 5, 0, sys_putpmsg, "putpmsg" }, - [190] = { 0, TP, sys_vfork, "vfork" }, - [191] = { 2, 0, sys_getrlimit, "ugetrlimit" }, --[192] = { 6, TD|TM|SI, sys_mmap_pgoff, "mmap2" }, -+[192] = { 6, TD|TM|SI, sys_mmap_4koff, "mmap2" }, - [193] = { 4, TF, sys_truncate64, "truncate64" }, - [194] = { 4, TD, sys_ftruncate64, "ftruncate64" }, - [195] = { 2, TF, sys_stat64, "stat64" }, diff --git a/packages/strace/4.10/003_aarch64_arch_regs.patch b/packages/strace/4.10/003_aarch64_arch_regs.patch deleted file mode 100644 index e5153b5e..00000000 --- a/packages/strace/4.10/003_aarch64_arch_regs.patch +++ /dev/null @@ -1,25 +0,0 @@ -commit 64fc9cedc475b2fc0d940509dc4232b02b5f83ec -Author: Andreas Schwab -Date: Thu Mar 12 11:54:08 2015 +0100 - - Distribute linux/aarch64/arch_regs.h - - * Makefile.am (EXTRA_DIST): Add linux/aarch64/arch_regs.h. - -diff --git a/Makefile.am b/Makefile.am -index 2030f9b..48fe1d7 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -164,6 +164,7 @@ EXTRA_DIST = \ - linux/32/syscallent.h \ - linux/64/ioctls_inc.h \ - linux/64/syscallent.h \ -+ linux/aarch64/arch_regs.h \ - linux/aarch64/errnoent1.h \ - linux/aarch64/ioctls_arch0.h \ - linux/aarch64/ioctls_arch1.h \ ---- a/linux/aarch64/arch_regs.h 2015-06-09 03:27:46.170000000 +0000 -+++ b/linux/aarch64/arch_regs.h 2015-07-01 21:23:17.025202308 +0000 -@@ -0,0 +1,2 @@ -+extern uint64_t *const aarch64_sp_ptr; -+extern uint32_t *const arm_sp_ptr; diff --git a/packages/strace/4.10/004_stat64-v.test.patch b/packages/strace/4.10/004_stat64-v.test.patch deleted file mode 100644 index 53383e34..00000000 --- a/packages/strace/4.10/004_stat64-v.test.patch +++ /dev/null @@ -1,87 +0,0 @@ -commit f79252f072a193bdff435afeaa6b6cd6d5c79947 -Author: Dmitry V. Levin -Date: Mon Mar 16 17:18:40 2015 +0000 - - stat64-v.test: add newfstatat syscall support - - Newer architectures have no stat syscall, so stat() is implemented there - using newfstatat syscall. - - * tests/stat.c (STAT_FNAME): Rename to STAT_PREFIX. Update callers. - [_FILE_OFFSET_BITS == 64] (STAT_PREFIX): Add newfstatat support. - (main) [!NR_stat]: Add newfstatat support. - - Reported-by: Andreas Schwab - -diff --git a/tests/stat.c b/tests/stat.c -index 21e37fb..2b04010 100644 ---- a/tests/stat.c -+++ b/tests/stat.c -@@ -14,22 +14,22 @@ - # include - #endif - --#undef STAT_FNAME -+#undef STAT_PREFIX - #undef NR_stat - - #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 - # include --# define STAT_FNAME "stat(64)?" -+# define STAT_PREFIX "(stat(64)?\\(|newfstatat\\(AT_FDCWD, )" - #else - # include - # if defined __NR_stat - # define NR_stat __NR_stat --# define STAT_FNAME "stat" -+# define STAT_PREFIX "stat\\(" - # elif defined __NR_newstat - # define NR_stat __NR_newstat --# define STAT_FNAME "newstat" -+# define STAT_PREFIX "newstat\\(" - # endif --# ifdef STAT_FNAME -+# ifdef STAT_PREFIX - /* for S_IFMT */ - # define stat libc_stat - # define stat64 libc_stat64 -@@ -57,10 +57,10 @@ - # define off_t __kernel_off_t - # define loff_t __kernel_loff_t - # include --# endif /* STAT_FNAME */ -+# endif /* STAT_PREFIX */ - #endif /* _FILE_OFFSET_BITS */ - --#ifdef STAT_FNAME -+#ifdef STAT_PREFIX - - static void - print_ftype(unsigned int mode) -@@ -115,7 +115,7 @@ main(int ac, const char **av) - assert(stat(av[1], &stb) == 0); - #endif - -- printf(STAT_FNAME "\\(\"%s\", \\{", av[1]); -+ printf(STAT_PREFIX "\"%s\", \\{", av[1]); - printf("st_dev=makedev\\(%u, %u\\)", - (unsigned int) major(stb.st_dev), - (unsigned int) minor(stb.st_dev)); -@@ -159,11 +159,15 @@ main(int ac, const char **av) - printf("(, st_flags=[0-9]+)?"); - printf("(, st_fstype=[^,]*)?"); - printf("(, st_gen=[0-9]+)?"); -- printf("\\}\\) += 0\n"); -+ printf("\\}"); -+#ifndef NR_stat -+ printf("(, 0)?"); -+#endif -+ printf("\\) += 0\n"); - return 0; - } - --#else /* !STAT_FNAME */ -+#else /* !STAT_PREFIX */ - int main(void) - { - return 77; diff --git a/packages/strace/4.10/005_select_test.patch b/packages/strace/4.10/005_select_test.patch deleted file mode 100644 index cb56ec6c..00000000 --- a/packages/strace/4.10/005_select_test.patch +++ /dev/null @@ -1,48 +0,0 @@ -commit 95336102eb836ba69a2b51a3bbe733abd63bbe77 -Author: Andreas Schwab -Date: Thu Mar 12 16:47:38 2015 +0100 - - tests/select.test: handle architectures using pselect6 syscall - - * tests/select.awk (BEGIN): Update regexps to match both select - and pselect6 syscalls. - * tests/select.test: Probe for both select and pselect6 syscall. - -diff --git a/tests/select.awk b/tests/select.awk -index 142504a..688cefe 100644 ---- a/tests/select.awk -+++ b/tests/select.awk -@@ -1,7 +1,7 @@ - BEGIN { -- r[1] = "^select\\(2, \\[0 1\\], \\[0 1\\], \\[0 1\\], NULL\\) += 1 \\(\\)$" -- r[2] = "^select\\(-1, NULL, 0x[0-9a-f]+, NULL, NULL\\) += -1 " -- r[3] = "^select\\(1025, \\[0\\], \\[\\], NULL, \\{0, 100\\}\\) += 0 \\(Timeout\\)$" -+ r[1] = "^p?select6?\\(2, \\[0 1\\], \\[0 1\\], \\[0 1\\], NULL(, 0)?\\) += 1 \\(\\)$" -+ r[2] = "^p?select6?\\(-1, NULL, 0x[0-9a-f]+, NULL, NULL(, 0)?\\) += -1 " -+ r[3] = "^p?select6?\\(1025, \\[0\\], \\[\\], NULL, \\{0, 100(000)?\\}(, 0)?\\) += 0 \\(Timeout\\)$" - r[4] = "^\\+\\+\\+ exited with 0 \\+\\+\\+$" - lines = 4 - fail = 0 -diff --git a/tests/select.test b/tests/select.test -index bd3066b..5d5fe54 100755 ---- a/tests/select.test -+++ b/tests/select.test -@@ -6,13 +6,16 @@ - - check_prog awk - --$STRACE -eselect -h > /dev/null || -+syscall= -+$STRACE -epselect6 -h > /dev/null && syscall=$syscall,pselect6 -+$STRACE -eselect -h > /dev/null && syscall=$syscall,select -+test -n "$syscall" || - skip_ 'select syscall is not supported on this architecture' - - ./select || - framework_skip_ 'select syscall does not behave as expected' - --args='-eselect ./select' -+args="-e$syscall ./select" - $STRACE -o "$LOG" $args || { - cat "$LOG" - fail_ "$STRACE $args failed" diff --git a/packages/strace/4.10/006_fix_aarch64_ioctl_decoding.patch b/packages/strace/4.10/006_fix_aarch64_ioctl_decoding.patch deleted file mode 100644 index a2703499..00000000 --- a/packages/strace/4.10/006_fix_aarch64_ioctl_decoding.patch +++ /dev/null @@ -1,39 +0,0 @@ -commit 0e3811d7914f209858cf4e445221fd65644cc94b -Author: Andreas Schwab -Date: Thu Mar 12 18:07:00 2015 +0100 - - aarch64: fix ioctl decoding - - * linux/aarch64/ioctls_inc0.h: Rename from ioctls_inc1.h. - * linux/aarch64/ioctls_inc1.h: Rename from ioctls_inc0.h. - * linux/aarch64/ioctls_arch0.h: Rename from ioctls_arch1.h. - * linux/aarch64/ioctls_arch1.h: Rename from ioctls_arch0.h. - -diff --git a/linux/aarch64/ioctls_arch0.h b/linux/aarch64/ioctls_arch0.h -index 6a674cc..b722d22 100644 ---- a/linux/aarch64/ioctls_arch0.h -+++ b/linux/aarch64/ioctls_arch0.h -@@ -1 +1 @@ --/* Generated by ioctls_gen.sh from definitions found in $linux/arch/arm64/include/ tree. */ -+#include "arm/ioctls_arch0.h" -diff --git a/linux/aarch64/ioctls_arch1.h b/linux/aarch64/ioctls_arch1.h -index b722d22..6a674cc 100644 ---- a/linux/aarch64/ioctls_arch1.h -+++ b/linux/aarch64/ioctls_arch1.h -@@ -1 +1 @@ --#include "arm/ioctls_arch0.h" -+/* Generated by ioctls_gen.sh from definitions found in $linux/arch/arm64/include/ tree. */ -diff --git a/linux/aarch64/ioctls_inc0.h b/linux/aarch64/ioctls_inc0.h -index f9939fa..46c11b1 100644 ---- a/linux/aarch64/ioctls_inc0.h -+++ b/linux/aarch64/ioctls_inc0.h -@@ -1 +1 @@ --#include "64/ioctls_inc.h" -+#include "arm/ioctls_inc0.h" -diff --git a/linux/aarch64/ioctls_inc1.h b/linux/aarch64/ioctls_inc1.h -index 46c11b1..f9939fa 100644 ---- a/linux/aarch64/ioctls_inc1.h -+++ b/linux/aarch64/ioctls_inc1.h -@@ -1 +1 @@ --#include "arm/ioctls_inc0.h" -+#include "64/ioctls_inc.h" diff --git a/packages/strace/4.10/007_fix_bexecve64_test.patch b/packages/strace/4.10/007_fix_bexecve64_test.patch deleted file mode 100644 index 6dc9b465..00000000 --- a/packages/strace/4.10/007_fix_bexecve64_test.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit b704e8fbb4d9cf90ac56f3c889de5b779c444db4 -(loosely based on) ---- a/tests/bexecve.test -+++ b/tests/bexecve.test -@@ -24,13 +24,14 @@ - } - - pattern='Process [1-9][0-9]* detached' -+pattern_personality='\[ Process PID=[1-9][0-9]* runs in .* mode. \]' - - LC_ALL=C grep -x "$pattern" "$LOG" > /dev/null || { - cat "$LOG" - fail_ "$what: unexpected output" - } - --if LC_ALL=C grep -v -x "$pattern" "$LOG" > /dev/null; then -+if LC_ALL=C grep -E -v -x "($pattern|$pattern_personality)" "$LOG" > /dev/null; then - cat "$LOG" - fail_ "$what: unexpected output" - fi diff --git a/packages/strace/4.10/008_decode_mips_indirect_syscall.patch b/packages/strace/4.10/008_decode_mips_indirect_syscall.patch deleted file mode 100644 index d2d72173..00000000 --- a/packages/strace/4.10/008_decode_mips_indirect_syscall.patch +++ /dev/null @@ -1,65 +0,0 @@ -commit f34b97f89dd3893ef3652a6899487771402fc13c -Index: strace-4.10/linux/mips/syscallent-o32.h -=================================================================== ---- strace-4.10.orig/linux/mips/syscallent-o32.h -+++ strace-4.10/linux/mips/syscallent-o32.h -@@ -1,6 +1,6 @@ - #if defined LINUX_MIPSO32 - /* For an O32 strace, decode the o32 syscalls. */ --[4000] = { MA, 0, printargs, "syscall" }, /* start of Linux o32 */ -+[4000] = { MA, 0, sys_syscall, "syscall" }, /* start of Linux o32 */ - [4001] = { 1, TP|SE, sys_exit, "exit" }, - [4002] = { 0, TP, sys_fork, "fork" }, - [4003] = { 3, TD, sys_read, "read" }, -Index: strace-4.10/syscall.c -=================================================================== ---- strace-4.10.orig/syscall.c -+++ strace-4.10/syscall.c -@@ -606,6 +606,25 @@ decode_ipc_subcall(struct tcb *tcp) - } - #endif - -+#ifdef LINUX_MIPSO32 -+static void -+decode_mips_subcall(struct tcb *tcp) -+{ -+ if (!SCNO_IS_VALID(tcp->u_arg[0])) -+ return; -+ tcp->scno = tcp->u_arg[0]; -+ tcp->qual_flg = qual_flags[tcp->scno]; -+ tcp->s_ent = &sysent[tcp->scno]; -+ memmove(&tcp->u_arg[0], &tcp->u_arg[1], -+ sizeof(tcp->u_arg) - sizeof(tcp->u_arg[0])); -+} -+ -+int sys_syscall(struct tcb *tcp) -+{ -+ return printargs(tcp); -+} -+#endif -+ - int - printargs(struct tcb *tcp) - { -@@ -1774,6 +1793,11 @@ trace_syscall_entering(struct tcb *tcp) - goto ret; - } - -+#ifdef LINUX_MIPSO32 -+ if (sys_syscall == tcp->s_ent->sys_func) -+ decode_mips_subcall(tcp); -+#endif -+ - if ( sys_execve == tcp->s_ent->sys_func - # if defined(SPARC) || defined(SPARC64) - || sys_execv == tcp->s_ent->sys_func ---- strace-4.10.orig/linux/syscall.h 2015-02-06 01:23:05.000000000 +0000 -+++ strace-4.10/linux/syscall.h 2015-07-09 14:36:49.372494628 +0100 -@@ -277,6 +277,7 @@ - int sys_symlinkat(); - int sys_sync_file_range(); - int sys_sync_file_range2(); -+int sys_syscall(); - int sys_sysctl(); - int sys_sysinfo(); - int sys_syslog(); diff --git a/packages/strace/4.10/009-upstream-musl_includes.patch b/packages/strace/4.10/009-upstream-musl_includes.patch deleted file mode 100644 index c68f8d8d..00000000 --- a/packages/strace/4.10/009-upstream-musl_includes.patch +++ /dev/null @@ -1,55 +0,0 @@ -commit 3460dc486d333231998de0f19918204aacee9ae3 -commit d34e00b293942b1012ddc49ed3ab379a32337611 ---- a/evdev.c -+++ b/evdev.c -@@ -28,6 +28,8 @@ - - #include "defs.h" - -+#include -+ - #ifdef HAVE_LINUX_INPUT_H - #include - #include "xlat/evdev_abs.h" ---- a/ioctl.c -+++ b/ioctl.c -@@ -29,7 +29,7 @@ - */ - - #include "defs.h" --#include -+#include - #include "xlat/ioctl_dirs.h" - - #ifdef HAVE_LINUX_INPUT_H ---- a/ioctlsort.c -+++ b/ioctlsort.c -@@ -33,7 +33,7 @@ - #include - #include - #include --#include -+#include - - struct ioctlent { - const char *info; ---- a/mknod.c -+++ b/mknod.c -@@ -1,6 +1,7 @@ - #include "defs.h" - - #include -+#include - - #ifdef MAJOR_IN_SYSMACROS - # include ---- a/printmode.c -+++ b/printmode.c -@@ -1,6 +1,7 @@ - #include "defs.h" - - #include -+#include - - #include "xlat/modetypes.h" - diff --git a/packages/strace/4.10/010-use-host-ioctl.patch b/packages/strace/4.10/010-use-host-ioctl.patch deleted file mode 100644 index e9c34d38..00000000 --- a/packages/strace/4.10/010-use-host-ioctl.patch +++ /dev/null @@ -1,142 +0,0 @@ -diff -urpN strace-4.10.orig/ioctl_iocdef.c strace-4.10/ioctl_iocdef.c ---- strace-4.10.orig/ioctl_iocdef.c 1969-12-31 16:00:00.000000000 -0800 -+++ strace-4.10/ioctl_iocdef.c 2017-01-14 15:05:49.505335680 -0800 -@@ -0,0 +1,43 @@ -+/* -+ * Copyright (c) 2017 Alexey Neyman -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 3. The name of the author may not be used to endorse or promote products -+ * derived from this software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ */ -+ -+/* -+ * This file is *PREPROCESSED*, not *COMPILED* for host and the result -+ * is included into ioctlsort (which is compiled for build). Since some -+ * of these values are used in structure initializers, they cannot be -+ * defined as 'const unsigned int' - instead, they have to be macros. -+ * Hence, the result of preprocessing will be run through sed to change -+ * 'DEFINE' into '#define' -+ */ -+#include -+ -+DEFINE HOST_IOC_NONE _IOC_NONE -+DEFINE HOST_IOC_READ _IOC_READ -+DEFINE HOST_IOC_WRITE _IOC_WRITE -+ -+DEFINE HOST_IOC_SIZESHIFT _IOC_SIZESHIFT -+DEFINE HOST_IOC_DIRSHIFT _IOC_DIRSHIFT -diff -urpN strace-4.10.orig/ioctlsort.c strace-4.10/ioctlsort.c ---- strace-4.10.orig/ioctlsort.c 2015-02-15 18:35:58.000000000 -0800 -+++ strace-4.10/ioctlsort.c 2017-01-14 15:20:30.597371979 -0800 -@@ -33,7 +33,8 @@ - #include - #include - #include --#include -+ -+#include "ioctl_iocdef.h" - - struct ioctlent { - const char *info; -diff -urpN strace-4.10.orig/Makefile.am strace-4.10/Makefile.am ---- strace-4.10.orig/Makefile.am 2015-03-05 18:19:01.000000000 -0800 -+++ strace-4.10/Makefile.am 2017-01-14 15:07:28.978244260 -0800 -@@ -159,6 +159,7 @@ EXTRA_DIST = \ - debian/strace64.manpages \ - debian/watch \ - errnoent.sh \ -+ ioctl_iocdef.c \ - ioctlsort.c \ - linux/32/ioctls_inc.h \ - linux/32/syscallent.h \ -@@ -416,15 +417,24 @@ ioctlsort_LDFLAGS = $(AM_LDFLAGS) $(LDFL - ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h) - ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h)) - BUILT_SOURCES += $(ioctlent_h) --CLEANFILES = $(ioctlent_h) -+CLEANFILES = $(ioctlent_h) ioctl_iocdef.h - - ioctlent%.h: ioctlsort% - ./$< > $@ - -+# Need to pick up definitions *for host* while compiling -+# ioctlsort *for build*, hence this magic. -+ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c -+ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ -+ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ -+ -+ioctl_iocdef.h: ioctl_iocdef.i -+ sed -n 's/^DEFINE HOST/#define /p' $< > $@ -+ - ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o - $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ - --ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c -+ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c - $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c - - ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h -diff -urpN strace-4.10.orig/Makefile.in strace-4.10/Makefile.in ---- strace-4.10.orig/Makefile.in 2015-03-06 07:16:46.000000000 -0800 -+++ strace-4.10/Makefile.in 2017-01-14 15:23:06.718794409 -0800 -@@ -687,6 +687,7 @@ EXTRA_DIST = \ - debian/strace64.manpages \ - debian/watch \ - errnoent.sh \ -+ ioctl_iocdef.c \ - ioctlsort.c \ - linux/32/ioctls_inc.h \ - linux/32/syscallent.h \ -@@ -921,7 +922,7 @@ ioctlsort_CFLAGS = $(AM_CFLAGS) $(CFLAGS - ioctlsort_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD) - ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h) - ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h)) --CLEANFILES = $(ioctlent_h) -+CLEANFILES = $(ioctlent_h) ioctl_iocdef.h - @MAINTAINER_MODE_TRUE@gen_changelog_start_date = 2009-07-08 20:00 - all: $(BUILT_SOURCES) config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive -@@ -3414,13 +3415,22 @@ news-check: NEWS - exit 1; \ - fi - -+# Need to pick up definitions *for host* while compiling -+# ioctlsort *for build*, hence this magic. -+ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c -+ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ -+ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ -+ -+ioctl_iocdef.h: ioctl_iocdef.i -+ sed -n 's/^DEFINE HOST/#define /p' $< > $@ -+ - ioctlent%.h: ioctlsort% - ./$< > $@ - - ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o - $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ - --ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c -+ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c - $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c - - ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h diff --git a/packages/strace/4.11/0000-use-host-ioctl.patch b/packages/strace/4.11/0000-use-host-ioctl.patch new file mode 100644 index 00000000..99f8c4c3 --- /dev/null +++ b/packages/strace/4.11/0000-use-host-ioctl.patch @@ -0,0 +1,147 @@ +--- + Makefile.am | 14 ++++++++++++-- + Makefile.in | 14 ++++++++++++-- + ioctl_iocdef.c | 43 +++++++++++++++++++++++++++++++++++++++++++ + ioctlsort.c | 3 ++- + 4 files changed, 69 insertions(+), 5 deletions(-) + +--- /dev/null ++++ b/ioctl_iocdef.c +@@ -0,0 +1,43 @@ ++/* ++ * Copyright (c) 2017 Alexey Neyman ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. The name of the author may not be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * This file is *PREPROCESSED*, not *COMPILED* for host and the result ++ * is included into ioctlsort (which is compiled for build). Since some ++ * of these values are used in structure initializers, they cannot be ++ * defined as 'const unsigned int' - instead, they have to be macros. ++ * Hence, the result of preprocessing will be run through sed to change ++ * 'DEFINE' into '#define' ++ */ ++#include ++ ++DEFINE HOST_IOC_NONE _IOC_NONE ++DEFINE HOST_IOC_READ _IOC_READ ++DEFINE HOST_IOC_WRITE _IOC_WRITE ++ ++DEFINE HOST_IOC_SIZESHIFT _IOC_SIZESHIFT ++DEFINE HOST_IOC_DIRSHIFT _IOC_DIRSHIFT +--- a/ioctlsort.c ++++ b/ioctlsort.c +@@ -33,7 +33,8 @@ + #include + #include + #include +-#include ++ ++#include "ioctl_iocdef.h" + + struct ioctlent { + const char *info; +--- a/Makefile.am ++++ b/Makefile.am +@@ -239,6 +239,7 @@ + debian/watch \ + errnoent.sh \ + generate_sen.sh \ ++ ioctl_iocdef.c \ + ioctlsort.c \ + linux/32/ioctls_inc.h \ + linux/32/ioctls_inc_align32.h \ +@@ -666,17 +667,26 @@ + ioctlent%.h: ioctlsort% + ./$< > $@ + ++# Need to pick up definitions *for host* while compiling ++# ioctlsort *for build*, hence this magic. ++ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c ++ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ ++ ++ioctl_iocdef.h: ioctl_iocdef.i ++ sed -n 's/^DEFINE HOST/#define /p' $< > $@ ++ + ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o + $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ + +-ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c ++ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c + $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c + + ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h + cat $^ > $@ + + BUILT_SOURCES = $(ioctlent_h) native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version +-CLEANFILES = $(ioctlent_h) native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h ++CLEANFILES = $(ioctlent_h) ioctl_iocdef.h native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h + DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h + + # defines mpers_source_files +--- a/Makefile.in ++++ b/Makefile.in +@@ -848,6 +848,7 @@ + debian/watch \ + errnoent.sh \ + generate_sen.sh \ ++ ioctl_iocdef.c \ + ioctlsort.c \ + linux/32/ioctls_inc.h \ + linux/32/ioctls_inc_align32.h \ +@@ -1243,7 +1244,7 @@ + BUILT_SOURCES = $(ioctlent_h) native_printer_decls.h \ + native_printer_defs.h printers.h sen.h sys_func.h .version \ + $(am__append_7) $(am__append_11) +-CLEANFILES = $(ioctlent_h) native_printer_decls.h \ ++CLEANFILES = $(ioctlent_h) ioctl_iocdef.h native_printer_decls.h \ + native_printer_defs.h printers.h sen.h sys_func.h \ + $(am__append_8) $(am__append_12) + DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h +@@ -4829,13 +4830,22 @@ + exit 1; \ + fi + ++# Need to pick up definitions *for host* while compiling ++# ioctlsort *for build*, hence this magic. ++ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c ++ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ ++ ++ioctl_iocdef.h: ioctl_iocdef.i ++ sed -n 's/^DEFINE HOST/#define /p' $< > $@ ++ + ioctlent%.h: ioctlsort% + ./$< > $@ + + ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o + $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ + +-ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c ++ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c + $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c + + ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h diff --git a/packages/strace/4.11/010-use-host-ioctl.patch b/packages/strace/4.11/010-use-host-ioctl.patch deleted file mode 100644 index 51552009..00000000 --- a/packages/strace/4.11/010-use-host-ioctl.patch +++ /dev/null @@ -1,144 +0,0 @@ -diff -urpN strace-4.11.orig/ioctl_iocdef.c strace-4.11/ioctl_iocdef.c ---- strace-4.11.orig/ioctl_iocdef.c 1969-12-31 16:00:00.000000000 -0800 -+++ strace-4.11/ioctl_iocdef.c 2017-01-14 15:31:16.925139193 -0800 -@@ -0,0 +1,43 @@ -+/* -+ * Copyright (c) 2017 Alexey Neyman -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 3. The name of the author may not be used to endorse or promote products -+ * derived from this software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ */ -+ -+/* -+ * This file is *PREPROCESSED*, not *COMPILED* for host and the result -+ * is included into ioctlsort (which is compiled for build). Since some -+ * of these values are used in structure initializers, they cannot be -+ * defined as 'const unsigned int' - instead, they have to be macros. -+ * Hence, the result of preprocessing will be run through sed to change -+ * 'DEFINE' into '#define' -+ */ -+#include -+ -+DEFINE HOST_IOC_NONE _IOC_NONE -+DEFINE HOST_IOC_READ _IOC_READ -+DEFINE HOST_IOC_WRITE _IOC_WRITE -+ -+DEFINE HOST_IOC_SIZESHIFT _IOC_SIZESHIFT -+DEFINE HOST_IOC_DIRSHIFT _IOC_DIRSHIFT -diff -urpN strace-4.11.orig/ioctlsort.c strace-4.11/ioctlsort.c ---- strace-4.11.orig/ioctlsort.c 2015-03-28 15:37:30.000000000 -0700 -+++ strace-4.11/ioctlsort.c 2017-01-14 15:32:13.373831957 -0800 -@@ -33,7 +33,8 @@ - #include - #include - #include --#include -+ -+#include "ioctl_iocdef.h" - - struct ioctlent { - const char *info; -diff -urpN strace-4.11.orig/Makefile.am strace-4.11/Makefile.am ---- strace-4.11.orig/Makefile.am 2015-12-17 09:56:48.000000000 -0800 -+++ strace-4.11/Makefile.am 2017-01-14 15:33:39.186837242 -0800 -@@ -239,6 +239,7 @@ EXTRA_DIST = \ - debian/watch \ - errnoent.sh \ - generate_sen.sh \ -+ ioctl_iocdef.c \ - ioctlsort.c \ - linux/32/ioctls_inc.h \ - linux/32/ioctls_inc_align32.h \ -@@ -666,17 +667,26 @@ ioctlent_h = $(patsubst $(srcdir)/$(OS)/ - ioctlent%.h: ioctlsort% - ./$< > $@ - -+# Need to pick up definitions *for host* while compiling -+# ioctlsort *for build*, hence this magic. -+ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c -+ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ -+ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ -+ -+ioctl_iocdef.h: ioctl_iocdef.i -+ sed -n 's/^DEFINE HOST/#define /p' $< > $@ -+ - ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o - $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ - --ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c -+ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c - $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c - - ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h - cat $^ > $@ - - BUILT_SOURCES = $(ioctlent_h) native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version --CLEANFILES = $(ioctlent_h) native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h -+CLEANFILES = $(ioctlent_h) ioctl_iocdef.h native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h - DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h - - # defines mpers_source_files -diff -urpN strace-4.11.orig/Makefile.in strace-4.11/Makefile.in ---- strace-4.11.orig/Makefile.in 2015-12-21 15:24:05.000000000 -0800 -+++ strace-4.11/Makefile.in 2017-01-14 15:34:34.803440359 -0800 -@@ -848,6 +848,7 @@ EXTRA_DIST = \ - debian/watch \ - errnoent.sh \ - generate_sen.sh \ -+ ioctl_iocdef.c \ - ioctlsort.c \ - linux/32/ioctls_inc.h \ - linux/32/ioctls_inc_align32.h \ -@@ -1243,7 +1244,7 @@ ioctlent_h = $(patsubst $(srcdir)/$(OS)/ - BUILT_SOURCES = $(ioctlent_h) native_printer_decls.h \ - native_printer_defs.h printers.h sen.h sys_func.h .version \ - $(am__append_7) $(am__append_11) --CLEANFILES = $(ioctlent_h) native_printer_decls.h \ -+CLEANFILES = $(ioctlent_h) ioctl_iocdef.h native_printer_decls.h \ - native_printer_defs.h printers.h sen.h sys_func.h \ - $(am__append_8) $(am__append_12) - DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h -@@ -4829,13 +4830,22 @@ news-check: NEWS - exit 1; \ - fi - -+# Need to pick up definitions *for host* while compiling -+# ioctlsort *for build*, hence this magic. -+ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c -+ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ -+ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ -+ -+ioctl_iocdef.h: ioctl_iocdef.i -+ sed -n 's/^DEFINE HOST/#define /p' $< > $@ -+ - ioctlent%.h: ioctlsort% - ./$< > $@ - - ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o - $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ - --ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c -+ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c - $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c - - ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h diff --git a/packages/strace/4.12/0000-use-host-ioctl.patch b/packages/strace/4.12/0000-use-host-ioctl.patch new file mode 100644 index 00000000..932ccdae --- /dev/null +++ b/packages/strace/4.12/0000-use-host-ioctl.patch @@ -0,0 +1,148 @@ +--- + Makefile.am | 14 ++++++++++++-- + Makefile.in | 14 ++++++++++++-- + ioctl_iocdef.c | 43 +++++++++++++++++++++++++++++++++++++++++++ + ioctlsort.c | 3 ++- + 4 files changed, 69 insertions(+), 5 deletions(-) + +--- /dev/null ++++ b/ioctl_iocdef.c +@@ -0,0 +1,43 @@ ++/* ++ * Copyright (c) 2017 Alexey Neyman ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. The name of the author may not be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * This file is *PREPROCESSED*, not *COMPILED* for host and the result ++ * is included into ioctlsort (which is compiled for build). Since some ++ * of these values are used in structure initializers, they cannot be ++ * defined as 'const unsigned int' - instead, they have to be macros. ++ * Hence, the result of preprocessing will be run through sed to change ++ * 'DEFINE' into '#define' ++ */ ++#include ++ ++DEFINE HOST_IOC_NONE _IOC_NONE ++DEFINE HOST_IOC_READ _IOC_READ ++DEFINE HOST_IOC_WRITE _IOC_WRITE ++ ++DEFINE HOST_IOC_SIZESHIFT _IOC_SIZESHIFT ++DEFINE HOST_IOC_DIRSHIFT _IOC_DIRSHIFT +--- a/ioctlsort.c ++++ b/ioctlsort.c +@@ -33,7 +33,8 @@ + #include + #include + #include +-#include ++ ++#include "ioctl_iocdef.h" + + struct ioctlent { + const char *info; +--- a/Makefile.am ++++ b/Makefile.am +@@ -274,6 +274,7 @@ + debian/watch \ + errnoent.sh \ + generate_sen.sh \ ++ ioctl_iocdef.c \ + ioctlsort.c \ + linux/32/ioctls_inc.h \ + linux/32/ioctls_inc_align32.h \ +@@ -712,10 +713,19 @@ + ioctlent%.h: ioctlsort% + ./$< > $@ + ++# Need to pick up definitions *for host* while compiling ++# ioctlsort *for build*, hence this magic. ++ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c ++ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ ++ ++ioctl_iocdef.h: ioctl_iocdef.i ++ sed -n 's/^DEFINE HOST/#define /p' $< > $@ ++ + ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o + $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ + +-ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c ++ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c + $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c + + ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h +@@ -723,7 +733,7 @@ + + BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \ + native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version +-CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ ++CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) ioctl_iocdef.h $(mpers_preproc_files) \ + native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h + DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h + +--- a/Makefile.in ++++ b/Makefile.in +@@ -952,6 +952,7 @@ + debian/watch \ + errnoent.sh \ + generate_sen.sh \ ++ ioctl_iocdef.c \ + ioctlsort.c \ + linux/32/ioctls_inc.h \ + linux/32/ioctls_inc_align32.h \ +@@ -1351,7 +1352,7 @@ + BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) native_printer_decls.h \ + native_printer_defs.h printers.h sen.h sys_func.h .version \ + $(am__append_7) $(am__append_11) +-CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ ++CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) octl_iocdef.h $(mpers_preproc_files) \ + native_printer_decls.h native_printer_defs.h printers.h sen.h \ + sys_func.h $(am__append_8) $(am__append_12) + DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h +@@ -5506,13 +5507,22 @@ + rm -f $<-t + mv $@-t $@ + ++# Need to pick up definitions *for host* while compiling ++# ioctlsort *for build*, hence this magic. ++ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c ++ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ ++ ++ioctl_iocdef.h: ioctl_iocdef.i ++ sed -n 's/^DEFINE HOST/#define /p' $< > $@ ++ + ioctlent%.h: ioctlsort% + ./$< > $@ + + ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o + $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ + +-ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c ++ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c + $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c + + ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h diff --git a/packages/strace/4.12/010-use-host-ioctl.patch b/packages/strace/4.12/010-use-host-ioctl.patch deleted file mode 100644 index bd5a40eb..00000000 --- a/packages/strace/4.12/010-use-host-ioctl.patch +++ /dev/null @@ -1,145 +0,0 @@ -diff -urpN strace-4.12.orig/ioctl_iocdef.c strace-4.12/ioctl_iocdef.c ---- strace-4.12.orig/ioctl_iocdef.c 1969-12-31 16:00:00.000000000 -0800 -+++ strace-4.12/ioctl_iocdef.c 2017-01-14 15:35:21.055924401 -0800 -@@ -0,0 +1,43 @@ -+/* -+ * Copyright (c) 2017 Alexey Neyman -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 3. The name of the author may not be used to endorse or promote products -+ * derived from this software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ */ -+ -+/* -+ * This file is *PREPROCESSED*, not *COMPILED* for host and the result -+ * is included into ioctlsort (which is compiled for build). Since some -+ * of these values are used in structure initializers, they cannot be -+ * defined as 'const unsigned int' - instead, they have to be macros. -+ * Hence, the result of preprocessing will be run through sed to change -+ * 'DEFINE' into '#define' -+ */ -+#include -+ -+DEFINE HOST_IOC_NONE _IOC_NONE -+DEFINE HOST_IOC_READ _IOC_READ -+DEFINE HOST_IOC_WRITE _IOC_WRITE -+ -+DEFINE HOST_IOC_SIZESHIFT _IOC_SIZESHIFT -+DEFINE HOST_IOC_DIRSHIFT _IOC_DIRSHIFT -diff -urpN strace-4.12.orig/ioctlsort.c strace-4.12/ioctlsort.c ---- strace-4.12.orig/ioctlsort.c 2015-03-28 15:37:30.000000000 -0700 -+++ strace-4.12/ioctlsort.c 2017-01-14 15:35:21.055924401 -0800 -@@ -33,7 +33,8 @@ - #include - #include - #include --#include -+ -+#include "ioctl_iocdef.h" - - struct ioctlent { - const char *info; -diff -urpN strace-4.12.orig/Makefile.am strace-4.12/Makefile.am ---- strace-4.12.orig/Makefile.am 2016-05-28 03:29:30.000000000 -0700 -+++ strace-4.12/Makefile.am 2017-01-14 15:36:46.916796883 -0800 -@@ -274,6 +274,7 @@ EXTRA_DIST = \ - debian/watch \ - errnoent.sh \ - generate_sen.sh \ -+ ioctl_iocdef.c \ - ioctlsort.c \ - linux/32/ioctls_inc.h \ - linux/32/ioctls_inc_align32.h \ -@@ -712,10 +713,19 @@ ioctl_redefs%.h: ioctlent%.h ioctlent0.h - ioctlent%.h: ioctlsort% - ./$< > $@ - -+# Need to pick up definitions *for host* while compiling -+# ioctlsort *for build*, hence this magic. -+ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c -+ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ -+ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ -+ -+ioctl_iocdef.h: ioctl_iocdef.i -+ sed -n 's/^DEFINE HOST/#define /p' $< > $@ -+ - ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o - $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ - --ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c -+ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c - $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c - - ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h -@@ -723,7 +733,7 @@ ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/i - - BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \ - native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version --CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ -+CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) ioctl_iocdef.h $(mpers_preproc_files) \ - native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h - DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h - -diff -urpN strace-4.12.orig/Makefile.in strace-4.12/Makefile.in ---- strace-4.12.orig/Makefile.in 2016-05-31 04:35:57.000000000 -0700 -+++ strace-4.12/Makefile.in 2017-01-14 15:37:33.353259891 -0800 -@@ -952,6 +952,7 @@ EXTRA_DIST = \ - debian/watch \ - errnoent.sh \ - generate_sen.sh \ -+ ioctl_iocdef.c \ - ioctlsort.c \ - linux/32/ioctls_inc.h \ - linux/32/ioctls_inc_align32.h \ -@@ -1351,7 +1352,7 @@ ioctl_redefs_h = $(filter-out ioctl_rede - BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) native_printer_decls.h \ - native_printer_defs.h printers.h sen.h sys_func.h .version \ - $(am__append_7) $(am__append_11) --CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ -+CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) octl_iocdef.h $(mpers_preproc_files) \ - native_printer_decls.h native_printer_defs.h printers.h sen.h \ - sys_func.h $(am__append_8) $(am__append_12) - DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h -@@ -5506,13 +5507,22 @@ ioctl_redefs%.h: ioctlent%.h ioctlent0.h - rm -f $<-t - mv $@-t $@ - -+# Need to pick up definitions *for host* while compiling -+# ioctlsort *for build*, hence this magic. -+ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c -+ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ -+ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ -+ -+ioctl_iocdef.h: ioctl_iocdef.i -+ sed -n 's/^DEFINE HOST/#define /p' $< > $@ -+ - ioctlent%.h: ioctlsort% - ./$< > $@ - - ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o - $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ - --ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c -+ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c - $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c - - ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h diff --git a/packages/strace/4.13/0000-use-host-ioctl.patch b/packages/strace/4.13/0000-use-host-ioctl.patch new file mode 100644 index 00000000..ee596958 --- /dev/null +++ b/packages/strace/4.13/0000-use-host-ioctl.patch @@ -0,0 +1,148 @@ +--- + Makefile.am | 14 ++++++++++++-- + Makefile.in | 14 ++++++++++++-- + ioctl_iocdef.c | 43 +++++++++++++++++++++++++++++++++++++++++++ + ioctlsort.c | 3 ++- + 4 files changed, 69 insertions(+), 5 deletions(-) + +--- /dev/null ++++ b/ioctl_iocdef.c +@@ -0,0 +1,43 @@ ++/* ++ * Copyright (c) 2017 Alexey Neyman ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. The name of the author may not be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * This file is *PREPROCESSED*, not *COMPILED* for host and the result ++ * is included into ioctlsort (which is compiled for build). Since some ++ * of these values are used in structure initializers, they cannot be ++ * defined as 'const unsigned int' - instead, they have to be macros. ++ * Hence, the result of preprocessing will be run through sed to change ++ * 'DEFINE' into '#define' ++ */ ++#include ++ ++DEFINE HOST_IOC_NONE _IOC_NONE ++DEFINE HOST_IOC_READ _IOC_READ ++DEFINE HOST_IOC_WRITE _IOC_WRITE ++ ++DEFINE HOST_IOC_SIZESHIFT _IOC_SIZESHIFT ++DEFINE HOST_IOC_DIRSHIFT _IOC_DIRSHIFT +--- a/ioctlsort.c ++++ b/ioctlsort.c +@@ -33,7 +33,8 @@ + #include + #include + #include +-#include ++ ++#include "ioctl_iocdef.h" + + struct ioctlent { + const char *info; +--- a/Makefile.am ++++ b/Makefile.am +@@ -283,6 +283,7 @@ + debian/watch \ + errnoent.sh \ + generate_sen.sh \ ++ ioctl_iocdef.c \ + ioctlsort.c \ + linux/32/ioctls_inc.h \ + linux/32/ioctls_inc_align32.h \ +@@ -721,10 +722,19 @@ + ioctlent%.h: ioctlsort% + ./$< > $@ + ++# Need to pick up definitions *for host* while compiling ++# ioctlsort *for build*, hence this magic. ++ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c ++ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ ++ ++ioctl_iocdef.h: ioctl_iocdef.i ++ sed -n 's/^DEFINE HOST/#define /p' $< > $@ ++ + ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o + $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ + +-ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c ++ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c + $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c + + ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h +@@ -732,7 +742,7 @@ + + BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \ + native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version +-CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ ++CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) ioctl_iocdef.h $(mpers_preproc_files) \ + native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h + DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h + +--- a/Makefile.in ++++ b/Makefile.in +@@ -978,6 +978,7 @@ + debian/watch \ + errnoent.sh \ + generate_sen.sh \ ++ ioctl_iocdef.c \ + ioctlsort.c \ + linux/32/ioctls_inc.h \ + linux/32/ioctls_inc_align32.h \ +@@ -1377,7 +1378,7 @@ + BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) native_printer_decls.h \ + native_printer_defs.h printers.h sen.h sys_func.h .version \ + $(am__append_7) $(am__append_11) +-CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ ++CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) octl_iocdef.h $(mpers_preproc_files) \ + native_printer_decls.h native_printer_defs.h printers.h sen.h \ + sys_func.h $(am__append_8) $(am__append_12) + DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h +@@ -5730,13 +5731,22 @@ + rm -f $<-t + mv $@-t $@ + ++# Need to pick up definitions *for host* while compiling ++# ioctlsort *for build*, hence this magic. ++ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c ++ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ ++ ++ioctl_iocdef.h: ioctl_iocdef.i ++ sed -n 's/^DEFINE HOST/#define /p' $< > $@ ++ + ioctlent%.h: ioctlsort% + ./$< > $@ + + ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o + $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ + +-ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c ++ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c + $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c + + ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h diff --git a/packages/strace/4.13/010-use-host-ioctl.patch b/packages/strace/4.13/010-use-host-ioctl.patch deleted file mode 100644 index 40ebbf37..00000000 --- a/packages/strace/4.13/010-use-host-ioctl.patch +++ /dev/null @@ -1,145 +0,0 @@ -diff -urpN strace-4.13.orig/ioctl_iocdef.c strace-4.13/ioctl_iocdef.c ---- strace-4.13.orig/ioctl_iocdef.c 1969-12-31 16:00:00.000000000 -0800 -+++ strace-4.13/ioctl_iocdef.c 2017-01-14 15:50:14.368196376 -0800 -@@ -0,0 +1,43 @@ -+/* -+ * Copyright (c) 2017 Alexey Neyman -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 3. The name of the author may not be used to endorse or promote products -+ * derived from this software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ */ -+ -+/* -+ * This file is *PREPROCESSED*, not *COMPILED* for host and the result -+ * is included into ioctlsort (which is compiled for build). Since some -+ * of these values are used in structure initializers, they cannot be -+ * defined as 'const unsigned int' - instead, they have to be macros. -+ * Hence, the result of preprocessing will be run through sed to change -+ * 'DEFINE' into '#define' -+ */ -+#include -+ -+DEFINE HOST_IOC_NONE _IOC_NONE -+DEFINE HOST_IOC_READ _IOC_READ -+DEFINE HOST_IOC_WRITE _IOC_WRITE -+ -+DEFINE HOST_IOC_SIZESHIFT _IOC_SIZESHIFT -+DEFINE HOST_IOC_DIRSHIFT _IOC_DIRSHIFT -diff -urpN strace-4.13.orig/ioctlsort.c strace-4.13/ioctlsort.c ---- strace-4.13.orig/ioctlsort.c 2015-03-28 15:37:30.000000000 -0700 -+++ strace-4.13/ioctlsort.c 2017-01-14 15:50:14.368196376 -0800 -@@ -33,7 +33,8 @@ - #include - #include - #include --#include -+ -+#include "ioctl_iocdef.h" - - struct ioctlent { - const char *info; -diff -urpN strace-4.13.orig/Makefile.am strace-4.13/Makefile.am ---- strace-4.13.orig/Makefile.am 2016-07-22 12:28:06.000000000 -0700 -+++ strace-4.13/Makefile.am 2017-01-14 15:50:14.368196376 -0800 -@@ -283,6 +283,7 @@ EXTRA_DIST = \ - debian/watch \ - errnoent.sh \ - generate_sen.sh \ -+ ioctl_iocdef.c \ - ioctlsort.c \ - linux/32/ioctls_inc.h \ - linux/32/ioctls_inc_align32.h \ -@@ -721,10 +722,19 @@ ioctl_redefs%.h: ioctlent%.h ioctlent0.h - ioctlent%.h: ioctlsort% - ./$< > $@ - -+# Need to pick up definitions *for host* while compiling -+# ioctlsort *for build*, hence this magic. -+ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c -+ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ -+ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ -+ -+ioctl_iocdef.h: ioctl_iocdef.i -+ sed -n 's/^DEFINE HOST/#define /p' $< > $@ -+ - ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o - $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ - --ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c -+ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c - $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c - - ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h -@@ -732,7 +742,7 @@ ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/i - - BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \ - native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version --CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ -+CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) ioctl_iocdef.h $(mpers_preproc_files) \ - native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h - DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h - -diff -urpN strace-4.13.orig/Makefile.in strace-4.13/Makefile.in ---- strace-4.13.orig/Makefile.in 2016-07-26 09:17:18.000000000 -0700 -+++ strace-4.13/Makefile.in 2017-01-14 15:50:14.368196376 -0800 -@@ -978,6 +978,7 @@ EXTRA_DIST = \ - debian/watch \ - errnoent.sh \ - generate_sen.sh \ -+ ioctl_iocdef.c \ - ioctlsort.c \ - linux/32/ioctls_inc.h \ - linux/32/ioctls_inc_align32.h \ -@@ -1377,7 +1378,7 @@ ioctl_redefs_h = $(filter-out ioctl_rede - BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) native_printer_decls.h \ - native_printer_defs.h printers.h sen.h sys_func.h .version \ - $(am__append_7) $(am__append_11) --CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ -+CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) octl_iocdef.h $(mpers_preproc_files) \ - native_printer_decls.h native_printer_defs.h printers.h sen.h \ - sys_func.h $(am__append_8) $(am__append_12) - DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h -@@ -5730,13 +5731,22 @@ ioctl_redefs%.h: ioctlent%.h ioctlent0.h - rm -f $<-t - mv $@-t $@ - -+# Need to pick up definitions *for host* while compiling -+# ioctlsort *for build*, hence this magic. -+ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c -+ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ -+ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ -+ -+ioctl_iocdef.h: ioctl_iocdef.i -+ sed -n 's/^DEFINE HOST/#define /p' $< > $@ -+ - ioctlent%.h: ioctlsort% - ./$< > $@ - - ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o - $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ - --ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c -+ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c - $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c - - ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h diff --git a/packages/strace/4.14/0000-use-host-ioctl.patch b/packages/strace/4.14/0000-use-host-ioctl.patch new file mode 100644 index 00000000..5e90362e --- /dev/null +++ b/packages/strace/4.14/0000-use-host-ioctl.patch @@ -0,0 +1,148 @@ +--- + Makefile.am | 14 ++++++++++++-- + Makefile.in | 14 ++++++++++++-- + ioctl_iocdef.c | 43 +++++++++++++++++++++++++++++++++++++++++++ + ioctlsort.c | 3 ++- + 4 files changed, 69 insertions(+), 5 deletions(-) + +--- /dev/null ++++ b/ioctl_iocdef.c +@@ -0,0 +1,43 @@ ++/* ++ * Copyright (c) 2017 Alexey Neyman ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. The name of the author may not be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * This file is *PREPROCESSED*, not *COMPILED* for host and the result ++ * is included into ioctlsort (which is compiled for build). Since some ++ * of these values are used in structure initializers, they cannot be ++ * defined as 'const unsigned int' - instead, they have to be macros. ++ * Hence, the result of preprocessing will be run through sed to change ++ * 'DEFINE' into '#define' ++ */ ++#include ++ ++DEFINE HOST_IOC_NONE _IOC_NONE ++DEFINE HOST_IOC_READ _IOC_READ ++DEFINE HOST_IOC_WRITE _IOC_WRITE ++ ++DEFINE HOST_IOC_SIZESHIFT _IOC_SIZESHIFT ++DEFINE HOST_IOC_DIRSHIFT _IOC_DIRSHIFT +--- a/ioctlsort.c ++++ b/ioctlsort.c +@@ -33,7 +33,8 @@ + #include + #include + #include +-#include ++ ++#include "ioctl_iocdef.h" + + struct ioctlent { + const char *info; +--- a/Makefile.am ++++ b/Makefile.am +@@ -289,6 +289,7 @@ + debian/watch \ + errnoent.sh \ + generate_sen.sh \ ++ ioctl_iocdef.c \ + ioctlsort.c \ + linux/32/ioctls_inc.h \ + linux/32/ioctls_inc_align32.h \ +@@ -739,10 +740,19 @@ + ioctlent%.h: ioctlsort% + ./$< > $@ + ++# Need to pick up definitions *for host* while compiling ++# ioctlsort *for build*, hence this magic. ++ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c ++ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ ++ ++ioctl_iocdef.h: ioctl_iocdef.i ++ sed -n 's/^DEFINE HOST/#define /p' $< > $@ ++ + ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o + $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ + +-ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c ++ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c + $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c + + ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h +@@ -750,7 +760,7 @@ + + BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \ + native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version +-CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ ++CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) ioctl_iocdef.h $(mpers_preproc_files) \ + native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h + DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h + +--- a/Makefile.in ++++ b/Makefile.in +@@ -995,6 +995,7 @@ + debian/watch \ + errnoent.sh \ + generate_sen.sh \ ++ ioctl_iocdef.c \ + ioctlsort.c \ + linux/32/ioctls_inc.h \ + linux/32/ioctls_inc_align32.h \ +@@ -1406,7 +1407,7 @@ + BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) native_printer_decls.h \ + native_printer_defs.h printers.h sen.h sys_func.h .version \ + $(am__append_7) $(am__append_11) +-CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ ++CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) octl_iocdef.h $(mpers_preproc_files) \ + native_printer_decls.h native_printer_defs.h printers.h sen.h \ + sys_func.h $(am__append_8) $(am__append_12) + DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h +@@ -5896,13 +5897,22 @@ + rm -f $<-t + mv $@-t $@ + ++# Need to pick up definitions *for host* while compiling ++# ioctlsort *for build*, hence this magic. ++ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c ++ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ ++ ++ioctl_iocdef.h: ioctl_iocdef.i ++ sed -n 's/^DEFINE HOST/#define /p' $< > $@ ++ + ioctlent%.h: ioctlsort% + ./$< > $@ + + ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o + $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ + +-ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c ++ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c + $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c + + ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h diff --git a/packages/strace/4.14/010-use-host-ioctl.patch b/packages/strace/4.14/010-use-host-ioctl.patch deleted file mode 100644 index 2c7671f2..00000000 --- a/packages/strace/4.14/010-use-host-ioctl.patch +++ /dev/null @@ -1,145 +0,0 @@ -diff -urpN strace-4.14.orig/ioctl_iocdef.c strace-4.14/ioctl_iocdef.c ---- strace-4.14.orig/ioctl_iocdef.c 1969-12-31 16:00:00.000000000 -0800 -+++ strace-4.14/ioctl_iocdef.c 2017-01-14 15:50:38.748425119 -0800 -@@ -0,0 +1,43 @@ -+/* -+ * Copyright (c) 2017 Alexey Neyman -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 3. The name of the author may not be used to endorse or promote products -+ * derived from this software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ */ -+ -+/* -+ * This file is *PREPROCESSED*, not *COMPILED* for host and the result -+ * is included into ioctlsort (which is compiled for build). Since some -+ * of these values are used in structure initializers, they cannot be -+ * defined as 'const unsigned int' - instead, they have to be macros. -+ * Hence, the result of preprocessing will be run through sed to change -+ * 'DEFINE' into '#define' -+ */ -+#include -+ -+DEFINE HOST_IOC_NONE _IOC_NONE -+DEFINE HOST_IOC_READ _IOC_READ -+DEFINE HOST_IOC_WRITE _IOC_WRITE -+ -+DEFINE HOST_IOC_SIZESHIFT _IOC_SIZESHIFT -+DEFINE HOST_IOC_DIRSHIFT _IOC_DIRSHIFT -diff -urpN strace-4.14.orig/ioctlsort.c strace-4.14/ioctlsort.c ---- strace-4.14.orig/ioctlsort.c 2015-03-28 15:37:30.000000000 -0700 -+++ strace-4.14/ioctlsort.c 2017-01-14 15:50:38.748425119 -0800 -@@ -33,7 +33,8 @@ - #include - #include - #include --#include -+ -+#include "ioctl_iocdef.h" - - struct ioctlent { - const char *info; -diff -urpN strace-4.14.orig/Makefile.am strace-4.14/Makefile.am ---- strace-4.14.orig/Makefile.am 2016-09-05 12:52:57.000000000 -0700 -+++ strace-4.14/Makefile.am 2017-01-14 15:50:38.748425119 -0800 -@@ -289,6 +289,7 @@ EXTRA_DIST = \ - debian/watch \ - errnoent.sh \ - generate_sen.sh \ -+ ioctl_iocdef.c \ - ioctlsort.c \ - linux/32/ioctls_inc.h \ - linux/32/ioctls_inc_align32.h \ -@@ -739,10 +740,19 @@ ioctl_redefs%.h: ioctlent%.h ioctlent0.h - ioctlent%.h: ioctlsort% - ./$< > $@ - -+# Need to pick up definitions *for host* while compiling -+# ioctlsort *for build*, hence this magic. -+ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c -+ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ -+ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ -+ -+ioctl_iocdef.h: ioctl_iocdef.i -+ sed -n 's/^DEFINE HOST/#define /p' $< > $@ -+ - ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o - $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ - --ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c -+ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c - $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c - - ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h -@@ -750,7 +760,7 @@ ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/i - - BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \ - native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version --CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ -+CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) ioctl_iocdef.h $(mpers_preproc_files) \ - native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h - DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h - -diff -urpN strace-4.14.orig/Makefile.in strace-4.14/Makefile.in ---- strace-4.14.orig/Makefile.in 2016-10-04 12:13:20.000000000 -0700 -+++ strace-4.14/Makefile.in 2017-01-14 15:50:38.752425155 -0800 -@@ -995,6 +995,7 @@ EXTRA_DIST = \ - debian/watch \ - errnoent.sh \ - generate_sen.sh \ -+ ioctl_iocdef.c \ - ioctlsort.c \ - linux/32/ioctls_inc.h \ - linux/32/ioctls_inc_align32.h \ -@@ -1406,7 +1407,7 @@ ioctl_redefs_h = $(filter-out ioctl_rede - BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) native_printer_decls.h \ - native_printer_defs.h printers.h sen.h sys_func.h .version \ - $(am__append_7) $(am__append_11) --CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ -+CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) octl_iocdef.h $(mpers_preproc_files) \ - native_printer_decls.h native_printer_defs.h printers.h sen.h \ - sys_func.h $(am__append_8) $(am__append_12) - DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h -@@ -5896,13 +5897,22 @@ ioctl_redefs%.h: ioctlent%.h ioctlent0.h - rm -f $<-t - mv $@-t $@ - -+# Need to pick up definitions *for host* while compiling -+# ioctlsort *for build*, hence this magic. -+ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c -+ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ -+ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ -+ -+ioctl_iocdef.h: ioctl_iocdef.i -+ sed -n 's/^DEFINE HOST/#define /p' $< > $@ -+ - ioctlent%.h: ioctlsort% - ./$< > $@ - - ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o - $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ - --ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c -+ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c - $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c - - ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h diff --git a/packages/strace/4.15/0000-use-host-ioctl.patch b/packages/strace/4.15/0000-use-host-ioctl.patch new file mode 100644 index 00000000..74e8c521 --- /dev/null +++ b/packages/strace/4.15/0000-use-host-ioctl.patch @@ -0,0 +1,148 @@ +--- + Makefile.am | 14 ++++++++++++-- + Makefile.in | 14 ++++++++++++-- + ioctl_iocdef.c | 43 +++++++++++++++++++++++++++++++++++++++++++ + ioctlsort.c | 3 ++- + 4 files changed, 69 insertions(+), 5 deletions(-) + +--- /dev/null ++++ b/ioctl_iocdef.c +@@ -0,0 +1,43 @@ ++/* ++ * Copyright (c) 2017 Alexey Neyman ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. The name of the author may not be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * This file is *PREPROCESSED*, not *COMPILED* for host and the result ++ * is included into ioctlsort (which is compiled for build). Since some ++ * of these values are used in structure initializers, they cannot be ++ * defined as 'const unsigned int' - instead, they have to be macros. ++ * Hence, the result of preprocessing will be run through sed to change ++ * 'DEFINE' into '#define' ++ */ ++#include ++ ++DEFINE HOST_IOC_NONE _IOC_NONE ++DEFINE HOST_IOC_READ _IOC_READ ++DEFINE HOST_IOC_WRITE _IOC_WRITE ++ ++DEFINE HOST_IOC_SIZESHIFT _IOC_SIZESHIFT ++DEFINE HOST_IOC_DIRSHIFT _IOC_DIRSHIFT +--- a/ioctlsort.c ++++ b/ioctlsort.c +@@ -33,7 +33,8 @@ + #include + #include + #include +-#include ++ ++#include "ioctl_iocdef.h" + + struct ioctlent { + const char *info; +--- a/Makefile.am ++++ b/Makefile.am +@@ -298,6 +298,7 @@ + debian/watch \ + errnoent.sh \ + generate_sen.sh \ ++ ioctl_iocdef.c \ + ioctlsort.c \ + linux/32/ioctls_inc.h \ + linux/32/ioctls_inc_align16.h \ +@@ -815,10 +816,19 @@ + ioctlent%.h: ioctlsort% + ./$< > $@ + ++# Need to pick up definitions *for host* while compiling ++# ioctlsort *for build*, hence this magic. ++ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c ++ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ ++ ++ioctl_iocdef.h: ioctl_iocdef.i ++ sed -n 's/^DEFINE HOST/#define /p' $< > $@ ++ + ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o + $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ + +-ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c ++ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c + $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c + + ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h +@@ -826,7 +836,7 @@ + + BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \ + native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version +-CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ ++CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) ioctl_iocdef.h $(mpers_preproc_files) \ + native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h + DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h + +--- a/Makefile.in ++++ b/Makefile.in +@@ -1036,6 +1036,7 @@ + debian/watch \ + errnoent.sh \ + generate_sen.sh \ ++ ioctl_iocdef.c \ + ioctlsort.c \ + linux/32/ioctls_inc.h \ + linux/32/ioctls_inc_align16.h \ +@@ -1514,7 +1515,7 @@ + BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) native_printer_decls.h \ + native_printer_defs.h printers.h sen.h sys_func.h .version \ + $(am__append_7) $(am__append_11) +-CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ ++CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) octl_iocdef.h $(mpers_preproc_files) \ + native_printer_decls.h native_printer_defs.h printers.h sen.h \ + sys_func.h $(am__append_8) $(am__append_12) + DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h +@@ -6177,13 +6178,22 @@ + rm -f $<-t + mv $@-t $@ + ++# Need to pick up definitions *for host* while compiling ++# ioctlsort *for build*, hence this magic. ++ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c ++ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ ++ ++ioctl_iocdef.h: ioctl_iocdef.i ++ sed -n 's/^DEFINE HOST/#define /p' $< > $@ ++ + ioctlent%.h: ioctlsort% + ./$< > $@ + + ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o + $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ + +-ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c ++ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c + $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c + + ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h diff --git a/packages/strace/4.15/010-use-host-ioctl.patch b/packages/strace/4.15/010-use-host-ioctl.patch deleted file mode 100644 index 71d380a8..00000000 --- a/packages/strace/4.15/010-use-host-ioctl.patch +++ /dev/null @@ -1,145 +0,0 @@ -diff -urpN strace-4.15.orig/ioctl_iocdef.c strace-4.15/ioctl_iocdef.c ---- strace-4.15.orig/ioctl_iocdef.c 1969-12-31 16:00:00.000000000 -0800 -+++ strace-4.15/ioctl_iocdef.c 2017-01-14 15:50:56.388590804 -0800 -@@ -0,0 +1,43 @@ -+/* -+ * Copyright (c) 2017 Alexey Neyman -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 3. The name of the author may not be used to endorse or promote products -+ * derived from this software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ */ -+ -+/* -+ * This file is *PREPROCESSED*, not *COMPILED* for host and the result -+ * is included into ioctlsort (which is compiled for build). Since some -+ * of these values are used in structure initializers, they cannot be -+ * defined as 'const unsigned int' - instead, they have to be macros. -+ * Hence, the result of preprocessing will be run through sed to change -+ * 'DEFINE' into '#define' -+ */ -+#include -+ -+DEFINE HOST_IOC_NONE _IOC_NONE -+DEFINE HOST_IOC_READ _IOC_READ -+DEFINE HOST_IOC_WRITE _IOC_WRITE -+ -+DEFINE HOST_IOC_SIZESHIFT _IOC_SIZESHIFT -+DEFINE HOST_IOC_DIRSHIFT _IOC_DIRSHIFT -diff -urpN strace-4.15.orig/ioctlsort.c strace-4.15/ioctlsort.c ---- strace-4.15.orig/ioctlsort.c 2015-03-28 15:37:30.000000000 -0700 -+++ strace-4.15/ioctlsort.c 2017-01-14 15:50:56.388590804 -0800 -@@ -33,7 +33,8 @@ - #include - #include - #include --#include -+ -+#include "ioctl_iocdef.h" - - struct ioctlent { - const char *info; -diff -urpN strace-4.15.orig/Makefile.am strace-4.15/Makefile.am ---- strace-4.15.orig/Makefile.am 2016-12-07 07:53:13.000000000 -0800 -+++ strace-4.15/Makefile.am 2017-01-14 15:50:56.392590842 -0800 -@@ -298,6 +298,7 @@ EXTRA_DIST = \ - debian/watch \ - errnoent.sh \ - generate_sen.sh \ -+ ioctl_iocdef.c \ - ioctlsort.c \ - linux/32/ioctls_inc.h \ - linux/32/ioctls_inc_align16.h \ -@@ -815,10 +816,19 @@ ioctl_redefs%.h: ioctlent%.h ioctlent0.h - ioctlent%.h: ioctlsort% - ./$< > $@ - -+# Need to pick up definitions *for host* while compiling -+# ioctlsort *for build*, hence this magic. -+ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c -+ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ -+ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ -+ -+ioctl_iocdef.h: ioctl_iocdef.i -+ sed -n 's/^DEFINE HOST/#define /p' $< > $@ -+ - ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o - $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ - --ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c -+ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c - $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c - - ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h -@@ -826,7 +836,7 @@ ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/i - - BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \ - native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version --CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ -+CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) ioctl_iocdef.h $(mpers_preproc_files) \ - native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h - DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h - -diff -urpN strace-4.15.orig/Makefile.in strace-4.15/Makefile.in ---- strace-4.15.orig/Makefile.in 2016-12-14 01:17:46.000000000 -0800 -+++ strace-4.15/Makefile.in 2017-01-14 15:50:56.392590842 -0800 -@@ -1036,6 +1036,7 @@ EXTRA_DIST = \ - debian/watch \ - errnoent.sh \ - generate_sen.sh \ -+ ioctl_iocdef.c \ - ioctlsort.c \ - linux/32/ioctls_inc.h \ - linux/32/ioctls_inc_align16.h \ -@@ -1514,7 +1515,7 @@ ioctl_redefs_h = $(filter-out ioctl_rede - BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) native_printer_decls.h \ - native_printer_defs.h printers.h sen.h sys_func.h .version \ - $(am__append_7) $(am__append_11) --CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ -+CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) octl_iocdef.h $(mpers_preproc_files) \ - native_printer_decls.h native_printer_defs.h printers.h sen.h \ - sys_func.h $(am__append_8) $(am__append_12) - DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h -@@ -6177,13 +6178,22 @@ ioctl_redefs%.h: ioctlent%.h ioctlent0.h - rm -f $<-t - mv $@-t $@ - -+# Need to pick up definitions *for host* while compiling -+# ioctlsort *for build*, hence this magic. -+ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c -+ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ -+ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ -+ -+ioctl_iocdef.h: ioctl_iocdef.i -+ sed -n 's/^DEFINE HOST/#define /p' $< > $@ -+ - ioctlent%.h: ioctlsort% - ./$< > $@ - - ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o - $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ - --ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c -+ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c - $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c - - ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h diff --git a/packages/strace/4.19/0000-conflicting-decl.patch b/packages/strace/4.19/0000-conflicting-decl.patch new file mode 100644 index 00000000..92427e19 --- /dev/null +++ b/packages/strace/4.19/0000-conflicting-decl.patch @@ -0,0 +1,36 @@ +commit d45f27147f7d95eb209463dc03dc039ea3f15b59 +Author: Baruch Siach +Date: Fri Sep 8 12:12:57 2017 +0300 + + error_prints: fix potential program_invocation_name type conflict + + uClibc-ng declares program_invocation_name as const. + This causes the build failure below: + + error_prints.c:40:14: error: conflicting types for ‘program_invocation_name’ + extern char *program_invocation_name; + ^~~~~~~~~~~~~~~~~~~~~~~ + In file included from error_prints.c:32:0: + .../output/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/errno.h:54:20: note: previous declaration of ‘program_invocation_name’ was here + extern const char *program_invocation_name, *program_invocation_short_name; + ^~~~~~~~~~~~~~~~~~~~~~~ + + * error_prints.c (program_invocation_name): Declare only in case + of [!HAVE_PROGRAM_INVOCATION_NAME]. + +--- + error_prints.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/error_prints.c ++++ b/error_prints.c +@@ -37,7 +37,9 @@ + + #include "error_prints.h" + ++#ifndef HAVE_PROGRAM_INVOCATION_NAME + extern char *program_invocation_name; ++#endif + + static void + verror_msg(int err_no, const char *fmt, va_list p) diff --git a/packages/strace/4.19/100-conflicting-decl.patch b/packages/strace/4.19/100-conflicting-decl.patch deleted file mode 100644 index 992eac81..00000000 --- a/packages/strace/4.19/100-conflicting-decl.patch +++ /dev/null @@ -1,34 +0,0 @@ -commit d45f27147f7d95eb209463dc03dc039ea3f15b59 -Author: Baruch Siach -Date: Fri Sep 8 12:12:57 2017 +0300 - - error_prints: fix potential program_invocation_name type conflict - - uClibc-ng declares program_invocation_name as const. - This causes the build failure below: - - error_prints.c:40:14: error: conflicting types for ‘program_invocation_name’ - extern char *program_invocation_name; - ^~~~~~~~~~~~~~~~~~~~~~~ - In file included from error_prints.c:32:0: - .../output/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/errno.h:54:20: note: previous declaration of ‘program_invocation_name’ was here - extern const char *program_invocation_name, *program_invocation_short_name; - ^~~~~~~~~~~~~~~~~~~~~~~ - - * error_prints.c (program_invocation_name): Declare only in case - of [!HAVE_PROGRAM_INVOCATION_NAME]. - -diff --git a/error_prints.c b/error_prints.c -index 8519b924..710e99b0 100644 ---- a/error_prints.c -+++ b/error_prints.c -@@ -37,7 +37,9 @@ - - #include "error_prints.h" - -+#ifndef HAVE_PROGRAM_INVOCATION_NAME - extern char *program_invocation_name; -+#endif - - static void - verror_msg(int err_no, const char *fmt, va_list p) diff --git a/packages/strace/4.8/0000-strace-4.8-glibc_2.18_build_fix-1.patch b/packages/strace/4.8/0000-strace-4.8-glibc_2.18_build_fix-1.patch new file mode 100644 index 00000000..042f82ab --- /dev/null +++ b/packages/strace/4.8/0000-strace-4.8-glibc_2.18_build_fix-1.patch @@ -0,0 +1,77 @@ +Submitted By: Ken Moffat +Date: 2013-08-26 +Initial Package Version: 4.8 +Upstream Status: Unknown +Origin: Unknown +Description: Fixes compilation with glibc-2.18. +From OpenSuse factory, found in strace-4.8-2.1.src.rpm by rpmfind.net. +http://download.opensuse.org/factory/repo/src-oss/suse/strace-4.8-2.1.src.rpm +Their changelog reports: + * Wed Aug 14 2013 schwab@suse.de + - strace-linux-ptrace-h.patch: handle conflict with struct + ptrace_peeksiginfo_args between and + + +--- + process.c | 2 ++ + signal.c | 2 ++ + syscall.c | 2 ++ + util.c | 2 ++ + 4 files changed, 8 insertions(+) + +--- a/process.c ++++ b/process.c +@@ -63,9 +63,11 @@ + # ifdef HAVE_STRUCT_PT_ALL_USER_REGS + # define pt_all_user_regs XXX_pt_all_user_regs + # endif ++# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args + # include + # undef ia64_fpreg + # undef pt_all_user_regs ++# undef ptrace_peeksiginfo_args + #endif + + #if defined(SPARC64) +--- a/signal.c ++++ b/signal.c +@@ -51,9 +51,11 @@ + # ifdef HAVE_STRUCT_PT_ALL_USER_REGS + # define pt_all_user_regs XXX_pt_all_user_regs + # endif ++# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args + # include + # undef ia64_fpreg + # undef pt_all_user_regs ++# undef ptrace_peeksiginfo_args + #endif + + #ifdef IA64 +--- a/syscall.c ++++ b/syscall.c +@@ -48,9 +48,11 @@ + # ifdef HAVE_STRUCT_PT_ALL_USER_REGS + # define pt_all_user_regs XXX_pt_all_user_regs + # endif ++# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args + # include + # undef ia64_fpreg + # undef pt_all_user_regs ++# undef ptrace_peeksiginfo_args + #endif + + #if defined(SPARC64) +--- a/util.c ++++ b/util.c +@@ -55,9 +55,11 @@ + # ifdef HAVE_STRUCT_PT_ALL_USER_REGS + # define pt_all_user_regs XXX_pt_all_user_regs + # endif ++# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args + # include + # undef ia64_fpreg + # undef pt_all_user_regs ++# undef ptrace_peeksiginfo_args + #endif + + int diff --git a/packages/strace/4.8/001-strace-4.8-glibc_2.18_build_fix-1.patch b/packages/strace/4.8/001-strace-4.8-glibc_2.18_build_fix-1.patch deleted file mode 100644 index 49a71e12..00000000 --- a/packages/strace/4.8/001-strace-4.8-glibc_2.18_build_fix-1.patch +++ /dev/null @@ -1,78 +0,0 @@ -Submitted By: Ken Moffat -Date: 2013-08-26 -Initial Package Version: 4.8 -Upstream Status: Unknown -Origin: Unknown -Description: Fixes compilation with glibc-2.18. -From OpenSuse factory, found in strace-4.8-2.1.src.rpm by rpmfind.net. -http://download.opensuse.org/factory/repo/src-oss/suse/strace-4.8-2.1.src.rpm -Their changelog reports: - * Wed Aug 14 2013 schwab@suse.de - - strace-linux-ptrace-h.patch: handle conflict with struct - ptrace_peeksiginfo_args between and - - -Index: strace-4.8/process.c -=================================================================== ---- strace-4.8.orig/process.c -+++ strace-4.8/process.c -@@ -63,9 +63,11 @@ - # ifdef HAVE_STRUCT_PT_ALL_USER_REGS - # define pt_all_user_regs XXX_pt_all_user_regs - # endif -+# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args - # include - # undef ia64_fpreg - # undef pt_all_user_regs -+# undef ptrace_peeksiginfo_args - #endif - - #if defined(SPARC64) -Index: strace-4.8/signal.c -=================================================================== ---- strace-4.8.orig/signal.c -+++ strace-4.8/signal.c -@@ -51,9 +51,11 @@ - # ifdef HAVE_STRUCT_PT_ALL_USER_REGS - # define pt_all_user_regs XXX_pt_all_user_regs - # endif -+# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args - # include - # undef ia64_fpreg - # undef pt_all_user_regs -+# undef ptrace_peeksiginfo_args - #endif - - #ifdef IA64 -Index: strace-4.8/syscall.c -=================================================================== ---- strace-4.8.orig/syscall.c -+++ strace-4.8/syscall.c -@@ -48,9 +48,11 @@ - # ifdef HAVE_STRUCT_PT_ALL_USER_REGS - # define pt_all_user_regs XXX_pt_all_user_regs - # endif -+# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args - # include - # undef ia64_fpreg - # undef pt_all_user_regs -+# undef ptrace_peeksiginfo_args - #endif - - #if defined(SPARC64) -Index: strace-4.8/util.c -=================================================================== ---- strace-4.8.orig/util.c -+++ strace-4.8/util.c -@@ -55,9 +55,11 @@ - # ifdef HAVE_STRUCT_PT_ALL_USER_REGS - # define pt_all_user_regs XXX_pt_all_user_regs - # endif -+# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args - # include - # undef ia64_fpreg - # undef pt_all_user_regs -+# undef ptrace_peeksiginfo_args - #endif - - int -- cgit v1.2.3