1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-03 20:32:07 -04:00

feat(Ubuntu): Initial Ubuntu 26.04 LTS Resolute Raccoon distro support

This commit is contained in:
purian23
2026-03-21 17:56:08 -04:00
parent be8326f497
commit 5f631b36cd
4 changed files with 83 additions and 23 deletions

View File

@@ -242,7 +242,11 @@ jobs:
echo "🔄 Using rebuild release number: ppa$REBUILD_RELEASE" echo "🔄 Using rebuild release number: ppa$REBUILD_RELEASE"
fi fi
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
bash distro/scripts/ppa-upload.sh "$PKG" "$PPA_NAME" questing ${REBUILD_RELEASE:+"$REBUILD_RELEASE"} # ppa-upload.sh uploads to questing + resolute when series is omitted
if ! bash distro/scripts/ppa-upload.sh "$PKG" "$PPA_NAME" ${REBUILD_RELEASE:+"$REBUILD_RELEASE"}; then
echo "::error::Upload failed for $PKG"
exit 1
fi
done done
- name: Summary - name: Summary

View File

@@ -3,8 +3,10 @@
# Usage: ./create-source.sh <package-dir> [ubuntu-series] # Usage: ./create-source.sh <package-dir> [ubuntu-series]
# #
# Example: # Example:
# ./create-source.sh ../dms questing # ./create-source.sh ../dms questing # Ubuntu 25.10 (default series in ppa-upload)
# ./create-source.sh ../dms resolute # Ubuntu 26.04 LTS
# ./create-source.sh ../dms-git questing # ./create-source.sh ../dms-git questing
# ./create-source.sh ../dms-git resolute
set -e set -e
@@ -25,11 +27,13 @@ if [ $# -lt 1 ]; then
echo "Arguments:" echo "Arguments:"
echo " package-dir : Path to package directory (e.g., ../dms)" echo " package-dir : Path to package directory (e.g., ../dms)"
echo " ubuntu-series : Ubuntu series (optional, default: noble)" echo " ubuntu-series : Ubuntu series (optional, default: noble)"
echo " Options: noble, jammy, oracular, mantic" echo " Options: noble, jammy, oracular, mantic, questing, resolute"
echo echo
echo "Examples:" echo "Examples:"
echo " $0 ../dms questing" echo " $0 ../dms questing"
echo " $0 ../dms resolute"
echo " $0 ../dms-git questing" echo " $0 ../dms-git questing"
echo " $0 ../dms-git resolute"
exit 1 exit 1
fi fi
@@ -129,10 +133,14 @@ check_ppa_version_exists() {
local SOURCE_NAME="$2" local SOURCE_NAME="$2"
local VERSION="$3" local VERSION="$3"
local CHECK_MODE="${4:-commit}" local CHECK_MODE="${4:-commit}"
local DISTRO_SERIES="${5:-}"
# Query Launchpad API # Query Launchpad API (optionally scoped to one Ubuntu series so the same version can ship to questing and resolute)
PPA_VERSION=$(curl -s \ local API_URL="https://api.launchpad.net/1.0/~avengemedia/+archive/ubuntu/$PPA_NAME?ws.op=getPublishedSources&source_name=$SOURCE_NAME&status=Published"
"https://api.launchpad.net/1.0/~avengemedia/+archive/ubuntu/$PPA_NAME?ws.op=getPublishedSources&source_name=$SOURCE_NAME&status=Published" \ if [[ -n "$DISTRO_SERIES" ]]; then
API_URL+="&distro_series=https://api.launchpad.net/1.0/ubuntu/${DISTRO_SERIES}"
fi
PPA_VERSION=$(curl -s "$API_URL" \
| grep -oP '"source_package_version":\s*"\K[^"]+' | head -1 || echo "") | grep -oP '"source_package_version":\s*"\K[^"]+' | head -1 || echo "")
if [[ -n "$PPA_VERSION" ]]; then if [[ -n "$PPA_VERSION" ]]; then
@@ -259,14 +267,14 @@ if [ "$IS_GIT_PACKAGE" = false ] && [ -n "$GIT_REPO" ]; then
if [[ -n "$PPA_NAME" ]]; then if [[ -n "$PPA_NAME" ]]; then
info "Checking if version $NEW_VERSION already exists in PPA..." info "Checking if version $NEW_VERSION already exists in PPA..."
if [[ -z "${REBUILD_RELEASE:-}" ]]; then if [[ -z "${REBUILD_RELEASE:-}" ]]; then
if check_ppa_version_exists "$PPA_NAME" "$SOURCE_NAME" "${BASE_VERSION}ppa1" "exact"; then if check_ppa_version_exists "$PPA_NAME" "$SOURCE_NAME" "${BASE_VERSION}ppa1" "exact" "$UBUNTU_SERIES"; then
error "==> Error: Version ${BASE_VERSION}ppa1 already exists in PPA $PPA_NAME" error "==> Error: Version ${BASE_VERSION}ppa1 already exists in PPA $PPA_NAME"
error " To rebuild with a different release number, use:" error " To rebuild with a different release number, use:"
error " ./distro/scripts/ppa-upload.sh $PACKAGE_NAME 2" error " ./distro/scripts/ppa-upload.sh $PACKAGE_NAME 2"
exit 1 exit 1
fi fi
else else
if check_ppa_version_exists "$PPA_NAME" "$SOURCE_NAME" "$NEW_VERSION" "exact"; then if check_ppa_version_exists "$PPA_NAME" "$SOURCE_NAME" "$NEW_VERSION" "exact" "$UBUNTU_SERIES"; then
error "==> Error: Version $NEW_VERSION already exists in PPA $PPA_NAME" error "==> Error: Version $NEW_VERSION already exists in PPA $PPA_NAME"
NEXT_NUM=$((REBUILD_RELEASE + 1)) NEXT_NUM=$((REBUILD_RELEASE + 1))
error " To rebuild with a different release number, use:" error " To rebuild with a different release number, use:"
@@ -410,7 +418,7 @@ if [ "$IS_GIT_PACKAGE" = true ] && [ -n "$GIT_REPO" ]; then
if [[ -n "$PPA_NAME" ]]; then if [[ -n "$PPA_NAME" ]]; then
if [[ -z "${REBUILD_RELEASE:-}" ]]; then if [[ -z "${REBUILD_RELEASE:-}" ]]; then
info "Checking if commit $GIT_COMMIT_HASH already exists in PPA..." info "Checking if commit $GIT_COMMIT_HASH already exists in PPA..."
if check_ppa_version_exists "$PPA_NAME" "$SOURCE_NAME" "${BASE_VERSION}ppa1" "commit"; then if check_ppa_version_exists "$PPA_NAME" "$SOURCE_NAME" "${BASE_VERSION}ppa1" "commit" "$UBUNTU_SERIES"; then
error "==> Error: This commit is already uploaded to PPA" error "==> Error: This commit is already uploaded to PPA"
error " The same git commit ($GIT_COMMIT_HASH) already exists in PPA." error " The same git commit ($GIT_COMMIT_HASH) already exists in PPA."
error " To rebuild the same commit, specify a rebuild number:" error " To rebuild the same commit, specify a rebuild number:"
@@ -429,7 +437,7 @@ if [ "$IS_GIT_PACKAGE" = true ] && [ -n "$GIT_REPO" ]; then
PPA_NUM=$REBUILD_RELEASE PPA_NUM=$REBUILD_RELEASE
NEW_VERSION="${BASE_VERSION}ppa${PPA_NUM}" NEW_VERSION="${BASE_VERSION}ppa${PPA_NUM}"
info "Checking if version $NEW_VERSION already exists in PPA..." info "Checking if version $NEW_VERSION already exists in PPA..."
if check_ppa_version_exists "$PPA_NAME" "$SOURCE_NAME" "$NEW_VERSION" "exact"; then if check_ppa_version_exists "$PPA_NAME" "$SOURCE_NAME" "$NEW_VERSION" "exact" "$UBUNTU_SERIES"; then
error "==> Error: Version $NEW_VERSION already exists in PPA" error "==> Error: Version $NEW_VERSION already exists in PPA"
error " This exact version (including ppa${PPA_NUM}) is already uploaded." error " This exact version (including ppa${PPA_NUM}) is already uploaded."
NEXT_NUM=$((PPA_NUM + 1)) NEXT_NUM=$((PPA_NUM + 1))

View File

@@ -10,7 +10,8 @@
PPA_OWNER="avengemedia" PPA_OWNER="avengemedia"
LAUNCHPAD_API="https://api.launchpad.net/1.0" LAUNCHPAD_API="https://api.launchpad.net/1.0"
DISTRO_SERIES="questing" # Supported Ubuntu series for PPA builds (25.10 questing + 26.04 LTS resolute)
DISTRO_SERIES_LIST=(questing resolute)
# Define packages (sync with ppa-upload.sh) # Define packages (sync with ppa-upload.sh)
ALL_PACKAGES=(dms dms-git dms-greeter) ALL_PACKAGES=(dms dms-git dms-greeter)
@@ -106,10 +107,10 @@ get_status_display() {
for PPA_NAME in "${PPAS[@]}"; do for PPA_NAME in "${PPAS[@]}"; do
PPA_ARCHIVE="${LAUNCHPAD_API}/~${PPA_OWNER}/+archive/ubuntu/${PPA_NAME}" PPA_ARCHIVE="${LAUNCHPAD_API}/~${PPA_OWNER}/+archive/ubuntu/${PPA_NAME}"
for DISTRO_SERIES in "${DISTRO_SERIES_LIST[@]}"; do
echo "==========================================" echo "=========================================="
echo "=== PPA: ${PPA_OWNER}/${PPA_NAME} ===" echo "=== PPA: ${PPA_OWNER}/${PPA_NAME} (Ubuntu ${DISTRO_SERIES}) ==="
echo "==========================================" echo "=========================================="
echo "Distribution: Ubuntu $DISTRO_SERIES"
echo "" echo ""
for pkg in "${PACKAGES[@]}"; do for pkg in "${PACKAGES[@]}"; do
@@ -210,6 +211,7 @@ for PPA_NAME in "${PPAS[@]}"; do
echo "View full PPA at: https://launchpad.net/~${PPA_OWNER}/+archive/ubuntu/${PPA_NAME}" echo "View full PPA at: https://launchpad.net/~${PPA_OWNER}/+archive/ubuntu/${PPA_NAME}"
echo "" echo ""
done
done done
echo "==========================================" echo "=========================================="

View File

@@ -3,13 +3,15 @@
# Usage: ./ppa-upload.sh [package-name] [ppa-name] [ubuntu-series] [rebuild-number] [--keep-builds] [--rebuild=N] # Usage: ./ppa-upload.sh [package-name] [ppa-name] [ubuntu-series] [rebuild-number] [--keep-builds] [--rebuild=N]
# #
# Examples: # Examples:
# ./ppa-upload.sh dms # Single package (auto-detects PPA) # ./ppa-upload.sh dms # Upload to questing + resolute (default)
# ./ppa-upload.sh dms 2 # Rebuild with ppa2 (simple syntax) # ./ppa-upload.sh dms 2 # Rebuild with ppa2 on both series
# ./ppa-upload.sh dms --rebuild=2 # Rebuild with ppa2 (flag syntax) # ./ppa-upload.sh dms --rebuild=2 # Rebuild with ppa2 (flag syntax)
# ./ppa-upload.sh dms-git # Single package # ./ppa-upload.sh dms-git # Single package (both series)
# ./ppa-upload.sh all # All packages # ./ppa-upload.sh all # All packages (each to both series)
# ./ppa-upload.sh dms dms questing # Explicit PPA and series # ./ppa-upload.sh dms resolute # 26.04 LTS only (same as "dms dms resolute")
# ./ppa-upload.sh dms dms questing 2 # Explicit PPA, series, and rebuild number # ./ppa-upload.sh dms questing # 25.10 only
# ./ppa-upload.sh dms dms resolute # Explicit PPA name + one series (optional form)
# ./ppa-upload.sh dms dms resolute 2 # One series + rebuild number
# ./ppa-upload.sh distro/ubuntu/dms dms # Path-style (backward compatible) # ./ppa-upload.sh distro/ubuntu/dms dms # Path-style (backward compatible)
set -e set -e
@@ -52,7 +54,7 @@ done
PACKAGE_INPUT="${POSITIONAL_ARGS[0]:-}" PACKAGE_INPUT="${POSITIONAL_ARGS[0]:-}"
PPA_NAME_INPUT="${POSITIONAL_ARGS[1]:-}" PPA_NAME_INPUT="${POSITIONAL_ARGS[1]:-}"
UBUNTU_SERIES="${POSITIONAL_ARGS[2]:-questing}" UBUNTU_SERIES_RAW="${POSITIONAL_ARGS[2]:-}"
if [[ ${#POSITIONAL_ARGS[@]} -gt 0 ]]; then if [[ ${#POSITIONAL_ARGS[@]} -gt 0 ]]; then
LAST_INDEX=$((${#POSITIONAL_ARGS[@]} - 1)) LAST_INDEX=$((${#POSITIONAL_ARGS[@]} - 1))
@@ -64,10 +66,27 @@ if [[ ${#POSITIONAL_ARGS[@]} -gt 0 ]]; then
POSITIONAL_ARGS=("${POSITIONAL_ARGS[@]:0:$LAST_INDEX}") POSITIONAL_ARGS=("${POSITIONAL_ARGS[@]:0:$LAST_INDEX}")
PACKAGE_INPUT="${POSITIONAL_ARGS[0]:-}" PACKAGE_INPUT="${POSITIONAL_ARGS[0]:-}"
PPA_NAME_INPUT="${POSITIONAL_ARGS[1]:-}" PPA_NAME_INPUT="${POSITIONAL_ARGS[1]:-}"
UBUNTU_SERIES="${POSITIONAL_ARGS[2]:-questing}" UBUNTU_SERIES_RAW="${POSITIONAL_ARGS[2]:-}"
fi fi
fi fi
# Shorthand: "dms resolute" / "dms questing" (package + series; PPA inferred — no need for "dms dms resolute")
if [[ ${#POSITIONAL_ARGS[@]} -eq 2 ]] && [[ "${POSITIONAL_ARGS[1]}" == "questing" || "${POSITIONAL_ARGS[1]}" == "resolute" ]]; then
PACKAGE_INPUT="${POSITIONAL_ARGS[0]}"
PPA_NAME_INPUT=""
UBUNTU_SERIES_RAW="${POSITIONAL_ARGS[1]}"
fi
SERIES_LIST=()
if [[ -z "$UBUNTU_SERIES_RAW" ]]; then
SERIES_LIST=(questing resolute)
elif [[ "$UBUNTU_SERIES_RAW" == "questing" || "$UBUNTU_SERIES_RAW" == "resolute" ]]; then
SERIES_LIST=("$UBUNTU_SERIES_RAW")
else
error "Invalid Ubuntu series: $UBUNTU_SERIES_RAW (use questing, resolute, or omit for both)"
exit 1
fi
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
BUILD_SCRIPT="$SCRIPT_DIR/ppa-build.sh" BUILD_SCRIPT="$SCRIPT_DIR/ppa-build.sh"
@@ -119,7 +138,12 @@ elif [[ -n "$PACKAGE_INPUT" ]] && [[ "$PACKAGE_INPUT" == "all" ]]; then
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
info "Processing $pkg..." info "Processing $pkg..."
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
BUILD_ARGS=("$pkg" "$PPA_NAME_INPUT" "$UBUNTU_SERIES") BUILD_ARGS=("$pkg")
[[ -n "$PPA_NAME_INPUT" ]] && BUILD_ARGS+=("$PPA_NAME_INPUT")
if [[ ${#SERIES_LIST[@]} -eq 1 ]]; then
BUILD_ARGS+=("${SERIES_LIST[0]}")
fi
[[ -n "$REBUILD_RELEASE" ]] && BUILD_ARGS+=("$REBUILD_RELEASE")
[[ "$KEEP_BUILDS" == "true" ]] && BUILD_ARGS+=("--keep-builds") [[ "$KEEP_BUILDS" == "true" ]] && BUILD_ARGS+=("--keep-builds")
if ! "$0" "${BUILD_ARGS[@]}"; then if ! "$0" "${BUILD_ARGS[@]}"; then
FAILED_PACKAGES+=("$pkg") FAILED_PACKAGES+=("$pkg")
@@ -165,7 +189,9 @@ else
if [[ "$selection" == "a" ]] || [[ "$selection" == "all" ]]; then if [[ "$selection" == "a" ]] || [[ "$selection" == "all" ]]; then
PACKAGE_INPUT="all" PACKAGE_INPUT="all"
BUILD_ARGS=("all" "$PPA_NAME_INPUT" "$UBUNTU_SERIES") BUILD_ARGS=("all")
[[ -n "$PPA_NAME_INPUT" ]] && BUILD_ARGS+=("$PPA_NAME_INPUT")
[[ -n "$REBUILD_RELEASE" ]] && BUILD_ARGS+=("$REBUILD_RELEASE")
[[ "$KEEP_BUILDS" == "true" ]] && BUILD_ARGS+=("--keep-builds") [[ "$KEEP_BUILDS" == "true" ]] && BUILD_ARGS+=("--keep-builds")
exec "$0" "${BUILD_ARGS[@]}" exec "$0" "${BUILD_ARGS[@]}"
elif [[ "$selection" =~ ^[0-9]+$ ]] && [[ "$selection" -ge 1 ]] && [[ "$selection" -le ${#AVAILABLE_PACKAGES[@]} ]]; then elif [[ "$selection" =~ ^[0-9]+$ ]] && [[ "$selection" -ge 1 ]] && [[ "$selection" -le ${#AVAILABLE_PACKAGES[@]} ]]; then
@@ -191,6 +217,26 @@ fi
PACKAGE_DIR=$(cd "$PACKAGE_DIR" && pwd) PACKAGE_DIR=$(cd "$PACKAGE_DIR" && pwd)
PARENT_DIR=$(dirname "$PACKAGE_DIR") PARENT_DIR=$(dirname "$PACKAGE_DIR")
if [[ ${#SERIES_LIST[@]} -gt 1 ]]; then
export REBUILD_RELEASE
for SERIES in "${SERIES_LIST[@]}"; do
if [[ -n "$PACKAGE_INPUT" ]] && [[ "$PACKAGE_INPUT" == *"/"* ]]; then
ARGS=("$PACKAGE_DIR" "$PPA_NAME" "$SERIES")
else
ARGS=("$PACKAGE_NAME" "$PPA_NAME" "$SERIES")
fi
[[ -n "$REBUILD_RELEASE" ]] && ARGS+=("$REBUILD_RELEASE")
[[ "$KEEP_BUILDS" == "true" ]] && ARGS+=("--keep-builds")
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
info "Upload series: $SERIES (of ${SERIES_LIST[*]})"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
"$0" "${ARGS[@]}" || exit 1
done
exit 0
fi
UBUNTU_SERIES="${SERIES_LIST[0]}"
info "Building and uploading: $PACKAGE_NAME" info "Building and uploading: $PACKAGE_NAME"
info "Package directory: $PACKAGE_DIR" info "Package directory: $PACKAGE_DIR"
info "PPA: ppa:avengemedia/$PPA_NAME" info "PPA: ppa:avengemedia/$PPA_NAME"