apt-ostree/docs/README.md

7.6 KiB

apt-ostree Documentation

Last Updated: July 18, 2025

Overview

apt-ostree is a Debian/Ubuntu equivalent of rpm-ostree, providing a hybrid image/package system that combines APT package management with OSTree's atomic, immutable deployment model. This documentation provides comprehensive technical details, architectural insights, and implementation guidance.

📚 Documentation Structure

🏗️ Architecture & Design

🔧 Implementation Details

📖 User Guides

🧪 Development & Testing

📋 Reference

🎯 Current Status

Completed Features

  • Real Package Install/Commit Logic: Working APT/OSTree integration with atomic commits
  • FFI Segfaults Fixed: Stable rust-apt FFI calls with proper error handling
  • Atomic Filesystem Layout: OSTree-compatible filesystem structure following best practices
  • Package Metadata Parsing: Real DEB control file parsing with dependency resolution
  • Complete CLI Framework: Full command structure with rpm-ostree compatibility
  • Permissions System: Robust root privilege validation and error messages
  • rpm-ostree Install Command: Complete CLI interface matching rpm-ostree install exactly

🔄 Current Phase: rpm-ostree CLI Mirroring

  • Install Command: Fully implemented with all 20+ rpm-ostree options
  • Remaining Commands: Implementing all other rpm-ostree commands for identical UX
  • Integration Tests: Testing real workflows in containers/VMs
  • Performance Optimization: Optimizing package extraction and commit creation

🏗️ Core Architecture

Key Principles

  1. "From Scratch" Philosophy: Every change regenerates the target filesystem completely
  2. Atomic Operations: All changes are atomic with proper rollback support
  3. Immutable Base + Layered Packages: Base image remains unchanged, user packages layered on top

Component Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   CLI Client    │    │   D-Bus Daemon  │    │  OSTree Manager │
│                 │◄──►│                 │◄──►│                 │
└─────────────────┘    └─────────────────┘    └─────────────────┘
                                │                       │
                                ▼                       ▼
                       ┌─────────────────┐    ┌─────────────────┐
                       │  APT Manager    │    │ Package Manager │
                       │                 │    │                 │
                       └─────────────────┘    └─────────────────┘
                                │                       │
                                ▼                       ▼
                       ┌─────────────────┐    ┌─────────────────┐
                       │ Filesystem      │    │ Script Execution│
                       │ Assembly        │    │ & Sandboxing    │
                       └─────────────────┘    └─────────────────┘

🚀 Quick Start

Installation

# Clone the repository
git clone https://github.com/your-org/apt-ostree.git
cd apt-ostree

# Install dependencies
sudo apt install libapt-pkg-dev libostree-dev bubblewrap

# Build and install
cargo build --release
sudo cargo install --path .

Basic Usage

# Initialize the system
sudo apt-ostree init

# Install packages (identical to rpm-ostree)
sudo apt-ostree install nginx vim
sudo apt-ostree install --dry-run htop
sudo apt-ostree install --uninstall package-name

# Check status
apt-ostree status

# Rollback if needed
sudo apt-ostree rollback

📖 Documentation Philosophy

This documentation follows these principles:

  1. Comprehensive Coverage: All aspects of the system are documented
  2. Technical Depth: Detailed technical information for developers
  3. User-Focused: Clear guidance for end users
  4. Living Documentation: Updated with code changes
  5. Examples: Practical examples for all major features

🤝 Contributing to Documentation

Documentation Standards

  • Use clear, concise language
  • Include practical examples
  • Maintain technical accuracy
  • Update when code changes
  • Follow the established structure

How to Contribute

  1. Identify documentation gaps or improvements
  2. Create or update relevant documentation files
  3. Ensure examples work with current code
  4. Submit pull requests with documentation changes
  5. Review and test documentation changes

📞 Support

Getting Help

  • GitHub Issues: For bug reports and feature requests
  • Documentation: Check relevant documentation sections
  • Development Plan: See .notes/plan.md for current status

Community Resources

  • IRC: #apt-ostree on Libera.Chat (when available)
  • Mailing List: apt-ostree@lists.example.com (when available)
  • Discussions: GitHub Discussions (when available)

Note: This documentation reflects the current state of apt-ostree development. The project has achieved major milestones with working real APT/OSTree integration and complete rpm-ostree install command compatibility. The project is now focused on implementing the remaining rpm-ostree commands for identical user experience.