On 2020-11-23 12:22:46, Joey Hess wrote:
> Package: etckeeper
> Version: 1.18.15
> Severity: normal
>
> +if [ -z "en_GB.UTF-8" ]; then
> + # Default to UTF8 encoding, if unset
> + export LANG=C.UTF-8
> +fi
>
> I'm fairly sure it's impossible for this part of the debian patch to do
> anything..
Inded. It looks like this patch comes from Ubuntu. It was submitted in
#928177. It looks like someone (with a en_GB locale, I should add) hosed
the patch on merge... I committed the patch to git, but it was a merge
of the 1.18.10-1.1 NMU, done by Mattia back in October.
It seems like the fix is to do:
if [ -z "$LANG" ]; then
instead. The original patch follows.
Thanks for looking at the Debian patchset! :)
>From 10d74939aeff32d6638b905ec248ccd6f37fe512 Mon Sep 17 00:00:00 2001
From: Dimitri John Ledkov <[email protected]>
Date: Mon, 29 Apr 2019 14:11:51 +0100
Subject: [PATCH 2/3] Default to UTF8 encoding, for consistent ordering
---
debian/changelog | 1 +
etckeeper | 4 ++++
pre-commit.d/30store-metadata | 2 +-
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 9457eb2..01aa03a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
etckeeper (1.18.11) UNRELEASED; urgency=medium
* Add breezy python3 plugin
+ * Default to UTF8 encoding, for consistent ordering
-- Dimitri John Ledkov <[email protected]> Mon, 29 Apr 2019 14:04:46 +0100
diff --git a/etckeeper b/etckeeper
index 73b6a1f..e1be2e6 100755
--- a/etckeeper
+++ b/etckeeper
@@ -54,6 +54,10 @@ fi
if [ ! -z "$AVOID_SPECIAL_FILE_WARNING" ]; then
export AVOID_SPECIAL_FILE_WARNING
fi
+if [ -z "$LANG" ]; then
+ # Default to UTF8 encoding, if unset
+ export LANG=C.UTF-8
+fi
if [ ! -z "$PUSH_REMOTE" ]; then
export PUSH_REMOTE
diff --git a/pre-commit.d/30store-metadata b/pre-commit.d/30store-metadata
index ce014d1..e070bce 100755
--- a/pre-commit.d/30store-metadata
+++ b/pre-commit.d/30store-metadata
@@ -2,7 +2,7 @@
set -e
# Make sure sort always sorts in same order.
-LANG=C
+LANG=C.UTF-8
export LANG
filter_ignore() {