Some checks failed
Comprehensive CI/CD Pipeline / Build and Test bootc Package (push) Failing after 2m43s
Comprehensive CI/CD Pipeline / Security Audit (push) Failing after 0s
Comprehensive CI/CD Pipeline / Package Validation (push) Successful in 1m2s
Comprehensive CI/CD Pipeline / Status Report (push) Has been skipped
- Update debian/changelog: 1.5.1-1~noble1 → 1.5.1-1~trixie1 - Change distribution from noble-backports to trixie - Add missing build dependencies: libfuse3-dev, libsoup-3.0-dev, etc. - Update install.sh and README.md to reflect Trixie version - Fix repository URLs to use particle-os instead of robojerk - Ensure all required packages are available for successful build
127 lines
No EOL
2.9 KiB
Bash
Executable file
127 lines
No EOL
2.9 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# Bootc Installation Script
|
|
# Installs the bootc .deb package with proper dependency handling
|
|
|
|
set -e
|
|
|
|
# Colors for output
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
BLUE='\033[0;34m'
|
|
NC='\033[0m' # No Color
|
|
|
|
log_info() {
|
|
echo -e "${BLUE}[INFO]${NC} $1"
|
|
}
|
|
|
|
log_success() {
|
|
echo -e "${GREEN}[SUCCESS]${NC} $1"
|
|
}
|
|
|
|
log_warning() {
|
|
echo -e "${YELLOW}[WARNING]${NC} $1"
|
|
}
|
|
|
|
log_error() {
|
|
echo -e "${RED}[ERROR]${NC} $1" >&2
|
|
exit 1
|
|
}
|
|
|
|
# Check if running as root
|
|
check_root() {
|
|
if [ "$EUID" -ne 0 ]; then
|
|
log_error "This script must be run as root (use sudo)"
|
|
fi
|
|
}
|
|
|
|
# Check for libostree 2025.2-1
|
|
check_libostree() {
|
|
log_info "Checking libostree version..."
|
|
|
|
if ! dpkg -l | grep -q "libostree-1-1.*2025.2"; then
|
|
log_warning "libostree 2025.2-1 not found. This package requires the libostree backport."
|
|
log_info "Please install the libostree backport first."
|
|
log_error "Installation cannot proceed without libostree 2025.2-1"
|
|
fi
|
|
|
|
log_success "libostree 2025.2-1 found."
|
|
}
|
|
|
|
# Find the .deb file
|
|
find_deb_file() {
|
|
log_info "Looking for bootc .deb file..."
|
|
|
|
DEB_FILE=$(find . -name "bootc_1.5.1-1~trixie1_*.deb" | head -n 1)
|
|
|
|
if [ -z "$DEB_FILE" ]; then
|
|
log_error "No bootc .deb file found. Please run ./build.sh first."
|
|
fi
|
|
|
|
log_success "Found package: $DEB_FILE"
|
|
echo "$DEB_FILE"
|
|
}
|
|
|
|
# Install the package
|
|
install_package() {
|
|
local deb_file="$1"
|
|
|
|
log_info "Installing bootc package..."
|
|
|
|
# Install the package
|
|
dpkg -i "$deb_file"
|
|
|
|
# Fix any dependency issues
|
|
log_info "Checking for dependency issues..."
|
|
apt-get install -f -y
|
|
|
|
log_success "Bootc package installed successfully."
|
|
}
|
|
|
|
# Verify installation
|
|
verify_installation() {
|
|
log_info "Verifying installation..."
|
|
|
|
# Check if bootc is available
|
|
if ! command -v bootc &> /dev/null; then
|
|
log_error "bootc command not found after installation"
|
|
fi
|
|
|
|
# Test basic functionality
|
|
log_info "Testing bootc functionality..."
|
|
bootc --help > /dev/null 2>&1 || log_error "bootc --help failed"
|
|
|
|
log_success "Bootc installation verified successfully."
|
|
}
|
|
|
|
# Show next steps
|
|
show_next_steps() {
|
|
echo
|
|
log_success "Bootc installation completed!"
|
|
echo
|
|
log_info "Next steps:"
|
|
echo "1. Test bootc: bootc --help"
|
|
echo "2. Check status: bootc status"
|
|
echo "3. Test with your apt-ostree OCI images"
|
|
echo
|
|
log_info "For Aurora-style workflow integration:"
|
|
echo "- Use bootc with your apt-ostree generated OCI images"
|
|
echo "- Test container image deployment and updates"
|
|
}
|
|
|
|
# Main execution
|
|
main() {
|
|
log_info "Starting bootc installation..."
|
|
|
|
check_root
|
|
check_libostree
|
|
|
|
DEB_FILE=$(find_deb_file)
|
|
install_package "$DEB_FILE"
|
|
verify_installation
|
|
show_next_steps
|
|
}
|
|
|
|
# Run main function
|
|
main "$@" |