Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ENV LC_ALL|LANG=C.UTF-8 #75

Merged
merged 1 commit into from
Aug 8, 2019
Merged

Conversation

kaspar030
Copy link
Contributor

@kaspar030 kaspar030 commented Jul 11, 2019

This somewhat ensures a consistent utf-8 configuration.

Without any LANG or LC_ALL setting, Linux systems default to the C locale. This breaks many utf8 applications. Most notably, python is much more sane when running in utf8 locales.

(See #73 , RIOT-OS/RIOT#11691)

This somewhat ensures a consistent utf-8 configuration.
@kaspar030
Copy link
Contributor Author

@cladmi like this?

@cladmi
Copy link
Contributor

cladmi commented Jul 11, 2019

Oh, python3-pyserial is supposed to be there already ?
I think there is something wrong as the image is outdated upstream https://hub.docker.com/r/riot/riotbuild

@cladmi
Copy link
Contributor

cladmi commented Jul 11, 2019

I test building it locally and see if it works.

@cladmi
Copy link
Contributor

cladmi commented Jul 11, 2019

#19

@cladmi
Copy link
Contributor

cladmi commented Jul 11, 2019

This fixes this test RIOT-OS/RIOT#11691 (comment) (after removing the pyserial install).

DOCKER_IMAGE=riot/locale:latest DOCKER_FLAGS='--rm --privileged -i --group-add plugdev --group-add dialout --device=$(PORT)' BUILD_IN_DOCKER=1 DOCKER="sudo docker" BOARD=samr21-xpro make -C tests/lua_loader/ test

I could run it with native with the --privileged option.

DOCKER_IMAGE=riot/locale:latest DOCKER_FLAGS='--rm --privileged' BUILD_IN_DOCKER=1 DOCKER="sudo docker" BOARD=native make -C tests/lua_loader/ all test
...
/data/riotbuild/riotbase/tests/lua_loader/bin/native/tests_lua_loader.elf                                                                                                                                                                                                                 
RIOT native interrupts/signals initialized.                                                                                                                                                                                                                                               
LED_RED_OFF                                                                                                                                                                                                                                                                               
LED_GREEN_ON                                                                                                                                                                                                                                                                              
RIOT native board initialized.                                                                                                                                                                                                                                                            
RIOT native hardware initialization complete.                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                                          
main(): This is RIOT! (Version: 2019.10-devel-25-g6b094)                                                                                                                                                                                                                                  
I am a module, hi!                                                                                                                                                                                                                                                                        
print((require"m1").a)                                                                                                                                                                                                                                                                    
Quando uma lua                                                                                                                                                                                                                                                                            
print((require"m2").a)                                                                                                                                                                                                                                                                    
chega de repente                                                                                                                                                                                                                                                                          
print((require"c1").X)                                                                                                                                                                                                                                                                    
E se deixa no céu,                                                                                                                                                                                                                                                                        
print((require"c2").X)                                                                                                                                                                                                                                                                    
como esquecida                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                          
make: Nothing to be done for 'test'.                                                                                                                                                                                                                                                      
make: Leaving directory '/home/harter/work/git/RIOT/tests/lua_loader'    

Some websites talk about doing a local-gen but it must be already there http://jaredmarkell.com/docker-and-locales/

@kaspar030
Copy link
Contributor Author

I think there is something wrong as the image is outdated upstream https://hub.docker.com/r/riot/riotbuild

That's indeed weird. That page says there are no autobuilds? I don't want to merge anything while release testing is ongoing, though...

@kaspar030
Copy link
Contributor Author

I don't want to merge anything while release testing is ongoing, though...

(a push to master of this repo should trigger a Docker hub rebuild.)

@cladmi
Copy link
Contributor

cladmi commented Jul 12, 2019

As I only did a local test for something I thought could be a reason.
Do you have an output for a real murdock job ?
The PR does not have a testing procedure on itself.

Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, and working locally for me. Also fixes RIOT-OS/RIOT#11691.

DOCKER_IMAGE=riot_pr_75:latest DOCKER_FLAGS='--rm --privileged' BUILD_IN_DOCKER=1 DOCKER="sudo docker" BOARD=native make -C tests/lua_loader/ all term

make: Entering directory '/home/francisco/workspace/RIOT/tests/lua_loader'
Launching build container using image "riot_pr_75:latest".
sudo docker run --rm --privileged -t -u "$(id -u)"
-v '/usr/share/zoneinfo/Europe/Paris:/etc/localtime:ro' -v '/home/francisco/workspace/RIOT:/data/riotbuild/riotbase' -e 'RIOTBASE=/data/riotbuild/riotbase' -e 'CCACHE_BASEDIR=/data/riotbuild/riotbase' -e 'BUILD_DIR=/data/riotbuild/riotbase/build' -e 'RIOTPROJECT=/data/riotbuild/riotbase' -e 'RIOTCPU=/data/riotbuild/riotbase/cpu' -e 'RIOTBOARD=/data/riotbuild/riotbase/boards' -e 'RIOTMAKE=/data/riotbuild/riotbase/makefiles'
-e 'BOARD=native'
-w '/data/riotbuild/riotbase/tests/lua_loader/'
'riot_pr_75:latest' make all
Building application "tests_lua_loader" for "native" with MCU "native".

rm -Rf /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/lua
mkdir -p /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/lua
/data/riotbuild/riotbase/dist/tools/git/git-cache clone "https://github.com/lua/lua.git" "e354c6355e7f48e087678ec49e340ca0696725b1" "/data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/lua"
Cloning into '/data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/lua'...
remote: Enumerating objects: 272, done.
remote: Counting objects: 100% (272/272), done.
remote: Compressing objects: 100% (132/132), done.
remote: Total 23509 (delta 166), reused 216 (delta 140), pack-reused 23237
Receiving objects: 100% (23509/23509), 9.33 MiB | 2.12 MiB/s, done.
Resolving deltas: 100% (17610/17610), done.
HEAD is now at e354c635 small updates
touch /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/lua/.git-downloaded
if [ e354c6355e7f48e087678ec49e340ca0696725b1 != e354c6355e7f48e087678ec49e340ca0696725b1 ] ; then
git -C /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/lua clean -xdff ;
git -C /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/lua fetch "https://github.com/lua/lua.git" "e354c6355e7f48e087678ec49e340ca0696725b1" ;
git -C /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/lua checkout -f e354c6355e7f48e087678ec49e340ca0696725b1 ;
touch /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/lua/.git-downloaded ;
fi
git -C /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/lua checkout -f e354c6355e7f48e087678ec49e340ca0696725b1
HEAD is now at e354c635 small updates
git -c user.email=buildsystem@riot -c user.name="RIOT buildsystem" -C /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/lua am --no-gpg-sign --ignore-whitespace "/data/riotbuild/riotbase/pkg/lua"/patches/.patch
Applying: Remove luaL_newstate.
Applying: Allow LUAL_BUFFERSIZE to be defined in the command line.
Applying: Make size of LoadF buffer configurable.
Applying: Remove os.tmpname.
Applying: Do not allocate buffers on the stack.
Applying: Cleanup test module.
Applying: Add a proper makefile.
Applying: Default to 32 bit build and small buffer size.
touch /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/lua/.git-patched
rm -Rf /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/tlsf
mkdir -p /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/tlsf
/data/riotbuild/riotbase/dist/tools/git/git-cache clone "https://github.com/mattconte/tlsf" "a1f743ffac0305408b39e791e0ffb45f6d9bc777" "/data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/tlsf"
Cloning into '/data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/tlsf'...
remote: Enumerating objects: 40, done.
remote: Total 40 (delta 0), reused 0 (delta 0), pack-reused 40
Unpacking objects: 100% (40/40), done.
HEAD is now at a1f743f Merge pull request #3 from velvitonator/large-alloc-corruption
touch /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/tlsf/.git-downloaded
if [ a1f743ffac0305408b39e791e0ffb45f6d9bc777 != a1f743ffac0305408b39e791e0ffb45f6d9bc777 ] ; then
git -C /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/tlsf clean -xdff ;
git -C /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/tlsf fetch "https://github.com/mattconte/tlsf" "a1f743ffac0305408b39e791e0ffb45f6d9bc777" ;
git -C /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/tlsf checkout -f a1f743ffac0305408b39e791e0ffb45f6d9bc777 ;
touch /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/tlsf/.git-downloaded ;
fi
git -C /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/tlsf checkout -f a1f743ffac0305408b39e791e0ffb45f6d9bc777
HEAD is now at a1f743f Merge pull request #3 from velvitonator/large-alloc-corruption
git -c user.email=buildsystem@riot -c user.name="RIOT buildsystem" -C /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/tlsf am --no-gpg-sign --ignore-whitespace "/data/riotbuild/riotbase/pkg/tlsf"/patches/
.patch
Applying: Fix warnining on implicit pointer conversion.
touch /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/tlsf/.git-patched
"make" -C /data/riotbuild/riotbase/pkg/lua
"make" -C /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/lua -f Makefile.lua
"make" -C /data/riotbuild/riotbase/pkg/tlsf
"make" -C /data/riotbuild/riotbase/tests/lua_loader/bin/pkg/native/tlsf
"make" -C /data/riotbuild/riotbase/boards/native
"make" -C /data/riotbuild/riotbase/boards/native/drivers
"make" -C /data/riotbuild/riotbase/core
"make" -C /data/riotbuild/riotbase/cpu/native
"make" -C /data/riotbuild/riotbase/cpu/native/periph
"make" -C /data/riotbuild/riotbase/cpu/native/vfs
"make" -C /data/riotbuild/riotbase/drivers
"make" -C /data/riotbuild/riotbase/drivers/periph_common
"make" -C /data/riotbuild/riotbase/pkg/lua/contrib
"make" -C /data/riotbuild/riotbase/sys
"make" -C /data/riotbuild/riotbase/sys/auto_init
text data bss dec hex filename
287503 2804 58692 348999 55347 /data/riotbuild/riotbase/tests/lua_loader/bin/native/tests_lua_loader.elf
/home/francisco/workspace/RIOT/tests/lua_loader/bin/native/tests_lua_loader.elf
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

main(): This is RIOT! (Version: 2019.10-devel-214-g644040-pr-11056)
I am a module, hi!

Could you run this in a Murdock worker once just to be sure. Otherwise ACK

@kaspar030
Copy link
Contributor Author

Could you run this in a Murdock worker once just to be sure. Otherwise ACK

Let's fix any Murdock related problems within the murdock repo. Let's go!

@kaspar030 kaspar030 merged commit cf0ca2c into RIOT-OS:master Aug 8, 2019
@kaspar030 kaspar030 deleted the add_utf8_envs branch August 8, 2019 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants