Repository navigation
fix(file)!: keep image holes, map the input bmap ranges, rename bmap options #158
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
Open
JanZachmann
wants to merge
66
commits into
omnect:main
Choose a base branch
from
JanZachmann:jz-2026-09-28-keep-image-layout
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,294
−379
Open
Changes from all commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
449c4d4
fix(file): keep the image layout when writing a partition back
JanZachmann 5186d4b
chore: bump dependencies including major versions
JanZachmann 2c7f060
style(device_update): drop redundant borrows in info! arguments
JanZachmann e9163a5
fix(file): keep holes when copying the image
JanZachmann e2443b2
fix(file): map the ext4 journals in a generated bmap
JanZachmann 52fe21d
fix: copy image data segments larger than 2 GiB completely
JanZachmann 19bcd30
fix(file): harden ext4 journal lookup for bmap generation
JanZachmann d7e7242
build(docker): install e2fsprogs in the builder
JanZachmann 2912452
fix(file): keep zero blocks as holes when decompressing
JanZachmann 84ba27e
refactor(file): move bmap generation into its own module
JanZachmann 9842fef
test(file): cover ext4 journal edge cases and a flash onto old content
JanZachmann efea1b0
Merge remote-tracking branch 'upstream/main' into jz-2026-09-28-keep-…
JanZachmann 68f21f4
fix(deps): resolve RUSTSEC-2026-0385 (ctutils)
JanZachmann 7e75052
fix(file): detect truncated input and harden sparse decompress
JanZachmann a0da23c
fix(file): keep the ranges of the input bmap mapped
JanZachmann fb4441d
fix(file): address review findings on input bmap handling
JanZachmann cb3c476
feat(cli)!: rename bmap options to --input-bmap and --output-bmap
JanZachmann 46d0362
fix(file): map zero blocks that a copy writes into a hole
JanZachmann 02a712b
fix(file): reject an input bmap whose checksums do not match the image
JanZachmann 5e827ac
docs(file): explain a checksum mismatch after a command without -b
JanZachmann 279f8a8
feat(file): write the output bmap in Rust and keep the image sparse
JanZachmann 57a1580
perf(file): compare only blocks that hold data in a partition write back
JanZachmann b59788c
test(file): check the bmaptool format only in the integration tests
JanZachmann 53ebcd8
chore(docker): drop dd and sync from the image
JanZachmann d386816
fix(file): decompress images named .gz and .bz2
JanZachmann cdc299c
refactor(cli): share the bmap and compression options of image commands
JanZachmann 92ce896
test(file): make the write back failure test work as root
JanZachmann 04bb5f1
fix(file): name the output bmap after the output image
JanZachmann beafb45
perf(file): do not sync the temp image after a partition write
JanZachmann d7ba2da
test(file): cover a failed compress trailer and a partition past the …
JanZachmann 1ce9e1a
refactor(file): share the sparse copy into a new file
JanZachmann c18fc17
fix(file): do not write the image back after copy-from-image
JanZachmann c51066f
feat(file)!: fail on output name conflicts, add --output-image and --…
JanZachmann f0ead21
perf(file): check the input bmap of an uncompressed image before the …
JanZachmann be84b33
fix(file): read concatenated compressed streams
JanZachmann 453b124
fix(file): check every bmap that bmaptool would use
JanZachmann d0800f8
fix(file)!: name a bzip2 image .bz2
JanZachmann c477f9a
fix(file): check the extension of the --output-image name
JanZachmann 7ab73f8
fix(file): write the output image through a rename
JanZachmann 20c114b
refactor(file): use tempfile::TempDir for the temp image
JanZachmann 342bea1
fix(file): keep the partition files in their own temp dir
JanZachmann 53672ec
perf(file): run copy-from-image on an uncompressed image directly
JanZachmann b328b45
fix(file): read partitions of a GPT with 4096-byte sectors
JanZachmann ee181b4
docs(file): describe the --output-image extension rule and the rename
JanZachmann 961f95b
fix(file): keep the name of an image with any extension of the -p com…
JanZachmann 3504b5a
fix(file): find the input bmap the way bmaptool does
JanZachmann 3da5a4d
fix(file): sync the output image and remove the old bmap before the r…
JanZachmann 039b861
fix(file): copy into an output image that is a mount point
JanZachmann 6c599be
fix(file): keep a read-only output image unchanged
JanZachmann 8d67433
refactor(file): write the output bmap into its staged file directly
JanZachmann 9126d55
refactor(file): use Path::with_added_extension for bmap and compresse…
JanZachmann 8f08735
fix(file): refuse a bmap with another root element or a newer major v…
JanZachmann 19bb6be
docs(file): describe the space a command needs in TMPDIR
JanZachmann a75f17f
fix(file): replace an output bmap that is a mount point
JanZachmann 6e9c9e1
fix(file): copy into a detected mount point without a rename
JanZachmann 32c4a0b
refactor(file): share the sparse file copy in sparse::copy_file
JanZachmann 44e456f
fix(file): keep the staged file when the copy into the destination fails
JanZachmann 5e772f9
fix(file): skip the sync of a staged file that is only copied
JanZachmann bac7b43
test(file): check / as mount root only where the kernel reports it
JanZachmann 483adce
test(file): make the bmap of another image valid except for its size
JanZachmann f918204
test(file): build bmap paths with bmap::bmap_path
JanZachmann ddb60e9
fix(identity): write the new device certificate and key into a temp dir
JanZachmann 7b61618
fix(file): remove the staging dir when a stop signal ends the command
JanZachmann 334d81d
docs: list the output and signal modules in the project context
JanZachmann 224b7bf
fix(file): keep the staged file when a signal stops the copy into a m…
JanZachmann 47c05a5
fix(identity): remove the new device key when a stop signal ends the …
JanZachmann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The module list adds
bmap.rsandsparse.rsbut not the newsrc/file/output.rs(output naming, conflict checks, staging, commit).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in 334d81d, with the new
signal.rs.Checked:
cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo test(99 unit, 38 integration, 1 ignored),cargo audit(only RUSTSEC-2025-0141, bincode via mbrman, not from this change).