Getting ready to move out of heavy alpha development. Created ci/cd
Some checks failed
Build apt-ostree Package / Build apt-ostree Package (push) Failing after 2m12s
Test apt-ostree Build / Test apt-ostree Build (with existing libostree) (push) Failing after 2m36s

This commit is contained in:
robojerk 2025-07-22 04:43:43 +00:00
parent ceaa66fb07
commit 75f5d2fc05
56 changed files with 1122 additions and 3133 deletions

81
debian/build.sh vendored Normal file
View file

@ -0,0 +1,81 @@
#!/bin/bash
# apt-ostree Debian Package Builder
# Simplified version for CI/CD environments
set -e
# Colors for output
GREEN='\033[0;32m'
BLUE='\033[0;34m'
RED='\033[0;31m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${BLUE}[INFO]${NC} $1"
}
print_success() {
echo -e "${GREEN}[SUCCESS]${NC} $1"
}
print_error() {
echo -e "${RED}[ERROR]${NC} $1"
}
print_header() {
echo ""
echo -e "${BLUE}================================${NC}"
echo -e "${BLUE}$1${NC}"
echo -e "${BLUE}================================${NC}"
}
# Configuration
PROJECT_NAME="apt-ostree"
VERSION="0.1.0"
print_header "apt-ostree Debian Package Builder"
# Check if we're in the right directory
if [ ! -f "Cargo.toml" ]; then
print_error "Cargo.toml not found. Please run this script from the project root."
exit 1
fi
# Check if debian directory exists
if [ ! -d "debian" ]; then
print_error "debian/ directory not found. Please ensure Debian packaging files are present."
exit 1
fi
print_status "Building apt-ostree package..."
# Ensure Rust environment is available
if command -v cargo &> /dev/null; then
print_status "Rust environment found"
cargo --version
else
print_error "Cargo not found. Please ensure Rust is installed."
exit 1
fi
# Build the package using dpkg-buildpackage
print_status "Running dpkg-buildpackage..."
dpkg-buildpackage -us -uc -b
# Check if build was successful
if [ $? -eq 0 ]; then
print_success "Package built successfully!"
# List built packages
print_status "Built packages:"
ls -la ../*.deb 2>/dev/null || echo "No .deb files found in parent directory"
ls -la *.deb 2>/dev/null || echo "No .deb files found in current directory"
else
print_error "Package build failed!"
exit 1
fi
print_success "Build completed successfully!"

8
debian/changelog vendored Normal file
View file

@ -0,0 +1,8 @@
apt-ostree (0.1.0-1) noble; urgency=medium
* Initial release
* Debian/Ubuntu equivalent of rpm-ostree
* Basic package management commands
* OSTree integration for atomic deployments
-- Robojerk <robojerk@example.com> Mon, 22 Jul 2025 04:15:00 +0000

35
debian/control vendored Normal file
View file

@ -0,0 +1,35 @@
Source: apt-ostree
Section: admin
Priority: optional
Maintainer: Robojerk <robojerk@example.com>
Build-Depends: debhelper (>= 13),
dh-cargo,
cargo,
rustc,
pkg-config,
libostree-dev (>= 2025.2),
libglib2.0-dev,
libcurl4-gnutls-dev,
libssl-dev,
libsystemd-dev,
libmount-dev,
libselinux1-dev
Standards-Version: 4.6.2
Homepage: https://github.com/robojerk/apt-ostree
Vcs-Git: https://github.com/robojerk/apt-ostree.git
Vcs-Browser: https://github.com/robojerk/apt-ostree
Package: apt-ostree
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends},
libostree-1-1 (>= 2025.2),
ostree,
systemd
Description: Debian/Ubuntu equivalent of rpm-ostree
apt-ostree is a tool for managing atomic, immutable deployments
on Debian and Ubuntu systems using OSTree as the backend.
.
It provides functionality similar to rpm-ostree but adapted for
APT package management, enabling atomic updates and rollbacks
on Debian-based systems.

45
debian/copyright vendored Normal file
View file

@ -0,0 +1,45 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: apt-ostree
Source: https://github.com/robojerk/apt-ostree
Files: *
Copyright: 2025 Robojerk <robojerk@example.com>
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Files: debian/*
Copyright: 2025 Robojerk <robojerk@example.com>
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

32
debian/rules vendored Normal file
View file

@ -0,0 +1,32 @@
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE = 1
# This has to be exported to make some magic below work.
export DH_OPTIONS
# Build system
export CARGO_HOME = $(CURDIR)/debian/cargo
export CARGO_TARGET_DIR = $(CURDIR)/debian/cargo/target
override_dh_auto_build:
# Build apt-ostree with cargo - ensure rustup environment is available
export PATH=$(HOME)/.cargo/bin:$$PATH
cargo build --release
dh_auto_build
override_dh_auto_install:
# Install the apt-ostree binary to the correct location
install -D -m 755 debian/cargo/target/release/apt-ostree debian/apt-ostree/usr/bin/apt-ostree
# Create any additional directories or files needed
mkdir -p debian/apt-ostree/usr/share/doc/apt-ostree
# Skip dh_auto_install since we've handled installation manually
override_dh_auto_clean:
# Clean cargo build artifacts
rm -rf debian/cargo
dh_auto_clean
%:
dh $@