Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: kairos-io/kairos-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.5
Choose a base ref
...
head repository: kairos-io/kairos-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.1.6
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on May 14, 2024

  1. Disable certs list in state (#113)

    Itxaka authored May 14, 2024
    Copy the full SHA
    c643cb5 View commit details
Showing with 6 additions and 2 deletions.
  1. +6 −2 state/state.go
8 changes: 6 additions & 2 deletions state/state.go
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@ import (
"github.com/itchyny/gojq"
"github.com/jaypipes/ghw"
"github.com/jaypipes/ghw/pkg/block"
"github.com/kairos-io/kairos-sdk/signatures"
"github.com/kairos-io/kairos-sdk/types"
"github.com/kairos-io/kairos-sdk/utils"
"github.com/rs/zerolog"
@@ -326,7 +325,9 @@ func detectKairos(r *Runtime) {
k.Version = v
}
k.Init = utils.GetInit()
k.EfiCerts = getEfiCertsCommonNames()
// go-uefi calls os.exit directly if it fails which breaks state. we cannot tolerate that as for us state is
// mainly optional data, not a failure if we cant find it
//k.EfiCerts = getEfiCertsCommonNames()
k.SecureBoot = efi.GetSecureBoot()
r.Kairos = *k

@@ -359,8 +360,10 @@ func detectEncryptedPartitions(runtime *Runtime) {
}

// getEfiCertsCommonNames returns a simple list of the Common names of the certs
/*
func getEfiCertsCommonNames() types.EfiCerts {
var data types.EfiCerts
certs, _ := signatures.GetAllCerts() // Ignore errors here, we dont care about them, we only want the presentation of the names
for _, c := range certs.PK {
data.PK = append(data.PK, c.Issuer.CommonName)
@@ -373,6 +376,7 @@ func getEfiCertsCommonNames() types.EfiCerts {
}
return data
}
*/

func NewRuntimeWithLogger(logger zerolog.Logger) (Runtime, error) {
logger.Info().Msg("creating a runtime")