summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rsync/files/determism.patch
blob: 53a4ca75058940a5532d324085660e12de770e5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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