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

squashfs support for uuid and label #264

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bcarnes
Copy link

@bcarnes bcarnes commented Sep 8, 2023

Here's working code for #59, the basics of which I've reimplemented a few times over the years.

Curious what @plougher thinks about this approach.

Due to the way squashfs directly stores the offsets to the datablocks and fragments, and the remaining sections having offsets stored in the superblock... no squashfs-mount/unsquashfs/etc implementation I've encountered ever expects or needs the datablocks to start at the next byte after the (optional) compression options metablock.

As such, it has proved to be perfectly backwards compatible wherever I've used it.

See #59 (comment) for how it is used, behaves, and how to build it (and the corresponding changes to libblkid)

Let me know if this approach (or something similar) has a chance of being merged upstream.

Only after the above question is answered... here are some preemptive comments for other things to think about before considering merging:

  • Allow dependency on libuuid? (so we can internally generate random uuids when desired without a shell call to uuidgen)
  • Add support for sqfstar equivalents, update docs, etc.
  • What is the desired -append behavior w/ uuid/labels?
  • Talk about ability to add/remove a uuid/label from an existing squashfs (that has or doesn't have an existing uuid/label).

Brian Carnes added 2 commits September 6, 2023 13:29
In preparation for an extra_info block after the compressor
options.
@bcarnes
Copy link
Author

bcarnes commented Sep 8, 2023

Here is the corresponding code in util-linux / libblkid for detecting and extracting the label and uuid...

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