Add kcrypt packages and to initrd

This commit is contained in:
Ettore Di Giacinto
2022-10-06 15:10:42 +00:00
parent 6ad00ed05f
commit 22739e9033
6 changed files with 71 additions and 4 deletions

View File

@@ -17,7 +17,18 @@ copy:
version: ">=0"
source: "/usr/bin/elemental"
destination: "/usr/bin/elemental"
- package:
category: "dracut"
name: "kcrypt"
version: ">=0"
source: "/package/."
destination: "/"
- package:
category: "system"
name: "kcrypt"
version: ">=0"
source: "/usr/bin/kcrypt"
destination: "/usr/bin/kcrypt"
prelude:
# remove if any
- rm -rf /boot/initrd || true

View File

@@ -1,10 +1,10 @@
packages:
- name: "opensuse"
category: "distro-initrd"
version: "0.4"
version: "0.5"
- name: "fedora"
category: "distro-initrd"
version: "0.4"
version: "0.5"
- name: "ubuntu"
category: "distro-initrd"
version: "0.4"
version: "0.5"

View File

@@ -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/* /package/usr/lib/dracut/modules.d
- cp {{.Values.name}}/dracut.conf /package/etc/dracut.conf.d/10-kcrypt.conf
env:
- GITHUB_ORG={{ ( index .Values.labels "github.owner" ) }}
package_dir: "/package"

View File

@@ -0,0 +1,10 @@
name: kcrypt
category: dracut
version: "0.1"
labels:
github.repo: "kcrypt"
github.owner: "kairos-io"
uri:
- https://github.com/kairos-io/kcrypt
license: "Apache License v2"
description: "Dracut module for kcrypt"

View File

@@ -0,0 +1,18 @@
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
steps:
- |
PACKAGE_VERSION=${PACKAGE_VERSION%\+*} && \
cd go/src/github.com/${GITHUB_ORG}/{{ .Values.name }}/ && git checkout v"${PACKAGE_VERSION}" -b build && go build -ldflags="-w -s" && mv {{.Values.name}} /usr/bin/
- chmod +x /usr/bin/{{.Values.name}}
includes:
- /usr/bin/{{.Values.name}}

View File

@@ -0,0 +1,10 @@
name: kcrypt
category: system
version: "0.1"
labels:
github.repo: "kcrypt"
github.owner: "kairos-io"
uri:
- https://github.com/kairos-io/kcrypt
license: "Apache License v2"
description: "Cloud native guardian for persistent data in the edge"