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

Collapse All | Expand All

(-)Mk/Scripts/qa.sh (-1 / +45 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
			# No results presents a blank line from heredoc.
845
			[ -z "${dep_file}" ] && continue
846
847
			if echo ${dep_file} | grep -qE "^(/usr/lib/libssl|/lib/libcrypto)\.so" > /dev/null; then
848
				base_libs="${base_libs} ${dep_file}"
849
			fi
850
			if echo ${dep_file} | grep -qE "^(${PREFIX}|${LOCALBASE})/lib/lib(ssl|crypto)\.so" > /dev/null; then
851
				port_libs="${port_libs} ${dep_file}"
852
			fi
853
		done <<-EOT
854
		$(LD_LIBRARY_PATH=${STAGEDIR}${PREFIX}/lib ldd "${STAGEDIR}${file}" | \
855
			grep '=>' | \
856
			awk '{print $3}')
857
		EOT
858
859
		if [ -n "${base_libs}" -a -n "${port_libs}" ]; then
860
			err "${file} is linked to both base and port SSL libraries: `echo ${base_libs}` and `echo ${port_libs}`"
861
			rc=1
862
		fi
863
	done <<-EOT
864
	$(list_stagedir_elfs | \
865
		file -F $'\1' -f - | \
866
		grep -a 'ELF.*FreeBSD.*dynamically linked' | \
867
		cut -f 1 -d $'\1'| \
868
		sed -e 's/^\.//')
869
	EOT
870
871
	return ${rc}
872
}
873
826
checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo"
874
checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo"
827
checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo"
875
checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo"
828
checks="$checks proxydeps sonames perlcore no_arch"
876
checks="$checks proxydeps sonames perlcore no_arch sslmix"
829
877
830
ret=0
878
ret=0
831
cd ${STAGEDIR}
879
cd ${STAGEDIR}

Return to bug 221134