Files
vasilito 59d4ba5dcf Add CUB package builder and include in all Red Bear OS configs
CUB (Red Bear OS Package Builder) is a Rust CLI tool that combines package management and building:
- RBPKGBUILD parser (TOML format) with full spec support
- Cookbook adapter converting RBPKGBUILD to recipe.toml
- PKGBUILD (Arch AUR) to RBPKGBUILD conversion with Linuxism detection
- Dependency mapping (Arch to Redox names)
- pkgar package creation integration
- Build environment setup with Cookbook env vars
- CLI with pacman-style shortcuts: -S, -Ss, -B, -G, -Pi, -Sua, -Sc, --import-aur

28 cub-lib tests passing. cub-cli compiles with local pkgutils.
Added cub = {} to redbear-desktop, redbear-full, redbear-minimal configs.
Created recipe symlink and updated integrate-redbear.sh.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-12 23:51:48 +01:00

24 lines
684 B
Rust

use thiserror::Error;
#[derive(Error, Debug)]
pub enum CubError {
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("TOML parse error: {0}")]
TomlParse(#[from] toml::de::Error),
#[error("TOML serialize error: {0}")]
TomlSerialize(#[from] toml::ser::Error),
#[error("Invalid RBPKGBUILD: {0}")]
InvalidPkgbuild(String),
#[error("Build failed: {0}")]
BuildFailed(String),
#[error("Package not found: {0}")]
PackageNotFound(String),
#[error("Conversion error: {0}")]
Conversion(String),
#[error("Dependency resolution failed: {0}")]
Dependency(String),
#[error("Sandbox error: {0}")]
Sandbox(String),
}