947 Commits

Author SHA1 Message Date
Samuele Pedroni
5967930d46 many: use pre-UC20 instead of non-UC20+ as is less clunky 2022-04-29 14:43:39 +02:00
Samuele Pedroni
b8e364fa47 many: switch to UC20+ in user messages (instead of UC20) 2022-04-29 14:30:24 +02:00
Maciej Borzecki
6ce1d791a2 boot: move to secboot/keys
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-04-26 10:43:55 +02:00
Paweł Stołowski
1f6f1ee740 Fixes related to inclusive language. 2022-04-14 12:51:08 +02:00
Alfonso Sánchez-Beato
7dd912b49d boot,bootloader: add missing grub.cfg assets mocks in some tests
This is the same fix as commit 17fbdc7c, but in other tests.

The current code will mock the `amd64` architecture when running some
tests but it does not mock the `grub.cfg:static-cmdline` or the
`grub-recovery.cfg:static-cmdline`. This is needed because the
`bootloader/asserts` package registers the cmdline via `init()` so
this happens before the architecture is mocked in the testing
code. Hence the tests will fail when inspecting the command line on
non amd64/i386 machines.

This commit makes the mocking explicit. An alternative approach would
be to move the snippet registration out of `init()` and run it on
first boot but that has it's own problems so this other approach was
followed.
2022-04-06 16:24:25 +02:00
Michael Vogt
50fca7c0eb Merge pull request #11511 from mvo5/less-sanity-3
many: replace use of "sanity" with more inclusive naming (part 2)
2022-03-25 11:04:45 +01:00
Michael Vogt
2af863e2aa Merge pull request #11068 from alfonsosanchezbeato/piboot
bootloader: add support for piboot
2022-03-18 10:03:03 +01:00
Alfonso Sánchez-Beato
3cf6f0eda6 boot/initramfs_test: add test case and change method name 2022-03-16 17:20:40 +01:00
Alfonso Sánchez-Beato
559d98ca30 boot/initramfs.go: use osutil to parse kernel command line 2022-03-16 17:20:40 +01:00
Michael Vogt
44498b937c Merge pull request #11470 from bboozzoo/bboozzoo/factory-reset-seal-keys
boot: support factory-reset when sealing and resealing
2022-03-16 12:48:12 +01:00
Michael Vogt
46ef068423 many: replace use of "sanity" with more inclusive naming
This commit replaces the use of "sanity" with more inclusive
naming. When "sanity" is used in a more general sense either
"validity" or "quick" is used.
2022-03-16 09:10:59 +01:00
Alfonso Sánchez-Beato
115dcc9ad7 boot/initramfs_test.go: fix typo 2022-03-15 11:16:47 +01:00
Michael Vogt
277eb06412 many: replace use of "sanity" with more inclusive naming
This commit replaces the use of "sanity" with more inclusive
naming.

When `sanity` is used in a more general sense either `validity`
or `quick` is used.
2022-03-14 18:22:34 +01:00
Maciej Borzecki
2529bd5be0 boot: drop unnecessary check for system modes
There is a more relevant per system check done further in the code path

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-03-14 11:35:05 +01:00
Maciej Borzecki
af77d93964 boot: tweak the order in which current and tried systems are processed for their modes
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-03-14 10:48:07 +01:00
Maciej Borzecki
e328a854dc boot: seal and reseal keys for factory-reset mode
Consider factory-reset mode when sealing and resealing keys. Allow factory-reset
mode only for tested recovery systems.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-03-07 13:56:53 +01:00
Maciej Borzecki
6a9529858c boot: compose command line for factory-reset mode
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-03-07 13:44:07 +01:00
Maciej Borzecki
c18bbb6068 boot: add factory-reset to valid modes
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-03-07 13:44:00 +01:00
Maciej Borzecki
d49dd52f57 boot: mock amd64 arch for mabootable 20 suite
One last fix for tests failing on non amd64:

----------------------------------------------------------------------
FAIL: makebootable_test.go:791: makeBootable20Suite.TestMakeRunnableSystem20RunModeSealKeyErr

makebootable_test.go:893:
    c.Assert(err, IsNil)
... value *errors.errorString = &errors.errorString{s:"cannot copy trusted asset to cache: read /tmp/check-855608922/49/run/mnt/ubuntu-seed: is a directory"} ("cannot copy trusted asset to cache: read /tmp/check-855608922/49/run/mnt/ubuntu-seed: is a directory")

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-03-03 13:48:36 +01:00
Maciej Borzecki
3bf7f8a53f boot: mock amd64 architecture in relevant unit tests
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-03-02 08:31:08 +01:00
Alfonso Sánchez-Beato
ce12dc8aa7 boot: improve comment in updateNotScriptableBootloaderStatus 2022-02-28 14:49:54 +01:00
Alfonso Sánchez-Beato
8a519f46b1 boot,bootloader: add error parameter to GetRebootArguments() 2022-02-23 16:23:53 +01:00
Paweł Stołowski
5d2f85153e Merge branch 'master' into core20-preseed/pick-system 2022-02-22 16:44:22 +01:00
Alfonso Sánchez-Beato
2543d2c2e3 Merge branch 'master' into piboot 2022-02-22 15:38:12 +01:00
Samuele Pedroni
e46e2c612e gadget/install: measure and save disk volume traits during install.Run()
Merge pull request #11374 from anonymouse64/feature/uc20-multi-volume-gadget-asset-updates-26

This file will be necessary later on when we perform multi-volume gadget asset
updates.

This will be necessary later on when we perform multi-volume gadget asset
updates.

Also adjust install mode unit tests for install.Run() to check this file too.

Also test for the disk-mapping.json in some spread tests too.
2022-02-22 15:29:33 +01:00