Documentation
¶
Overview ¶
Package yap provides a powerful, container-based package building system that creates packages for multiple GNU/Linux distributions from a single PKGBUILD-like specification format.
YAP (Yet Another Packager) eliminates the need to learn multiple packaging formats by providing a unified interface based on the familiar PKGBUILD format from Arch Linux, extended with multi-distribution support and modern container-based builds.
Key Features ¶
- Multi-format package support: RPM, DEB, APK, TAR.ZST packages
- Container-based isolation for clean, reproducible builds
- Dependency-aware build orchestration with project management
- PKGBUILD compatibility with enhanced parsing capabilities
- Component-aware structured logging system
Supported Distributions ¶
YAP supports building packages for Alpine, Arch, CentOS, Debian, Fedora, OpenSUSE, Rocky, Ubuntu, and more.
Usage ¶
The primary way to use YAP is through its command-line interface:
// Build for current system distribution yap build . // Build for specific distribution yap build ubuntu-jammy /path/to/project // Prepare build environment yap prepare fedora-38
Package Structure ¶
YAP is organized into several key packages:
- pkg/project: Project configuration and orchestration
- pkg/parser: PKGBUILD parsing and processing
- pkg/packer: Package format implementations (RPM, DEB, APK, etc.)
- pkg/source: Source code retrieval and management
- pkg/builder: Container-based build execution
- pkg/logger: Component-aware structured logging
- pkg/osutils: Operating system utilities and helpers
For detailed documentation and examples, visit https://github.com/M0Rf30/yap
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
i18n-tool
command
Package main provides the i18n tool for extracting and managing localization messages.
|
Package main provides the i18n tool for extracting and managing localization messages. |
|
mcp-surface
command
Command mcp-surface introspects the live yap-mcp server and writes an authoritative inventory of its tools, prompts, and resources to docs/mcp-surface.md.
|
Command mcp-surface introspects the live yap-mcp server and writes an authoritative inventory of its tools, prompts, and resources to docs/mcp-surface.md. |
|
yap
command
Package main provides the yap command-line package management tool.
|
Package main provides the yap command-line package management tool. |
|
yap-mcp
command
Package main is the entrypoint for the yap-mcp binary — an MCP (Model Context Protocol) server that exposes yap's package-build capabilities to MCP-compatible clients (Claude Desktop, IDE agents, etc.).
|
Package main is the entrypoint for the yap-mcp binary — an MCP (Model Context Protocol) server that exposes yap's package-build capabilities to MCP-compatible clients (Claude Desktop, IDE agents, etc.). |
|
yap/command
Package command implements the YAP CLI commands including build, install, graph, and utility operations.
|
Package command implements the YAP CLI commands including build, install, graph, and utility operations. |
|
pkg
|
|
|
apkindex
Package apkindex parses Alpine APKINDEX files and installs .apk packages APK packages.
|
Package apkindex parses Alpine APKINDEX files and installs .apk packages APK packages. |
|
aptcache
Package aptcache is an in-memory index of apt + dpkg metadata.
|
Package aptcache is an in-memory index of apt + dpkg metadata. |
|
aptinstall
Package aptinstall installs Debian packages into a target root.
|
Package aptinstall installs Debian packages into a target root. |
|
aptrepo
Package aptrepo refreshes apt repository indexes.
|
Package aptrepo refreshes apt repository indexes. |
|
archive
Package archive provides archive creation and manipulation functionality.
|
Package archive provides archive creation and manipulation functionality. |
|
binary
Package binary provides binary file manipulation utilities.
|
Package binary provides binary file manipulation utilities. |
|
buffers
Package buffers provides efficient memory management utilities for buffer pooling.
|
Package buffers provides efficient memory management utilities for buffer pooling. |
|
builder
Package builder provides build orchestration functionality for YAP packages.
|
Package builder provides build orchestration functionality for YAP packages. |
|
builders/apk
Package apk provides functionality for building Alpine Linux APK packages.
|
Package apk provides functionality for building Alpine Linux APK packages. |
|
builders/common
Package common provides shared interfaces and base implementations for package builders.
|
Package common provides shared interfaces and base implementations for package builders. |
|
builders/deb
Package deb provides Debian package building functionality and constants.
|
Package deb provides Debian package building functionality and constants. |
|
builders/pacman
Package pacman provides Arch Linux package building functionality and constants.
|
Package pacman provides Arch Linux package building functionality and constants. |
|
builders/rpm
Package rpm provides RPM package building functionality and constants.
|
Package rpm provides RPM package building functionality and constants. |
|
builders/testhelpers
Package testhelpers provides shared test fixtures for package builder tests.
|
Package testhelpers provides shared test fixtures for package builder tests. |
|
buildinfo
Package buildinfo holds build-time metadata injected via -ldflags.
|
Package buildinfo holds build-time metadata injected via -ldflags. |
|
color
Package color provides minimal ANSI terminal color helpers.
|
Package color provides minimal ANSI terminal color helpers. |
|
constants
Package constants provides centralized constants and mappings for all package formats.
|
Package constants provides centralized constants and mappings for all package formats. |
|
container
Package container provides an abstraction layer for container runtimes, allowing YAP to operate with podman, docker, or a built-in rootless runner.
|
Package container provides an abstraction layer for container runtimes, allowing YAP to operate with podman, docker, or a built-in rootless runner. |
|
container/internal/runtimetype
Package runtimetype defines the RuntimeType enum shared between the container package and its sub-packages to avoid import cycles.
|
Package runtimetype defines the RuntimeType enum shared between the container package and its sub-packages to avoid import cycles. |
|
container/rootless
Package rootless implements a daemon-free container runtime for YAP using go-containerregistry for image pulls and rootlesskit for isolated execution.
|
Package rootless implements a daemon-free container runtime for YAP using go-containerregistry for image pulls and rootlesskit for isolated execution. |
|
core
Package core provides package manager configurations and metadata.
|
Package core provides package manager configurations and metadata. |
|
crypto
Package crypto provides cryptographic operations for package building.
|
Package crypto provides cryptographic operations for package building. |
|
deb822
Package deb822 provides a streaming parser for RFC-822-style multi-stanza key/value format used by Debian package metadata (apt Packages files, dpkg status, etc.).
|
Package deb822 provides a streaming parser for RFC-822-style multi-stanza key/value format used by Debian package metadata (apt Packages files, dpkg status, etc.). |
|
dnfcache
Package dnfcache is an in-memory index of DNF/YUM repository metadata.
|
Package dnfcache is an in-memory index of DNF/YUM repository metadata. |
|
dnfinstall
Package dnfinstall replaces "dnf install" and "rpm --install" subprocesses.
|
Package dnfinstall replaces "dnf install" and "rpm --install" subprocesses. |
|
download
Package download provides file download functionality with resume capability, concurrent downloads, and progress tracking.
|
Package download provides file download functionality with resume capability, concurrent downloads, and progress tracking. |
|
errors
Package errors provides custom error types and error handling utilities for YAP.
|
Package errors provides custom error types and error handling utilities for YAP. |
|
files
Package files provides unified file system operations for package building.
|
Package files provides unified file system operations for package building. |
|
gensum
Package gensum downloads PKGBUILD sources and rewrites the checksum arrays in-place, matching the behaviour of makepkg's updpkgsums utility.
|
Package gensum downloads PKGBUILD sources and rewrites the checksum arrays in-place, matching the behaviour of makepkg's updpkgsums utility. |
|
git
Package git provides Git repository operations.
|
Package git provides Git repository operations. |
|
graph
Package graph provides core graph data structures and types for dependency visualization.
|
Package graph provides core graph data structures and types for dependency visualization. |
|
graph/layout
Package layout provides graph layout algorithms for positioning nodes.
|
Package layout provides graph layout algorithms for positioning nodes. |
|
graph/loader
Package loader provides functionality to load and parse project configurations for graph generation.
|
Package loader provides functionality to load and parse project configurations for graph generation. |
|
graph/render
Package render provides rendering functionality for dependency graphs.
|
Package render provides rendering functionality for dependency graphs. |
|
graph/theme
Package theme provides visual styling configurations for dependency graphs.
|
Package theme provides visual styling configurations for dependency graphs. |
|
httpclient
Package httpclient is the shared HTTP client used by aptcache, aptrepo, apkindex, and pacmandb for short metadata fetches.
|
Package httpclient is the shared HTTP client used by aptcache, aptrepo, apkindex, and pacmandb for short metadata fetches. |
|
i18n
Package i18n provides internationalization support for YAP.
|
Package i18n provides internationalization support for YAP. |
|
logger
Package logger provides logging functionality for the yap application.
|
Package logger provides logging functionality for the yap application. |
|
mcp
Package mcp — logging middleware.
|
Package mcp — logging middleware. |
|
options
Package options provides build and packaging option utilities, including binary stripping functionality.
|
Package options provides build and packaging option utilities, including binary stripping functionality. |
|
packer
Package packer provides unified package building interface for multiple formats.
|
Package packer provides unified package building interface for multiple formats. |
|
pacmandb
Package pacmandb refreshes Arch repository sync databases.
|
Package pacmandb refreshes Arch repository sync databases. |
|
parser
Package parser provides PKGBUILD parsing and processing functionality.
|
Package parser provides PKGBUILD parsing and processing functionality. |
|
pkgbuild
Package pkgbuild provides PKGBUILD structure and manipulation functionality.
|
Package pkgbuild provides PKGBUILD structure and manipulation functionality. |
|
platform
Package platform provides ownership preservation utilities for sudo environments.
|
Package platform provides ownership preservation utilities for sudo environments. |
|
project
Package project provides multi-package project management and build orchestration.
|
Package project provides multi-package project management and build orchestration. |
|
repo
Package repo registers extra distribution repositories (apt sources or dnf/yum repos) on the build host before any package manager operation.
|
Package repo registers extra distribution repositories (apt sources or dnf/yum repos) on the build host before any package manager operation. |
|
rpmdb
Package rpmdb reads the RPM SQLite database used by Fedora 33+, RHEL 9+, Rocky 9+, AlmaLinux 9+, and openSUSE 15.5+.
|
Package rpmdb reads the RPM SQLite database used by Fedora 33+, RHEL 9+, Rocky 9+, AlmaLinux 9+, and openSUSE 15.5+. |
|
safepath
Package safepath centralises the path-containment checks used by every archive/package extractor in YAP (deb data.tar, RPM CPIO payloads, APK tarballs, container rootfs layers, source archives).
|
Package safepath centralises the path-containment checks used by every archive/package extractor in YAP (deb data.tar, RPM CPIO payloads, APK tarballs, container rootfs layers, source archives). |
|
sbom
Package sbom provides Software Bill of Materials (SBOM) generation for YAP packages in CycloneDX and SPDX formats.
|
Package sbom provides Software Bill of Materials (SBOM) generation for YAP packages in CycloneDX and SPDX formats. |
|
set
Package set provides generic set data structure implementation and string utilities.
|
Package set provides generic set data structure implementation and string utilities. |
|
shell
Package shell provides process execution and shell operations.
|
Package shell provides process execution and shell operations. |
|
signing
Package signing provides package signing infrastructure for YAP.
|
Package signing provides package signing infrastructure for YAP. |
|
source
Package source provides source file download and management functionality.
|
Package source provides source file download and management functionality. |
|
yapdb
Package yapdb provides a state tracker for packages installed by YAP.
|
Package yapdb provides a state tracker for packages installed by YAP. |
|
Package main provides a tool for extracting i18n.T() messages from Go source code.
|
Package main provides a tool for extracting i18n.T() messages from Go source code. |