Just FYI / FTR,

tar2sqfs exists in squashfs-tools-ng.
I haven't gotten it working with mmdebstrap yet, but
this (below) is enough to show that the approach is sound.
Further work can happen in squashfs-land, not mmdebstrap-land.

Trent W. Buck wrote:
>   3. tar2squashfs is useful for this & other things.
>      I don't think it's possible, but I'll ask the squashfs people.

squashfs-tools isn't the only squashfs-tools anymore,

  * squashfs-tools-ng
    https://lkml.org/lkml/2019/8/1/1154
    https://github.com/AgentD/squashfs-tools-ng
    https://bugs.debian.org/932971  (wnpp ITP)

  * squashfskit
    https://bugs.debian.org/918480

Neither are in Debian yet.

I grabbed squashfs-tools-ng and spent twenty minutes with it.

  * claims to solve tar2squashfs
    https://bugs.debian.org/942288
    https://github.com/ plougher/squashfs-tools/issues/25

  * claims to solve --one-file-system, too - yay!
    https://bugs.debian.org/586757

  * This is working:

      tar c tmp.txt | ./tar2sqfs tmp.sq   # generate from plain tar
      unsquashfs -ll tmp.sq               # squashfs-tools can read it
      mount -o loop tmp.sq /mnt           # linux 5.2 can mount it

  * This is *not* working:

      mmdebstrap ["go faster" options...] buster |
      ./tar2sqfs tmp2.sq                   # generate from mmdebstrap
      unsquashfs -ll tmp2.sq               # squashfs-tools can't read it
      mount -o loop tmp2.sq /mnt           # linux 5.2 can mount it, but it's 
empty
      file tmp2.sq                         # header looks OK
      ./rdsquashfs --describe tmp2.sq      # even squashfs-tools-ng can't read 
it
      ==> tmp2.sq: reading filesystem tree: location out of bounds.

    tar2sqfs can definitely see the files in the tar, because
    it prints their names to stderr as they go past.

    When I have more time, I'll try to debug this further.

Reply via email to