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

mksquashfs pipe #88

Open
i0x71 opened this issue Apr 22, 2020 · 3 comments
Open

mksquashfs pipe #88

i0x71 opened this issue Apr 22, 2020 · 3 comments
Assignees
Milestone

Comments

@i0x71
Copy link

i0x71 commented Apr 22, 2020

Hello,
Is it possible to pipe put the output of mksquashfs to stdout ?
I have half a terabyte of files that i would like to make into a squash image and pipe them into an s3 client, storing it in a local image file would take up unnecessary space.

Thanks

@AnrDaemon
Copy link

Try writing to /proc/self/fd/1

@Dr-Emann
Copy link

No, the first several bytes (the superblock) depend on the results of building the whole archive.

@plougher
Copy link
Owner

No, the output has to be seekable (which a pipe isn't).

This is first because the Squashfs superblock (which contains information about where things are placed in the filesystem and what is in it) is at the start of the filesystem and the contents are only known once the filesystem has been generated and written out. To update the superblock after the filesystem has been written out requires the output file to be seekable.

Second Mksquashfs does de-duplicating on the contents of the filesystem, and this again requires the output to be seekable, so Mksquashfs can read back previously written out files, and do a byte comparison.

There is way of doing it, but, it will require a reasonable amount of coding, and it got a lower priority to do than a lot of other requests. There is already a lot of new stuff in the next release, and it has taken a long time to test and document it.

So I intend to work on this feature after the next release (which be in the next couple of days).

@plougher plougher self-assigned this Feb 22, 2022
@plougher plougher added this to the Undecided milestone Feb 22, 2022
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

4 participants