As agreed with Max yesterday, I've started by doing uploads for almost all
pending changes in partman. After that I've started on the reorganization,
the first part of which is now completed. I've run a test install for the
current status and have not seen any regressions.
The changes today should not cause any changes in functionality. Most just
moved code around.
Along the way I've also fixed a few bugs.
Before the upload:
- partman-crypto (fairly serious issue)
* Remove progresscancel capability again after erase progress bar to avoid
all following progress bars to become cancelable as well. Ensure backup
capability is retained.
- partman-auto
* lvm-wipe-disk(): needs device-mapper support while removing devices
(for some reason we now need to have dm-mod loaded when removing
LVM data; I'm pretty sure that was not the case for Etch)
* lvm-wipe-disk(): fix restart logic
After the upload:
- partman-crypto (minor error in recent commit)
* finish.d/crypto_config: fix script error when $tmp is empty
I also committed this change in partman/Makefile because dpkg-shlibdeps gave
a warning that libld.so.2 was unused:
-LIBS=-lparted -ldl
+LIBS=-lparted
If someone knows this to be incorrect, please shout.
Overview of the reorganization
==============================
Most commits are just moving files containing library functions around,
including updates for all scripts that source them:
partman-base: ./definitions.sh -> ./lib/base.sh
partman-partitioning: ./resize.sh -> ./lib/resize.sh
partman-lvm: ./lvm_tools.sh -> ./lib/lvm-base.sh
partman-crypto: ./crypto_tools.sh -> ./lib/crypto-base.sh
partman-auto: ./recipes.sh -> ./lib/recipes.sh
./auto-shared.sh -> ./lib/auto-shared.sh
partman-auto-lvm: ./auto-lvm_tools.sh -> ./lib/auto-lvm.sh
Then there are two commits that add a 'memfree' function in base.sh and
updates partman-crypto to use that. I intend to also use that function
tomorrow to dynamically load LVM and crypto support only if there is
sufficient memory.
The last commit is by far the most invasive. It is based on a change
proposed by Jérémy in #396023, but takes his suggestion a bit further.
The commit moves everything that has to do with disk labels (including four
templates) from partman-base to partman-partitioning.
Among others it moves the default_disk_label function from base.sh in p-base
to a new function library file new-label.sh [1] in p-partitioning. Main
reason is that this function is only called from a few specific places and
thus having it in base.sh is just not efficient, especially given that it
is ~150 lines of code.
The new function create_new_label is now only used from p-partitioning
itself, but intention is to also use it from partman-auto when using guided
partitioning of a whole disk. I'll work on that tomorrow as well.
Cheers,
FJP
[1] It just occurs to me that disk-label.sh is probably be a better name...
Attachment:
signature.asc
Description: This is a digitally signed message part.