Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Wed, 23 Dec 2015 02:33:23
Message-Id: 1450838378.5d97f52774e256b670a95f42583e01a9c268b7e6.blueness@gentoo
1 commit: 5d97f52774e256b670a95f42583e01a9c268b7e6
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 23 02:39:38 2015 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 23 02:39:38 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d97f527
7
8 pax-utils.eclass: silence excessive output from paxctl{,-ng}, scanelf and setfattr
9
10 eclass/pax-utils.eclass | 30 +++++++++++++++---------------
11 1 file changed, 15 insertions(+), 15 deletions(-)
12
13 diff --git a/eclass/pax-utils.eclass b/eclass/pax-utils.eclass
14 index a99bd78..9ed1170 100644
15 --- a/eclass/pax-utils.eclass
16 +++ b/eclass/pax-utils.eclass
17 @@ -78,30 +78,30 @@ pax-mark() {
18 for f in "$@"; do
19
20 # First try paxctl -> this might try to create/convert program headers.
21 - if type -p paxctl > /dev/null; then
22 + if type -p paxctl >/dev/null; then
23 einfo "PT_PAX marking -${flags} ${f} with paxctl"
24 # First, try modifying the existing PAX_FLAGS header.
25 - paxctl -q${flags} "${f}" && continue
26 + paxctl -q${flags} "${f}" >/dev/null 2>&1 && continue
27 # Second, try creating a PT_PAX header (works on ET_EXEC).
28 # Even though this is less safe, most exes need it. #463170
29 - paxctl -qC${flags} "${f}" && continue
30 + paxctl -qC${flags} "${f}" >/dev/null 2>&1 && continue
31 # Third, try stealing the (unused under PaX) PT_GNU_STACK header
32 - paxctl -qc${flags} "${f}" && continue
33 + paxctl -qc${flags} "${f}" >/dev/null 2>&1 && continue
34 fi
35
36 # Next try paxctl-ng -> this will not create/convert any program headers.
37 - if type -p paxctl-ng > /dev/null && paxctl-ng -L ; then
38 + if type -p paxctl-ng >/dev/null && paxctl-ng -L ; then
39 einfo "PT_PAX marking -${flags} ${f} with paxctl-ng"
40 flags="${flags//z}"
41 - [[ ${dodefault} == "yes" ]] && paxctl-ng -L -z "${f}"
42 + [[ ${dodefault} == "yes" ]] && paxctl-ng -L -z "${f}" >/dev/null 2>&1
43 [[ "${flags}" ]] || continue
44 - paxctl-ng -L -${flags} "${f}" && continue
45 + paxctl-ng -L -${flags} "${f}" >/dev/null 2>&1 && continue
46 fi
47
48 # Finally fall back on scanelf.
49 - if type -p scanelf > /dev/null && [[ ${PAX_MARKINGS} != "none" ]]; then
50 + if type -p scanelf >/dev/null && [[ ${PAX_MARKINGS} != "none" ]]; then
51 einfo "PT_PAX marking -${flags} ${f} with scanelf"
52 - scanelf -Xxz ${flags} "$f"
53 + scanelf -Xxz ${flags} "$f" >/dev/null 2>&1
54 # We failed to set PT_PAX flags.
55 elif [[ ${PAX_MARKINGS} != "none" ]]; then
56 elog "Failed to set PT_PAX markings -${flags} ${f}."
57 @@ -117,19 +117,19 @@ pax-mark() {
58 for f in "$@"; do
59
60 # First try paxctl-ng.
61 - if type -p paxctl-ng > /dev/null && paxctl-ng -l ; then
62 + if type -p paxctl-ng >/dev/null && paxctl-ng -l ; then
63 einfo "XATTR_PAX marking -${flags} ${f} with paxctl-ng"
64 - [[ ${dodefault} == "yes" ]] && paxctl-ng -d "${f}"
65 + [[ ${dodefault} == "yes" ]] && paxctl-ng -d "${f}" >/dev/null 2>&1
66 [[ "${flags}" ]] || continue
67 - paxctl-ng -l -${flags} "${f}" && continue
68 + paxctl-ng -l -${flags} "${f}" >/dev/null 2>&1 && continue
69 fi
70
71 # Next try setfattr.
72 - if type -p setfattr > /dev/null; then
73 + if type -p setfattr >/dev/null; then
74 [[ "${flags//[!Ee]}" ]] || flags+="e" # bug 447150
75 einfo "XATTR_PAX marking -${flags} ${f} with setfattr"
76 - [[ ${dodefault} == "yes" ]] && setfattr -x "user.pax.flags" "${f}"
77 - setfattr -n "user.pax.flags" -v "${flags}" "${f}" && continue
78 + [[ ${dodefault} == "yes" ]] && setfattr -x "user.pax.flags" "${f}" >/dev/null 2>&1
79 + setfattr -n "user.pax.flags" -v "${flags}" "${f}" >/dev/null 2>&1 && continue
80 fi
81
82 # We failed to set XATTR_PAX flags.