Initial commit: Complete bootc packaging with CI/CD automation
Some checks failed
Build Packages / Build libostree Backport (push) Failing after 0s
Build Packages / Build bootc Package (push) Has been skipped
Test Build / Test bootc Build (with existing libostree) (push) Failing after 0s
Build Packages / Create Release (push) Has been skipped
Build Packages / Create Artifacts for README Update (push) Has been skipped
Some checks failed
Build Packages / Build libostree Backport (push) Failing after 0s
Build Packages / Build bootc Package (push) Has been skipped
Test Build / Test bootc Build (with existing libostree) (push) Failing after 0s
Build Packages / Create Release (push) Has been skipped
Build Packages / Create Artifacts for README Update (push) Has been skipped
This commit is contained in:
commit
695714a60e
15 changed files with 1545 additions and 0 deletions
127
install.sh
Executable file
127
install.sh
Executable file
|
|
@ -0,0 +1,127 @@
|
|||
#!/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~noble1_*.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 "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue