Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,18 @@ jobs:
target/bcvk-*.tar.gz
target/bcvk-*.tar.gz.sha256
retention-days: 7

homebrew-formula:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4

- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Test formula
run: |
brew tap bootc-dev/bcvk ${{ github.workspace }}
brew install --build-from-source --verbose bootc-dev/bcvk/bcvk
bcvk --help
30 changes: 30 additions & 0 deletions bcvk.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
class Bcvk < Formula
desc "Bootc virtualization kit - launch ephemeral VMs and create disk images from bootc containers"
homepage "https://github.com/bootc-dev/bcvk"
url "https://github.com/bootc-dev/bcvk/archive/refs/tags/v0.5.3.tar.gz"
sha256 "67c632b26513f77edcf63b3da8b22941a4ef467c984bfce301544533a1f12979"
license any_of: ["MIT", "Apache-2.0"]
head "https://github.com/bootc-dev/bcvk.git", branch: "main"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This is a well-written Homebrew formula. To improve its long-term maintainability, I suggest adding a livecheck block. This allows Homebrew's infrastructure to automatically detect new releases of bcvk and open pull requests to update the formula, ensuring users get timely updates.

  head "https://github.com/bootc-dev/bcvk.git", branch: "main"

  livecheck do
    url :stable
    strategy :github_latest
  end


depends_on "rust" => :build
depends_on "pkg-config" => :build
depends_on "openssl@3"

def install
ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix
ENV["OPENSSL_NO_VENDOR"] = "1"
system "cargo", "install", *std_cargo_args(path: "crates/kit")
end

test do
# Test that the binary exists and help works
output = shell_output("#{bin}/bcvk --help")
assert_match "bootc", output
assert_match "Usage: bcvk <COMMAND>", output

# Test that subcommands are available
assert_match "ephemeral", output
assert_match "to-disk", output
assert_match "libvirt", output
end
end
16 changes: 15 additions & 1 deletion docs/src/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Prerequisites

Required:
- [Rust](https://www.rust-lang.org/)
- [Rust](https://www.rust-lang.org/) (if building from source)
- Git
- QEMU/KVM
- virtiofsd
Expand All @@ -16,6 +16,20 @@ Optional:
sudo usermod -a -G libvirt $USER
```

## Homebrew (Linux)

Install from the bcvk tap:

```bash
brew install bootc-dev/bcvk/bcvk
```

Or install the latest development version:

```bash
brew install --HEAD bootc-dev/bcvk/bcvk
```

## Building from Source

Without cloning the repo:
Expand Down