[arch-commits] Commit in lib32-elfutils/trunk (2 files)

Laurent Carlier lcarlier at archlinux.org
Fri Jan 16 20:25:27 UTC 2015


    Date: Friday, January 16, 2015 @ 21:25:26
  Author: lcarlier
Revision: 125999

upgpkg: lib32-elfutils 0.161-1

upstream update 0.161

Added:
  lib32-elfutils/trunk/0001-tests-Make-deleted-and-vdsosyms-testcases-work-with-.patch
Modified:
  lib32-elfutils/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-tests-Make-deleted-and-vdsosyms-testcases-work-with-.patch |   63 ++++++++++
 PKGBUILD                                                        |   25 ++-
 2 files changed, 78 insertions(+), 10 deletions(-)

Added: 0001-tests-Make-deleted-and-vdsosyms-testcases-work-with-.patch
===================================================================
--- 0001-tests-Make-deleted-and-vdsosyms-testcases-work-with-.patch	                        (rev 0)
+++ 0001-tests-Make-deleted-and-vdsosyms-testcases-work-with-.patch	2015-01-16 20:25:26 UTC (rev 125999)
@@ -0,0 +1,63 @@
+From 224e6776cfe6fc23a207cd05bf75b1e3548853a0 Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mjw at redhat.com>
+Date: Thu, 15 Jan 2015 13:39:06 +0100
+Subject: [PATCH] tests: Make deleted and vdsosyms testcases work with
+ "restricted ptrace".
+
+Some systems might have "restricted ptrace" that doesn't allow process
+inspection of arbitrary processes. Change the deleted testcase to
+explicitly allow any other process to inspect it using the PR_SET_PTRACER
+prctl set to PR_SET_PTRACER_ANY. Change the vdsosyms testcase to inspect
+the process itself which should always be allowed.
+
+Reported-by: Anatol Pomozov <anatol.pomozov at gmail.com>
+Signed-off-by: Mark Wielaard <mjw at redhat.com>
+---
+ tests/ChangeLog  | 5 +++++
+ tests/deleted.c  | 6 ++++++
+ tests/vdsosyms.c | 5 +++--
+ 3 files changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/tests/deleted.c b/tests/deleted.c
+index 32a310b..d071bf7 100644
+--- a/tests/deleted.c
++++ b/tests/deleted.c
+@@ -23,6 +23,7 @@
+ #include <stdio.h>
+ #include <error.h>
+ #include <errno.h>
++#include <sys/prctl.h>
+ 
+ extern void libfunc (void);
+ 
+@@ -42,6 +43,11 @@ main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused)))
+       assert (!err);
+       err = close (2);
+       assert (!err);
++      /* Make sure eu-stack -p works on this process even with
++	 "restricted ptrace".  */
++#ifdef PR_SET_PTRACER_ANY
++      prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, 0, 0, 0);
++#endif
+       libfunc ();
+       abort ();
+     }
+diff --git a/tests/vdsosyms.c b/tests/vdsosyms.c
+index c1f8d89..4f12b9a 100644
+--- a/tests/vdsosyms.c
++++ b/tests/vdsosyms.c
+@@ -80,8 +80,9 @@ main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused)))
+   if (dwfl == NULL)
+     error (2, 0, "dwfl_begin: %s", dwfl_errmsg (-1));
+ 
+-  /* Take our parent as "arbitrary" process to inspect.  */
+-  pid_t pid = getppid();
++  /* Take ourself as "arbitrary" process to inspect.  This should work
++     even with "restricted ptrace".  */
++  pid_t pid = getpid();
+ 
+   int result = dwfl_linux_proc_report (dwfl, pid);
+   if (result < 0)
+-- 
+1.8.3.1
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-01-16 20:25:20 UTC (rev 125998)
+++ PKGBUILD	2015-01-16 20:25:26 UTC (rev 125999)
@@ -4,7 +4,7 @@
 
 _pkgbasename=elfutils
 pkgname=lib32-elfutils
-pkgver=0.160
+pkgver=0.161
 pkgrel=1
 pkgdesc="Collection of libraries for working with ELF object files and DWARF debugging information (32-bit)"
 arch=('x86_64')
@@ -12,10 +12,21 @@
 license=('LGPL3' 'GPL' 'GPL3')
 depends=('lib32-bzip2' 'lib32-zlib' 'elfutils')
 makedepends=('gcc-multilib')
-source=(https://fedorahosted.org/releases/e/l/elfutils/${pkgver}/elfutils-${pkgver}.tar.bz2{,.sig})
-sha1sums=('a300a1cd1543b65532e333a6e9f931db76841558'
-	  'SKIP')
+source=(https://fedorahosted.org/releases/e/l/elfutils/${pkgver}/elfutils-${pkgver}.tar.bz2{,.sig}
+        0001-tests-Make-deleted-and-vdsosyms-testcases-work-with-.patch)
+options=('staticlibs')
+sha1sums=('85d48e18359c51e843c49b1894b2f54b85e88ae2'
+          'SKIP'
+          '86947fb8d0f51a65e19142350925f428ad0c7cb1')
+validpgpkeys=('47CC0331081B8BC6D0FD4DA08370665B57816A6A') # Mark J. Wielaard <mark at klomp.org>
 
+prepare() {
+  cd ${_pkgbasename}-${pkgver}
+
+  # https://lists.fedorahosted.org/pipermail/elfutils-devel/2015-January/004541.html
+  patch -p1 < "$srcdir"/0001-tests-Make-deleted-and-vdsosyms-testcases-work-with-.patch
+}
+
 build() {
   cd ${srcdir}/${_pkgbasename}-${pkgver}
 	
@@ -28,12 +39,6 @@
   make
 }
 
-#check() {
-#  cd ${srcdir}/${_pkgbasename}-${pkgver}
-#
-#  make check
-#}
-
 package() {
   cd ${srcdir}/${_pkgbasename}-${pkgver}
 



More information about the arch-commits mailing list