Skip to content
Snippets Groups Projects
apk-tools

apk-tools

Project ID: 4176
Forked from alpine / apk-tools
Source project has a limited visibility.
Christian Marangi's avatar
Christian Marangi authored
There is currently a fundamental problem with how tar are handled
insternally for scriptdb usage.

We totally lack any support and handling for filename in scriptdb that
are longer than 99char. This cause the filename to be cut and have
situation with file ending with:
- kernel-6.6.30~01f651a1bd5c5592d7cf5a98209bdce4-r1.X121290490411c8c2cf47e3
- kernel-6.6.30~01f651a1bd5c5592d7cf5a98209bdce4-r1.X121290490411c8c2cf47e308d95f12d65d011a391.post-instal
- kernel-6.6.30~01f651a1bd5c5592d7cf5a98209bdce4-r1.X121290490411c8c2cf47e308d95f12d65d011a391.post-i
- kernel-6.6.30~01f651a1bd5c5592d7cf5a98209bdce4-r1.X121290490411c8c2cf47e308d95f12d65

This is caused by the fact that POSIX ustar support up to 99char. The
prefix value can only be used to path but can't be used for filename
hence that is not a valuable solution.

To fix this introduce support to apk_tar_write_entry for GNU longnames
extension header. This is already supported by apk_tar_parse but we
couldn't actually add the special header.

With this fix long filename are correctly handled and the cut problem is
solved.

Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
6052bfef
Name Last commit Last update