build-system
build-system copied to clipboard
albs-sign-node: albs-sign-node uses English locale explicitly but glibc-langpack-en is not installed in container
albs-sign-node sets LANG=en_US.UTF-8
, LC_ALL=en_US.UTF-8
.
https://github.com/AlmaLinux/albs-sign-node/blob/5a204601e9de0c8686a9dbbfc4b5bf85517d696b/sign_node/package_sign.py#L53
However, locale for en_US must be installed to use en_US.UTF_8. Signing will fail with the following error if the locale is not installed.
24.02.19 04:29:11 ERROR [MainThread]: The RPM signing command is failed with 8 exit code.
Command: /bin/bash -c "rpmsign --rpmv3 --resign -D '_gpg_name 6AC72865464F4569' /srv/alternatives/sign_node/2/rpms/58/bzip2-1.0.8-8.el9.src.rpm /srv/alternatives/sign_node/2/rpms/59/bzip2-devel-1.0.8-8.el9.x86_64.rpm /srv/alternatives/sign_node/2/rpms/60/bzip2-static-1.0.8-8.el9.x86_64.rpm /srv/alternatives/sign_node/2/rpms/61/bzip2-1.0.8-8.el9.x86_64.rpm /srv/alternatives/sign_node/2/rpms/62/bzip2-libs-1.0.8-8.el9.x86_64.rpm /srv/alternatives/sign_node/2/rpms/63/bzip2-debugsource-1.0.8-8.el9.x86_64.rpm /srv/alternatives/sign_node/2/rpms/64/bzip2-libs-debuginfo-1.0.8-8.el9.x86_64.rpm /srv/alternatives/sign_node/2/rpms/65/bzip2-debuginfo-1.0.8-8.el9.x86_64.rpm"
Output:
b'/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/srv/alternatives/sign_node/2/rpms/58/bzip2-1.0.8-8.el9.src.rpm:
gpg: signing failed: Required environment variable not set
gpg: signing failed: Required environment variable not set
error: gpg exec failed (2)
I'm not sure this issue is related to missing locales, LC_ALL
should be fine AFAIK, isn't it?
The problem is LANG
LC_ALL
is set to en_US.UTF-8
although English locale glibc-langpack-en
is not installed. en_US.*
requires glibc-langpack-en
.
See: https://github.com/AlmaLinux/albs-sign-node/pull/57#issuecomment-1953733552