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.
This commit is contained in:
Maxim Cournoyer 2023-02-22 11:36:02 -05:00
parent 31735e0ccf
commit 5e7b0a7735
No known key found for this signature in database
GPG Key ID: 1260E46482E63562

View File

@ -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)