From 1fe01c138e7ee5aff84d017e3a8b1a03f6b038d1 Mon Sep 17 00:00:00 2001 From: Itxaka Date: Mon, 13 Feb 2023 12:10:13 +0100 Subject: [PATCH] Add immucore package (#108) --- packages/system/dracut/immucore/build.yaml | 18 ++++++++++++++++++ .../system/dracut/immucore/definition.yaml | 11 +++++++++++ packages/system/immucore/build.yaml | 19 +++++++++++++++++++ packages/system/immucore/definition.yaml | 11 +++++++++++ 4 files changed, 59 insertions(+) create mode 100644 packages/system/dracut/immucore/build.yaml create mode 100644 packages/system/dracut/immucore/definition.yaml create mode 100644 packages/system/immucore/build.yaml create mode 100644 packages/system/immucore/definition.yaml diff --git a/packages/system/dracut/immucore/build.yaml b/packages/system/dracut/immucore/build.yaml new file mode 100644 index 0000000..2b9d0fa --- /dev/null +++ b/packages/system/dracut/immucore/build.yaml @@ -0,0 +1,18 @@ +image: "alpine" + +prelude: + - apk add git + - | + PACKAGE_VERSION=${PACKAGE_VERSION%\+*} && \ + git clone https://github.com/${GITHUB_ORG}/{{ .Values.name }}.git && cd {{.Values.name}} && git checkout v"${PACKAGE_VERSION}" + +steps: + - mkdir -p /package/usr/lib/dracut/modules.d + - mkdir -p /package/etc/dracut.conf.d/ + - cp -r {{.Values.name}}/dracut/28immucore /package/usr/lib/dracut/modules.d/28immucore + - cp {{.Values.name}}/dracut/dracut.conf /package/etc/dracut.conf.d/10-immucore.conf + +env: + - GITHUB_ORG={{ ( index .Values.labels "github.owner" ) }} + +package_dir: "/package" \ No newline at end of file diff --git a/packages/system/dracut/immucore/definition.yaml b/packages/system/dracut/immucore/definition.yaml new file mode 100644 index 0000000..6887575 --- /dev/null +++ b/packages/system/dracut/immucore/definition.yaml @@ -0,0 +1,11 @@ +name: "immucore" +category: "dracut" +version: "0.0.1" +labels: + github.repo: "immucore" + autobump.revdeps: "true" + github.owner: "kairos-io" +uri: + - https://github.com/kairos-io/kcrypt +license: "Apache License v2" +description: "Dracut module for immucore" \ No newline at end of file diff --git a/packages/system/immucore/build.yaml b/packages/system/immucore/build.yaml new file mode 100644 index 0000000..6bcc473 --- /dev/null +++ b/packages/system/immucore/build.yaml @@ -0,0 +1,19 @@ +requires: + - name: "toolchain-go" + category: "development" + version: ">=0" +prelude: + - 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 +env: + - GOPATH=/luetbuild/go/ + - GITHUB_ORG={{ ( index .Values.labels "github.owner" ) }} + - CGO_ENABLED=0 + - LDFLAGS="-s -w -X github.com/kairos-io/immucore/internal/version.Version=v${PACKAGE_VERSION}" +steps: + - | + PACKAGE_VERSION=${PACKAGE_VERSION%\+*} && \ + cd go/src/github.com/${GITHUB_ORG}/{{ .Values.name }}/ && git checkout v"${PACKAGE_VERSION}" -b build && go build -o {{ .Values.name }} -ldflags="${LDFLAGS}" && mv {{.Values.name}} /usr/bin/ + - chmod +x /usr/bin/{{.Values.name}} +includes: + - /usr/bin/{{.Values.name}} diff --git a/packages/system/immucore/definition.yaml b/packages/system/immucore/definition.yaml new file mode 100644 index 0000000..44a868f --- /dev/null +++ b/packages/system/immucore/definition.yaml @@ -0,0 +1,11 @@ +name: "immucore" +category: "system" +version: "0.0.1" +labels: + github.repo: "immucore" + autobump.revdeps: "true" + github.owner: "kairos-io" +uri: + - https://github.com/kairos-io/immucore +license: "Apache License v2" +description: "The Kairos immutability management interface" \ No newline at end of file