View | Details | Raw Unified | Return to bug 221134 | Differences between
and this patch

Collapse All | Expand All

(-)Mk/Scripts/qa.sh (-1 / +42 lines)
Lines 822-831 Link Here
822
	return $rc
826
	return $rc
823
}
827
}
824
828
829
sslmix() {
830
	local file dep_file base_libs port_libs rc
825
831
832
	rc=0
833
834
	# Check all dynamicaly linked ELF files
835
	# Some .so are not executable, but we want to check them too.
836
	while read file; do
837
		# No results presents a blank line from heredoc.
838
		[ -z "${file}" ] && continue
839
840
		base_libs=""
841
		port_libs=""
842
843
		while read dep_file; do
844
			if echo ${dep_file} | grep -qE "^(/usr/lib/libssl|/lib/libcrypto)\.so" > /dev/null; then
845
				base_libs="${base_libs} ${dep_file}"
846
			fi
847
			if echo ${dep_file} | grep -qE "^(${PREFIX}|${LOCALBASE})/lib/lib(ssl|crypto)\.so" > /dev/null; then
848
				port_libs="${port_libs} ${dep_file}"
849
			fi
850
		done <<-EOT
851
		$(LD_LIBRARY_PATH=${STAGEDIR}${PREFIX}/lib ldd "${STAGEDIR}${file}" | \
852
			grep '=>' | \
853
			awk '{print $3}')
854
		EOT
855
856
		if [ -n "${base_libs}" -a -n "${port_libs}" ]; then
857
			err "${file} is linked to both base and port SSL libraries: `echo ${base_libs}` and `echo ${port_libs}`"
858
			rc=1
859
		fi
860
	done <<-EOT
861
	$(list_stagedir_elfs | \
862
		file -F $'\1' -f - | \
863
		grep -a 'ELF.*FreeBSD.*dynamically linked' | \
864
		cut -f 1 -d $'\1'| \
865
		sed -e 's/^\.//')
866
	EOT
867
868
	return ${rc}
869
}
870
826
checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo"
871
checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo"
827
checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo"
872
checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo"
828
checks="$checks proxydeps sonames perlcore no_arch"
873
checks="$checks proxydeps sonames perlcore no_arch sslmix"
829
874
830
ret=0
875
ret=0
831
cd ${STAGEDIR}
876
cd ${STAGEDIR}

Return to bug 221134