From 16fae52da20dfff952b01f73fb860529e7c5e5ba Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Fri, 10 May 2024 04:00:36 -0700 Subject: [PATCH] add sbctl (#1022) (#1246) (cherry picked from commit bdcbacef70effe3920d31438c59f637fd49d1edc) Co-authored-by: Cappy Ishihara --- anda/tools/sbctl/anda.hcl | 5 +++ anda/tools/sbctl/sbctl.spec | 84 ++++++++++++++++++++++++++++++++++++ anda/tools/sbctl/update.rhai | 1 + 3 files changed, 90 insertions(+) create mode 100644 anda/tools/sbctl/anda.hcl create mode 100644 anda/tools/sbctl/sbctl.spec create mode 100644 anda/tools/sbctl/update.rhai diff --git a/anda/tools/sbctl/anda.hcl b/anda/tools/sbctl/anda.hcl new file mode 100644 index 0000000000..85845deea1 --- /dev/null +++ b/anda/tools/sbctl/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "sbctl.spec" + } +} diff --git a/anda/tools/sbctl/sbctl.spec b/anda/tools/sbctl/sbctl.spec new file mode 100644 index 0000000000..79c89b169c --- /dev/null +++ b/anda/tools/sbctl/sbctl.spec @@ -0,0 +1,84 @@ +Name: sbctl +Version: 0.13 +Release: 1%{?dist} +Summary: Secure Boot key manager + +License: MIT +URL: https://github.com/Foxboron/sbctl +Source0: https://github.com/Foxboron/sbctl/releases/download/%{version}/sbctl-%{version}.tar.gz + +ExclusiveArch: %{golang_arches} + +Requires: binutils +Requires: util-linux + +Recommends: systemd-udev + +BuildRequires: asciidoc +BuildRequires: git +BuildRequires: go-rpm-macros + +%description +sbctl intends to be a user-friendly secure boot key manager capable of setting +up secure boot, offer key management capabilities, and keep track of files that +needs to be signed in the boot chain. + + +%prep +%setup -q +sed -i '/go build/d' Makefile + + +%build +export GOPATH=%{_builddir}/go +%global gomodulesmode GO111MODULE=on +%gobuild -o sbctl ./cmd/sbctl +%make_build + + +%install +%make_install PREFIX=%{_prefix} + + +%transfiletriggerin -P 1 -- /boot /efi /usr/lib /usr/libexec +if grep -q -m 1 -e '\.efi$' -e '/vmlinuz$'; then + exec - 0.13-1 +- Push to Terra + +* Tue Dec 26 2023 Andrew Gunnerson - 0.13-1 +- Update to version 0.13 + +* Sun Nov 12 2023 Andrew Gunnerson - 0.12-2 +- Switch to upstream 91-sbctl.install kernel-install script + +* Fri Oct 20 2023 Andrew Gunnerson - 0.12-1 +- Update to version 0.12 + +* Sat Mar 25 2023 Andrew Gunnerson - 0.11-1 +- Update to version 0.11 + +* Mon Dec 12 2022 Andrew Gunnerson - 0.10-1 +- Update to version 0.10 + +* Tue May 3 2022 Andrew Gunnerson - 0.9-1 +- Update to version 0.9 + +* Thu Jan 27 2022 Andrew Gunnerson - 0.8-1 +- Initial release \ No newline at end of file diff --git a/anda/tools/sbctl/update.rhai b/anda/tools/sbctl/update.rhai new file mode 100644 index 0000000000..603627aa65 --- /dev/null +++ b/anda/tools/sbctl/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("Foxboron/sbctl"));