~ondrak/ondras-snaps/+git/snapd:cmd-export-FDEinitramfsHelper

Last commit made on 2024-04-15
Get this branch:
git clone -b cmd-export-FDEinitramfsHelper https://git.launchpad.net/~ondrak/ondras-snaps/+git/snapd

Branch merges

Branch information

Name:
cmd-export-FDEinitramfsHelper
Repository:
lp:~ondrak/ondras-snaps/+git/snapd

Recent commits

9a68b66... by Ondrej Kubik

cmd: snap-bootstrap: add fdekeymgr functionality

Signed-off-by: Ondrej Kubik <email address hidden>

79ece84... by Ondrej Kubik

cmd/snap-fde-keymgr: rework test after sub-package introduction

Signed-off-by: Ondrej Kubik <email address hidden>

f8b4436... by Ondrej Kubik

cmd/snap-fde-keymgr: introduce new sub-package for later re-use

Signed-off-by: Ondrej Kubik <email address hidden>

fe0ce14... by Alfonso Sanchez-Beato

packaging: add kmod as Depends (#13830)

It is needed now on hybrid systems to be able to build the drivers
tree.

3af6a4d... by Maciej Borzecki

overlord/snapstate/backend: mock depmod

The tests seem to call real depmod which fails when building on LP:

```
----------------------------------------------------------------------
FAIL: setup_test.go:770: setupSuite.TestRemoveKernelModulesComponentsFails

setup_test.go:786:
    s.testSetupKernelModulesComponents(c, firstInstalled, nil, ksnap, kernRev, "")
setup_test.go:709:
    c.Assert(err, IsNil)
... value *exec.Error = &exec.Error{Name:"depmod", Err:(*errors.errorString)(0x4000118380)} ("exec: \"depmod\": executable file not found in $PATH")

----------------------------------------------------------------------
FAIL: setup_test.go:656: setupSuite.TestSetupAndRemoveKernelModulesComponents

setup_test.go:662:
    // Set-up and then remove
    s.testSetupKernelModulesComponents(c, toInstall, nil, ksnap, kernRev, "")
setup_test.go:709:
    c.Assert(err, IsNil)
... value *exec.Error = &exec.Error{Name:"depmod", Err:(*errors.errorString)(0x4000118380)} ("exec: \"depmod\": executable file not found in $PATH")

----------------------------------------------------------------------
FAIL: setup_test.go:666: setupSuite.TestSetupAndRemoveKernelModulesComponentsWithInstalled

setup_test.go:672:
    s.testSetupKernelModulesComponents(c, firstInstalled, nil, ksnap, kernRev, "")
setup_test.go:709:
    c.Assert(err, IsNil)
... value *exec.Error = &exec.Error{Name:"depmod", Err:(*errors.errorString)(0x4000118380)} ("exec: \"depmod\": executable file not found in $PATH")

OOPS: 164 passed, 3 FAILED
```

Make sure to have a default mock which fails and a mock the appropriate variant
in tests which require it.

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

2b786bf... by Ondrej Kubik

cmd: snap-bootstrap: fix unpreseeded sigle boot install (#13475)

Signed-off-by: Ondrej Kubik <email address hidden>

fe87c19... by Alfonso Sanchez-Beato

kernel,overlord: fix component unit tests

c2956ea... by Sergio Cazzolato

tests: improve nightly github workflow (#13825)

The main fix in this change is the cobertura file path is updated
Also several shellcheck improvements are included

25c9e7d... by Maciej Borzecki

daemon: fix notices API tests on non Ubuntu (#13823)

Snap mount location is hardcoded, but os-release is not mocked, so host paths
are assumed.

Failed like so:

```
----------------------------------------------------------------------
FAIL: api_notices_test.go:947: noticesSuite.TestAddNoticesSnapCmdReexecCore

api_notices_test.go:948:
    s.testAddNoticesSnapCmd(c, "/snap/core/12/usr/bin/snap", false)
api_base_test.go:648:
    c.Assert(rsp.Type, check.Equals, daemon.ResponseTypeSync, check.Commentf("expected sync resp: %#v, result: %+v", rsp, rsp.Result))
... obtained daemon.ResponseType = "error"
... expected daemon.ResponseType = "sync"
... expected sync resp: &daemon.respJSON{Type:"error", Status:403, StatusText:"", Result:(*daemon.errorResult)(0xc0007911d0), Change:"", Sources:[]string(nil), SuggestedCurrency:"", WarningTimestamp:<nil>, WarningCount:0, Maintenance:(*daemon.errorResult)(nil)}, result: &{Message:only snap command can record notices Kind:login-required Value:<nil>}
... Difference:
... "error" != "sync"

```

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

1a5cef2... by Alfonso Sanchez-Beato

o/snapstate: add support for kernel-modules handlers (#13748)

* kernel,overlord: use function from kernel pkg to get kernel early

mount dir.

* o/snapstate/sequence: add ancillary methods to retrieve components

for a given snap revision in the sequence. One of the methods can be
given a component type for filtering.

* o/snapstate/backend: add methods to set-up kernel-modules components

* o/snapstate: add handlers to set-up kernel-modules components

* o/snapstate: add specific setup task for kernel-modules components

* o/{devicestate,snapstate}: change name of kernel set-up tasks

* systemd: add before dependency to early mounts for local-fs.target

So dependencies are the same as when mounting in /snap, as that is
where we will do also the early mounts now.

* kernel: use normal mount points when building drivers tree

* overlord/devicestate: no need to remove early mount anymore

* overlord/snapstate: consider kernel type when ensuring the mounts

* kernel: put modules back in "updates" folder

As that gives priority to the kernel modules under that directory (see
depmod.d(5)).