Repository: https://github.com/Artagon/homebrew-jdk26ea Purpose: Homebrew tap providing automated distribution of OpenJDK 26 Early Access builds Current Version: JDK 26 EA Build 20 (Released: 2025-10-17) License: GPL-2.0 with Classpath Exception (matching OpenJDK)
This is a Homebrew tap that automates the distribution and updating of JDK 26 Early Access builds from jdk.java.net/26. It provides both a cask (native macOS app installation) and a formula (command-line package) for cross-platform support.
-
Cask (
Casks/jdk26ea.rb) - macOS only- Installs to:
/Library/Java/JavaVirtualMachines/jdk-26-ea.jdk - Integrates with macOS Java management system
- Uses secure
dittocommand for installation - Path validation to prevent directory traversal attacks
- Supports both ARM64 (Apple Silicon) and Intel x64
- Installs to:
-
Formula (
Formula/jdk26ea.rb) - macOS and Linux- Creates symlinks in Homebrew bin directory
- Cross-platform (macOS ARM64/x64, Linux ARM64/x64)
- Used for scripting and server environments
| Platform | Architecture | Cask | Formula | CI Tested |
|---|---|---|---|---|
| macOS 13 | Intel x64 | ✅ | ✅ | ✅ |
| macOS 14 | Apple Silicon ARM64 | ✅ | ✅ | ✅ |
| Linux (Ubuntu 22.04) | x64 | ❌ | ✅ | ✅ |
| Linux (Ubuntu 24.04) | x64 | ❌ | ✅ | ✅ |
| Linux | ARM64 | ❌ | ✅ | ❌ |
- Ruby - Homebrew DSL for formula/cask definitions
- Bash/Shell - Update automation scripts
- YAML - GitHub Actions workflows
- GitHub Actions - CI/CD platform (5 active workflows)
- Homebrew - Package manager and distribution platform
homebrew-jdk26/
├── .github/
│ ├── workflows/ # GitHub Actions automation
│ │ ├── audit.yml # Weekly syntax validation
│ │ ├── auto-update.yml # Daily auto-update checks
│ │ ├── release.yml # Automated GitHub releases
│ │ ├── validate.yml # CI validation on push/PR
│ │ └── update.yml # Manual update workflow
│ ├── ISSUE_TEMPLATE/ # Issue templates
│ └── pull_request_template.md
├── .githooks/ # Git commit message validation
│ └── commit-msg # Semantic commit enforcement
├── Formula/
│ └── jdk26ea.rb # Homebrew formula (cross-platform)
├── Casks/
│ └── jdk26ea.rb # Homebrew cask (macOS only)
├── scripts/
│ └── update.sh # Manual update script
├── README.md
└── .gitignore
- Frequency: Daily at 6:00 AM UTC
- Purpose: Check for new JDK 26 EA builds and create PRs automatically
- Process:
- Scrapes jdk.java.net/26 for latest build number
- Downloads SHA256 checksums from official sources
- Updates cask and formula with new version/checksums
- Validates Ruby syntax
- Creates PR with detailed changelog
- Applies labels:
automated,update
- Trigger: When Formula/Casks files change on main branch
- Purpose: Create GitHub releases automatically
- Process:
- Audits cask before release
- Extracts version and build number
- Generates changelog from git commits
- Updates README with new version/date
- Creates GitHub pre-release
- Documents platform support
- Trigger: Push to main, pull requests
- Purpose: Comprehensive CI testing across platforms
- Jobs:
validate-syntax: Ruby syntax, brew style, brew audittest-install-macos: Tests on macOS 13 and 14test-install-linux: Tests on Ubuntu 22.04 and 24.04
- Testing: Verifies installation, runs
java -version, compiles HelloWorld.java
- Frequency: Weekly on Monday at 12:00 PM UTC
- Purpose: Manual syntax validation checks
- Can be triggered: Via workflow_dispatch
Enforced via git hooks (.githooks/commit-msg)
Format: type(scope): description
Valid types:
feat- New featurefix- Bug fixdocs- Documentation changesstyle- Code style (formatting)refactor- Code refactoringperf- Performance improvementstest- Test changeschore- Build process or toolingci- CI configuration changes
Valid scopes:
cask- Cask file changesformula- Formula file changesworkflow- GitHub Actions changesdocs- Documentation changesscripts- Script changes
Examples:
feat(cask): add support for JDK 26 EA Build 21
fix(formula): correct SHA256 checksum for Linux ARM64
docs: update README with new installation instructions
chore(workflow): update auto-update scheduleBreaking Changes:
feat(cask)!: rename from jdk26valhalla to jdk26ea
BREAKING CHANGE: Users must uninstall old cask and reinstall with new name- Follows Homebrew's RuboCop rules
- Enforced via
brew styleandbrew audit - Stanza ordering in casks matters
- Empty lines between stanza groups required
- No logical operators in
unlessstatements
-
Path Validation
- Uses
realpathto resolve symlinks - Validates JDK bundle is within staging area
- Prevents directory traversal attacks
- Validates paths don't escape staging
- Uses
-
Secure Copying
- Uses Apple's
dittoinstead of externalrsync dittois Apple-signed and part of macOS- Better metadata preservation (ACLs, extended attributes)
--noqtnflag prevents quarantine issues
- Uses Apple's
-
Error Handling
- Uses
system_command!for immediate error detection - Uses
odiefor fatal errors (stops execution) - Uses
ohaifor user-facing messages - Validates source exists before operations
- Uses
- SHA256 checksums for all platform downloads
- Downloaded from official
.sha256files on download.java.net - Verified by Homebrew during installation
- Four platforms verified independently:
- macOS ARM64
- macOS x64
- Linux ARM64
- Linux x64
26-ea+{build_number}
Example: 26-ea+20
Automated:
auto-update.ymlruns daily- Scrapes jdk.java.net/26 for new builds
- Downloads checksums
- Updates both cask and formula
- Creates PR for review
Manual:
./scripts/update.shCasks/jdk26ea.rb- Line 2:version "26-ea+20"Formula/jdk26ea.rb- Line 4:version "26-ea+20"README.md- Line 30: Current version display
| Job | OS | Architecture | Package Type |
|---|---|---|---|
| test-install-macos | macOS 13 | Intel x64 | Cask |
| test-install-macos | macOS 14 | Apple Silicon ARM64 | Cask |
| test-install-linux | Ubuntu 22.04 | x64 | Formula |
| test-install-linux | Ubuntu 24.04 | x64 | Formula |
Each test verifies:
- Installation succeeds
java -versionexecutesjavac -versionexecutes (Linux only)- Can compile HelloWorld.java (Linux only)
- Can run compiled Java programs (Linux only)
- JAVA_HOME setup works (Linux only)
Cask:
brew install --cask Casks/jdk26ea.rb
java -version
brew uninstall --cask jdk26eaFormula:
brew install Formula/jdk26ea.rb
java -version
brew uninstall jdk26ea- Automated: Wait for
auto-update.ymlto create PR - Manual:
./scripts/update.sh git add Formula/jdk26ea.rb Casks/jdk26ea.rb git commit -m "feat: update to JDK 26 EA Build XX"
# Check style
brew style Casks/jdk26ea.rb
brew style Formula/jdk26ea.rb
# Audit
brew audit --cask Casks/jdk26ea.rb
# Validate syntax
ruby -c Casks/jdk26ea.rb
ruby -c Formula/jdk26ea.rbReleases are automated when version changes on main branch.
Manual trigger:
# Push version change to main
git push origin main
# Release workflow triggers automatically
# Creates GitHub release with pre-release flag.gitignore- Excludes macOS, Homebrew, and temp files.githooks/commit-msg- Semantic commit validationCODEOWNERS- Code ownership (@you owns all)
README.md- User-facing documentation.github/ISSUE_TEMPLATE/- Issue templates.github/pull_request_template.md- PR template
scripts/update.sh- Manual update automation- Scrapes jdk.java.net/26
- Downloads SHA256 checksums
- Updates cask and formula
- Validates syntax
- Colored output
https://jdk.java.net/26/- Official JDK 26 EA pagehttps://download.java.net/java/early_access/jdk26/{build}/GPL/- Binary downloads- Accompanying
.sha256files for checksums
actions/checkout@v4- Checkout repositoryHomebrew/actions/setup-homebrew@master- Setup Homebrew on Linux
- Linux ARM64 not tested in CI - Requires self-hosted runners
- Early Access only - Not production-ready
- Single maintainer - All owned by @you
- Web scraping dependency - Relies on jdk.java.net page structure
mainbranch requires PRValidatestatus check required- No force pushes allowed
- Auto-delete merged branches
This repository uses a dedicated SSH identity:
- Host:
github.com-artagon - User:
trumpyla@gmail.com - Identity file:
~/.ssh/id_trumpyla@gmail.com
- Removed
issue-commands.yml(security concern) - Removed
CONTRIBUTING.md(simplified docs) - Replaced
rsyncwithditto(security) - Added comprehensive CI testing
- Repository renamed from
jdk26valhallatojdk26ea
- Check stanza ordering (sha256 before url)
- Ensure empty lines between stanza groups
- Avoid logical operators in
unless
- Verify SHA256 checksums match official sources
- Check JDK bundle naming matches
jdk-*.jdkpattern - Ensure sufficient permissions for
/Library/Java/JavaVirtualMachines/
- Check Ruby syntax:
ruby -c Casks/jdk26ea.rb - Run brew audit:
brew audit --cask Casks/jdk26ea.rb - Verify all platform URLs are accessible
- Confirm checksums are correct
- Originally
homebrew-jdk26valhallafor Project Valhalla - Renamed to
homebrew-jdk26eafor general EA builds - Build 20 current as of 2025-10-17
- 31 commits total
- Active maintenance and improvements ongoing
This repository uses domain-organized skill files for specialized expertise. AI assistants should reference these files for detailed guidance in each area:
- Homebrew Development - Formula and cask development, security patterns, validation
- GitHub Workflows - Actions security, input validation, workflow patterns
- Shell Scripting - Bash best practices, error handling, safe patterns
- Security Practices - Input validation, path traversal prevention, cryptographic verification
- Development Workflow - Git workflows, PR management, code review
- Semantic Commits - Conventional commits, changelog generation
- Purpose: Homebrew tap for OpenJDK 26 Early Access builds
- Platforms: macOS (ARM64, x64), Linux (ARM64, x64)
- Automation: Daily auto-updates, automated releases, multi-platform CI testing
All commits MUST follow Conventional Commits format. See semantic-commits.md for details.
Quick Reference:
type(scope): description
Valid types: feat, fix, docs, style, refactor, perf, test, chore, ci
Valid scopes: cask, formula, workflow, docs, scripts
Examples:
feat(cask): add support for JDK 26 EA Build 21
fix(formula): correct SHA256 checksum for Linux ARM64
ci(workflow): pin action to commit SHA for securityhomebrew-jdk26/
├── Casks/jdk26ea.rb # macOS cask
├── Formula/jdk26ea.rb # Linux/macOS formula
├── .github/workflows/ # CI/CD automation
├── scripts/ # Update and sync scripts
└── .model-context/ # AI configuration
├── skills/ # Domain-specific skills
├── shared/ # Shared context
└── agents/ # Agent-specific overrides
When updating to a new JDK build:
- Update version in both Casks/jdk26ea.rb and Formula/jdk26ea.rb
- Download and verify checksums for all 4 platforms
- Validate changes with brew style and brew audit
- Commit with semantic message:
feat: update to JDK 26 EA Build XX
Reference Skills:
Critical Rules:
- Pin ALL GitHub Actions to commit SHAs → github-workflows.md
- Validate ALL external inputs → security.md
- Verify checksums before use → security.md
- Use realpath for path operations → homebrew.md
- Quote all shell variables → shell-scripts.md
Before Committing:
# Syntax validation
ruby -c Casks/jdk26ea.rb
ruby -c Formula/jdk26ea.rb
# Style checking
brew style Casks/jdk26ea.rb Formula/jdk26ea.rb
# Audit
brew audit --cask Casks/jdk26ea.rb
brew audit --formula Formula/jdk26ea.rbCI Testing:
- macOS 13, 14 (cask installation)
- Ubuntu 22.04, 24.04 (formula installation)
- Syntax and style validation
- Functional tests (java -version, compile HelloWorld)
Feature Development:
# Create feature branch
git checkout -b feat/description
# Make changes with semantic commits
git commit -m "feat(cask): add support for new feature"
# Push and create PR
git push -u origin feat/description
gh pr create --title "feat: description" --body "..."Reference:
Daily Auto-Updates (6 AM UTC):
- Scrapes https://jdk.java.net/26/ for new builds
- Downloads and verifies checksums
- Creates PR if new build available
Automated Releases (on main branch push):
- Validates syntax and style
- Runs multi-platform tests
- Creates GitHub release with changelog
Reference:
- Run
./scripts/update.sh <build-number>or update manually - Verify checksums for all 4 platforms
- Test:
brew styleandbrew audit - Commit:
feat: update to JDK 26 EA Build XX - Push and create PR
Skills: homebrew.md, security.md
- Identify vulnerability
- Create branch:
fix/security-issue-name - Apply fix following security best practices
- Add tests if applicable
- Commit:
fix(scope): descriptionwith security note - Create PR with security context
Skills: security.md, github-workflows.md
- Validate YAML syntax
- Pin all actions to commit SHAs
- Validate inputs and add error handling
- Test in fork if possible
- Commit:
ci(workflow): description - Monitor workflow runs after merge
Skills: github-workflows.md, security.md
- Start with strict mode:
set -euo pipefail - Add input validation
- Implement error handling (trap)
- Quote all variables
- Test with ShellCheck
- Commit:
chore(scripts): description
Skills: shell-scripts.md, security.md
❌ Don't:
- Skip brew style validation
- Hardcode SHA256 checksums without verification
- Use unpinned GitHub Actions
- Commit without semantic format
- Update README version manually (automated)
- Use rsync in cask postflight (use ditto)
✅ Do:
- Run validation before every commit
- Download and verify checksums
- Pin actions to commit SHAs with version comments
- Follow Conventional Commits format
- Let automation handle README updates
- Use ditto (Apple-signed) for file operations
If auto-update creates bad PR:
- Close the PR
- Fix issue locally
- Let auto-update run again next day, or
- Create manual PR with fix
If release fails:
- Check workflow logs for errors
- Fix validation/test failures
- Re-push to main (triggers re-run)
If CI failing:
- Check RuboCop violations
- Verify SHA256 checksums
- Test locally when possible
- Review detailed workflow logs
All repository operations should follow the guidelines in:
- Development Workflow for Git operations
- Semantic Commits for commit messages
- GitHub Workflows for CI/CD changes
This repository values:
- Security - Path validation, secure commands, checksum verification
- Automation - Daily updates, automatic releases, comprehensive CI
- Quality - RuboCop enforcement, semantic commits, multi-platform testing
- Simplicity - Clear documentation, skill-based organization
- Reliability - Early detection, rollback capabilities
When in doubt:
- Consult relevant skill file for detailed guidance
- Prioritize security over convenience
- Let automation handle routine tasks
- Follow semantic commit format
- Test before committing
- NEVER use tags or branches (they're mutable)
- ALWAYS use full commit SHA with version comment
- Example:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- Never expose tokens in curl commands
- Use
ghCLI for GitHub API calls - Pass secrets via environment variables only
- Use minimal permissions (contents: read, pull-requests: write)
- Validate ALL external inputs with regex
- Build numbers:
^[0-9]{1,3}$(range: 1-999) - URLs: Must match
https://download.java.net/java/early_access/... - SHA256:
^[a-f0-9]{64}$ - Reject invalid inputs immediately
- Download files AND verify checksums (don't just fetch checksums)
- Compare expected vs actual before using values
- Fail workflow if verification fails
- Use
realpathto resolve all symlinks - Validate paths stay within staging area
- Check:
path.to_s.start_with?(staged_root.to_s) - Validate candidate count:
odieif not exactly 1
- Use
system_command!(with !) to fail fast - Use
dittoinstead ofrsync(Apple-signed) - Pass args as array (never string interpolation)
- Use
sudoonly for system locations
- Use
odiefor fatal errors (stops execution) - Use
ohaifor user messages - Use
opoofor warnings (non-fatal) - Never silently continue on errors
# For auto-update PRs
permissions:
contents: read
pull-requests: write
# For releases
permissions:
contents: write- Create PRs instead of pushing to main
- Exception: Documentation-only auto-updates with clear justification
- Always respect branch protection rules
| Vulnerability | Fix |
|---|---|
| Unpinned actions | Pin to commit SHA |
| Token in curl | Use gh CLI |
| No input validation | Add regex validation |
| No checksum verify | Download and verify |
| Excessive permissions | Use minimal permissions |
| Direct commits to main | Create PRs |
- Always validate API responses
type(scope): description
[optional body]
feat- New featurefix- Bug fixdocs- Documentation onlystyle- Code formattingrefactor- Code refactoringperf- Performance improvementstest- Adding/modifying testschore- Build process, dependenciesci- CI configuration changes
cask- Changes to Casks/jdk26ea.rbformula- Changes to Formula/jdk26ea.rbworkflow- GitHub Actions workflowsdocs- Documentation changesscripts- Script changes
feat(cask): add support for JDK 26 EA Build 21
fix(formula): correct SHA256 checksum for Linux ARM64
ci(workflow): pin action to commit SHA for security
docs: update README with installation instructions- Validate syntax:
ruby -c Casks/jdk26ea.rb - Check style:
brew style Casks/jdk26ea.rb - Run audit:
brew audit --cask Casks/jdk26ea.rb
archdeclarationversionsha256(before url!)urlnamedeschomepagepostflightuninstall
- Missing empty lines between stanza groups
- SHA256 after URL (should be before)
- Logical operators in
unless(useifwith negation)
- Use consistent indentation (2 spaces)
- Add comments for complex logic
- Name all steps clearly
- Group related steps
# Pin to commit SHA with version comment
- uses: actions/checkout@a1b2c3d... # v4.1.1
# Document why permissions are needed
permissions:
contents: read # Checkout repository
pull-requests: write # Create update PRs- Syntax validation (all files)
- Style checks (brew style)
- Audit checks (brew audit)
- Installation tests (macOS 13, 14, Ubuntu 22.04, 24.04)
- Functional tests (java -version, compile HelloWorld)
- All jobs must pass
- No RuboCop violations
- No audit failures
- Successful installation on all platforms
OpenAI Codex loads from AGENTS.md in project root (auto-generated from shared context)
- Terminal-based coding agent
- Multi-file editing capabilities
- Git integration
- Natural language to code translation
- Inline code generation
When using OpenAI Codex:
- Follow repository semantic commit conventions
- Run validation scripts before committing
- Use natural language for complex multi-file changes
- Verify security guidelines for workflow changes
- Check that all platforms have SHA256 checksums
- Always use
brew stylebefore completing tasks - Validate commit messages match semantic format
- Pin GitHub Actions to commit SHAs
- Verify checksums for all platform downloads
- Create PRs instead of direct commits to main