refactor: modernise RPM builder with Python tooling v2
- Migrate from legacy shell-based build system to modern Python tooling - Update all metadata.yaml files to new schema with per-distro builds - Standardise build scripts with curl -L, envsubst, and error handling - Convert nfpm.yaml templates to use environment variable substitution - Update Dockerfile to accept all package metadata as build arguments - Modernise Makefile to use new Python build tool commands - Update CI workflow to use tools/build instead of make
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
name: incus
|
||||
release: 1
|
||||
version: 6.10.1
|
||||
build:
|
||||
- distro: el/8
|
||||
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
||||
- distro: el/9
|
||||
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||
---
|
||||
builds:
|
||||
- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
||||
release: '1'
|
||||
repository: [almalinux/el8]
|
||||
version: 6.10.1
|
||||
- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||
release: '1'
|
||||
repository: [almalinux/el9]
|
||||
version: 6.10.1
|
||||
description: incus package
|
||||
github: lxc/incus
|
||||
name: incus
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Install build dependencies
|
||||
dnf install -y \
|
||||
unzip \
|
||||
@@ -24,14 +26,14 @@ dnf install -y \
|
||||
bash-completion \
|
||||
gettext \
|
||||
help2man \
|
||||
curl
|
||||
curl-minimal
|
||||
|
||||
# Download and extract incus source
|
||||
curl -o /app/incus.tar.gz https://github.com/lxc/incus/archive/refs/tags/v${PACKAGE_VERSION}.tar.gz
|
||||
curl -L -o /app/incus.tar.gz https://github.com/lxc/incus/archive/refs/tags/v${PACKAGE_VERSION}.tar.gz
|
||||
tar -C /app -xf incus.tar.gz
|
||||
|
||||
# Install specific Go version
|
||||
curl -O https://go.dev/dl/go1.24.1.linux-amd64.tar.gz
|
||||
curl -L -O https://go.dev/dl/go1.24.1.linux-amd64.tar.gz
|
||||
rm -rf /usr/local/go
|
||||
tar -C /usr/local -xzf go1.24.1.linux-amd64.tar.gz
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ contents:
|
||||
|
||||
# Scripts to run during installation/removal (optional)
|
||||
scripts:
|
||||
postinstall: ./scripts/postinstall.sh
|
||||
preremove: ./scripts/preremove.sh
|
||||
postremove: ./scripts/postremove.sh
|
||||
preinstall: ./scripts/preinstall.sh
|
||||
postinstall: ./resources/scripts/postinstall.sh
|
||||
preremove: ./resources/scripts/preremove.sh
|
||||
postremove: ./resources/scripts/postremove.sh
|
||||
preinstall: ./resources/scripts/preinstall.sh
|
||||
|
||||
Reference in New Issue
Block a user