1 |
commit: bd9c5468dd0ba397121c5674e370346bd0d1ebef |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 23 02:34:21 2015 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 23 02:34:21 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd9c5468 |
7 |
|
8 |
pax-utils.eclass: cosmetic changes to output |
9 |
|
10 |
eclass/pax-utils.eclass | 15 +++++++++------ |
11 |
1 file changed, 9 insertions(+), 6 deletions(-) |
12 |
|
13 |
diff --git a/eclass/pax-utils.eclass b/eclass/pax-utils.eclass |
14 |
index 56dad3c..a99bd78 100644 |
15 |
--- a/eclass/pax-utils.eclass |
16 |
+++ b/eclass/pax-utils.eclass |
17 |
@@ -73,12 +73,13 @@ pax-mark() { |
18 |
[[ "${flags//[!z]}" ]] && dodefault="yes" |
19 |
|
20 |
if has PT ${PAX_MARKINGS}; then |
21 |
- _pax_list_files einfo "$@" |
22 |
+ # Uncomment to list all files to be marked |
23 |
+ # _pax_list_files einfo "$@" |
24 |
for f in "$@"; do |
25 |
|
26 |
# First try paxctl -> this might try to create/convert program headers. |
27 |
if type -p paxctl > /dev/null; then |
28 |
- einfo "PT PaX marking -${flags} ${f} with paxctl" |
29 |
+ einfo "PT_PAX marking -${flags} ${f} with paxctl" |
30 |
# First, try modifying the existing PAX_FLAGS header. |
31 |
paxctl -q${flags} "${f}" && continue |
32 |
# Second, try creating a PT_PAX header (works on ET_EXEC). |
33 |
@@ -90,7 +91,7 @@ pax-mark() { |
34 |
|
35 |
# Next try paxctl-ng -> this will not create/convert any program headers. |
36 |
if type -p paxctl-ng > /dev/null && paxctl-ng -L ; then |
37 |
- einfo "PT PaX marking -${flags} ${f} with paxctl-ng" |
38 |
+ einfo "PT_PAX marking -${flags} ${f} with paxctl-ng" |
39 |
flags="${flags//z}" |
40 |
[[ ${dodefault} == "yes" ]] && paxctl-ng -L -z "${f}" |
41 |
[[ "${flags}" ]] || continue |
42 |
@@ -99,6 +100,7 @@ pax-mark() { |
43 |
|
44 |
# Finally fall back on scanelf. |
45 |
if type -p scanelf > /dev/null && [[ ${PAX_MARKINGS} != "none" ]]; then |
46 |
+ einfo "PT_PAX marking -${flags} ${f} with scanelf" |
47 |
scanelf -Xxz ${flags} "$f" |
48 |
# We failed to set PT_PAX flags. |
49 |
elif [[ ${PAX_MARKINGS} != "none" ]]; then |
50 |
@@ -109,13 +111,14 @@ pax-mark() { |
51 |
fi |
52 |
|
53 |
if has XT ${PAX_MARKINGS}; then |
54 |
- _pax_list_files einfo "$@" |
55 |
+ # Uncomment to list all files to be marked |
56 |
+ # _pax_list_files einfo "$@" |
57 |
flags="${flags//z}" |
58 |
for f in "$@"; do |
59 |
|
60 |
# First try paxctl-ng. |
61 |
if type -p paxctl-ng > /dev/null && paxctl-ng -l ; then |
62 |
- einfo "XT PaX marking -${flags} ${f} with paxctl-ng" |
63 |
+ einfo "XATTR_PAX marking -${flags} ${f} with paxctl-ng" |
64 |
[[ ${dodefault} == "yes" ]] && paxctl-ng -d "${f}" |
65 |
[[ "${flags}" ]] || continue |
66 |
paxctl-ng -l -${flags} "${f}" && continue |
67 |
@@ -124,7 +127,7 @@ pax-mark() { |
68 |
# Next try setfattr. |
69 |
if type -p setfattr > /dev/null; then |
70 |
[[ "${flags//[!Ee]}" ]] || flags+="e" # bug 447150 |
71 |
- einfo "XT PaX marking -${flags} ${f} with setfattr" |
72 |
+ einfo "XATTR_PAX marking -${flags} ${f} with setfattr" |
73 |
[[ ${dodefault} == "yes" ]] && setfattr -x "user.pax.flags" "${f}" |
74 |
setfattr -n "user.pax.flags" -v "${flags}" "${f}" && continue |
75 |
fi |