Kaydet (Commit) f9272828 authored tarafından Bryan Quigley's avatar Bryan Quigley Kaydeden (comit) Michael Stahl

Remove last use of md5sum (in building)

Switch to using sha256sum for checking if files change.  Not for
security, just so we don't need to check for md5sum.

We also change the Windows installer to rely on the perm md5
digest instead of the environment variable.  The code to do this was
already in directory.pm

Change-Id: I24aed542c6201abf030fdd62116aec3f8ea3513b
Reviewed-on: https://gerrit.libreoffice.org/35140Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 29c066ee
......@@ -376,7 +376,6 @@ export MARIADB_LIBS=$(gb_SPACE)@MARIADB_LIBS@
export LIBMARIADB=@LIBMARIADB@
export LIBMARIADB_PATH=@LIBMARIADB_PATH@
export BUNDLE_MARIADB=@BUNDLE_MARIADB@
export MD5SUM=@MD5SUM@
export MDDS_CFLAGS=$(gb_SPACE)@MDDS_CFLAGS@
export MDDS_LIBS=$(gb_SPACE)@MDDS_LIBS@
export MERGELIBS=@MERGELIBS@
......
......@@ -11866,38 +11866,6 @@ fi
AC_SUBST(WGET)
AC_SUBST(CURL)
#
# check for md5sum
#
MD5SUM=
for i in md5 md5sum /usr/local/bin/md5sum gmd5sum /usr/sfw/bin/md5sum /opt/sfw/bin/gmd5sum /opt/local/bin/md5sum; do
if test "$i" = "md5"; then
eval "$i -x" > /dev/null 2>&1
else
eval "$i --version" > /dev/null 2>&1
fi
ret=$?
if test $ret -eq 0; then
MD5SUM=$i
break
fi
done
if test "$MD5SUM" = "md5"; then
if md5 -r < /dev/null > /dev/null 2>/dev/null; then
MD5SUM="$MD5SUM -r"
elif md5 -n < /dev/null > /dev/null 2>/dev/null; then
MD5SUM="$MD5SUM -n"
fi
fi
if test -z "$MD5SUM"; then
AC_MSG_ERROR([no md5sum found!])
fi
AC_SUBST(MD5SUM)
#
# check for sha256sum
#
......@@ -12694,12 +12662,12 @@ AC_SUBST(LO_PATH)
libo_FUZZ_SUMMARY
# Generate a configuration md5 we can use for deps
# Generate a configuration sha256 we can use for deps
if test -f config_host.mk; then
config_md5=`$MD5SUM config_host.mk | sed "s/ .*//"`
config_sha256=`$SHA256SUM config_host.mk | sed "s/ .*//"`
fi
if test -f config_host_lang.mk; then
config_lang_md5=`$MD5SUM config_host_lang.mk | sed "s/ .*//"`
config_lang_sha256=`$SHA256SUM config_host_lang.mk | sed "s/ .*//"`
fi
CFLAGS=$my_original_CFLAGS
......@@ -12757,7 +12725,7 @@ fi
# touch the config timestamp file
if test ! -f config_host.mk.stamp; then
echo > config_host.mk.stamp
elif test "$config_md5" = `$MD5SUM config_host.mk | sed "s/ .*//"`; then
elif test "$config_sha256" = `$SHA256SUM config_host.mk | sed "s/ .*//"`; then
echo "Host Configuration unchanged - avoiding scp2 stamp update"
else
echo > config_host.mk.stamp
......@@ -12766,7 +12734,7 @@ fi
# touch the config lang timestamp file
if test ! -f config_host_lang.mk.stamp; then
echo > config_host_lang.mk.stamp
elif test "$config_lang_md5" = `$MD5SUM config_host_lang.mk | sed "s/ .*//"`; then
elif test "$config_lang_sha256" = `$SHA256SUM config_host_lang.mk | sed "s/ .*//"`; then
echo "Language Configuration unchanged - avoiding scp2 stamp update"
else
echo > config_host_lang.mk.stamp
......
......@@ -466,8 +466,10 @@ sub run {
if (length($loglanguagestring) > $installer::globals::max_lang_length)
{
my $number_of_languages = installer::systemactions::get_number_of_langs($loglanguagestring);
chomp(my $shorter = `echo $loglanguagestring | $ENV{'MD5SUM'} | sed -e "s/ .*//g"`);
my $id = substr($shorter, 0, 8); # taking only the first 8 digits
#replace this in the same it was done in installer/windows/directory.pm
#chomp(my $shorter = `echo $loglanguagestring | $ENV{'MD5SUM'} | sed -e "s/ .*//g"`);
#my $id = substr($shorter, 0, 8); # taking only the first 8 digits
my $id = installer::windows::msiglobal::calculate_id($loglanguagestring, 8); # taking only the first 8 digits
$loglanguagestring = "lang_" . $number_of_languages . "_id_" . $id;
}
......
......@@ -25,6 +25,7 @@ use installer::exiter;
use installer::globals;
use installer::pathanalyzer;
use installer::remover;
use installer::windows::msiglobal;
######################################################
# Creating a new direcotory
......@@ -252,8 +253,10 @@ sub create_directories
if (length($languagestring) > $installer::globals::max_lang_length )
{
my $number_of_languages = get_number_of_langs($languagestring);
chomp(my $shorter = `echo $languagestring | $ENV{'MD5SUM'} | sed -e "s/ .*//g"`);
my $id = substr($shorter, 0, 8); # taking only the first 8 digits
#replace this in the same it was done in installer/windows/directory.pm
#chomp(my $shorter = `echo $languagestring | $ENV{'MD5SUM'} | sed -e "s/ .*//g"`);
#my $id = substr($shorter, 0, 8); # taking only the first 8 digits
my $id = installer::windows::msiglobal::calculate_id($languagestring, 8); # taking only the first 8 digits
$languagestring = "lang_" . $number_of_languages . "_id_" . $id;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment