diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-06-16 18:54:14 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-06-16 21:35:26 +0200 |
commit | ed2ae0dc7f44d884ed1329cba457f5479cafd2ba (patch) | |
tree | dfcb5332ced729aced441aa383b60db78ecf5d3a /gnu | |
parent | 4c0df1a8705287d60498261e1cd59a6eaf100aa5 (diff) | |
download | guix-ed2ae0dc7f44d884ed1329cba457f5479cafd2ba.tar.gz |
gnu: strace: Update to 4.23.
* gnu/packages/linux.scm (strace): Update to 4.23. [source]: Remove obsolete patch. * gnu/packages/patches/strace-kernel-4.16.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/linux.scm | 5 | ||||
-rw-r--r-- | gnu/packages/patches/strace-kernel-4.16.patch | 92 |
3 files changed, 2 insertions, 96 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index a1bebe0dfa..3aad334a11 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1112,7 +1112,6 @@ dist_patch_DATA = \ %D%/packages/patches/slim-login.patch \ %D%/packages/patches/sooperlooper-build-with-wx-30.patch \ %D%/packages/patches/steghide-fixes.patch \ - %D%/packages/patches/strace-kernel-4.16.patch \ %D%/packages/patches/superlu-dist-scotchmetis.patch \ %D%/packages/patches/swish-e-search.patch \ %D%/packages/patches/swish-e-format-security.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 4ed418d6a9..60cd80ec04 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -920,16 +920,15 @@ Zerofree requires the file system to be unmounted or mounted read-only.") (define-public strace (package (name "strace") - (version "4.22") + (version "4.23") (home-page "https://strace.io") (source (origin (method url-fetch) (uri (string-append home-page "/files/" version "/strace-" version ".tar.xz")) - (patches (search-patches "strace-kernel-4.16.patch")) (sha256 (base32 - "17dkpnsjxmys1ydidm9wcvc3wscsz44fmlxw3dclspn9cj9d1306")))) + "1bcsq2gbpcb81ayryvn56a6kjx42fc21la6qgds35n0xbybacq3q")))) (build-system gnu-build-system) (arguments '(#:phases diff --git a/gnu/packages/patches/strace-kernel-4.16.patch b/gnu/packages/patches/strace-kernel-4.16.patch deleted file mode 100644 index e86d3be439..0000000000 --- a/gnu/packages/patches/strace-kernel-4.16.patch +++ /dev/null @@ -1,92 +0,0 @@ -Fix test failure when using Linux-Libre >= 4.16. - -Taken from upstream: -https://github.com/strace/strace/commit/bcff87c31c0f27c678a43d6b7f67dab363a974fa - -From bcff87c31c0f27c678a43d6b7f67dab363a974fa Mon Sep 17 00:00:00 2001 -From: Masatake YAMATO <yamato@redhat.com> -Date: Wed, 2 May 2018 17:11:07 +0900 -Subject: [PATCH] tests/ioctl_kvm_run.c: handle cpuid at the end of vcpu dentry - -Since Linux 4.16, kernel appends the cpuid as suffix to the entry -for a kvm vcpu in /proc/$pid/fd like: - - anon_inode:kvm-vcpu:0 - -That was - - anon_inode:kvm-vcpu - -This kernel change causes the test case failure on newer kernels. -Update the test to deal with the new name as well as the old one. - -* tests/ioctl_kvm_run.c: Include unistd.h for using readlink(2). -(vcpu_dev_should_have_cpuid): New function for detecting whether -a proc entry for given fd has the cpuid suffix or not. -(main): Trim vcpu_dev to remove the cpuid suffix if needed. -(vcpu_dev): Remove const modifier. ---- - tests/ioctl_kvm_run.c | 29 ++++++++++++++++++++++++++++- - 1 file changed, 28 insertions(+), 1 deletion(-) - -diff --git a/tests/ioctl_kvm_run.c b/tests/ioctl_kvm_run.c -index 179461430..e1bef5796 100644 ---- a/tests/ioctl_kvm_run.c -+++ b/tests/ioctl_kvm_run.c -@@ -40,6 +40,7 @@ - # include <string.h> - # include <sys/ioctl.h> - # include <sys/mman.h> -+# include <unistd.h> - # include <linux/kvm.h> - - static int -@@ -56,7 +57,7 @@ kvm_ioctl(int fd, unsigned long cmd, const char *cmd_str, void *arg) - - static const char dev[] = "/dev/kvm"; - static const char vm_dev[] = "anon_inode:kvm-vm"; --static const char vcpu_dev[] = "anon_inode:kvm-vcpu"; -+static char vcpu_dev[] = "anon_inode:kvm-vcpu:0"; - static size_t page_size; - - extern const char code[]; -@@ -165,6 +166,23 @@ run_kvm(const int vcpu_fd, struct kvm_run *const run, const size_t mmap_size, - } - } - -+static int -+vcpu_dev_should_have_cpuid(int fd) -+{ -+ int r = 0; -+ char *filename = NULL; -+ char buf[sizeof(vcpu_dev)]; -+ -+ if (asprintf(&filename, "/proc/%d/fd/%d", getpid(), fd) < 0) -+ error_msg_and_fail("asprintf"); -+ -+ if (readlink(filename, buf, sizeof(buf)) == sizeof(buf) - 1 -+ && (memcmp(buf, vcpu_dev, sizeof(buf) - 1) == 0)) -+ r = 1; -+ free(filename); -+ return r; -+} -+ - int - main(void) - { -@@ -208,6 +226,15 @@ main(void) - (unsigned long) page_size, (unsigned long) page_size, mem); - - int vcpu_fd = KVM_IOCTL(vm_fd, KVM_CREATE_VCPU, NULL); -+ if (!vcpu_dev_should_have_cpuid(vcpu_fd)) -+ /* -+ * This is an older kernel that doesn't place a cpuid -+ * at the end of the dentry associated with vcpu_fd. -+ * Trim the cpuid part of vcpu_dev like: -+ * "anon_inode:kvm-vcpu:0" -> "anon_inode:kvm-vcpu" -+ */ -+ vcpu_dev[strlen (vcpu_dev) - 2] = '\0'; -+ - printf("ioctl(%d<%s>, KVM_CREATE_VCPU, 0) = %d<%s>\n", - vm_fd, vm_dev, vcpu_fd, vcpu_dev); - |