Skip to contentSkip to conversation

V3: Update strace to 4.8

PATCH In review Kai Kang 3 participants 7 messages Jun 21, 2013 – Jul 1, 2013

lore
Share & tools
lore

Kai Kang

author
#0 lore raw

cover V3: Update strace to 4.8

V3:
* split update to 4.8 in a seperata commit
* add configure options "libaio" and "acl"

The following changes since commit e04e6dab0afa8f72bf001b0cc106cd13b7694a91:

bdwgc-native: Add missing pkgconfig DEPENDS (2013-06-19 18:03:35 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib kangkai/update-strace
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/update-strace

Kai Kang (2):
strace: update to 4.8
strace: add configure options libaio and acl

 ...ilding-when-glibc-has-a-stub-process_vm_r.patch |   54 -
 .../strace-4.7/0014-x32-update-syscall-table.patch |   91 -
 ...-x32-update-g-s-etsockopt-syscall-numbers.patch |   43 -
 .../0024-x32-add-64bit-annotation-too.patch        |  231 --
 .../0025-Add-e-trace-memory-option.patch           | 2898 --------------------
 ...ew-errno-values-for-EPROBE_DEFER-and-EOPE.patch |   36 -
 .../0027-Add-AArch64-support-to-strace.patch       |  542 ----
 .../0028-Enhance-quotactl-decoding.patch           |  391 ---
 ...029-Filter-out-redundant-32-ioctl-entries.patch |  145 -
 ...neric-ioctl-definitions-to-linux-ioctlent.patch |  571 ----
 ...-for-tracing-32-bit-ARM-EABI-binaries-on-.patch |  963 -------
 .../0032-Fix-kernel-release-string-parsing.patch   |   38 -
 .../strace/strace-4.8/git-version-gen              |  225 ++
 .../strace-4.8/strace-add-configure-options.patch  |   60 +
 .../strace/{strace_4.7.bb => strace_4.8.bb}        |   35 +-
 15 files changed, 302 insertions(+), 6021 deletions(-)
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0003-util-fix-building-when-glibc-has-a-stub-process_vm_r.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0014-x32-update-syscall-table.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0018-x32-update-g-s-etsockopt-syscall-numbers.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0024-x32-add-64bit-annotation-too.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0025-Add-e-trace-memory-option.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0026-linux-add-new-errno-values-for-EPROBE_DEFER-and-EOPE.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0027-Add-AArch64-support-to-strace.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0028-Enhance-quotactl-decoding.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0029-Filter-out-redundant-32-ioctl-entries.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0030-Move-asm-generic-ioctl-definitions-to-linux-ioctlent.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0031-Add-support-for-tracing-32-bit-ARM-EABI-binaries-on-.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0032-Fix-kernel-release-string-parsing.patch
 create mode 100755 meta/recipes-devtools/strace/strace-4.8/git-version-gen
 create mode 100644 meta/recipes-devtools/strace/strace-4.8/strace-add-configure-options.patch
 rename meta/recipes-devtools/strace/{strace_4.7.bb => strace_4.8.bb} (27%)
Signature · 1 line
1.7.5.4
author
#1 lore raw

PATCH 1/2 strace: update to 4.8

Update strace to 4.8:

* Update License file.
* Remove the backport patches which are already in version 4.8.
* Add file git-version-gen from git repo. Without this file configure fails.

---
 ...ilding-when-glibc-has-a-stub-process_vm_r.patch |   54 -
 .../strace-4.7/0014-x32-update-syscall-table.patch |   91 -
 ...-x32-update-g-s-etsockopt-syscall-numbers.patch |   43 -
 .../0024-x32-add-64bit-annotation-too.patch        |  231 --
 .../0025-Add-e-trace-memory-option.patch           | 2898 --------------------
 ...ew-errno-values-for-EPROBE_DEFER-and-EOPE.patch |   36 -
 .../0027-Add-AArch64-support-to-strace.patch       |  542 ----
 .../0028-Enhance-quotactl-decoding.patch           |  391 ---
 ...029-Filter-out-redundant-32-ioctl-entries.patch |  145 -
 ...neric-ioctl-definitions-to-linux-ioctlent.patch |  571 ----
 ...-for-tracing-32-bit-ARM-EABI-binaries-on-.patch |  963 -------
 .../0032-Fix-kernel-release-string-parsing.patch   |   38 -
 .../strace/strace-4.8/git-version-gen              |  225 ++
 .../strace/{strace_4.7.bb => strace_4.8.bb}        |   26 +-
 14 files changed, 234 insertions(+), 6020 deletions(-)
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0003-util-fix-building-when-glibc-has-a-stub-process_vm_r.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0014-x32-update-syscall-table.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0018-x32-update-g-s-etsockopt-syscall-numbers.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0024-x32-add-64bit-annotation-too.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0025-Add-e-trace-memory-option.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0026-linux-add-new-errno-values-for-EPROBE_DEFER-and-EOPE.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0027-Add-AArch64-support-to-strace.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0028-Enhance-quotactl-decoding.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0029-Filter-out-redundant-32-ioctl-entries.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0030-Move-asm-generic-ioctl-definitions-to-linux-ioctlent.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0031-Add-support-for-tracing-32-bit-ARM-EABI-binaries-on-.patch
 delete mode 100644 meta/recipes-devtools/strace/strace-4.7/0032-Fix-kernel-release-string-parsing.patch
 create mode 100755 meta/recipes-devtools/strace/strace-4.8/git-version-gen
 rename meta/recipes-devtools/strace/{strace_4.7.bb => strace_4.8.bb} (27%)
meta/recipes-devtools/strace/strace-4.7/0003-util-fix-building-when-glibc-has-a-stub-process_vm_r.patch deleted +0 -54
deleted file mode 100644
index 2fd80ec..0000000
@@ -1,54 +0,0 @@
-Upstream-Status: Backport
-
-From 24ee60b836ad33bb4ac694ca99d6c94a8cc5ff92 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <[email protected]>
-Date: Fri, 4 May 2012 19:37:29 -0400
-Subject: [PATCH 03/31] util: fix building when glibc has a stub
- process_vm_readv
-
-If you have a newer glibc which provides process_vm_readv, but it is built
-against older kernel headers which lack __NR_process_vm_readv, the library
-will contain a stub implementation that just returns ENOSYS.  Autoconf
-checks for this case explicitly and will declare it as unavailable.  So we
-end up in a case where the headers provide the prototype, but autoconf has
-not defined HAVE_PROCESS_VM_READV, so we hit the same build failure again:
-
-util.c:738:16: error: static declaration of 'process_vm_readv' follows non-static declaration
-/usr/include/bits/uio.h:58:16: note: previous declaration of 'process_vm_readv' was here
-
-So rename our local function to something unique, and add a define so the
-callers all hit the right place.
-
-* util.c (strace_process_vm_readv): Rename from process_vm_readv.
-(process_vm_readv): Define to strace_process_vm_readv.
-
-Signed-off-by: Mike Frysinger <[email protected]>
----
- util.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/util.c b/util.c
-index d347bd8..f27acdf 100644
---- a/util.c
-+++ b/util.c
-@@ -735,7 +735,8 @@ static bool process_vm_readv_not_supported = 0;
- 
- #if defined(__NR_process_vm_readv)
- static bool process_vm_readv_not_supported = 0;
--static ssize_t process_vm_readv(pid_t pid,
-+/* Have to avoid duplicating with the C library headers. */
-+static ssize_t strace_process_vm_readv(pid_t pid,
- 		 const struct iovec *lvec,
- 		 unsigned long liovcnt,
- 		 const struct iovec *rvec,
-@@ -744,6 +745,7 @@ static ssize_t process_vm_readv(pid_t pid,
- {
- 	return syscall(__NR_process_vm_readv, (long)pid, lvec, liovcnt, rvec, riovcnt, flags);
- }
-+#define process_vm_readv strace_process_vm_readv
- #else
- static bool process_vm_readv_not_supported = 1;
- # define process_vm_readv(...) (errno = ENOSYS, -1)
--- 
-1.8.0
-
meta/recipes-devtools/strace/strace-4.7/0014-x32-update-syscall-table.patch deleted +0 -91

91 lines not on this page · raw message

meta/recipes-devtools/strace/strace-4.7/0018-x32-update-g-s-etsockopt-syscall-numbers.patch deleted +0 -43

43 lines not on this page · raw message

meta/recipes-devtools/strace/strace-4.7/0024-x32-add-64bit-annotation-too.patch deleted +0 -231

231 lines not on this page · raw message

meta/recipes-devtools/strace/strace-4.7/0025-Add-e-trace-memory-option.patch deleted +0 -2898

2,581 lines not on this page · raw message

meta/recipes-devtools/strace/strace-4.7/0026-linux-add-new-errno-values-for-EPROBE_DEFER-and-EOPE.patch deleted +0 -36
deleted file mode 100644
index 1f84d46..0000000

Lines of this file are not shown. View the raw message.

meta/recipes-devtools/strace/strace-4.7/0027-Add-AArch64-support-to-strace.patch deleted +0 -542

542 lines not on this page · raw message

meta/recipes-devtools/strace/strace-4.7/0028-Enhance-quotactl-decoding.patch deleted +0 -391

391 lines not on this page · raw message

meta/recipes-devtools/strace/strace-4.7/0029-Filter-out-redundant-32-ioctl-entries.patch deleted +0 -145

145 lines not on this page · raw message

meta/recipes-devtools/strace/strace-4.7/0030-Move-asm-generic-ioctl-definitions-to-linux-ioctlent.patch deleted +0 -571

571 lines not on this page · raw message

meta/recipes-devtools/strace/strace-4.7/0031-Add-support-for-tracing-32-bit-ARM-EABI-binaries-on-.patch deleted +0 -963

963 lines not on this page · raw message

meta/recipes-devtools/strace/strace-4.7/0032-Fix-kernel-release-string-parsing.patch deleted +0 -38
deleted file mode 100644
index cef4222..0000000

Lines of this file are not shown. View the raw message.

meta/recipes-devtools/strace/strace-4.8/git-version-gen new file +225 -0

225 lines not on this page · raw message

meta/recipes-devtools/strace/strace_4.8.bb renamed from meta/recipes-devtools/strace/strace_4.7.bb +9 -17
similarity index 27%
rename from meta/recipes-devtools/strace/strace_4.7.bb
rename to meta/recipes-devtools/strace/strace_4.8.bb
index e360e63..c1ffdd1 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.5.4

Part of the diff is not shown here. View the raw message.

#2 lore raw

Re: [PATCH 1/2] strace: update to 4.8

Quoted 6 lines · Kai Kang

Update strace to 4.8:

* Update License file.
* Remove the backport patches which are already in version 4.8.
* Add file git-version-gen from git repo. Without this file configure fails.

Thanks, the diff is much more readable this time :)

Cheers,

Richard

author
#3 lore raw

PATCH 2/2 strace: add configure options libaio and acl

In reply to Kai Kang

Add strace configure options libaio and acl to enable or disable build with them. Then PACKAGECONFIG can be used to handle dependency.

Set "libaio" as a default feature of PACKAGECONFIG.

---
 .../strace-4.8/strace-add-configure-options.patch  |   60 ++++++++++++++++++++
 meta/recipes-devtools/strace/strace_4.8.bb         |    9 +++-
 2 files changed, 68 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-devtools/strace/strace-4.8/strace-add-configure-options.patch
meta/recipes-devtools/strace/strace-4.8/strace-add-configure-options.patch new file +60 -0
new file mode 100644
index 0000000..27266d9
@@ -0,0 +1,60 @@
+Add options "aio" and "acl" to enable/disable libaio and acl support.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <[email protected]>
+
+--- strace-4.8/configure.ac.orig	2013-06-21 15:37:52.145892182 +0800
++++ strace-4.8/configure.ac	2013-06-21 15:45:49.029909004 +0800
+@@ -219,7 +219,6 @@ AC_CHECK_HEADERS(m4_normalize([
+ 	netinet/sctp.h
+ 	poll.h
+ 	stropts.h
+-	sys/acl.h
+ 	sys/asynch.h
+ 	sys/conf.h
+ 	sys/epoll.h
+@@ -231,6 +230,19 @@ AC_CHECK_HEADERS(m4_normalize([
+ 	sys/uio.h
+ 	sys/vfs.h
+ ]))
++
++AC_ARG_ENABLE([acl],
++	[AS_HELP_STRING([--enable-acl], [turn on acl support])],
++	[case $enableval in
++	yes) 
++		AC_CHECK_HEADERS([sys/acl.h])
++		;;
++	no)  ;;
++	*)   AC_MSG_ERROR([bad value $enableval for aio option]) ;;
++	esac]
++	
++)
++
+ AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
+                  [], [], [#include <stddef.h>
+ #include <sys/socket.h>
+@@ -301,10 +313,19 @@ AC_CHECK_SIZEOF([long])
+ AC_CHECK_SIZEOF([long long])
+ AC_CHECK_SIZEOF([rlim_t],,[#include <sys/resource.h>])
+ 
+-AC_CHECK_HEADERS([libaio.h], [
+-	AC_CHECK_MEMBERS([struct iocb.u.c.flags],,, [#include <libaio.h>])
+-	AC_CHECK_DECLS([IO_CMD_PWRITE, IO_CMD_PWRITEV],,, [#include <libaio.h>])
+-])
++AC_ARG_ENABLE([aio],
++	[AS_HELP_STRING([--enable-aio], [turn on libaio support])],
++	[case $enableval in
++	yes) 
++	AC_CHECK_HEADERS([libaio.h], [
++		AC_CHECK_MEMBERS([struct iocb.u.c.flags],,, [#include <libaio.h>])
++		AC_CHECK_DECLS([IO_CMD_PWRITE, IO_CMD_PWRITEV],,, [#include <libaio.h>])
++	])
++	;;
++	no)  ;;
++	*)   AC_MSG_ERROR([bad value $enableval for aio option]) ;;
++	esac]
++)
+ 
+ AC_PATH_PROG([PERL], [perl])
+ 
meta/recipes-devtools/strace/strace_4.8.bb +8 -1
index c1ffdd1..0f4d2f0 100644
@@ -6,12 +6,19 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=124500c21e856f0912df29295ba104c7"
 PR = "r0"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
-           file://git-version-gen"
+           file://git-version-gen \
+           file://strace-add-configure-options.patch"
 
 SRC_URI[md5sum] = "c575ef43829586801f514fd91bfe7575"
 SRC_URI[sha256sum] = "f492291f07a7c805c07a8395cce1ea054a6401ad414f4cc12185672215e1d7f8"
 inherit autotools
 
+PACKAGECONFIG_class-target ?= "libaio"
+PACKAGECONFIG_class-target += "${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"
+
+PACKAGECONFIG[libaio] = "--enable-aio,--disable-aio,libaio"
+PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
+
 export INCLUDES = "-I. -I./linux"
 
 do_configure_prepend() {
Signature · 1 line
1.7.5.4
#4 lore raw

Re: [PATCH 2/2] strace: add configure options libaio and acl

Quoted 9 lines · On Friday 21 June 2013 16:12:21 Kai Kang wrote:

Add strace configure options libaio and acl to enable or disable build with them. Then PACKAGECONFIG can be used to handle dependency.

Set "libaio" as a default feature of PACKAGECONFIG.
...

(quoted diff) +2 -0
+PACKAGECONFIG_class-target ?= "libaio"
+PACKAGECONFIG_class-target += "${@base_contains('DISTRO_FEATURES', 'acl',

'acl', '', d)}"

I realise this has already been merged, but I think there are a couple of issues with the above. Firstly, for consistency, I think the first option should be called "aio" and not "libaio". Secondly, although this seems to work the use of overrides, += and ?= together is a little bit confusing. Perhaps the following would be a bit clearer:

PACKAGECONFIG_class-target ?= "aio \
                               ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
author
#5 lore raw

Re: [PATCH 2/2] strace: add configure options libaio and acl

Quoted 10 lines · Paul Eggleton
Quoted 9 lines · On Friday 21 June 2013 16:12:21 Kai Kang wrote:

Add strace configure options libaio and acl to enable or disable build with them. Then PACKAGECONFIG can be used to handle dependency.

Set "libaio" as a default feature of PACKAGECONFIG.
...

(quoted diff) +2 -0
+PACKAGECONFIG_class-target ?= "libaio"
+PACKAGECONFIG_class-target += "${@base_contains('DISTRO_FEATURES', 'acl',

'acl', '', d)}"

Hi Paul,

Quoted 3 lines

I realise this has already been merged, but I think there are a couple of issues with the above. Firstly, for consistency, I think the first option should be called "aio" and not "libaio".

OK, I'll update it.

Quoted 6 lines

Secondly, although this seems to work the use
of overrides, += and ?= together is a little bit confusing. Perhaps the following would be a bit clearer:

PACKAGECONFIG_class-target ?= "aio \
                               ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"

I considered this way.
When 'acl' in distro feature, I want strace enable acl support. But PACKAGECONFIG could be overwritten that even 'acl' in distro feature but not in 'PACKAGECONFIG'.

Thanks,
Kai

Quoted 4 lines

Cheers,
Paul

Signature · 2 lines
Regards,
Neil | Kai Kang
#6 lore raw

Re: [PATCH 2/2] strace: add configure options libaio and acl

Quoted 7 lines · On Monday 01 July 2013 09:52:42 Kang Kai wrote:
Quoted 6 lines · Paul Eggleton

Secondly, although this seems to work the use
of overrides, += and ?= together is a little bit confusing. Perhaps the following would be a bit clearer:

PACKAGECONFIG_class-target ?= "aio \

Quoted 7 lines
Quoted 2 lines
                               ${@base_contains('DISTRO_FEATURES', 'acl',
                               'acl', '', d)}"

I considered this way.
When 'acl' in distro feature, I want strace enable acl support. But PACKAGECONFIG could be overwritten that even 'acl' in distro feature but not in 'PACKAGECONFIG'.

I don't think this is a big issue - we have a fairly strong precedent for doing it this way so that PACKAGECONFIG customisation overrides DISTRO_FEATURES, based on usage in other recipes.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre