* Fix hooks under encrypted partitions
We had a mess of mounting and unmounting things around when we try to
copy things to persistent.
Part of the changes (using the by-label to mount the persistent) are due
to the change in kcrypt. As we set the same label to the encrypted fs
and unencrypted fs, our utils.Mount could get mistaken and return the
first hit, which usually its the encrypted one, and we cannot mount that
one.
This patch brings it up to date.
- Makes bundles and logs hooks work when we have encrypted persistent.
It didnt work before.
- Makes both workflows the same.
- Locks everything once its over, to not leave encrypted parts around
- Mounts OEM so kcrypt can read the config if we are using a remote
server for encryption
- Mounts by label so there is not a change of getting the wrong device
- Uses the mount syscall directly. The util can mistake and return the
actual encrypted part if they both have the same label and finds it
first
---------
Signed-off-by: Itxaka <itxaka@kairos.io>
* Converge all yaml libs into v3
Signed-off-by: Itxaka <itxaka@kairos.io>
* go mod tid
Signed-off-by: Itxaka <itxaka@kairos.io>
---------
Signed-off-by: Itxaka <itxaka@kairos.io>
This was failing but wasn't visible because it needs
`fail_on_bundles_errors: true` to be set in the Kairos config.
We need to find whether we need a new test or an existing one can be
adapted to catch this.
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* Bump go in Earthly and workflows to ^1.20
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Update go.mod version
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Lint
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Remove pin of go version to get the latest
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Remove minor version
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
---------
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
https://go.dev/doc/modules/major-version
This way we can bump the kairos dependency on the provider-kairos repo
which otherwise produced the error:
```
~/workspace/kairos/provider-kairos (main)*$ go get -u github.com/kairos-io/kairos@v2.0.0-alpha3
go: github.com/kairos-io/kairos@v2.0.0-alpha3: invalid version: module contains a go.mod file, so module path must match major version ("github.com/kairos-io/kairos/v2")
```
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Co-authored-by: Itxaka <itxaka.garcia@spectrocloud.com>