DefaultGPGKeyURL pointed at /secubox.gpg, which does not exist on the
public repo (200 OK was the HTML landing page falling through
try_files). And the canonical /secubox-keyring.gpg is ASCII-armored,
which apt rejects under signed-by=. Fetch /secubox-keyring.gpg.bin
(binary) directly and write it as the keyring — no dearmor needed.
Verified end-to-end in a fresh bookworm chroot:
secubox apt setup # OK
apt-get update # Hit:1 https://apt.secubox.in bookworm InRelease
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Move direct dependencies (cobra, promptui, viper, yaml.v3) out of
indirect section. Verify all tests pass and binary builds successfully.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add TestAptCmdHelp to verify apt help output mentions setup and publish
- Add TestAptSetupRequiresRoot to verify root privilege check
- Add TestCloneCmdHelp to verify clone help output mentions tier and minimal flags
- Add TestCloneRequiresRoot to verify root privilege check
All tests pass successfully.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement all six APT server subcommands for repository management:
- init: Initialize local APT repository at /srv/apt
- publish: Publish .deb packages with optional lintian validation
- sync: Sync repository to apt.secubox.in
- list: List packages in repository
- remove: Remove package from repository
- check: Verify repository integrity
All commands support global flags (--codename, --component, --dry-run, --verbose)
and delegate to corresponding methods on the apt.Server struct.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements Server struct with methods for managing APT repository:
- Init: Initialize repository with reprepro
- Publish: Publish .deb packages via apt-publish.sh script
- Sync: Sync repository to remote via apt-sync.sh script
- List: List packages in repository
- Remove: Remove package from repository
- Check: Verify repository integrity
Wraps existing shell scripts (apt-publish.sh, apt-sync.sh) and provides
direct reprepro commands for APT repository server operations.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Tier struct with Name, Description, Packages fields
- Define Tiers map: lite, standard, pro, minimal
- Add AvailablePackages list with 14 SecuBox modules
- Implement TierPackages() to resolve tier to package list
- Implement ValidateTier() for tier validation
- Implement TierNames() for wizard display
- Add comprehensive test coverage for all functions
All tests pass: TestTierPackages, TestValidateTier, TestTierNames, TestAvailablePackages.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Download pre-built images from releases
- Support --board, --version, --list, --output flags
- Verify SHA256 checksums after download
- Show download progress with ETA
- List available releases and images
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Implement Builder with Run() and RunStage() methods
- Add rootfs stage: debootstrap with ARM64 cross-compilation support
- Add partition stage: GPT partitions with ESP, root, data
- Add boot stage: U-Boot/GRUB/extlinux bootloader installation
- Add compress stage: gzip/xz/zstd compression with parallel jobs
- Add checksums stage: SHA256/SHA512 checksum generation
- Support --dry-run to preview commands without execution
- Support -j flag for parallel compression jobs
- Support --stage flag to run individual stages
- Add 12 comprehensive tests for all functionality
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Detect arch, CPU, RAM from /proc and runtime
- Detect board from device tree (/proc/device-tree/model)
- Detect VM from DMI or hypervisor flag
- Suggest tier based on RAM size
- Update gen command to use hardware.Detect
- Add --json flag for scripted output
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create wizard package with Run() and discoverBoards() functions
- Discover available boards from board/ directory with fallback defaults
- Prompt for board, tier, optional packages, and output formats
- Use promptui for terminal-based interactive selection UI
- Update gen.go runWizard() to integrate wizard package
- Support loading board metadata from board.yaml when available
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Generate Makefile with image, rootfs, partition, boot stages
- Support configurable output formats (gz, xz)
- Support configurable checksums (sha256, sha512)
- Add vdi, qcow2, iso extra targets
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Define Manifest struct with kernel, partitions, boot, output
- Implement Generate() from Profile and Board
- Add ToYAML() for serialization with header comments
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Define Component struct with requirements, tags, modes
- Implement Scanner to find all secubox-* packages
- Add SupportsArch() helper method
- Create secubox-core/debian/secubox.yaml example
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Define Board struct with hardware, boot, interfaces
- Define Tweaks struct for board-specific overrides
- Add LoadBoard and LoadTweaks functions
- Add MOCHAbin board.yaml and tweaks.yaml
- Support missing tweaks.yaml (optional)
- Add tests for TestLoadBoard and TestLoadTweaks
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Define Profile struct with packages, kernel, services, features
- Implement Load() function for YAML files
- Add base.yaml with common SecuBox foundation
- Add unit tests for profile loading
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add go.mod with cobra, viper, yaml dependencies
- Create main.go entry point
- Create root command with version and config flags
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>