Fix YAML linting issues and update system requirements to Debian 13+

- Fix trailing spaces and blank lines in Forgejo workflows
- Update system requirements from Ubuntu Jammy/Bookworm to Debian 13+ (Trixie)
- Update test treefile to use Debian Trixie instead of Ubuntu Jammy
- Update documentation to reflect modern system requirements
- Fix yamllint errors for CI/CD functionality
- Ensure compatibility with modern OSTree and libapt versions
This commit is contained in:
robojerk 2025-08-18 11:39:58 -07:00
parent ec0da91864
commit 3dec23f8f7
85 changed files with 12569 additions and 1088 deletions

View file

@ -28,15 +28,81 @@ setup_completions() {
fi
}
# Function to check if systemd is available
check_systemd() {
if ! command -v systemctl >/dev/null 2>&1; then
log "Warning: systemd not available, skipping service setup"
return 1
fi
return 0
}
# Function to enable and start the service
setup_service() {
if ! check_systemd; then
return 0
fi
log "Setting up apt-ostreed service..."
# Reload systemd daemon
systemctl daemon-reload
# Enable the service
if systemctl enable apt-ostreed.service; then
log "apt-ostreed service enabled"
else
log "Warning: Failed to enable apt-ostreed service"
fi
# Start the service if not running
if ! systemctl is-active --quiet apt-ostreed.service; then
if systemctl start apt-ostreed.service; then
log "apt-ostreed service started"
else
log "Warning: Failed to start apt-ostreed service"
fi
else
log "apt-ostreed service already running"
fi
}
# Function to setup directories and permissions
setup_directories() {
log "Setting up directories and permissions..."
# Create necessary directories with proper permissions
mkdir -p /var/log/apt-ostreed
mkdir -p /var/cache/apt-ostree
mkdir -p /var/lib/apt-ostree
mkdir -p /var/lib/apt-ostree/repo
# Set proper ownership (root:root)
chown root:root /var/log/apt-ostreed
chown root:root /var/cache/apt-ostree
chown root:root /var/lib/apt-ostree
chown root:root /var/lib/apt-ostree/repo
# Set proper permissions
chmod 755 /var/log/apt-ostreed
chmod 755 /var/cache/apt-ostree
chmod 755 /var/lib/apt-ostree
chmod 755 /var/lib/apt-ostree/repo
}
# Function to reload polkit rules
reload_polkit() {
if command -v pkaction >/dev/null 2>&1; then
log "Reloading polkit rules..."
# This will trigger polkit to reload its rules
pkaction --version >/dev/null 2>&1 || true
fi
}
# Function to check dependencies
check_dependencies() {
log "Checking dependencies..."
# Check if apt-ostreed is installed and running
if ! dpkg -l apt-ostreed >/dev/null 2>&1; then
log "Warning: apt-ostreed package not found. Some features may not work."
fi
# Check if ostree is available
if ! command -v ostree >/dev/null 2>&1; then
log "Warning: ostree command not found. Please install ostree package."
@ -53,6 +119,9 @@ case "$1" in
configure)
log "Configuring apt-ostree package..."
setup_completions
setup_directories
setup_service
reload_polkit
check_dependencies
log "Configuration completed successfully"
;;