From 2f7654af558cf1a0e3f332675621a94195a6d96c Mon Sep 17 00:00:00 2001 From: Itxaka Date: Tue, 16 Apr 2024 14:50:26 +0200 Subject: [PATCH] Fix fips build Signed-off-by: Itxaka --- packages/system/kcrypt-challenger/build.yaml | 12 +++--------- .../system/kcrypt-challenger/collection.yaml | 17 +---------------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/packages/system/kcrypt-challenger/build.yaml b/packages/system/kcrypt-challenger/build.yaml index 12f484bf7..0f1af10fc 100644 --- a/packages/system/kcrypt-challenger/build.yaml +++ b/packages/system/kcrypt-challenger/build.yaml @@ -10,15 +10,9 @@ requires: version: ">=0" {{end}} prelude: - - apt-get update && apt-get install -y gcc -{{if not (or (eq .Values.category "fips") (eq .Values.category "fips-static"))}} - - apt-get install -y libssl-dev -{{ end }} + - apt-get update && apt-get install -y gcc libssl-dev - mkdir go/src/github.com/${GITHUB_ORG}/ -p - cd go/src/github.com/${GITHUB_ORG}/ && git clone https://github.com/${GITHUB_ORG}/{{ .Values.name }}.git -{{ if ne .Values.live "yes" }} - - cd go/src/github.com/${GITHUB_ORG}/ && git checkout 3912abcec424521725ccd335181f2fde90510081 -b build -{{ end }} env: - GOPATH=/luetbuild/go/ - DEBIAN_FRONTEND=noninteractive @@ -38,14 +32,14 @@ steps: PACKAGE_VERSION=${PACKAGE_VERSION%\+*} && \ mkdir -p /system/discovery && \ cd go/src/github.com/${GITHUB_ORG}/{{ .Values.name }}/ && go build -ldflags="${LDFLAGS}" -o {{ .Values.binary_name }} ./cmd/discovery/main.go && mv {{ .Values.binary_name }} /system/discovery - - upx -1 /system/discovery/{{ .Values.binary_name }} - - chmod +x /system/discovery/{{ .Values.binary_name }} {{if or (eq .Values.category "fips") (eq .Values.category "fips-static")}} {{ if .Values.arch }} {{ if eq .Values.arch "amd64" }} - go tool nm /system/discovery/{{ .Values.binary_name }} | grep -i "FIPS_mode" {{end}} {{end}} + - upx -1 /system/discovery/{{ .Values.binary_name }} + - chmod +x /system/discovery/{{ .Values.binary_name }} {{end}} includes: - /system/discovery/{{ .Values.binary_name }} diff --git a/packages/system/kcrypt-challenger/collection.yaml b/packages/system/kcrypt-challenger/collection.yaml index c4d867a3c..956beca96 100644 --- a/packages/system/kcrypt-challenger/collection.yaml +++ b/packages/system/kcrypt-challenger/collection.yaml @@ -2,7 +2,6 @@ packages: - name: kcrypt-challenger binary_name: kcrypt-discovery-challenger category: system - live: "yes" version: "0.8.0" labels: github.repo: "kcrypt-challenger" @@ -14,8 +13,7 @@ packages: - name: kcrypt-challenger binary_name: kcrypt-discovery-challenger category: fips - live: "yes" - version: "0.7.0" + version: "0.8.0" labels: github.repo: "kcrypt-challenger" github.owner: "kairos-io" @@ -23,16 +21,3 @@ packages: - https://github.com/kairos-io/kcrypt-challenger license: "Apache License v2" description: "Cloud native guardian for persistent data in the edge" - #- name: kcrypt-challenger - #binary_name: kcrypt-discovery-challenger - #ldflags: "-linkmode external -extldflags -static" - #category: fips-static - #live: "yes" - #version: "0.5.0" - #labels: - #github.repo: "kcrypt-challenger" - #github.owner: "kairos-io" - #uri: - #- https://github.com/kairos-io/kcrypt-challenger - #license: "Apache License v2" - #description: "Cloud native guardian for persistent data in the edge"