Re: [dev] [sbase] [tar] some errors

From: Cág <>
Date: Sat, 24 Dec 2016 09:10:40 +0000

Laslo Hunhold wrote:

> can you design a minimal working example? Many tar implementations out
> there are unsafe or "bend" the standard in some way. Maybe we can
> resolve this easily as soon as you provide us with more information.

Imagine a typical themes directory: huge amount of files. In my case
tis around 12k. A typical icons directory is even worse: even bigger
of files and symlinks with mine having around 280k (!) files.

So here we are:

1. $ tar -c /usr/share/icons | xz > icons.tar.xz
    tar: strlcpy: input string too long

Around 30 sec pause between the command and the error.
The same with themes, except the pause is negligible.

2. $ busybox tar -c /usr/share/icons | xz > icons.tar.xz
    [10 minutes of await]

So the archive is made. Let's try to extract it:

3. $ tar -xvf icons.tar.xz
    tar: malformed tar archive

4. $ busybox tar -xvf icons.tar.xz
    [prints this big amount of files]

The archive is extracted.

Let's try something smaller. On my ~/code/suckless I have
various projects that fit the philosophy, 1515 files
with the vast majority being .git hidden files.

1. $ tar -c code/suckless | xz > suckless.tar.xz
    tar: strlcpy: input string too long

Trying to extract the archive because it was created:
    $ tar -xvf suckless.tar.xz
    tar: malformed tar archive

Trying to extract it with BusyBox:
    $ busybox tar -xvf suckless.tar.xz
    [prints the files]
    tar: short read

2. $ busybox tar -c code/suckless | xz > suckless.tar.xz

    $ busybox tar -xvf suckless.tar.xz

At the end let's try something tiny. I have a .cdw folder
in my home with just two files: cdw.conf and cdw.log.

1. $ tar -c .cdw | xz > cdw.tar.xz


Let's try to extract:

2. $ tar -xvf cdw.tar.xz
    tar: malformed tar archive

BusyBox extracts these two lads but with "short read" error
from above.

Thus, there is probably a certain amount of files tar
can do without errors, but created archives can only
be extracted with warnings from BusyBox and cannot be
extracted with sbase tar.

Received on Sat Dec 24 2016 - 10:10:40 CET

This archive was generated by hypermail 2.3.0 : Sat Dec 24 2016 - 10:12:13 CET