[gentoo-commits] repo/gentoo:master commit in: app-misc/pax-utils/, app-misc/pax-utils/files/

2022-09-07 Thread Mike Gilbert
commit: 7328940e2833ec9478d81745c609423b4c251b28
Author: Mike Gilbert  gentoo  org>
AuthorDate: Thu Sep  8 00:20:45 2022 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Thu Sep  8 00:22:39 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7328940e

app-misc/pax-utils: apply patch to reorder xmlto arguments

Closes: https://bugs.gentoo.org/869110
Signed-off-by: Mike Gilbert  gentoo.org>

 ...x-utils-1.3.5-man-reorder-xmlto-arguments.patch | 30 ++
 app-misc/pax-utils/pax-utils-1.3.5.ebuild  |  4 +++
 2 files changed, 34 insertions(+)

diff --git 
a/app-misc/pax-utils/files/pax-utils-1.3.5-man-reorder-xmlto-arguments.patch 
b/app-misc/pax-utils/files/pax-utils-1.3.5-man-reorder-xmlto-arguments.patch
new file mode 100644
index ..909c69e096c6
--- /dev/null
+++ b/app-misc/pax-utils/files/pax-utils-1.3.5-man-reorder-xmlto-arguments.patch
@@ -0,0 +1,30 @@
+From 2d981305b117b669c60bede076557c2d765cf198 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert 
+Date: Wed, 7 Sep 2022 20:13:00 -0400
+Subject: [PATCH] man: reorder xmlto arguments
+
+Bug: https://bugs.gentoo.org/869110
+Thanks-to: Fabian Groffen 
+Signed-off-by: Mike Gilbert 
+---
+ man/meson.build | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/man/meson.build b/man/meson.build
+index fc8d183..2e346ec 100644
+--- a/man/meson.build
 b/man/meson.build
+@@ -25,8 +25,8 @@ endforeach
+ 
+ custom_target('docbook_to_man',
+   command : [
+-xmlto, 'man', '-x', files('custom.xsl'), '--skip-validation', book,
+-'-o', meson.current_build_dir()
++xmlto, '-x', files('custom.xsl'), '--skip-validation',
++'-o', meson.current_build_dir(), 'man', book
+   ],
+   input : [
+ 'pax-utils.docbook.in', 'custom.xsl', 'fragment/reftail',
+-- 
+2.37.3
+

diff --git a/app-misc/pax-utils/pax-utils-1.3.5.ebuild 
b/app-misc/pax-utils/pax-utils-1.3.5.ebuild
index 1b90ea8c3bf9..c0464ce0aa15 100644
--- a/app-misc/pax-utils/pax-utils-1.3.5.ebuild
+++ b/app-misc/pax-utils/pax-utils-1.3.5.ebuild
@@ -51,6 +51,10 @@ RESTRICT="
!test? ( test )
 "
 
+PATCHES=(
+   "${FILESDIR}/pax-utils-1.3.5-man-reorder-xmlto-arguments.patch"
+)
+
 pkg_setup() {
if use test || use python; then
python-single-r1_pkg_setup



[gentoo-commits] repo/gentoo:master commit in: app-misc/pax-utils/, app-misc/pax-utils/files/

2018-11-24 Thread Sergei Trofimovich
commit: 0f69a565612708062ba66583780bb3fb606e503a
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sat Nov 24 19:53:38 2018 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sat Nov 24 19:54:02 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f69a565

app-misc/pax-utils: backport python-3.7 support, bug #671522

Fix by Oleksandr Natalenko:

lddtree.py: use errno properly

os.errno interface is removed [1], thus should not be used. In fact, it
is not used in other places of lddtree.py, so fix this one too, because
it breaks --copy-to-tree on systems with Python 3.7.

[1] https://bugs.python.org/issue33666

Closes: https://bugs.gentoo.org/671522
Signed-off-by: Oleksandr Natalenko  natalenko.name>
Signed-off-by: Sergei Trofimovich  gentoo.org>
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich  gentoo.org>

 .../files/pax-utils-1.2.3-python-3.7.patch | 32 ++
 app-misc/pax-utils/pax-utils-1.2.3-r3.ebuild   | 74 ++
 2 files changed, 106 insertions(+)

diff --git a/app-misc/pax-utils/files/pax-utils-1.2.3-python-3.7.patch 
b/app-misc/pax-utils/files/pax-utils-1.2.3-python-3.7.patch
new file mode 100644
index 000..40fff21c022
--- /dev/null
+++ b/app-misc/pax-utils/files/pax-utils-1.2.3-python-3.7.patch
@@ -0,0 +1,32 @@
+From 2acc5c3278354f56c70f9f48e66eb0203d5e8370 Mon Sep 17 00:00:00 2001
+From: Oleksandr Natalenko 
+Date: Sat, 17 Nov 2018 15:43:09 +0100
+Subject: [PATCH] lddtree.py: use errno properly
+
+os.errno interface is removed [1], thus should not be used. In fact, it
+is not used in other places of lddtree.py, so fix this one too, because
+it breaks --copy-to-tree on systems with Python 3.7.
+
+[1] https://bugs.python.org/issue33666
+
+Bug: https://bugs.gentoo.org/671522
+Signed-off-by: Oleksandr Natalenko 
+Signed-off-by: Sergei Trofimovich 
+---
+ lddtree.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/lddtree.py
 b/lddtree.py
+@@ -122,7 +122,7 @@ def makedirs(path):
+   try:
+ os.makedirs(path)
+   except OSError as e:
+-if e.errno != os.errno.EEXIST:
++if e.errno != errno.EEXIST:
+   raise
+ 
+ 
+-- 
+2.19.2
+

diff --git a/app-misc/pax-utils/pax-utils-1.2.3-r3.ebuild 
b/app-misc/pax-utils/pax-utils-1.2.3-r3.ebuild
new file mode 100644
index 000..880abaa929a
--- /dev/null
+++ b/app-misc/pax-utils/pax-utils-1.2.3-r3.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit eutils python-single-r1 toolchain-funcs unpacker
+
+DESCRIPTION="ELF utils that can check files for security relevant properties"
+HOMEPAGE="https://wiki.gentoo.org/index.php?title=Project:Hardened/PaX_Utilities;
+SRC_URI="mirror://gentoo/${P}.tar.xz
+   https://dev.gentoo.org/~slyfox/distfiles/${P}.tar.xz;
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos 
~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="caps debug python seccomp"
+
+RDEPEND="caps? ( >=sys-libs/libcap-2.24 )
+   python? (
+   ${PYTHON_DEPS}
+   dev-python/pyelftools[${PYTHON_USEDEP}]
+   )
+   seccomp? ( sys-libs/libseccomp )"
+DEPEND="${RDEPEND}
+   caps? ( virtual/pkgconfig )
+   seccomp? ( virtual/pkgconfig )
+   app-arch/xz-utils"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+   "${FILESDIR}"/${P}-python-3.7.patch
+)
+
+_emake() {
+   emake \
+   USE_CAP=$(usex caps) \
+   USE_DEBUG=$(usex debug) \
+   USE_PYTHON=$(usex python) \
+   USE_SECCOMP=$(usex seccomp) \
+   "$@"
+}
+
+pkg_setup() {
+   if use python; then
+   python-single-r1_pkg_setup
+   fi
+}
+
+src_configure() {
+   # Avoid slow configure+gnulib+make if on an up-to-date Linux system
+   if use prefix || ! use kernel_linux ||
+   has_version '

[gentoo-commits] repo/gentoo:master commit in: app-misc/pax-utils/, app-misc/pax-utils/files/

2017-09-18 Thread Fabian Groffen
commit: 8bb4efd8b8eb06c038cded8c1ec958b5825d1f4f
Author: Fabian Groffen  gentoo  org>
AuthorDate: Mon Sep 18 09:43:13 2017 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Mon Sep 18 09:43:25 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8bb4efd8

app-misc/pax-utils: add Prefix patches

Package-Manager: Portage-2.3.8, Repoman-2.3.1

 .../files/pax-utils-1.2.2-linux-2.6.32.patch   |  65 
 .../pax-utils/files/pax-utils-1.2.2-solaris.patch  | 181 +
 app-misc/pax-utils/pax-utils-1.2.2-r2.ebuild   |  62 +++
 3 files changed, 308 insertions(+)

diff --git a/app-misc/pax-utils/files/pax-utils-1.2.2-linux-2.6.32.patch 
b/app-misc/pax-utils/files/pax-utils-1.2.2-linux-2.6.32.patch
new file mode 100644
index 000..8139310b2e0
--- /dev/null
+++ b/app-misc/pax-utils/files/pax-utils-1.2.2-linux-2.6.32.patch
@@ -0,0 +1,65 @@
+This is the diff for generated sources after applying:
+https://github.com/gentoo/pax-utils/pull/2
+
+diff -ru pax-utils-HEAD.orig/config.h.in pax-utils-HEAD/config.h.in
+--- pax-utils-HEAD.orig/config.h.in2017-04-18 16:26:42.0 +0200
 pax-utils-HEAD/config.h.in 2017-04-18 16:28:05.0 +0200
+@@ -526,6 +526,9 @@
+ /* Define to 1 if you have the `link' function. */
+ #undef HAVE_LINK
+ 
++/* Define to 1 if you have the  header file. */
++#undef HAVE_LINUX_SECUREBITS_H
++
+ /* Define to 1 if the system has the type 'long long int'. */
+ #undef HAVE_LONG_LONG_INT
+ 
+diff -ru pax-utils-HEAD.orig/configure pax-utils-HEAD/configure
+--- pax-utils-HEAD.orig/configure  2017-04-18 16:26:41.0 +0200
 pax-utils-HEAD/configure   2017-04-18 16:28:03.0 +0200
+@@ -34537,6 +34537,19 @@
+ 
+ 
+ 
++for ac_header in linux/securebits.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "linux/securebits.h" 
"ac_cv_header_linux_securebits_h" "$ac_includes_default"
++if test "x$ac_cv_header_linux_securebits_h" = xyes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LINUX_SECUREBITS_H 1
++_ACEOF
++
++fi
++
++done
++
++
+ ac_config_files="$ac_config_files Makefile autotools/gnulib/Makefile"
+ 
+ cat >confcache <<\_ACEOF
+diff -ru pax-utils-HEAD.orig/configure.ac pax-utils-HEAD/configure.ac
+--- pax-utils-HEAD.orig/configure.ac   2017-04-18 16:25:48.0 +0200
 pax-utils-HEAD/configure.ac2017-04-18 16:27:11.0 +0200
+#@@ -62,6 +62,8 @@
+   AX_CHECK_COMPILE_FLAG(flag, AS_VAR_APPEND([CFLAGS], " flag"))
+ ])
+ 
++AC_CHECK_HEADERS([linux/securebits.h])
++
+ AC_CONFIG_FILES([
+   Makefile
+   autotools/gnulib/Makefile
+diff -ru pax-utils-HEAD.orig/porting.h pax-utils-HEAD/porting.h
+--- pax-utils-HEAD.orig/porting.h  2017-03-03 21:07:15.0 +0100
 pax-utils-HEAD/porting.h   2017-04-18 16:18:22.0 +0200
+@@ -46,7 +46,9 @@
+ #endif
+ #if defined(__linux__)
+ # include 
+-# include 
++# if !defined(HAVE_CONFIG_H) || defined(HAVE_LINUX_SECUREBITS_H)
++#  include 
++# endif
+ #endif
+ #if defined(__GLIBC__) || defined(__UCLIBC__) || defined(__ANDROID__)
+ # include 

diff --git a/app-misc/pax-utils/files/pax-utils-1.2.2-solaris.patch 
b/app-misc/pax-utils/files/pax-utils-1.2.2-solaris.patch
new file mode 100644
index 000..de1427f99bd
--- /dev/null
+++ b/app-misc/pax-utils/files/pax-utils-1.2.2-solaris.patch
@@ -0,0 +1,181 @@
+This is the diff for generated sources after applying:
+https://github.com/gentoo/pax-utils/pull/1
+
+diff -ruN pax-utils-1.2.2.orig/autotools/gnulib/Makefile.in 
pax-utils-1.2.2/autotools/gnulib/Makefile.in
+--- pax-utils-1.2.2.orig/autotools/gnulib/Makefile.in  2017-01-24 
21:30:06.0 +0100
 pax-utils-1.2.2/autotools/gnulib/Makefile.in   2017-03-15 
10:59:05.616490166 +0100
+@@ -1483,7 +1484,7 @@
+   $(top_srcdir)/autotools/snippet/c++defs.h \
+   $(top_srcdir)/autotools/snippet/warn-on-use.h stat.c \
+   stat-time.h stdbool.in.h stddef.in.h stdint.in.h stdio.in.h \
+-  stdlib.in.h strcasecmp.c strncasecmp.c str-two-way.h \
++  stdlib.in.h stpcpy.c strcasecmp.c strncasecmp.c str-two-way.h \
+   strcasestr.c strdup.c strerror.c strerror-override.c \
+   strerror-override.h string.in.h strings.in.h strncat.c \
+   symlink.c at-func.c symlinkat.c sys_stat.in.h sys_time.in.h \
+@@ -1546,7 +1547,7 @@
+   msvc-nothrow.c open.c openat.c opendir.c printf-frexp.c \
+   readlink.c at-func.c readlinkat.c realloc.c rename.c \
+   at-func2.c renameat.c rmdir.c signbitd.c signbitf.c signbitl.c \
+-  stat.c strcasecmp.c strncasecmp.c strcasestr.c strdup.c \
++  stat.c stpcpy.c strcasecmp.c strncasecmp.c strcasestr.c strdup.c \
+   strerror.c strerror-override.c strncat.c symlink.c at-func.c \
+   symlinkat.c unlink.c at-func.c unlinkat.c at-func.c \
+   utimensat.c asnprintf.c printf-args.c printf-parse.c \
+@@ -1708,6 +1709,7 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat-time.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ 

[gentoo-commits] repo/gentoo:master commit in: app-misc/pax-utils/, app-misc/pax-utils/files/

2017-08-19 Thread Sergei Trofimovich
commit: 7e17e5572bda4281b90959cf8999dc95dfe21c6b
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sat Aug 19 10:02:47 2017 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sat Aug 19 10:11:55 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e17e557

app-misc/pax-utils: fix crash on ia64 TEXTRELs, bug #624356

Bug: https://bugs.gentoo.org/624356
Package-Manager: Portage-2.3.8, Repoman-2.3.3

 ...-scanelf-fix-out-of-bounds-access-in-ia64.patch | 72 ++
 app-misc/pax-utils/pax-utils-1.2.2-r1.ebuild   | 58 +
 2 files changed, 130 insertions(+)

diff --git 
a/app-misc/pax-utils/files/pax-utils-1.2.2-scanelf-fix-out-of-bounds-access-in-ia64.patch
 
b/app-misc/pax-utils/files/pax-utils-1.2.2-scanelf-fix-out-of-bounds-access-in-ia64.patch
new file mode 100644
index 000..1fa5c3187e5
--- /dev/null
+++ 
b/app-misc/pax-utils/files/pax-utils-1.2.2-scanelf-fix-out-of-bounds-access-in-ia64.patch
@@ -0,0 +1,72 @@
+From e95103c40d0541fbcdb4b84b000832d9b1b83b8d Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich 
+Date: Sat, 19 Aug 2017 10:34:41 +0100
+Subject: [PATCH] scanelf: fix out-of-bounds access in ia64
+
+commit 2eb852129394f97dae89c0ff1f9f48637edcb0e9
+slightly changed decoder and added unchecked
+read from elf header:
+
+```
+   switch (EGET(dpltrel->d_un.d_val)) { \
+   case DT_REL: \
+   rel = REL##B(elf->vdata + EGET(drel->d_un.d_val)); \
+```
+
+On ia64 'EGET(drel->d_un.d_val)' returns absolute address:
+
+```
+$ dumpelf bug/luatex
+...
+/* Dynamic tag #31 'DT_RELA' 0x97E310 */
+{
+.d_tag = 0x7,
+.d_un  = {
+.d_val = 0x40031C30 ,
+.d_ptr = 0x40031C30 ,
+},
+},
+```
+
+That causes 'scanelf' crash on binaries like 'luatex'.
+
+This change restores check and loudly skips such sections:
+scanelf: bug/luatex: DT_RELA is out of file range
+
+Bug: https://bugs.gentoo.org/624356
+Signed-off-by: Sergei Trofimovich 
+---
+ scanelf.c | 12 
+ 1 file changed, 12 insertions(+)
+
+diff --git a/scanelf.c b/scanelf.c
+index 1ead891..a054408 100644
+--- a/scanelf.c
 b/scanelf.c
+@@ -607,11 +607,23 @@ static char *scanelf_file_textrels(elfobj *elf, char 
*found_textrels, char *foun
+   } \
+   switch (EGET(dpltrel->d_un.d_val)) { \
+   case DT_REL: \
++  if (EGET(drel->d_un.d_val) >= (uint64_t)elf->len - sizeof 
(drel->d_un.d_val)) { \
++  rel = NULL; \
++  rela = NULL; \
++  warn("%s: DT_REL is out of file range", elf->filename); 
\
++  break; \
++  } \
+   rel = REL##B(elf->vdata + EGET(drel->d_un.d_val)); \
+   rela = NULL; \
+   pltrel = DT_REL; \
+   break; \
+   case DT_RELA: \
++  if (EGET(drel->d_un.d_val) >= (uint64_t)elf->len - sizeof 
(drel->d_un.d_val)) { \
++  rel = NULL; \
++  rela = NULL; \
++  warn("%s: DT_RELA is out of file range", 
elf->filename); \
++  break; \
++  } \
+   rel = NULL; \
+   rela = RELA##B(elf->vdata + EGET(drel->d_un.d_val)); \
+   pltrel = DT_RELA; \
+-- 
+2.14.1
+

diff --git a/app-misc/pax-utils/pax-utils-1.2.2-r1.ebuild 
b/app-misc/pax-utils/pax-utils-1.2.2-r1.ebuild
new file mode 100644
index 000..ba368f7be67
--- /dev/null
+++ b/app-misc/pax-utils/pax-utils-1.2.2-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs unpacker
+
+DESCRIPTION="ELF utils that can check files for security relevant properties"
+HOMEPAGE="https://wiki.gentoo.org/index.php?title=Project:Hardened/PaX_Utilities;
+SRC_URI="mirror://gentoo/${P}.tar.xz
+   https://dev.gentoo.org/~vapier/dist/${P}.tar.xz;
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux 
~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris 
~x86-solaris"
+IUSE="caps debug python seccomp"
+
+RDEPEND="caps? ( >=sys-libs/libcap-2.24 )
+   python? ( dev-python/pyelftools )
+   seccomp? ( sys-libs/libseccomp )"
+DEPEND="${RDEPEND}
+   caps? ( virtual/pkgconfig )
+   seccomp? ( virtual/pkgconfig )
+   app-arch/xz-utils"
+
+PATCHES=("${FILESDIR}"/${P}-scanelf-fix-out-of-bounds-access-in-ia64.patch)
+
+_emake() {
+   emake \
+   USE_CAP=$(usex caps) \
+   USE_DEBUG=$(usex debug) \
+   USE_PYTHON=$(usex python) \
+   USE_SECCOMP=$(usex seccomp) \
+   "$@"
+}
+
+src_configure() {
+   # Avoid slow 

[gentoo-commits] repo/gentoo:master commit in: app-misc/pax-utils/, app-misc/pax-utils/files/

2016-11-08 Thread Mike Gilbert
commit: 19ffdf6414b7215a89a25c6b13cbf9197c86451a
Author: Mike Gilbert  gentoo  org>
AuthorDate: Tue Nov  8 22:04:10 2016 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Tue Nov  8 22:07:11 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19ffdf64

app-misc/pax-utils: fix lddtree with pyelfutils-0.24

Bug: https://bugs.gentoo.org/599082
Package-Manager: portage-2.3.2_p5

 ...tree.py-work-around-pyelftools-API-change.patch | 29 ++
 app-misc/pax-utils/pax-utils-1.1.6-r1.ebuild   | 62 ++
 2 files changed, 91 insertions(+)

diff --git 
a/app-misc/pax-utils/files/0001-lddtree.py-work-around-pyelftools-API-change.patch
 
b/app-misc/pax-utils/files/0001-lddtree.py-work-around-pyelftools-API-change.patch
new file mode 100644
index ..7a8b74e
--- /dev/null
+++ 
b/app-misc/pax-utils/files/0001-lddtree.py-work-around-pyelftools-API-change.patch
@@ -0,0 +1,29 @@
+From 6557b1512ebfda508345e032e09ed85789c16c98 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert 
+Date: Tue, 8 Nov 2016 15:37:27 -0500
+Subject: [PATCH] lddtree.py: work around pyelftools API change
+
+Section names now get returned as strings rather than bytes. See
+108eaea9 upstream.
+
+Bug: https://bugs.gentoo.org/599082
+---
+ lddtree.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lddtree.py b/lddtree.py
+index 3971a9a..8480248 100755
+--- a/lddtree.py
 b/lddtree.py
+@@ -72,6 +72,8 @@ def dbg(debug, *args, **kwargs):
+ 
+ def bstr(buf):
+   """Decode the byte string into a string"""
++  if isinstance(buf, str):
++  return buf
+   return buf.decode('utf-8')
+ 
+ 
+-- 
+2.10.2
+

diff --git a/app-misc/pax-utils/pax-utils-1.1.6-r1.ebuild 
b/app-misc/pax-utils/pax-utils-1.1.6-r1.ebuild
new file mode 100644
index ..ceaf0bd
--- /dev/null
+++ b/app-misc/pax-utils/pax-utils-1.1.6-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs unpacker
+
+DESCRIPTION="ELF related utils for ELF 32/64 binaries that can check files for 
security relevant properties"
+HOMEPAGE="https://wiki.gentoo.org/index.php?title=Project:Hardened/PaX_Utilities;
+SRC_URI="mirror://gentoo/${P}.tar.xz
+   http://dev.gentoo.org/~solar/pax/${P}.tar.xz
+   http://dev.gentoo.org/~vapier/dist/${P}.tar.xz;
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="caps debug python seccomp"
+
+RDEPEND="caps? ( >=sys-libs/libcap-2.24 )
+   python? ( dev-python/pyelftools )
+   seccomp? ( sys-libs/libseccomp )"
+DEPEND="${RDEPEND}
+   caps? ( virtual/pkgconfig )
+   seccomp? ( virtual/pkgconfig )
+   app-arch/xz-utils"
+
+_emake() {
+   emake \
+   USE_CAP=$(usex caps) \
+   USE_DEBUG=$(usex debug) \
+   USE_PYTHON=$(usex python) \
+   USE_SECCOMP=$(usex seccomp) \
+   "$@"
+}
+
+src_prepare() {
+   epatch 
"${FILESDIR}/0001-lddtree.py-work-around-pyelftools-API-change.patch"
+}
+
+src_configure() {
+   # Avoid slow configure+gnulib+make if on an up-to-date Linux system
+   if use prefix || ! use kernel_linux || \
+  has_version '