Merge ~mfo/ubiquity:lp1898129 into ubiquity:master

Proposed by Mauricio Faria de Oliveira
Status: Rejected
Rejected by: Łukasz Zemczak
Proposed branch: ~mfo/ubiquity:lp1898129
Merge into: ubiquity:master
Diff against target: 70 lines (+26/-2)
4 files modified
d-i/source/partman-crypto/debian/changelog (+9/-0)
d-i/source/partman-crypto/debian/partman-crypto.templates (+5/-0)
d-i/source/partman-crypto/lib/crypto-base.sh (+6/-2)
debian/changelog (+6/-0)
Reviewer Review Type Date Requested Status
Łukasz Zemczak Needs Resubmitting
Review via email: mp+391767@code.launchpad.net

Commit message

Introduce preseed option partman-crypto/luksformat_options

This allows preseeding additional options to 'cryptsetup luksFormat'.
(LP: #1898129)

P.S.: This change has been submitted to the stand-alone repo [1].

[1] https://code.launchpad.net/~mfo/partman-crypto/+git/partman-crypto/+merge/391766

To post a comment you must log in.
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hey Mauricio! Thanks for the MP! For ubiquity inside components though, we have a special process that we're trying to follow using git subtrees (per d-i/source/README). I'll reject this merge and pull in the latest partman-crypto changes myself, merge and release.

Cheers!

review: Needs Resubmitting
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Merged and released!

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Thanks, Łukasz!

Unmerged commits

677c853... by Mauricio Faria de Oliveira

Introduce preseed option partman-crypto/luksformat_options

This allows preseeding additional options to 'cryptsetup luksFormat'.
(LP: #1898129)

P.S.: This change has been submitted to the stand-alone repo.

Signed-off-by: Mauricio Faria de Oliveira <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/d-i/source/partman-crypto/debian/changelog b/d-i/source/partman-crypto/debian/changelog
2index b05458d..645b125 100644
3--- a/d-i/source/partman-crypto/debian/changelog
4+++ b/d-i/source/partman-crypto/debian/changelog
5@@ -1,3 +1,12 @@
6+partman-crypto (101ubuntu5) hirsute; urgency=medium
7+
8+ * Add preseed option 'partman-crypto/luksformat_options' to
9+ provide more options for 'cryptsetup luksFormat' (LP: #1898129)
10+ - d/partman-crypto.templates: add preseed option.
11+ - lib/crypto-base.sh: check for, log, and use it.
12+
13+ -- Mauricio Faria de Oliveira <mfo@canonical.com> Thu, 05 Nov 2020 12:24:33 -0300
14+
15 partman-crypto (101ubuntu4) eoan; urgency=medium
16
17 * Drop a big block in finish.d that iterates partman, and then does
18diff --git a/d-i/source/partman-crypto/debian/partman-crypto.templates b/d-i/source/partman-crypto/debian/partman-crypto.templates
19index ee78111..3541934 100644
20--- a/d-i/source/partman-crypto/debian/partman-crypto.templates
21+++ b/d-i/source/partman-crypto/debian/partman-crypto.templates
22@@ -509,3 +509,8 @@ _Description: Passphrase for ${DEVICE}:
23 Please enter the passphrase for the encrypted volume ${DEVICE}.
24 .
25 If you don't enter anything, the volume will not be activated.
26+
27+Template: partman-crypto/luksformat_options
28+Type: string
29+Description: for internal use; can be preseeded.
30+ Provide additional options to the cryptsetup luksFormat command.
31diff --git a/d-i/source/partman-crypto/lib/crypto-base.sh b/d-i/source/partman-crypto/lib/crypto-base.sh
32index 7616ad2..d3ed948 100644
33--- a/d-i/source/partman-crypto/lib/crypto-base.sh
34+++ b/d-i/source/partman-crypto/lib/crypto-base.sh
35@@ -205,7 +205,7 @@ setup_dmcrypt () {
36 }
37
38 setup_luks () {
39- local mapping device cipher iv size pass
40+ local mapping device cipher iv size pass luksopts
41 mapping=$1
42 device=$2
43 cipher=$3
44@@ -234,7 +234,11 @@ setup_luks () {
45 fi
46
47 if [ $zkey_available -eq 0 ]; then
48- log-output -t partman-crypto /sbin/cryptsetup -c $cipher-$iv -h $hash -s $size luksFormat $device $pass
49+ if db_get partman-crypto/luksformat_options; then
50+ luksopts="$RET"
51+ log "Additional options for luksFormat: '$luksopts'"
52+ fi
53+ log-output -t partman-crypto /sbin/cryptsetup -c $cipher-$iv -h $hash -s $size $luksopts luksFormat $device $pass
54 if [ $? -ne 0 ]; then
55 log "luksFormat failed"
56 return 2
57diff --git a/debian/changelog b/debian/changelog
58index 3a242a7..552ff03 100644
59--- a/debian/changelog
60+++ b/debian/changelog
61@@ -1,3 +1,9 @@
62+ubiquity (21.04.1) UNRELEASED; urgency=medium
63+
64+ * Introduce preseed option partman-crypto/luksformat_options (LP: #1898129)
65+
66+ -- Mauricio Faria de Oliveira <mfo@canonical.com> Thu, 05 Nov 2020 12:23:11 -0300
67+
68 ubiquity (20.10.13) groovy; urgency=medium
69
70 * misc.py: unset gsd keys to trigger keyboard settings migration.

Subscribers

People subscribed via source and target branches