Commit Graph

27 Commits

Author SHA1 Message Date
Itxaka
3d9999b170
Several improvements
Bump cli from v2 to v3
Drop several outdated commands
Drop unused libraries like config
Improve the log process by unifying into a single one witht he same name
Bump all deps
Add a version command so its inline with our other binaries
Add commit and go build info to version command

Signed-off-by: Itxaka <itxaka@kairos.io>
2025-04-16 15:35:22 +02:00
Itxaka
84b9223b87
Use kairos logger from sdk (#437) 2024-09-18 10:10:39 +02:00
Mauro Morales
7ed4425bb4 Bump urfave/cli to v2
Signed-off-by: Mauro Morales <contact@mauromorales.com>
2024-05-30 14:19:19 +02:00
Itxaka
418027453d
Rework TPM workflow (#318)
Co-authored-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-05-28 11:48:37 +02:00
Itxaka
94af8c8dd3 Also unlock with TPM
so we can use the same functions everywhere just with a flag

Signed-off-by: Itxaka <itxaka@kairos.io>
2023-11-30 11:39:21 +01:00
Itxaka
e43da08f2d Allow passing flags to luksify
flags for luks version and use tpm

Signed-off-by: Itxaka <itxaka@kairos.io>
2023-11-30 11:01:39 +01:00
Itxaka
365f16e8f1 Move all functions under pkg
Signed-off-by: Itxaka <itxaka@kairos.io>
2023-11-30 10:24:55 +01:00
Itxaka
36f861fd0c Use reproducible UUIDs for partition identification
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-05-04 12:07:21 +02:00
Itxaka
6d6dfd00a1 🌱 Make some functions public
So they can be imported from different places as lib and re-used

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-04-19 14:44:33 +02:00
Mauro Morales
0f3eee7851
Add golint
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-03-29 17:05:51 +02:00
Dimitris Karakasilis
018322ff00
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>
2023-01-18 14:55:25 +02:00
Ettore Di Giacinto
4234ae7034 Incorporating feedback review 2022-11-23 15:11:48 +00:00
Ettore Di Giacinto
193a7da9ee
Update main.go
Co-authored-by: Dimitris Karakasilis <jimmykarily@gmail.com>
2022-11-23 16:05:44 +01:00
Ettore Di Giacinto
1c3a3ac510 Do not fail if we can't find a partition file 2022-11-23 14:09:44 +01:00
Dimitris Karakasilis
b9572125e1
Fix typo in name, bad function call and version of the binary
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2022-11-15 15:09:56 +02:00
Dimitris Karakasilis
29f22e7f92
Update partition label with the store one before asking for a passphrase
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2022-11-11 13:14:31 +02:00
Dimitris Karakasilis
8ca95e953b
Add functions to produce a string representation of a partition
so that we encapsulate all the logic in the same package

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2022-11-11 12:11:43 +02:00
Dimitris Karakasilis
d84b1ea2c2
Make kcrypt encrypt return useful lable/uuid mapping data
part of: https://github.com/kairos-io/kairos/issues/380

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2022-11-10 16:21:48 +02:00
Ettore Di Giacinto
4c073ca50c Make mkfs call more compatible 2022-10-15 16:34:18 +00:00
Ettore Di Giacinto
ce6ef0573b Wait mapper to be ready before formatting 2022-10-15 16:19:36 +00:00
mudler
5dd71fbf19 Use luks1 by default 2022-10-06 00:24:06 +02:00
mudler
410f8b2ed7 Close device after luksify 2022-10-06 00:16:03 +02:00
mudler
5fbdc4d614 Minor fixups to the encryption process 2022-10-06 00:03:43 +02:00
mudler
d977bdf888 go fmt 2022-10-05 23:09:04 +02:00
mudler
dc90d59ad2 Add /dev/ prefix to partition found 2022-10-05 23:08:50 +02:00
Ettore Di Giacinto
06a8eff25f Minor fixups 2022-10-04 17:08:20 +00:00
mudler
b05d3c1e54 Initial import 2022-10-03 11:03:48 +02:00