mirror of
https://github.com/vhaudiquet/ecrou.git
synced 2026-11-12 22:22:44 +00:00
build: move the entitlements next to the Homebrew formula
All consumers live in packaging already: the formula codesigns at install, and the CI and release workflows codesign the built binary. The macOS dir held nothing else.
This commit is contained in:
1 parent
a3b4dca2d9
commit
d14d8c07bd
5 files changed
+6
-6
No files matched your search
@@ -71,7 +71,7 @@ jobs:
|
||||
# HVF grants VM creation only to binaries carrying the hypervisor
|
||||
# entitlement on current macOS; packaging signs the same way.
|
||||
- name: Sign the binary with the hypervisor entitlement
|
||||
run: codesign --force --sign - --entitlements packaging/macos/ecrou.entitlements target/release/ecrou
|
||||
run: codesign --force --sign - --entitlements packaging/homebrew/ecrou.entitlements target/release/ecrou
|
||||
|
||||
- name: Probe
|
||||
run: ./target/release/ecrou probe
|
||||
|
||||
@@ -87,7 +87,7 @@ jobs:
|
||||
run: cargo build --release -p ecrou-cli
|
||||
|
||||
- name: Sign the binary with the hypervisor entitlement
|
||||
run: codesign --force --sign - --entitlements packaging/macos/ecrou.entitlements target/release/ecrou
|
||||
run: codesign --force --sign - --entitlements packaging/homebrew/ecrou.entitlements target/release/ecrou
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
|
||||
@@ -342,7 +342,7 @@ the release tarball and pushes it (gated on a `HOMEBREW_TAP_TOKEN`
|
||||
PAT; without the secret the job no-ops). The formula carries the runtime
|
||||
dependencies (`libkrun` from the krun tap, `e2fsprogs`, `libarchive`),
|
||||
builds from source with cargo, and re-signs the binary with the
|
||||
entitlements plist from `packaging/macos/` — brew bottles are
|
||||
entitlements plist from `packaging/homebrew/` — brew bottles are
|
||||
ad-hoc signed, so the signature is part of the formula's install,
|
||||
not of the artifact. The formula is pinned by tag until the first
|
||||
release exists, then switches to the release tarball + sha256 the
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# krunkit comes from, because the engine is dlopen'd from those kegs
|
||||
# at runtime.
|
||||
class Ecrou < Formula
|
||||
desc "One-shot microVM environments"
|
||||
desc "a small microVM runtime based on libkrun"
|
||||
homepage "https://github.com/vhaudiquet/ecrou"
|
||||
# Pinned by tag until the first release exists; switch to the
|
||||
# release tarball + sha256 then.
|
||||
@@ -26,14 +26,14 @@ class Ecrou < Formula
|
||||
# with the hypervisor entitlement; on current macOS the signature
|
||||
# is a hard requirement, the same one krunkit's formula carries.
|
||||
system "codesign", "--force", "--sign", "-",
|
||||
"--entitlements", "packaging/macos/ecrou.entitlements", bin/"ecrou"
|
||||
"--entitlements", "packaging/homebrew/ecrou.entitlements", bin/"ecrou"
|
||||
end
|
||||
|
||||
def caveats
|
||||
<<~EOS
|
||||
The binary is ad-hoc signed with the com.apple.security.hypervisor
|
||||
entitlement. Rebuilding from source (cargo) requires re-signing:
|
||||
codesign --force --sign - --entitlements packaging/macos/ecrou.entitlements target/release/ecrou
|
||||
codesign --force --sign - --entitlements packaging/homebrew/ecrou.entitlements target/release/ecrou
|
||||
`ecrou probe` reports this when the entitlement is missing.
|
||||
EOS
|
||||
end
|
||||
|
||||
File renamed without changes.
Reference in new issue
Block a user