comparison gnulib-tool @ 39897:ac60f423d63b

bootstrap, gnulib-tool: use https instead of insecure rsync The rsync command does not do any authentication and thus allows man-in-the-middle attacks. Better use wget over https, although this is slower. * build-aux/bootstrap (download_po_files, po_download_command_format): Don't try using rsync; always use wget over https to fetch PO files. * gnulib-tool (func_import): Likewise. * pygnulib/GLImport.py (GLImport.execute): Likewise.
author Benno Schulenberg <bensberg@telfort.nl>
date Sun, 07 Oct 2018 18:20:44 +0200
parents e04cf5381eec
children 647230feebc0
comparison
equal deleted inserted replaced
39896:b658dddc67fd 39897:ac60f423d63b
5429 fi 5429 fi
5430 func_append added_files "$pobase/POTFILES.in$nl" 5430 func_append added_files "$pobase/POTFILES.in$nl"
5431 fi 5431 fi
5432 # Fetch PO files. 5432 # Fetch PO files.
5433 TP_URL="https://translationproject.org/latest/" 5433 TP_URL="https://translationproject.org/latest/"
5434 TP_RSYNC_URI="translationproject.org::tp/latest/"
5435 if $doit; then 5434 if $doit; then
5436 echo "Fetching gnulib PO files from $TP_URL" 5435 echo "Fetching gnulib PO files from $TP_URL"
5437 (cd "$destdir"/$pobase \ 5436 (cd "$destdir"/$pobase \
5438 && { # Prefer rsync over wget if it is available, since it consumes 5437 && wget --no-verbose --mirror --level=1 -nd -A.po -P . "${TP_URL}gnulib/"
5439 # less network bandwidth, due to compression.
5440 if type rsync 2>/dev/null | grep / > /dev/null; then
5441 rsync --delete --include "*.po" --exclude "*" -Lrtz "${TP_RSYNC_URI}gnulib/" . && return
5442 fi
5443
5444 wget --no-verbose --mirror --level=1 -nd -A.po -P . "${TP_URL}gnulib/"
5445 }
5446 ) 5438 )
5447 else 5439 else
5448 echo "Fetch gnulib PO files from $TP_URL" 5440 echo "Fetch gnulib PO files from $TP_URL"
5449 fi 5441 fi
5450 # Create po/LINGUAS. 5442 # Create po/LINGUAS.