Skip to content

fix(deb): use more precise method to extract version from Cargo.toml#89

Open
imlk0 wants to merge 3 commits intomasterfrom
fix/debian-version-extraction
Open

fix(deb): use more precise method to extract version from Cargo.toml#89
imlk0 wants to merge 3 commits intomasterfrom
fix/debian-version-extraction

Conversation

@imlk0
Copy link
Collaborator

@imlk0 imlk0 commented Feb 6, 2026

Summary\nThis PR fixes the version extraction in debian/rules to more precisely target the [workspace.package] section in Cargo.toml.\n\n## Problem\nThe previous implementation using grep/sed could potentially match version strings from dependencies rather than the workspace package version.\n\n## Solution\nReplace grep/sed with awk to specifically target the [workspace.package] section for version extraction, ensuring we get the correct version for Debian package building.

imlk0 added 3 commits February 5, 2026 21:02
Introduce `has_valuable_data()` to better determine whether a block device contains meaningful filesystem data:

- When an expected filesystem type (`fs_hint`) is provided, it strictly checks for that type and errors if something else is detected.
- Without a hint, it treats known partition tables like `PTTYPE="atari"` as non-valuable (workaround for util-linux bug), while considering any other detected signature as valuable data.
- Update callers in `cryptpilot-crypt` and tests to use the new logic, flipping boolean expectations accordingly.

This improves safety during volume initialization by avoiding accidental overwrites of unexpected but valid data.

Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
Remove manual debian/changelog file and implement automatic generation from Cargo.toml

Fixes: #76
Replace grep/sed with awk to specifically target [workspace.package] section for version extraction
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.

1 participant