Fix fips build (#810)

This commit is contained in:
Itxaka
2024-04-16 13:20:32 +00:00
committed by GitHub
parent 906228f1e7
commit 7379fd723c
2 changed files with 4 additions and 25 deletions

View File

@@ -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 }}

View File

@@ -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"