ish-app / ish

Linux shell for iOS
https://ish.app
Other
16.91k stars 890 forks source link

Linkname can't be converted from UTF-8 to current locale, line 202 #1387

Open lifepillar opened 3 years ago

lifepillar commented 3 years ago

I get the error in the subject when I try to import a filesystem coming from an exported Docker container.

In detail, this is what I have done:

    docker pull econcz/x86-alpine-glibc:ish-import
    docker run -it econcz/x86-alpine-glibc:ish-import /bin/sh
    cp /etc/apk/repositories /tmp/repositories
    echo https://dl-cdn.alpinelinux.org/alpine/v3.12/main >>/etc/apk/repositories
    echo https://dl-cdn.alpinelinux.org/alpine/v3.12/community >>/etc/apk/repositories
    apk update
    apk add ...

Then I have stopped the container and exported it with:

    docker container export -o output.tar <container>

Then I have copied output.tar into iPadOS. In iSH, I have chosen Settings (Gear) > Filesystems > Import, and I have selected the archive. Should I follow a different procedure?

tbodt commented 3 years ago

Seems to be something related to filename encoding. Probably solved by asking libarchive to not try to reencode anything.

tbodt commented 3 years ago

If you could upload the tar file you used, that would be helpful.

lifepillar commented 3 years ago

This archive will be available for the next 24h: https://jirafeau.net/f.php?h=1juTZoKW.

Anyway, that is the vanilla Docker image, plus git:

docker pull econcz/x86-alpine-glibc:ish-import
docker run -it --name ish-fs-git <image ID> /bin/sh
cp /etc/apk/repositories /tmp/repositories
echo https://dl-cdn.alpinelinux.org/alpine/v3.12/main >>/etc/apk/repositories
echo https://dl-cdn.alpinelinux.org/alpine/v3.12/community >>/etc/apk/repositories
apk update
apk add git
exit
docker container export -o ish-fs-git.tar <container ID>

Using Docker on macOS, if that matters (installed with brew docker docker-machine).

sdhoward commented 3 years ago

You can also reproduce this with the void linux i686 root image from https://voidlinux.org/download/.

curl -O 'https://alpha.de.repo.voidlinux.org/live/current/void-i686-ROOTFS-20210218.tar.xz'
unxz void-i686-ROOTFS-20210218.tar.xz
gzip void-i686-ROOTFS-20210218.tar

And then try to import void-i686-ROOTFS-20210218.tar.gz as a filesystem. The error shown for me is

Pathname can't be converted from UTF-8 to current locale., line 202
sdhoward commented 3 years ago

also I think I found which characters in my filesystem image caused a problem

Screen Shot 2021-06-06 at 12 57 33 PM
ghost commented 3 years ago

It also happens for Gentoo i686 images (https://bouncer.gentoo.org/fetch/root/all/releases/x86/autobuilds/20210531T214504Z/stage3-i486-20210531T214504Z.tar.xz) in https://www.gentoo.org/downloads/ advanced choices.

Pathname can't be converted from UTF-8 to current locale. is the error I get. Unfortunately, I don't remember it very much. Also, it's glibc. Would uclibc work?