From 5e7b0a7735d9956ee8b8c3763e4ce05e2855606f Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 22 Feb 2023 11:36:02 -0500 Subject: [PATCH] pack: Add UTF-8 locales to RPM pack builder. It's necessary as 'generate-header' call ends up calling 'find-files', which could fail to read file names containing non-ascii characters, as spotted in the wild: building /gnu/store/...-jami-rpm-pack.rpm.drv... find-files: ./gnu/store/...-nss-certs-3.81/etc/ssl/certs/NetLock_Arany_=Class_Gold=_F??tan??s??tv??ny.pem: No such file or directory * guix/scripts/pack.scm (rpm-archive): Expand set-utf8-locale helper in the builder gexp. --- guix/scripts/pack.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 701e41ff1a..51a7b8f185 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -945,6 +945,9 @@ PREUN-FILE and POSTUN-FILE can be provided via EXTRA-OPTIONS." (rnrs bytevectors) (srfi srfi-1)) + ;; Make sure non-ASCII file names are properly handled. + #+(set-utf8-locale profile) + (define machine-type (and=> (or #$target %host-type) (lambda (triplet)