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
32 changes: 32 additions & 0 deletions docs/homebrew-publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,18 @@ path calls `scripts/homebrew-publish-sidecars.sh --status failed` so the failed
attempt is durable while the previous successful bottle remains selectable when
its fallback fields are complete.

The default trusted sidecar wrapper,
`scripts/homebrew-generate-sidecars-from-env.sh`, derives non-hello link
manifests from package kind. Program Formulae link their installed
`bin/<formula>` into the Homebrew prefix. Library Formulae link the declared
`[outputs]` headers, static libraries, and pkg-config files from the keg into
the prefix. Package-specific Node and browser outcome text may be supplied via
`KANDELO_HOMEBREW_NODE_SMOKE_COMMAND`,
`KANDELO_HOMEBREW_BROWSER_SMOKE_STATUS`, and
`KANDELO_HOMEBREW_BROWSER_SMOKE_REASON`; browser compatibility is recorded
only when `KANDELO_HOMEBREW_BROWSER_SMOKE_STATUS=success` and the browser VFS
smoke artifact environment is complete.

## VFS Planning And Building

Homebrew-derived VFS images are built from sidecars and verified bottle bytes,
Expand Down Expand Up @@ -265,6 +277,26 @@ It clones or reads the tap, builds a Homebrew VFS from published sidecars, runs
`/home/linuxbrew/.linuxbrew/bin/hello --version` through `NodeKernelHost`, and
checks negative ABI-mismatch and missing-bottle cases.

For the sqlite/bzip2/xz pilot and later non-hello package checks, use the
generic package smoke runner against a generated tap root:

```bash
npx tsx scripts/homebrew-package-node-smoke.ts \
--tap-root /path/to/kandelo-homebrew \
--formula sqlite \
--formula bzip2 \
--formula xz \
--arch wasm32 \
--result-dir test-runs/homebrew-package-node-smoke
```

The runner builds Homebrew VFS images from sidecars, writes passed, failed,
and skipped outcome lists, runs program package version smokes from the poured
prefix, and compiles SQLite's `sqlite_basic.c` against the poured headers and
static library before running the validation Wasm on Node. Dry-run bottle
evidence remains local evidence until the trusted workflow publishes GHCR
bottle bytes and tap sidecars.

Browser compatibility requires a separate browser smoke. For the current
`hello` path, the trusted publisher builds a precomposed wasm32 VFS image,
serves it through the browser demo, runs Chromium Playwright against
Expand Down
33 changes: 33 additions & 0 deletions homebrew/kandelo-homebrew/Formula/dash.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
require "shellwords"
require_relative "../Kandelo/kandelo_formula_support"

class Dash < Formula
include KandeloFormulaSupport

desc "POSIX shell for Kandelo"
homepage "http://gondor.apana.org.au/~herbert/dash/"
url "http://gondor.apana.org.au/~herbert/dash/files/dash-0.5.12.tar.gz"
sha256 "6a474ac46e8b0b32916c4c60df694c82058d3297d8b385b74508030ca4a8f28a"
license all_of: ["BSD-3-Clause", "GPL-2.0-or-later"]

bottle do
root_url "https://ghcr.io/v2/automattic/kandelo-homebrew"
sha256 cellar: :any_skip_relocation, wasm32_kandelo: "b07b39e7eb19324f49bd6ab23cad020354f4bcbf5602a6b6936a2633969888b8"
end

skip_clean "bin/dash"

def install
root = kandelo_root
configure_kandelo_environment(root)
ENV["DASH_VERSION"] = version.to_s
out_dir = prepare_kandelo_package_env(source_url: "http://gondor.apana.org.au/~herbert/dash/files/dash-0.5.12.tar.gz", source_sha256: "6a474ac46e8b0b32916c4c60df694c82058d3297d8b385b74508030ca4a8f28a")
system "bash", "#{root}/packages/registry/dash/build-dash.sh"
install_kandelo_wasm(out_dir, "dash.wasm", "dash")
end

test do
assert_kandelo_wasm "dash"
assert_match "dash-homebrew-smoke", shell_output_kandelo_wasm("dash", ["-c", "echo dash-homebrew-smoke"])
end
end
31 changes: 31 additions & 0 deletions homebrew/kandelo-homebrew/Formula/fbdoom.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
require "shellwords"
require_relative "../Kandelo/kandelo_formula_support"

class Fbdoom < Formula
include KandeloFormulaSupport

desc "fbDOOM framebuffer game port for Kandelo"
homepage "https://github.com/maximevince/fbDOOM"
url "https://github.com/maximevince/fbDOOM.git", branch: "master"
version "0.1.0"
license "GPL-2.0-or-later"

bottle do
root_url "https://ghcr.io/v2/automattic/kandelo-homebrew"
sha256 cellar: :any_skip_relocation, wasm32_kandelo: "51f8e3d28b47a182dbee12dd6eb25ab1a39c4c11cb6f78da51183d442796173c"
end

skip_clean "bin/fbdoom"

def install
root = kandelo_root
configure_kandelo_environment(root)
out_dir = prepare_kandelo_package_env(source_url: "https://github.com/maximevince/fbDOOM", source_sha256: "0000000000000000000000000000000000000000000000000000000000000000")
system "bash", "#{root}/packages/registry/fbdoom/build-fbdoom.sh"
install_kandelo_wasm(out_dir, "fbdoom.wasm", "fbdoom")
end

test do
assert_kandelo_wasm "fbdoom"
end
end
39 changes: 39 additions & 0 deletions homebrew/kandelo-homebrew/Formula/git.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
require "shellwords"
require_relative "../Kandelo/kandelo_formula_support"

class Git < Formula
include KandeloFormulaSupport

desc "Distributed revision control system for Kandelo"
homepage "https://git-scm.com/"
url "https://github.com/git/git/archive/refs/tags/v2.47.1.tar.gz"
sha256 "30654cc6c0142fa68050cc7b0ee6a2a65944288b907821781112efaf24293b23"
license "GPL-2.0-only"

bottle do
root_url "https://ghcr.io/v2/automattic/kandelo-homebrew"
sha256 cellar: :any_skip_relocation, wasm32_kandelo: "2ba2c7ce61393c99a06aff34744973b55bbd9e28ded2303e2f98d2363b39295f"
end

skip_clean "bin/git"
skip_clean "bin/git-remote-http"

def install
root = kandelo_root
configure_kandelo_environment(root)
ENV["GIT_VERSION"] = version.to_s
out_dir = prepare_kandelo_package_env(source_url: "https://github.com/git/git/archive/refs/tags/v2.47.1.tar.gz", source_sha256: "30654cc6c0142fa68050cc7b0ee6a2a65944288b907821781112efaf24293b23")
system "bash", "#{root}/packages/registry/git/build-git.sh"
install_kandelo_wasm(out_dir, "git.wasm", "git")
install_kandelo_wasm(out_dir, "git-remote-http.wasm", "git-remote-http")
bin.install_symlink "git-remote-http" => "git-remote-https"
bin.install_symlink "git-remote-http" => "git-remote-ftp"
bin.install_symlink "git-remote-http" => "git-remote-ftps"
end

test do
assert_kandelo_wasm "git"
assert_kandelo_wasm "git-remote-http"
assert_match "git version", shell_output_kandelo_wasm("git", ["--version"])
end
end
33 changes: 33 additions & 0 deletions homebrew/kandelo-homebrew/Formula/less.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
require "shellwords"
require_relative "../Kandelo/kandelo_formula_support"

class Less < Formula
include KandeloFormulaSupport

desc "Terminal pager for Kandelo"
homepage "https://www.greenwoodsoftware.com/less/"
url "https://www.greenwoodsoftware.com/less/less-668.tar.gz"
sha256 "2819f55564d86d542abbecafd82ff61e819a3eec967faa36cd3e68f1596a44b8"
license "GPL-3.0-or-later"

bottle do
root_url "https://ghcr.io/v2/automattic/kandelo-homebrew"
sha256 cellar: :any_skip_relocation, wasm32_kandelo: "ee8799015db23b073bb5f6f3c16953c07613f1c5dd16488cca16c9008da6c061"
end

skip_clean "bin/less"

def install
root = kandelo_root
configure_kandelo_environment(root)
ENV["LESS_VERSION"] = version.to_s
out_dir = prepare_kandelo_package_env(source_url: "https://www.greenwoodsoftware.com/less/less-668.tar.gz", source_sha256: "2819f55564d86d542abbecafd82ff61e819a3eec967faa36cd3e68f1596a44b8")
system "bash", "#{root}/packages/registry/less/build-less.sh"
install_kandelo_wasm(out_dir, "less.wasm", "less")
end

test do
assert_kandelo_wasm "less"
assert_match "less", shell_output_kandelo_wasm("less", ["--version"])
end
end
32 changes: 32 additions & 0 deletions homebrew/kandelo-homebrew/Formula/lsof.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
require "shellwords"
require_relative "../Kandelo/kandelo_formula_support"

class Lsof < Formula
include KandeloFormulaSupport

desc "Kandelo /proc file descriptor lister"
homepage "https://github.com/brandonpayton/kandelo"
url "https://github.com/Automattic/kandelo/archive/1ab41fe2ad5553f4fa4bb0223f2d804b13149578.tar.gz"
sha256 "446dd26b6e3f909f25f21f77950a3b11a07c633721dbff698a85b4f05fbbc493"
version "0.1.0"
license "GPL-2.0-or-later"

bottle do
root_url "https://ghcr.io/v2/automattic/kandelo-homebrew"
sha256 cellar: :any_skip_relocation, wasm32_kandelo: "104cc2d3f485eb2da330996de062cde2574aa28d693c60d875b7af0c0d534a6b"
end

skip_clean "bin/lsof"

def install
root = kandelo_root
configure_kandelo_environment(root)
out_dir = prepare_kandelo_package_env(source_url: "https://github.com/Automattic/kandelo/archive/1ab41fe2ad5553f4fa4bb0223f2d804b13149578.tar.gz", source_sha256: "446dd26b6e3f909f25f21f77950a3b11a07c633721dbff698a85b4f05fbbc493")
system "bash", "#{root}/packages/registry/lsof/build-lsof.sh"
install_kandelo_wasm(out_dir, "lsof.wasm", "lsof")
end

test do
assert_kandelo_wasm "lsof"
end
end
32 changes: 32 additions & 0 deletions homebrew/kandelo-homebrew/Formula/modeset.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
require "shellwords"
require_relative "../Kandelo/kandelo_formula_support"

class Modeset < Formula
include KandeloFormulaSupport

desc "DRI/GLES framebuffer fluid simulation for Kandelo"
homepage "https://github.com/brandonpayton/kandelo"
url "https://github.com/Automattic/kandelo/archive/1ab41fe2ad5553f4fa4bb0223f2d804b13149578.tar.gz"
sha256 "446dd26b6e3f909f25f21f77950a3b11a07c633721dbff698a85b4f05fbbc493"
version "0.1.0"
license "GPL-2.0-or-later"

bottle do
root_url "https://ghcr.io/v2/automattic/kandelo-homebrew"
sha256 cellar: :any_skip_relocation, wasm32_kandelo: "48002a330c17971fed6d7edf71872e0cce9552c8bfb3b18813092f936e14ca88"
end

skip_clean "bin/modeset"

def install
root = kandelo_root
configure_kandelo_environment(root)
out_dir = prepare_kandelo_package_env(source_url: "https://github.com/Automattic/kandelo/archive/1ab41fe2ad5553f4fa4bb0223f2d804b13149578.tar.gz", source_sha256: "446dd26b6e3f909f25f21f77950a3b11a07c633721dbff698a85b4f05fbbc493")
system "bash", "#{root}/packages/registry/modeset/build-modeset.sh"
install_kandelo_wasm(out_dir, "modeset.wasm", "modeset")
end

test do
assert_kandelo_wasm "modeset"
end
end
32 changes: 32 additions & 0 deletions homebrew/kandelo-homebrew/Formula/msmtpd.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
require "shellwords"
require_relative "../Kandelo/kandelo_formula_support"

class Msmtpd < Formula
include KandeloFormulaSupport

desc "SMTP capture daemon from msmtp for Kandelo"
homepage "https://marlam.de/msmtp/"
url "https://marlam.de/msmtp/releases/msmtp-1.8.32.tar.xz"
sha256 "20cd58b58dd007acf7b937fa1a1e21f3afb3e9ef5bbcfb8b4f5650deadc64db4"
license "GPL-3.0-or-later"

bottle do
root_url "https://ghcr.io/v2/automattic/kandelo-homebrew"
sha256 cellar: :any_skip_relocation, wasm32_kandelo: "ff2c0e456efbfe2d03b30dea2f8462a7f3818146715e3dc78ab5f21580a88691"
end

skip_clean "bin/msmtpd"

def install
root = kandelo_root
configure_kandelo_environment(root)
out_dir = prepare_kandelo_package_env(source_url: "https://marlam.de/msmtp/releases/msmtp-1.8.32.tar.xz", source_sha256: "20cd58b58dd007acf7b937fa1a1e21f3afb3e9ef5bbcfb8b4f5650deadc64db4")
system "bash", "#{root}/packages/registry/msmtpd/build-msmtpd.sh"
install_kandelo_wasm(out_dir, "msmtpd.wasm", "msmtpd")
end

test do
assert_kandelo_wasm "msmtpd"
assert_match(/msmtp|msmtpd/i, shell_output_kandelo_wasm("msmtpd", ["--version"]))
end
end
33 changes: 33 additions & 0 deletions homebrew/kandelo-homebrew/Formula/nano.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
require "shellwords"
require_relative "../Kandelo/kandelo_formula_support"

class Nano < Formula
include KandeloFormulaSupport

desc "Terminal text editor for Kandelo"
homepage "https://www.nano-editor.org/"
url "https://ftpmirror.gnu.org/gnu/nano/nano-8.0.tar.xz"
sha256 "c17f43fc0e37336b33ee50a209c701d5beb808adc2d9f089ca831b40539c9ac4"
license "GPL-3.0-or-later"

bottle do
root_url "https://ghcr.io/v2/automattic/kandelo-homebrew"
sha256 cellar: :any_skip_relocation, wasm32_kandelo: "5c9724cea03f33dbf62b4c3edafdc797d37f2ce060a8456fee3c9f50406db2f0"
end

skip_clean "bin/nano"

def install
root = kandelo_root
configure_kandelo_environment(root)
ENV["NANO_VERSION"] = version.to_s
out_dir = prepare_kandelo_package_env(source_url: "https://ftpmirror.gnu.org/gnu/nano/nano-8.0.tar.xz", source_sha256: "c17f43fc0e37336b33ee50a209c701d5beb808adc2d9f089ca831b40539c9ac4")
system "bash", "#{root}/packages/registry/nano/build-nano.sh"
install_kandelo_wasm(out_dir, "nano.wasm", "nano")
end

test do
assert_kandelo_wasm "nano"
assert_match(/GNU nano|nano/i, shell_output_kandelo_wasm("nano", ["--version"]))
end
end
34 changes: 34 additions & 0 deletions homebrew/kandelo-homebrew/Formula/netcat.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
require "shellwords"
require_relative "../Kandelo/kandelo_formula_support"

class Netcat < Formula
include KandeloFormulaSupport

desc "GNU netcat network utility for Kandelo"
homepage "https://sourceforge.net/projects/netcat/"
url "https://downloads.sourceforge.net/project/netcat/netcat/0.7.1/netcat-0.7.1.tar.gz"
sha256 "30719c9a4ffbcf15676b8f528233ccc54ee6cba96cb4590975f5fd60c68a066f"
license "GPL-2.0-or-later"

bottle do
root_url "https://ghcr.io/v2/automattic/kandelo-homebrew"
sha256 cellar: :any_skip_relocation, wasm32_kandelo: "2eec1a038a610fca2ab8d2cc6b2feff048b009288f3fa249cbbd586107bb0efd"
end

skip_clean "bin/nc"

def install
root = kandelo_root
configure_kandelo_environment(root)
ENV["NETCAT_VERSION"] = version.to_s
out_dir = prepare_kandelo_package_env(source_url: "https://downloads.sourceforge.net/project/netcat/netcat/0.7.1/netcat-0.7.1.tar.gz", source_sha256: "30719c9a4ffbcf15676b8f528233ccc54ee6cba96cb4590975f5fd60c68a066f")
system "bash", "#{root}/packages/registry/netcat/build-netcat.sh"
install_kandelo_wasm(out_dir, "nc.wasm", "nc")
bin.install_symlink "nc" => "netcat"
end

test do
assert_kandelo_wasm "nc"
assert_match(/netcat|listen|connect|usage/i, shell_output_kandelo_wasm("nc", ["--help"]))
end
end
34 changes: 34 additions & 0 deletions homebrew/kandelo-homebrew/Formula/vim.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
require "shellwords"
require_relative "../Kandelo/kandelo_formula_support"

class Vim < Formula
include KandeloFormulaSupport

desc "Vim terminal editor for Kandelo"
homepage "https://www.vim.org/"
url "https://github.com/vim/vim/archive/refs/tags/v9.1.0900.tar.gz"
sha256 "30efb714ed82c5d7a1491f3e4aac6487d2c493d33c834d7ef043e6f45176772e"
license "Vim"

bottle do
root_url "https://ghcr.io/v2/automattic/kandelo-homebrew"
sha256 cellar: :any_skip_relocation, wasm32_kandelo: "778be8fe04ce0439b260ed72c9bd81b163c60badd9e61c864864828198fee6ae"
end

skip_clean "bin/vim"

def install
root = kandelo_root
configure_kandelo_environment(root)
ENV["VIM_VERSION"] = version.to_s
out_dir = prepare_kandelo_package_env(source_url: "https://github.com/vim/vim/archive/refs/tags/v9.1.0900.tar.gz", source_sha256: "30efb714ed82c5d7a1491f3e4aac6487d2c493d33c834d7ef043e6f45176772e")
system "bash", "#{root}/packages/registry/vim/build-vim.sh"
install_kandelo_wasm(out_dir, "vim.wasm", "vim")
(share/"vim").install out_dir/"runtime" if (out_dir/"runtime").directory?
end

test do
assert_kandelo_wasm "vim"
assert_match(/VIM|Vi IMproved/i, shell_output_kandelo_wasm("vim", ["--version"]))
end
end
Loading
Loading