Merge lp:~xnox/debian-cd/subiquity into lp:~ubuntu-cdimage/debian-cd/ubun3

Proposed by Dimitri John Ledkov
Status: Work in progress
Proposed branch: lp:~xnox/debian-cd/subiquity
Merge into: lp:~ubuntu-cdimage/debian-cd/ubun3
Diff against target: 94 lines (+14/-7)
2 files modified
tools/boot/eoan/boot-amd64 (+10/-6)
tools/boot/eoan/common.sh (+4/-1)
To merge this branch: bzr merge lp:~xnox/debian-cd/subiquity
Reviewer Review Type Date Requested Status
Dimitri John Ledkov (community) rebase-to-focal Needs Resubmitting
Ubuntu CD Image Team Pending
Review via email: mp+366564@code.launchpad.net

Commit message

  Fix whitespace & drop OEM boot options from subiquity

  Currently kernel commandline string on subiquity images has multiple
  groups of duplicate whitespace. This is because most of the
  parameteres are empty for subiquity images and are concatenated space
  delimited. Instead of fiddling with optionality of each argument,
  simply parse them with $(echo ), such that shell escaping space
  separates all arguments without any double/tripple spacing.

  Also this makes reading the variable names easier.

  Create a variable indicating subiquity based images, to skip chunks of
  unneeded boot options. E.g. OEM boot is not supported by the subiquity
  images.

Description of the change

  Fix whitespace & drop OEM boot options from subiquity

  Currently kernel commandline string on subiquity images has multiple
  groups of duplicate whitespace. This is because most of the
  parameteres are empty for subiquity images and are concatenated space
  delimited. Instead of fiddling with optionality of each argument,
  simply parse them with $(echo ), such that shell escaping space
  separates all arguments without any double/tripple spacing.

  Also this makes reading the variable names easier.

  Create a variable indicating subiquity based images, to skip chunks of
  unneeded boot options. E.g. OEM boot is not supported by the subiquity
  images.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) :
review: Needs Resubmitting (rebase-to-focal)

Unmerged revisions

2028. By Dimitri John Ledkov

Fix whitespace & drop OEM boot options from subiquity

Currently kernel commandline string on subiquity images has multiple
groups of duplicate whitespace. This is because most of the
parameteres are empty for subiquity images and are concatenated space
delimited. Instead of fiddling with optionality of each argument,
simply parse them with $(echo ), such that shell escaping space
separates all arguments without any double/tripple spacing.

Also this makes reading the variable names easier.

Create a variable indicating subiquity based images, to skip chunks of
unneeded boot options. E.g. OEM boot is not supported by the subiquity
images.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tools/boot/eoan/boot-amd64'
2--- tools/boot/eoan/boot-amd64 2019-04-24 18:24:20 +0000
3+++ tools/boot/eoan/boot-amd64 2019-04-26 13:02:57 +0000
4@@ -447,7 +447,7 @@
5 label live
6 menu label $livelabel
7 kernel $CASPER_KERNEL
8- append $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT initrd=$CASPER_INITRD $QUIET $SPLASH ---
9+ append $(echo $KERNEL_PARAMS $DEFAULT_PRESEED $liveparams $LAYERFS_PATH_OPT initrd=$CASPER_INITRD $QUIET $SPLASH ---)
10 EOF
11 for variant in "" " (safe graphics)^ nomodeset"; do
12 suffix="${variant%^*}"
13@@ -455,7 +455,7 @@
14 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
15 menuentry "${livelabel#^}${suffix}" {
16 set gfxpayload=keep
17- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT $QUIET $SPLASH$extra_kopt ---
18+ linux $CASPER_KERNEL $(echo $KERNEL_PARAMS $DEFAULT_PRESEED $liveparams $LAYERFS_PATH_OPT $QUIET $SPLASH $extra_kopt ---)
19 initrd $CASPER_INITRD
20 }
21 EOF
22@@ -463,7 +463,7 @@
23 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
24 menuentry "${livelabel#^}" {
25 set gfxpayload=keep
26- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} $QUIET $SPLASH ---
27+ linux $CASPER_KERNEL $(echo $KERNEL_PARAMS $DEFAULT_PRESEED $liveparams $LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} $QUIET $SPLASH ---)
28 initrd $CASPER_INITRD
29 }
30 EOF
31@@ -472,7 +472,7 @@
32 label live-install
33 menu label ^Install $HUMANPROJECT
34 kernel $CASPER_KERNEL
35- append $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity initrd=$CASPER_INITRD $QUIET $SPLASH ---
36+ append $(echo $KERNEL_PARAMS $DEFAULT_PRESEED $LAYERFS_PATH_OPT only-ubiquity initrd=$CASPER_INITRD $QUIET $SPLASH ---)
37 EOF
38 for variant in "" " (safe graphics)^ nomodeset"; do
39 suffix="${variant%^*}"
40@@ -480,14 +480,14 @@
41 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
42 menuentry "Install $HUMANPROJECT${suffix}" {
43 set gfxpayload=keep
44- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity $QUIET $SPLASH$extra_kopt ---
45+ linux $CASPER_KERNEL $(echo $KERNEL_PARAMS $DEFAULT_PRESEED $LAYERFS_PATH_OPT only-ubiquity $QUIET $SPLASH$extra_kopt ---)
46 initrd $CASPER_INITRD
47 }
48 EOF
49 done
50 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
51 menuentry "Install $HUMANPROJECT" {
52- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} $QUIET $SPLASH ---
53+ linux $CASPER_KERNEL $(echo $KERNEL_PARAMS $DEFAULT_PRESEED $LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} $QUIET $SPLASH ---)
54 initrd $CASPER_INITRD
55 }
56 EOF
57@@ -551,10 +551,12 @@
58 EOF
59 fi
60 fi
61+
62 # The GRUB versions of this only correspond to single isolinux labels,
63 # because we don't yet have the necessary technology in our GRUB menu stack
64 # to have a two-dimensional set of boot options, as is implemented for
65 # isolinux using the gfxboot "applies" keyword.
66+if [ "$SUBIQUITY" == "0" ]; then
67 for kp in $KERNEL_PREFIXES; do
68 cat >> boot$N/isolinux/${!kp}gfxboot.cfg <<EOF
69 label ${!kp}oem=OEM install (for manufacturers)
70@@ -584,6 +586,8 @@
71 EOF
72 fi
73 done
74+fi
75+
76 if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
77 if [ "$PROJECT" != ubuntu-server ]; then
78 cat >> boot$N/isolinux/gfxboot.cfg <<EOF
79
80=== modified file 'tools/boot/eoan/common.sh'
81--- tools/boot/eoan/common.sh 2019-04-20 08:07:06 +0000
82+++ tools/boot/eoan/common.sh 2019-04-26 13:02:57 +0000
83@@ -35,7 +35,10 @@
84 ;;
85 ubuntu-server)
86 if [ "$CDIMAGE_LIVE" != 1 ]; then
87- DEFAULT_PRESEED='file=/cdrom/preseed/ubuntu-server.seed'
88+ DEFAULT_PRESEED='file=/cdrom/preseed/ubuntu-server.seed'
89+ SUBIQUITY=0
90+ else
91+ SUBIQUITY=1
92 fi
93 ;;
94 ubuntu-mid)

Subscribers

People subscribed via source and target branches