Move from partition_info to config package

Now the kcrypt configuration will be just a block (`kcrypt`) in the regular
kairos configuration files.

We will use the config mechanism of looking up in multiple directories
becase the old code was only looking at `/oem` but at boot time
(initramfs) the configuration was present in `/sysroot/oem`.

The reason it "worked" was that we had a bug and a sealedvolume was
matching our request simply because we sent an empty UUID/Label/Name
and the sealedvolume had and empty UUID (empty matches empty, right?)

With that fixed on the challenger server side, it became obvious that we
never actually read the partition_info file because we were looking for
it at the wrong place.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
Dimitris Karakasilis
2023-01-13 17:41:39 +02:00
parent 361e1ab817
commit 018322ff00
8 changed files with 822 additions and 379 deletions

13
pkg/config/suite_test.go Normal file
View File

@@ -0,0 +1,13 @@
package config
import (
"testing"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
func TestPartitionINfo(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Kcrypt config test suite")
}