[Buildroot] [git commit branch/2025.02.x] support/download/svn: use 'svn info' whith LC_ALL=C

Arnout Vandecappelle arnout at rnout.be
Tue Apr 8 07:06:51 UTC 2025


commit: https://git.buildroot.net/buildroot/commit/?id=81da9920631c6b99b8a211ee7d27bd5f97a21029
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2025.02.x

Use the 'C' locale when retrieving the date of the last change using
'svn info' since the svn download helper script expect
"Last Changed Date" string.

If another locale is used, the 'date' is empty so the generated
archive (by mk_tar_gz) will not match the expected hash since
the file timestamp is not set properly.

If LANG=fr_FR.UTF-8 is defined in the host system, svn print some
"French encrypted" text:

  eval svn --non-interactive --config-option servers:global:http-timeout=10 info ''\''https://svn.code.sf.net/p/xmlrpc-c/code/advanced@r3176'\'''
  ...
  Date de la dernière modification: 2023-09-02 19:13:35 +0200 (sam. 02 sept. 2023)

diffoscope confirm that the file timestamp is not set correctly
in the generated archive:

$ diffoscope NOK/libxmlrpc-r3176-svn5.tar.gz OK/libxmlrpc-r3176-svn5.tar.gz

Signed-off-by: Julien Olivain <ju.o at free.fr>
(cherry picked from commit 8d3b1781f639c174de3b09e292179f6f81da61f1)
Signed-off-by: Thomas Perale <thomas.perale at mind.be>
---
 support/download/svn | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/download/svn b/support/download/svn
index ff33f1fa39..576fd48303 100755
--- a/support/download/svn
+++ b/support/download/svn
@@ -81,7 +81,7 @@ done
 # In case there is a redirection (e.g. http -> https), just keep the
 # last line (svn outputs everything on stdout)
 # shellcheck disable=SC2086 # creds may be empty
-date="$( _plain_svn info ${creds} "'${uri}@${rev}'" \
+date="$( LC_ALL=C _plain_svn info ${creds} "'${uri}@${rev}'" \
         |sed -r -e '/^Last Changed Date: /!d; s///'
        )"
 


More information about the buildroot mailing list