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

Mimic ql-minitar's handling of unusual tarball entries. #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mtstickney
Copy link
Contributor

archive signals an error for unknown tarball entry types (including
relatively common ones like symlinks), while quicklisp's own
ql-minitar generally just ignores unknown entries. Since archive
appears to be less than actively maintained, mimic ql-minitar's
behavior by overriding the read method for tarballs read by qlot.

This is accomplished by creating a subclass of tar-archive and
coercing opened archives to that class. A customized
read-entry-from-archive method then handles reading tarball entries
without throwing an error, so that unexpected entry types can be
skipped. Other users of archive in the same image will not be
affected, since they won't be using the subclass.

There is a maintenance risk here, since the implementation of
read-entry-from-archive is more-or-less copied from archive, and uses
a slew of unexported symbols. However, archive does not appear to be
actively developed, even by the sharplisper group that adopted it, so
the odds of this being an issue are small. This change allows qlot to
patch the read behavior without having to get changes upstreamed into
archive.

This implementation handles everything that ql-minitar does, plus some
extras provided by archive, with the sole exception of POSIX extended
headers.

archive signals an error for unknown tarball entry types (including
relatively common ones like symlinks), while quicklisp's own
ql-minitar generally just ignores unknown entries. Since archive
appears to be less than actively maintained, mimic ql-minitar's
behavior by overriding the read method for tarballs read by qlot.

This is accomplished by creating a subclass of ARCHIVE:TAR-ARCHIVE and
coercing opened archives to that class. A customized
READ-ENTRY-FROM-ARCHIVE method then handles reading tarball entries
without throwing an error, so that unexpected entry types can be
skipped. Other users of archive in the same image will not be
affected, since they won't be using the subclass.

There is a maintenance risk here, since the implementation of
READ-ENTRY-FROM-ARCHIVE is more-or-less copied from archive, and uses
a slew of unexported symbols. However, archive does not appear to be
actively developed, even by the sharplisper group that adopted it, so
the odds of this being an issue are small. This change allows qlot to
patch the read behavior without having to get changes upstreamed into
archive.

This implementation handles everything that ql-minitar does, plus some
extras provided by archive, with the sole exception of POSIX extended
headers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant