No description
- ❌ Remove complex apt-cacher-ng logic (was causing timeouts) - ✅ Use Debian's automatic mirror selection (httpredir.debian.org) - 🔧 Fix git installation order (install git first, then clone) - 📦 Simplify APT sources (single sources.list, no conflicts) - 🎯 Target: Eliminate hanging issues and use proven Debian approach |
||
|---|---|---|
| .forgejo/workflows | ||
| .github/workflows | ||
| .notes | ||
| benches | ||
| debian | ||
| docs | ||
| scripts | ||
| src | ||
| tests | ||
| .env | ||
| .gitignore | ||
| build-debian-trixie.sh | ||
| Cargo.toml | ||
| PRODUCTION_READINESS_SUMMARY.md | ||
| README.md | ||
| test-debian-build.sh | ||
apt-ostree
Debian/Ubuntu equivalent of rpm-ostree for managing atomic, immutable deployments using OSTree.
🎯 What is apt-ostree?
apt-ostree is a tool that brings the benefits of atomic, immutable operating systems to Debian and Ubuntu systems. It provides functionality similar to rpm-ostree but adapted for APT package management, enabling:
- Atomic updates - System updates happen atomically with rollback capability
- Immutable base system - Core system files are read-only and versioned
- Layered package management - Additional packages can be layered on top
- OSTree integration - Uses OSTree for filesystem management and versioning
🚀 Quick Start
Prerequisites
- Debian Trixie (13) or Forky (14), or Ubuntu Noble (24.04) or newer
- OSTree tools installed
- Rust development environment
Installation
Option 1: Install from Debian Package
# Install dependencies
sudo apt update
sudo apt install ostree libostree-1-1 systemd
# Install apt-ostree package
sudo dpkg -i apt-ostree_0.1.0-2_amd64.deb
Option 2: Build from Source
# Clone the repository
git clone https://github.com/robojerk/apt-ostree.git
cd apt-ostree
# Install build dependencies
sudo apt install build-essential cargo rustc pkg-config \
libostree-dev libglib2.0-dev libcurl4-gnutls-dev \
libssl-dev libsystemd-dev libmount-dev libselinux1-dev \
libapt-pkg-dev debhelper dh-cargo
# Build for Debian Trixie/Forky
./build-debian-trixie.sh
# Install the built package
sudo dpkg -i ../apt-ostree_0.1.0-2_amd64.deb
🔧 Building for Different Distributions
Debian Trixie/Forky (Debian 13/14)
# Use the specialized build script
./build-debian-trixie.sh
This script:
- Verifies system compatibility
- Checks for libapt-pkg7.0 support
- Builds with correct dependencies
- Tests package installation
Ubuntu Noble (24.04)
# Use the standard Debian build process
./debian/build.sh
📦 Package Compatibility
| Distribution | Version | libapt-pkg | Status | Notes |
|---|---|---|---|---|
| Debian Trixie | 13 | 7.0 | ✅ Supported | Tested and working |
| Debian Forky | 14 | 7.0 | ✅ Supported | Tested and working |
| Ubuntu Noble | 24.04 | 6.0 | ✅ Supported | Original target |
| Ubuntu Jammy | 22.04 | 6.0 | ⚠️ May work | Not tested |
🎯 Usage Examples
# Check system status
apt-ostree status
# Install packages atomically
apt-ostree install firefox libreoffice
# Update system
apt-ostree upgrade
# Rollback to previous deployment
apt-ostree rollback
# View deployment history
apt-ostree log
# Create new deployment from container
apt-ostree deploy ghcr.io/your-org/debian-ostree:latest
🏗️ Architecture
apt-ostree works by:
- Creating OSTree deployments from APT package selections
- Managing atomic updates through OSTree commits
- Providing rollback capability to previous deployments
- Integrating with systemd for boot management
🔍 Troubleshooting
Library Compatibility Issues
If you encounter libapt-pkg.so.6.0: cannot open shared object file:
# Check your libapt-pkg version
pkg-config --modversion libapt-pkg
# For Debian Trixie/Forky, you need version 3.0.0+
# For Ubuntu Noble, version 2.0.0+ is sufficient
Build Failures
# Clean and rebuild
cargo clean
./build-debian-trixie.sh
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test on target distributions
- Submit a pull request
📄 License
This project is licensed under the GPL-3.0-or-later License - see the LICENSE file for details.
🙏 Acknowledgments
- Inspired by
rpm-ostreefrom the Fedora project - Built on the excellent
rust-aptcrate - OSTree integration powered by the OSTree project