Merge lp://staging/~cezary0/cryptsetup/bugfix474258_refactored into lp://staging/~ubuntu-core-dev/cryptsetup/ubuntu
Status: | Rejected |
---|---|
Rejected by: | Steve Langasek |
Proposed branch: | lp://staging/~cezary0/cryptsetup/bugfix474258_refactored |
Merge into: | lp://staging/~ubuntu-core-dev/cryptsetup/ubuntu |
Diff against target: |
401 lines (+231/-76) 2 files modified
debian/cryptdisks.functions (+124/-76) debian/test_cryptdisk.sh (+107/-0) |
To merge this branch: | bzr merge lp://staging/~cezary0/cryptsetup/bugfix474258_refactored |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Surbhi Palande | Pending | ||
Steve Langasek | Pending | ||
Review via email: mp+91775@code.staging.launchpad.net |
Description of the change
I refactored the code for clarity and fixed the error in the condition:
if ! pre_out=
[ "$MAKESWAP" != "yes" ] && \
! /lib/cryptsetup
The error was introduced here (Debian):
in short the current bad condition:
if has_a_filesystem and ! for_cryptswap and ! swap -> then fail
should have been:
if has_a_filesystem and !( for_cryptswap and swap) -> then fail
I made other changes based on feedback here:
https:/
and I created a small test suite to test the changes and refactored code. During this, I found a similar bug/condition for the encrypted tmp handling - and fixed it too.
The tests are messy but useful and can easily be extended to cover more edge cases.
Unmerged revisions
- 176. By Cezary Baginski
-
debian/
cryptdisks. functions: minor refactoring and prevent destroying valid
filesystems (LP:#474258)debian/
test_cryptdisk. sh: minimalistic test suite for the above
This merge request has been superseded by an unrelated solution which appears to have been uploaded to Ubuntu:
cryptsetup (2:1.4.1-2ubuntu2) precise; urgency=low
* Split up package in cryptsetup and cryptsetup-bin. (LP: #343363).
* Do not overwrite existing filesystems when creating swap (LP: #474258).
* Add aesni module when we have hardware encryption.
-- Jean-Louis Dupond <email address hidden> Mon, 12 Mar 2012 10:14:30 +0100
Please check whether this solves the problem for you, and if not, please propose an updated patch.