Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 131779 | Differences between
and this patch

Collapse All | Expand All

(-)misc-functions.sh.orig (-18 / +22 lines)
Lines 88-101 Link Here
88
		qa_var="QA_TEXTRELS_${ARCH}"
88
		qa_var="QA_TEXTRELS_${ARCH}"
89
		[[ -n ${!qa_var} ]] && QA_TEXTRELS=${!qa_var}
89
		[[ -n ${!qa_var} ]] && QA_TEXTRELS=${!qa_var}
90
		[[ -n ${QA_STRICT_TEXTRELS} ]] && QA_TEXTRELS=""
90
		[[ -n ${QA_STRICT_TEXTRELS} ]] && QA_TEXTRELS=""
91
		f=$(scanelf -qyRF '%t %p' "${D}" | grep -v ' usr/lib/debug/' | \
91
		f=""
92
			gawk '
92
		while read s; do
93
			BEGIN { split("'"${QA_TEXTRELS}"'", ignore); }
93
			sf=( ${s} )
94
			{	for (idx in ignore)
94
			for t in ${QA_TEXTRELS}; do
95
					if ($NF ~ "^"ignore[idx]"$")
95
				[[ ${sf[1]} =~ "^${t}$" ]] && continue 2
96
					next;
96
			done
97
				print;
97
			f="${f}${s}\n"
98
			}')
98
		done <<EOF
99
$(scanelf -qyRF '%t %p' "${D}" | grep -v ' usr/lib/debug/')
100
EOF
99
		if [[ -n ${f} ]] ; then
101
		if [[ -n ${f} ]] ; then
100
			scanelf -qyRF '%T %p' "${PORTAGE_BUILDDIR}"/ &> "${T}"/scanelf-textrel.log
102
			scanelf -qyRF '%T %p' "${PORTAGE_BUILDDIR}"/ &> "${T}"/scanelf-textrel.log
101
			echo -ne '\a\n'
103
			echo -ne '\a\n'
Lines 107-113 Link Here
107
			echo " For more information, see http://hardened.gentoo.org/pic-fix-guide.xml"
109
			echo " For more information, see http://hardened.gentoo.org/pic-fix-guide.xml"
108
			echo " Please include this file in your report:"
110
			echo " Please include this file in your report:"
109
			echo " ${T}/scanelf-textrel.log"
111
			echo " ${T}/scanelf-textrel.log"
110
			echo "${f}"
112
			printf "${f}"
111
			echo -ne '\a\n'
113
			echo -ne '\a\n'
112
			die_msg="${die_msg} textrels,"
114
			die_msg="${die_msg} textrels,"
113
			sleep 1
115
			sleep 1
Lines 130-143 Link Here
130
					qa_var="QA_EXECSTACK_${ARCH}"
132
					qa_var="QA_EXECSTACK_${ARCH}"
131
					[[ -n ${!qa_var} ]] && QA_EXECSTACK=${!qa_var}
133
					[[ -n ${!qa_var} ]] && QA_EXECSTACK=${!qa_var}
132
					[[ -n ${QA_STRICT_EXECSTACK} ]] && QA_EXECSTACK=""
134
					[[ -n ${QA_STRICT_EXECSTACK} ]] && QA_EXECSTACK=""
133
					f=$(scanelf -qyRF '%e %p' "${D}" | grep -v ' usr/lib/debug/' | \
135
					f=""
134
						gawk '
136
					while read s; do
135
						BEGIN { split("'"${QA_EXECSTACK}"'", ignore); }
137
						sf=( ${s} )
136
						{	for (idx in ignore)
138
						for e in ${QA_EXECSTACK}; do
137
								if ($NF ~ "^"ignore[idx]"$")
139
							[[ ${sf[3]} =~ "^${e}$" ]] && continue 2
138
									next;
140
						done
139
							print;
141
						f="${f}${s}\n"
140
						}')
142
					done <<EOF
143
$(scanelf -qyRF '%e %p' "${D}" | grep -v ' usr/lib/debug/')
144
EOF
141
					;;
145
					;;
142
				*)	f="" ;;
146
				*)	f="" ;;
143
			esac
147
			esac
Lines 154-160 Link Here
154
			echo " For more information, see http://hardened.gentoo.org/gnu-stack.xml"
158
			echo " For more information, see http://hardened.gentoo.org/gnu-stack.xml"
155
			echo " Please include this file in your report:"
159
			echo " Please include this file in your report:"
156
			echo " ${T}/scanelf-execstack.log"
160
			echo " ${T}/scanelf-execstack.log"
157
			echo "${f}"
161
			printf "${f}"
158
			echo -ne '\a\n'
162
			echo -ne '\a\n'
159
			die_msg="${die_msg} execstacks"
163
			die_msg="${die_msg} execstacks"
160
			sleep 1
164
			sleep 1

Return to bug 131779