]> code.ossystems Code Review - openembedded-core.git/commitdiff
rsync: Fix a file sorting determinism issue
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 21 Feb 2021 09:45:48 +0000 (09:45 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 23 Feb 2021 22:31:26 +0000 (22:31 +0000)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/rsync/files/determism.patch [new file with mode: 0644]
meta/recipes-devtools/rsync/rsync_3.2.3.bb

diff --git a/meta/recipes-devtools/rsync/files/determism.patch b/meta/recipes-devtools/rsync/files/determism.patch
new file mode 100644 (file)
index 0000000..53a4ca7
--- /dev/null
@@ -0,0 +1,28 @@
+The Makefile calls awk on a "*.c" glob. The results of this glob are sorted
+but the order depends on the locale settings, particularly whether
+"util.c" and "util2.c" sort before or after each other. In en_US.UTF-8
+they sort one way, in C, they sort the other. The sorting order changes 
+the output binaries. The behaviour also changes dependning on whether
+SHELL (/bin/sh) is dash or bash.
+
+Specify a C locale setting to be deterministic.
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Upstream-Status: Pending
+
+Index: rsync-3.2.3/Makefile.in
+===================================================================
+--- rsync-3.2.3.orig/Makefile.in
++++ rsync-3.2.3/Makefile.in
+@@ -26,6 +26,11 @@ MKDIR_P=@MKDIR_P@
+ VPATH=$(srcdir)
+ SHELL=/bin/sh
++# We use globbing in commands, need to be deterministic
++unexport LC_ALL
++LC_COLLATE=C
++export LC_COLLATE
++
+ .SUFFIXES:
+ .SUFFIXES: .c .o
index b7205e5bdef4a16702475b3dfb55c88958718cca..c08f93884f5e2f63a009a6c8596726f6d86f5b98 100644 (file)
@@ -12,6 +12,7 @@ DEPENDS = "popt"
 SRC_URI = "https://download.samba.org/pub/${BPN}/src/${BP}.tar.gz \
            file://rsyncd.conf \
            file://makefile-no-rebuild.patch \
+           file://determism.patch \
            "
 
 SRC_URI[sha256sum] = "becc3c504ceea499f4167a260040ccf4d9f2ef9499ad5683c179a697146ce50e"