snappy:release/2.48-hotfix1

Last commit made on 2020-12-03
Get this branch:
git clone -b release/2.48-hotfix1 https://git.launchpad.net/snappy

Branch merges

Branch information

Name:
release/2.48-hotfix1
Repository:
lp:snappy

Recent commits

1365275... by Michael Vogt on 2020-12-03

releasing package snapd version 2.48.1

0d72c2a... by Samuele Pedroni on 2020-12-02

gadget: disable ubuntu-boot role validation check

Merge pull request #9735 from mvo5/relax-role-check-2.48

A customer with a gadget snap that has a "ubuntu-boot" label
in the wild is broken by this new validation in 2.48. This
commit fixes this.

b7610e4... by Michael Vogt on 2020-12-02

gadget: disable ubuntu-boot role validation check

A customer with a gadget snap that has a "ubuntu-boot" label
in the wild is broken by this new validation in 2.48. This
commit fixes this.

ae35aed... by Michael Vogt on 2020-11-19

releasing package snapd version 2.48

9a79a79... by Ian Johnson on 2020-11-19

osutil: add KernelCommandLineKeyValue; boot: refactor ModeAnd...FromKernelCommandLine (#9659)

* boot/cmdline.go: add TODO about using strutil.KernelCommandLineSplit

Signed-off-by: Ian Johnson <email address hidden>

* strutil/cmdline.go: add GetKernelCommandLineKeyValue

This complements KernelCommandLineSplit, but goes further, checking for a
specific key-value pair in the kernel command line parameters, and returning the
value if found. This will be useful across the codebase for places where we want
to check one specific kernel command line parameter key-value pair.

Signed-off-by: Ian Johnson <email address hidden>

* logger/logger.go: use GetKernelCommandLineKeyValue directly

This is a bit more straight forward to read IMHO and potentially reduces some
looping over the parameters as we break as soon as we find snapd.debug in the
positive case where it is set.

Signed-off-by: Ian Johnson <email address hidden>

* strutil,osutil: move kernel commandline helpers to osutil

* boot: tweak TODO now that we use osutil.KernelCommandLineSplit

* many: refactor ModeAnd...FromKernelCommandLine and KernelCommandLineKeyValue

Refactor GetKernelCommandLineKeyValue to KernelCommandLineKeyValue which
returns a map of the specified keys that were found on the kernel command line
that have values. It also no longer takes the command line string as an
argument and instead parses the command line itself.

The above necessitates moving the mocking function for where to find
/proc/cmdline to osutil as well and adjusting many tests for this.

Finally, with all of this in place we can refactor
boot.ModeAndRecoverySystemFromKernelCommandLine to use the osutil helpers
and not duplicate parsing logic in the boot package. This does result in
a slight change in behavior where now duplicated kernel command line
parameters are not a fatal condition, but instead the last definition is
used.

Also adjust some tests to mock an empty proc/cmdline to avoid using the
host's version when running tests.

Signed-off-by: Ian Johnson <email address hidden>

* osutil, many: rename to KernelCommandLineKeyValues

Signed-off-by: Maciej Borzecki <email address hidden>

* boot: disallow non empty system label without a mode

Signed-off-by: Maciej Borzecki <email address hidden>

* osutil: tweak handling of cmdline keys

Signed-off-by: Maciej Borzecki <email address hidden>

* osutil: mv cmdline to kcmdline

Signed-off-by: Maciej Borzecki <email address hidden>

* osutil: comment tweak

Signed-off-by: Maciej Borzecki <email address hidden>

* logger: further tweaks

Signed-off-by: Maciej Borzecki <email address hidden>

Co-authored-by: Michael Vogt <email address hidden>
Co-authored-by: Maciej Borzecki <email address hidden>

ed10c56... by Michael Vogt on 2020-11-19

devicestate: implement boot.HasFDESetupHook (#9667)

* devicestate: implement boot.HasFDESetupHook

This commit adds support for boot.HasFDESetupHook and matching
tests.

* devicestate: move hasFDESetupHook setup into delayedCrossMgrInit()

* boot,devicestate: use deviceCtx to get fde-setup hook data

* devicestate: improve TestHasFdeSetupHook test

* devicestate: tweak TestHasFdeSetupHook further

* boot,devicestate: remove "bootWith" from SealKeyToModeenv() again

* boot: tweak error message

Signed-off-by: Maciej Borzecki <email address hidden>

* o/devicestate: tweak error messages and comments

Signed-off-by: Maciej Borzecki <email address hidden>

Co-authored-by: Maciej Borzecki <email address hidden>

9702503... by Ian Johnson on 2020-11-17

boot/makebootable.go: set snapd_recovery_mode=install at image-build time

This is the first step to doing away with the current default of
snapd_recovery_mode being unset implying "install". We need prepare-image (and
thus also ubuntu-image) to start writing "snapd_recovery_mode=install".

Signed-off-by: Ian Johnson <email address hidden>

737f396... by Michael Vogt on 2020-11-18

Merge pull request #9668 from mvo5/bboozzoo/uc20-bootloader-install-boot-config-cleanup-2.48

bootloader: use ForGadget when installing boot config (2.48)

78f427e... by Maciej Borzecki on 2020-11-16

image, bootloader: comment tweaks

Signed-off-by: Maciej Borzecki <email address hidden>

b96d863... by Maciej Borzecki on 2020-11-13

image: update tests to verify proper boot config installation

Signed-off-by: Maciej Borzecki <email address hidden>