Skip to content

Commit 73cd674

Browse files
committed
Use LC_ALL=C for filename sorting in make-sqlite.
Sorting is necessary for deterministic builds. Per https://trac.torproject.org/projects/tor/ticket/11630#comment:19, gk's build machine doesn't have the UTF-8 locale. Since the locale doesn't determine output encoding, only sorting, and all that matters is that the sort order is deterministic, LC_ALL=C is fine, and more likely to be present on any given machine.
1 parent d324c10 commit 73cd674

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/make-sqlite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# This is important for deterministic builds.
1717
# https://trac.torproject.org/projects/tor/ticket/11630#comment:20
1818
# It's also helpful to ensure consistency for the lowercase check below.
19-
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
19+
locale.setlocale(locale.LC_ALL, 'C')
2020

2121
conn = sqlite3.connect(os.path.join(os.path.dirname(__file__), '../src/defaults/rulesets.sqlite'))
2222
c = conn.cursor()

0 commit comments

Comments
 (0)