Coder Social home page Coder Social logo

Comments (6)

cmarcelo avatar cmarcelo commented on June 1, 2024

The symbolic links in question do have non ASCII characters.

Extracting os-core pack for version 50
Warning: Linkname can't be converted from UTF-8 to current locale.
  Issue with header for entry: staged/dbd127931f8a330113afd10bfe3979d7b395a0d88c407473cb3db5ee1aa36b2e
  with link: TÜBİTAK_UEKAE_Kök_Sertifika_Hizmet_Sağlayıcısı_-_Sürüm_3.crt
Warning: Linkname can't be converted from UTF-8 to current locale.
  Issue with header for entry: staged/1b2f6102fac7898b72bbaaeb0fa580a2d693598b1adc9ebbcc9f14c5063aa762
  with link: AC_Raíz_Certicámara_S.A..crt
Warning: Linkname can't be converted from UTF-8 to current locale.
  Issue with header for entry: staged/ca61e50a8e4b1bcb36aafabb66e11fecadaafd8a2b93b69ff61b5a567b6d1b15
  with link: TÜRKTRUST_Elektronik_Sertifika_Hizmet_Sağlayıcısı_H5.crt
Warning: Linkname can't be converted from UTF-8 to current locale.
  Issue with header for entry: staged/5ea38d0b2dfd812a72ca4b9c2a893c8723963c12397096f86455d85042101272
  with link: NetLock_Arany_=Class_Gold=_Főtanúsítvány.crt
Warning: Linkname can't be converted from UTF-8 to current locale.
  Issue with header for entry: staged/21d89e644fd57b4194364d356799ae200da61b936a184ab74667ee50866e84bc
  with link: TÜRKTRUST_Elektronik_Sertifika_Hizmet_Sağlayıcısı_H6.crt
Warning: Linkname can't be converted from UTF-8 to current locale.
  Issue with header for entry: staged/538da6ab585223433a079f1c43799d1d6e8ec9c6cdf073125435ae330c52ff1e
  with link: Certinomis_-_Autorité_Racine.crt

Next step is to see how encoding from GNU tar (used in swupd-server) is different than Go tar package so that libarchive doesn't complain about it.

from mixer-tools.

cmarcelo avatar cmarcelo commented on June 1, 2024
  • Go tar encodes the symbolic link using a PAX record "linkpath". UTF-8. Gets warning from swupd client.
  • GNU tar encodes it using a GNU format header. UTF-8. No warning from swupd client.

Also tested in Go 1.10 (still unreleased), which contains a way to force the use of GNU extension for an entry.

  • Go 1.10 by default for that file still produces PAX + linkpath.
  • Go 1.10 tar forcing GNU format header. UTF-8. No warning from swupd client.

After inspecting the output tar files from various combinations and formats, I think that the files we are generating are sound. The warning message from libarchive seems misleading, as libarchive can handle correctly the GNU one. My current guess:

One mitigation for us, once Go 1.10 is release is to force GNU format for any symbolic link that has non ASCII characters.

I haven't looked deeply at libarchive, so next step is to check if we could explicitly state the UTF-8 in our usage of libarchive.

Given that the files themselves are being correctly written by swupd client besides the warning AND in a couple of weeks we'll have a mitigation, I'll likely put this on a lower priority.

from mixer-tools.

cmarcelo avatar cmarcelo commented on June 1, 2024

I couldn't revisit this. I still think it is something on swupd client side. Go 1.10 will be released soon so we can apply the workaround for the minimum effort.

The workaround: set the format to GNU in the header of any symbolic link we archive.

from mixer-tools.

cmarcelo avatar cmarcelo commented on June 1, 2024

For debugging libarchive, a starting point:

<thiago> if anyone wnats to debug this, put a breakpoint in archive_entry.c line 1301 with condition r != 0
<thiago> the debug fuse doesn't work for me (container)

from mixer-tools.

matthewrsj avatar matthewrsj commented on June 1, 2024

swupd now uses a more recent version of libarchive. This needs to be tested to see if it is still an issue.

from mixer-tools.

reaganlo avatar reaganlo commented on June 1, 2024

This has been fixed.

from mixer-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.