Lines 1058-1065
Link Here
|
1058 |
fi |
1058 |
fi |
1059 |
|
1059 |
|
1060 |
# TEXTREL's are baaaaaaaad |
1060 |
# TEXTREL's are baaaaaaaad |
1061 |
f=$(scanelf -qyRF '%t %p' "${D}") |
1061 |
# Allow devs to mark things as ignorable ... e.g. things that are |
1062 |
if [[ -n ${f} ]] ; then |
1062 |
# binary-only and upstream isn't cooperating (nvidia-glx) ... we |
|
|
1063 |
# allow ebuild authors to set QA_TEXTRELS_arch and QA_TEXTRELS ... |
1064 |
# the former overrides the latter ... regexes allowed ! :) |
1065 |
qa_var="QA_TEXTRELS_${ARCH}" |
1066 |
[[ -n ${!qa_var} ]] && QA_TEXTRELS=${!qa_var} |
1067 |
[[ -n ${QA_STRICT_TEXTRELS} ]] && QA_TEXTRELS="" |
1068 |
f="" |
1069 |
while read s; do |
1070 |
sf=( ${s} ) |
1071 |
for t in ${QA_TEXTRELS}; do |
1072 |
[[ ${sf[1]} =~ "^${t}$" ]] && continue 2 |
1073 |
done |
1074 |
f="${f}${s}\n" |
1075 |
done <<EOF |
1076 |
$(scanelf -qyRF '%t %p' "${D}" | grep -v ' usr/lib/debug/') |
1077 |
EOF |
1078 |
if [[ -n ${f[@]} ]] ; then |
1063 |
echo -ne '\a\n' |
1079 |
echo -ne '\a\n' |
1064 |
echo "QA Notice: the following files contain runtime text relocations" |
1080 |
echo "QA Notice: the following files contain runtime text relocations" |
1065 |
echo " Text relocations require a lot of extra work to be preformed by the" |
1081 |
echo " Text relocations require a lot of extra work to be preformed by the" |
Lines 1067-1088
Link Here
|
1067 |
echo " and might not function properly on other architectures hppa for example." |
1083 |
echo " and might not function properly on other architectures hppa for example." |
1068 |
echo " If you are a programmer please take a closer look at this package and" |
1084 |
echo " If you are a programmer please take a closer look at this package and" |
1069 |
echo " consider writing a patch which addresses this problem." |
1085 |
echo " consider writing a patch which addresses this problem." |
1070 |
echo "${f}" |
1086 |
printf "${f}" |
1071 |
echo -ne '\a\n' |
1087 |
echo -ne '\a\n' |
1072 |
[[ ${FEATURES/stricter} != "${FEATURES}" ]] \ |
1088 |
[[ ${FEATURES/stricter} != "${FEATURES}" ]] \ |
1073 |
&& die "Aborting due to textrels" |
1089 |
&& die "Aborting due to textrels" |
1074 |
sleep 1 |
1090 |
sleep 1 |
1075 |
fi |
1091 |
fi |
1076 |
|
1092 |
|
1077 |
# Check for files with executable stacks |
1093 |
# Also, executable stacks only matter on linux (and just glibc atm ...) |
1078 |
f=$(scanelf -qyRF '%e %p' "${D}") |
1094 |
case ${CTARGET:-${CHOST}} in |
|
|
1095 |
*-linux-gnu*) |
1096 |
# Check for files with executable stacks, but only on arches which |
1097 |
# are supported at the moment. Keep this list in sync with |
1098 |
# http://hardened.gentoo.org/gnu-stack.xml (Arch Status) |
1099 |
case ${CTARGET:-${CHOST}} in |
1100 |
i?86*|ia64*|m68k*|s390*|x86_64*) |
1101 |
# Allow devs to mark things as ignorable ... e.g. things |
1102 |
# that are binary-only and upstream isn't cooperating ... |
1103 |
# we allow ebuild authors to set QA_EXECSTACK_arch and |
1104 |
# QA_EXECSTACK ... the former overrides the latter ... |
1105 |
# regexes allowed ! :) |
1106 |
|
1107 |
qa_var="QA_EXECSTACK_${ARCH}" |
1108 |
[[ -n ${!qa_var} ]] && QA_EXECSTACK=${!qa_var} |
1109 |
[[ -n ${QA_STRICT_EXECSTACK} ]] && QA_EXECSTACK="" |
1110 |
f="" |
1111 |
while read s; do |
1112 |
sf=( ${s} ) |
1113 |
for e in ${QA_EXECSTACK}; do |
1114 |
[[ ${sf[3]} =~ "^${e}$" ]] && continue 2 |
1115 |
done |
1116 |
f="${f}${s}\n" |
1117 |
done <<EOF |
1118 |
$(scanelf -qyRF '%e %p' "${D}" | grep -v ' usr/lib/debug/') |
1119 |
EOF |
1120 |
;; |
1121 |
*) f="" ;; |
1122 |
esac |
1123 |
;; |
1124 |
esac |
1079 |
if [[ -n ${f} ]] ; then |
1125 |
if [[ -n ${f} ]] ; then |
1080 |
echo -ne '\a\n' |
1126 |
echo -ne '\a\n' |
1081 |
echo "QA Notice: the following files contain executable stacks" |
1127 |
echo "QA Notice: the following files contain executable stacks" |
1082 |
echo " Files with executable stacks will not work properly (or at all!)" |
1128 |
echo " Files with executable stacks will not work properly (or at all!)" |
1083 |
echo " on some architectures/operating systems. A bug should be filed" |
1129 |
echo " on some architectures/operating systems. A bug should be filed" |
1084 |
echo " at http://bugs.gentoo.org/ to make sure the file is fixed." |
1130 |
echo " at http://bugs.gentoo.org/ to make sure the file is fixed." |
1085 |
echo "${f}" |
1131 |
printf "${f}" |
1086 |
echo -ne '\a\n' |
1132 |
echo -ne '\a\n' |
1087 |
[[ ${FEATURES/stricter} != "${FEATURES}" ]] \ |
1133 |
[[ ${FEATURES/stricter} != "${FEATURES}" ]] \ |
1088 |
&& die "Aborting due to +x stack" |
1134 |
&& die "Aborting due to +x stack" |