Lines 177-187
Link Here
|
177 |
err "Bad symlink '${l#${STAGEDIR}${PREFIX}/}' pointing inside the stage directory" |
177 |
err "Bad symlink '${l#${STAGEDIR}${PREFIX}/}' pointing inside the stage directory" |
178 |
rc=1 |
178 |
rc=1 |
179 |
;; |
179 |
;; |
180 |
/*) |
180 |
${PREFIX}/*) |
181 |
# Only warn for symlinks within the package. |
181 |
# Only warn for symlinks within the package. |
182 |
if [ -e "${STAGEDIR}${link}" ]; then |
182 |
if [ -e "${STAGEDIR}${link}" ]; then |
183 |
warn "Bad symlink '${l#${STAGEDIR}}' pointing to an absolute pathname '${link}'" |
183 |
warn "Bad symlink '${l#${STAGEDIR}}' pointing to an absolute pathname '${link}'" |
|
|
184 |
warn "Use a relative symlink pathname instead" |
184 |
fi |
185 |
fi |
|
|
186 |
# Don't stop here, continue with next check. |
187 |
;& |
188 |
/*) |
185 |
# Also warn if the symlink exists nowhere. |
189 |
# Also warn if the symlink exists nowhere. |
186 |
if [ ! -e "${STAGEDIR}${link}" -a ! -e "${link}" ]; then |
190 |
if [ ! -e "${STAGEDIR}${link}" -a ! -e "${link}" ]; then |
187 |
warn "Symlink '${l#${STAGEDIR}}' pointing to '${link}' which does not exist in the stage directory or in localbase" |
191 |
warn "Symlink '${l#${STAGEDIR}}' pointing to '${link}' which does not exist in the stage directory or in localbase" |
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} |