local shopts=$(shopt) OLDIFS="$IFS"
source "$@" || return 1
[[ $shopts != $(shopt) ]] &&
- vecho "QA Notice: Global shell options were changed and not restored while sourcing $1"
+ eqawarn "QA Notice: Global shell options changed and were not restored while sourcing '$*'"
[[ "$IFS" != "$OLDIFS" ]] &&
- vecho "QA Notice: IFS was changed and not reset while sourcing $1"
+ eqawarn "QA Notice: Global IFS changed and was not restored while sourcing '$*'"
return 0
}
local shopts=$(shopt) OLDIFS="$IFS"
"$@" || return 1
[[ $shopts != $(shopt) ]] &&
- vecho "QA Notice: Global shell options were changed while calling $1"
+ eqawarn "QA Notice: Global shell options changed and were not restored while calling '$*'"
[[ "$IFS" != "$OLDIFS" ]] &&
- vecho "QA Notice: IFS was changed and not reset while calling $1"
+ eqawarn "QA Notice: Global IFS changed and was not restored while calling '$*'"
return 0
}
source "${PORTAGE_BIN_PATH}/isolated-functions.sh" &>/dev/null
-case "${NOCOLOR:-false}" in
- yes|true)
- unset_colors
- ;;
- no|false)
- set_colors
- ;;
-esac
-
[[ $PORTAGE_QUIET != "" ]] && export PORTAGE_QUIET
# the sandbox is disabled by default except when overridden in the relevant stages
# Make sure we have this USE flag in IUSE
if ! hasq "${u}" ${IUSE} ${E_IUSE} && ! hasq "${u}" ${PORTAGE_ARCHLIST} selinux; then
- vecho "QA Notice: USE Flag '${u}' not in IUSE for ${CATEGORY}/${PF}" >&2
+ eqawarn "QA Notice: USE Flag '${u}' not in IUSE for ${CATEGORY}/${PF}"
fi
if hasq ${u} ${USE} ; then
# false alarms due to INHERITED in /var/db/pkg being outdated
# in comparison the the eclasses from the portage tree.
if ! hasq $ECLASS $INHERITED; then
- vecho
- vecho "QA Notice: ECLASS '$ECLASS' inherited illegally in $CATEGORY/$PF" >&2
- vecho
+ eqawarn "QA Notice: ECLASS '$ECLASS' inherited illegally in $CATEGORY/$PF"
fi
fi
BODY="${BIN_PATH} \"\$@\"; return \$?"
fi
FUNC_SRC="${BIN}() {
- vecho -n \"QA Notice: ${BIN} in global scope: \" >&2
if [ \$ECLASS_DEPTH -gt 0 ]; then
- vecho \"eclass \${ECLASS}\" >&2
+ eqawarn \"QA Notice: '${BIN}' called in global scope: eclass \${ECLASS}\"
else
- vecho \"\${CATEGORY}/\${PF}\" >&2
+ eqawarn \"QA Notice: '${BIN}' called in global scope: \${CATEGORY}/\${PF}\"
fi
${BODY}
}";
f=$(scanelf -qyRF '%r %p' "${D}" | grep -E "(${PORTAGE_BUILDDIR}|: |::|^:|^ )")
if [[ -n ${f} ]] ; then
vecho -ne '\a\n'
- vecho "QA Notice: the following files contain insecure RUNPATH's"
- vecho " Please file a bug about this at http://bugs.gentoo.org/"
- vecho " with the maintaining herd of the package."
- vecho "${f}"
+ eqawarn "QA Notice: The following files contain insecure RUNPATH's"
+ eqawarn " Please file a bug about this at http://bugs.gentoo.org/"
+ eqawarn " with the maintaining herd of the package."
+ eqawarn "${f}"
vecho -ne '\a\n'
if has stricter ${FEATURES} ; then
insecure_rpath=1
f=$(scanelf -qyRF '%b %p' "${D}")
if [[ -n ${f} ]] ; then
vecho -ne '\a\n'
- vecho "QA Notice: the following files are setXid, dyn linked, and using lazy bindings"
- vecho " This combination is generally discouraged. Try re-emerging the package:"
- vecho " LDFLAGS='-Wl,-z,now' emerge ${PN}"
- vecho "${f}"
+ eqawarn "QA Notice: The following files are setXid, dyn linked, and using lazy bindings"
+ eqawarn " This combination is generally discouraged. Try re-emerging the package:"
+ eqawarn " LDFLAGS='-Wl,-z,now' emerge ${PN}"
+ eqawarn "${f}"
vecho -ne '\a\n'
# Do not fail here until we have sorted out the lazy issues with security team
#die_msg="${die_msg} setXid lazy bindings,"
if [[ -n ${f} ]] ; then
scanelf -qyRF '%T %p' "${PORTAGE_BUILDDIR}"/ &> "${T}"/scanelf-textrel.log
vecho -ne '\a\n'
- vecho "QA Notice: the following files contain runtime text relocations"
- vecho " Text relocations force the dynamic linker to perform extra"
- vecho " work at startup, waste system resources, and may pose a security"
- vecho " risk. On some architectures, the code may not even function"
- vecho " properly, if at all."
- vecho " For more information, see http://hardened.gentoo.org/pic-fix-guide.xml"
- vecho " Please include this file in your report:"
- vecho " ${T}/scanelf-textrel.log"
- vecho "${f}"
+ eqawarn "QA Notice: The following files contain runtime text relocations"
+ eqawarn " Text relocations force the dynamic linker to perform extra"
+ eqawarn " work at startup, waste system resources, and may pose a security"
+ eqawarn " risk. On some architectures, the code may not even function"
+ eqawarn " properly, if at all."
+ eqawarn " For more information, see http://hardened.gentoo.org/pic-fix-guide.xml"
+ eqawarn " Please include this file in your report:"
+ eqawarn " ${T}/scanelf-textrel.log"
+ eqawarn "${f}"
vecho -ne '\a\n'
die_msg="${die_msg} textrels,"
sleep 1
# One more pass to help devs track down the source
scanelf -qyRF '%e %p' "${PORTAGE_BUILDDIR}"/ &> "${T}"/scanelf-execstack.log
vecho -ne '\a\n'
- vecho "QA Notice: the following files contain executable stacks"
- vecho " Files with executable stacks will not work properly (or at all!)"
- vecho " on some architectures/operating systems. A bug should be filed"
- vecho " at http://bugs.gentoo.org/ to make sure the file is fixed."
- vecho " For more information, see http://hardened.gentoo.org/gnu-stack.xml"
- vecho " Please include this file in your report:"
- vecho " ${T}/scanelf-execstack.log"
- vecho "${f}"
+ eqawarn "QA Notice: The following files contain executable stacks"
+ eqawarn " Files with executable stacks will not work properly (or at all!)"
+ eqawarn " on some architectures/operating systems. A bug should be filed"
+ eqawarn " at http://bugs.gentoo.org/ to make sure the file is fixed."
+ eqawarn " For more information, see http://hardened.gentoo.org/gnu-stack.xml"
+ eqawarn " Please include this file in your report:"
+ eqawarn " ${T}/scanelf-execstack.log"
+ eqawarn "${f}"
vecho -ne '\a\n'
die_msg="${die_msg} execstacks"
sleep 1
f=$(scanelf -ByF '%S %p' "${d}"/lib*.so* | gawk '$2 == "" { print }')
if [[ -n ${f} ]] ; then
vecho -ne '\a\n'
- vecho "QA Notice: the following shared libraries lack a SONAME"
- vecho "${f}"
+ eqawarn "QA Notice: The following shared libraries lack a SONAME"
+ eqawarn "${f}"
vecho -ne '\a\n'
sleep 1
fi
f=$(scanelf -ByF '%n %p' "${d}"/lib*.so* | gawk '$2 == "" { print }')
if [[ -n ${f} ]] ; then
vecho -ne '\a\n'
- vecho "QA Notice: the following shared libraries lack NEEDED entries"
- vecho "${f}"
+ eqawarn "QA Notice: The following shared libraries lack NEEDED entries"
+ eqawarn "${f}"
vecho -ne '\a\n'
sleep 1
fi
if [[ -d ${D}/${D} ]] ; then
declare -i INSTALLTOD=0
for i in $(find "${D}/${D}/"); do
- echo "QA Notice: /${i##${D}/${D}} installed in \${D}/\${D}"
+ eqawarn "QA Notice: /${i##${D}/${D}} installed in \${D}/\${D}"
((INSTALLTOD++))
done
die "Aborting due to QA concerns: ${INSTALLTOD} files installed in ${D}/${D}"
linkdest=$(readlink "${j}")
if [[ ${linkdest} == /* ]] ; then
vecho -ne '\a\n'
- vecho "QA Notice: Found an absolute symlink in a library directory:"
- vecho " ${j#${D}} -> ${linkdest}"
- vecho " It should be a relative symlink if in the same directory"
- vecho " or a linker script if it crosses the /usr boundary."
+ eqawarn "QA Notice: Found an absolute symlink in a library directory:"
+ eqawarn " ${j#${D}} -> ${linkdest}"
+ eqawarn " It should be a relative symlink if in the same directory"
+ eqawarn " or a linker script if it crosses the /usr boundary."
fi
continue
fi
s=${s%usr/*}${s##*/usr/}
if [[ -e ${s} ]] ; then
vecho -ne '\a\n'
- vecho "QA Notice: missing gen_usr_ldscript for ${s##*/}"
+ eqawarn "QA Notice: Missing gen_usr_ldscript for ${s##*/}"
abort="yes"
fi
fi
f=$(ls "${D}"lib*/*.{a,la} 2>/dev/null)
if [[ -n ${f} ]] ; then
vecho -ne '\a\n'
- vecho "QA Notice: excessive files found in the / partition"
- vecho "${f}"
+ eqawarn "QA Notice: Excessive files found in the / partition"
+ eqawarn "${f}"
vecho -ne '\a\n'
die "static archives (*.a) and libtool library files (*.la) do not belong in /"
fi
s=${a##*/}
if grep -qs "${D}" "${a}" ; then
vecho -ne '\a\n'
- vecho "QA Notice: ${s} appears to contain PORTAGE_TMPDIR paths"
+ eqawarn "QA Notice: ${s} appears to contain PORTAGE_TMPDIR paths"
abort="yes"
fi
done
f=$(LC_ALL=C grep "${m}" "${PORTAGE_LOG_FILE}")
if [[ -n ${f} ]] ; then
vecho -ne '\a\n'
- vecho "QA Notice: Package has poor programming practices which may compile"
- vecho " fine but exhibit random runtime failures."
- vecho "${f}"
+ eqawarn "QA Notice: Package has poor programming practices which may compile"
+ eqawarn " fine but exhibit random runtime failures."
+ eqawarn "${f}"
vecho -ne '\a\n'
abort="yes"
fi
f=$(cat "${PORTAGE_LOG_FILE}" | check-implicit-pointer-usage.py)
if [[ -n ${f} ]] ; then
vecho -ne '\a\n'
- vecho "QA Notice: Package has poor programming practices which may compile"
- vecho " but will almost certainly crash on 64bit architectures."
- vecho "${f}"
+ eqawarn "QA Notice: Package has poor programming practices which may compile"
+ eqawarn " but will almost certainly crash on 64bit architectures."
+ eqawarn "${f}"
vecho -ne '\a\n'
abort="yes"
fi