#7962 reconfigure koji builders to use LANG=C.UTF-8
Closed: Fixed 3 years ago by kevin. Opened 3 years ago by zbyszek.

Every Perl package build spits a warning like this:

perl: warning: Setting locale failed.                                                                                            
perl: warning: Please check that your locale settings:                                                                           
        LANGUAGE = (unset),                                                                                                      
        LC_ALL = (unset),                                                                                                        
        LANG = "en_US.UTF-8"                                                                                                     
    are supported and installed on your system.                                                                                  

Example
https://kojipkgs.fedoraproject.org//packages/perl-Task-Kensho-Async/0.40/1.fc30/data/logs/noarch/build.log.

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/NZTYZ7RQW5XXRXJN7IXUVPPG3BF56WUN/


Note that is is for ages resolved in recent Mock versions.
If you want to set it for the 1.3.4 version which Fedora Koji is using, then this should be enough:

config_opts['environment']['LANG'] = os.environ.setdefault('LANG', 'C.UTF-8')

Right. That is tracked in #6967. If mock is upgraded, this issue should go away too.

Can someone please look at fixing copr too?

Can someone please look at fixing copr too?

This is not an issue in Copr as Copr use Mock 1.4.x, which already set the LANG variable to C.UTF-8

So, all builders (except armv7) are moved to new mock, but it did not change the LANG to C.UTF-8. :(

So I also tried adding 'config_opts['environment']['LANG'] = os.environ.setdefault('LANG', 'C.UTF-8')'

But I see still:

DEBUG util.py:579:  Executing command: ['/bin/mount', '-n', '-t', 'proc', 'proc', '/var/lib/mock/f30-build-14822514-1054430/root/proc'] with env {'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG util.py:634:  Child return code was: 0
DEBUG util.py:116:  ensuring that dir exists: /var/lib/mock/f30-build-14822514-1054430/root/sys
DEBUG util.py:653:  child environment: None
DEBUG util.py:579:  Executing command: ['/bin/mount', '-n', '-t', 'sysfs', 'sysfs', '/var/lib/mock/f30-build-14822514-1054430/root/sys'] with env {'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG util.py:634:  Child return code was: 0
DEBUG util.py:116:  ensuring that dir exists: /var/lib/mock/f30-build-14822514-1054430/root/dev/shm
DEBUG util.py:653:  child environment: None
DEBUG util.py:579:  Executing command: ['/bin/mount', '-n', '-t', 'tmpfs', 'tmpfs', '/var/lib/mock/f30-build-14822514-1054430/root/dev/shm'] with env {'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG util.py:634:  Child return code was: 0
DEBUG util.py:116:  ensuring that dir exists: /var/lib/mock/f30-build-14822514-1054430/root/dev/pts
DEBUG util.py:653:  child environment: None
DEBUG util.py:579:  Executing command: ['/bin/mount', '-n', '-t', 'devpts', '-o', 'gid=5,mode=0620,ptmxmode=0666,newinstance', 'devpts', '/var/lib/mock/f30-build-14822514-1054430/root/dev/pts'] with env {'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG util.py:634:  Child return code was: 0
DEBUG util.py:116:  ensuring that dir exists: /var/lib/mock/f30-build-14822514-1054430/root/proc/filesystems
DEBUG util.py:653:  child environment: None
DEBUG util.py:579:  Executing command: ['/bin/mount', '-n', '--bind', '/tmp/mock-selinux-plugin.j3u31ktt', '/var/lib/mock/f30-build-14822514-1054430/root/proc/filesystems'] with env {'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG util.py:634:  Child return code was: 0
DEBUG buildroot.py:143:  rootdir = /var/lib/mock/f30-build-14822514-1054430/root
DEBUG buildroot.py:144:  resultdir = /var/lib/mock/f30-build-14822514-1054430/result
DEBUG util.py:116:  ensuring that dir exists: /var/lib/mock/f30-build-14822514-1054430/root/etc/pki/mock
DEBUG util.py:119:  creating dir: /var/lib/mock/f30-build-14822514-1054430/root/etc/pki/mock
DEBUG util.py:116:  ensuring that dir exists: /var/lib/mock/f30-build-14822514-1054430/root/etc/dnf
DEBUG util.py:116:  ensuring that dir exists: /var/lib/mock/f30-build-14822514-1054430/root/etc
DEBUG package_manager.py:118:  ['/usr/bin/dnf', '--installroot', '/var/lib/mock/f30-build-14822514-1054430/root/', '--setopt=install_weak_deps=0', 'groupinstall', 'build']
DEBUG util.py:653:  child environment: None
DEBUG util.py:579:  Executing command: ['/usr/bin/dnf', '--installroot', '/var/lib/mock/f30-build-14822514-1054430/root/', '--setopt=install_weak_deps=0', 'groupinstall', 'build', '--setopt=tsflags=nocontexts'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8', 

I don't know if thats koji or mock isn't configured quite right. Further investigation will be required...

config_opts['environment']['LANG'] = os.environ.setdefault('LANG', 'C.UTF-8') only has an effect if the host's environment has $LANG not set. I assume you need to replace that with config_opts['environment']['LANG'] = 'C.UTF-8'.

Good point. I will try that.

I think this is done now.

Please reopen if you still see anything missing.

:doughnut:

Metadata Update from @kevin:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata