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

use libarchive directly #285

Closed
pohly opened this issue Sep 27, 2017 · 2 comments
Closed

use libarchive directly #285

pohly opened this issue Sep 27, 2017 · 2 comments

Comments

@pohly
Copy link
Contributor

pohly commented Sep 27, 2017

This is related to clearlinux/swupd-server#48. Once the server uses libarchive, the client should also use bsdtar, which is already possible.

But calling libarchive directly would have several advantages:

  • when unpacking Manifest files, restoring file attributes can be skipped, thus avoiding a problem with "ioctl(4, FS_IOC_GETFLAGS, 0x7ffe5c46d874) = -1 ENOTTY (Inappropriate ioctl for device)" when the statedir is on a tmpfs
  • tar archives can be unpacked directly, without storing the entire file on disk first (GNUtar needs to seek in the file to detect compression methods, libarchive doesn't)
  • file name or link name encoding errors in a locale which does not support UTF-8 can be ignored because the fallback is to skip re-encoding, which is exactly what swupd needs (would solve bsdtar: ignore UTF-8 encoding errors #280)

Right now, #249 is implemented with statedir on the target partition (because of #273), but then the target partition must have at least enough space for "unpacked rootfs + pack-os-core-from-0.tar".

@pohly
Copy link
Contributor Author

pohly commented Sep 28, 2017

The goal is to do "swupd verify --install -p /mnt/some-partition" and directly stream the OS content onto the target partition (needed for issue #249).

Right now we put the state directory onto the target partition (partly because of issue #273, partly because unpacking Manifests into /tmp fails due to the ioctl() problem), but that means that additional space is needed on the OS partition.

@matthewrsj
Copy link
Contributor

Fixed by #327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants