diff options
| author | Nippy <nippy@rp1.hu> | 2026-05-10 10:46:33 +0200 |
|---|---|---|
| committer | Nippy <nippy@rp1.hu> | 2026-05-10 10:46:33 +0200 |
| commit | 072b36bf0e5a199fe038adffcadd99bbc4ab1dbc (patch) | |
| tree | f77d3f42c78aceeddf286fdc21ef40a65c3df10e | |
| parent | d527904cd222b8aecaec496ca2869e9172e74ebc (diff) | |
| download | RaveOS-build-iso-072b36bf0e5a199fe038adffcadd99bbc4ab1dbc.tar.gz RaveOS-build-iso-072b36bf0e5a199fe038adffcadd99bbc4ab1dbc.zip | |
raveos update
| -rw-r--r-- | .forgejo/workflows/build-iso.yml | 57 | ||||
| -rw-r--r-- | README.md | 25 | ||||
| -rw-r--r-- | releng/airootfs/etc/systemd/system/chaotic-rankmirrors.service | 11 | ||||
| l--------- | releng/airootfs/etc/systemd/system/multi-user.target.wants/chaotic-rankmirrors.service | 1 | ||||
| -rwxr-xr-x | releng/airootfs/usr/local/bin/chaotic-rankmirrors | 54 |
5 files changed, 117 insertions, 31 deletions
diff --git a/.forgejo/workflows/build-iso.yml b/.forgejo/workflows/build-iso.yml index c9161ed..17f5a40 100644 --- a/.forgejo/workflows/build-iso.yml +++ b/.forgejo/workflows/build-iso.yml @@ -19,11 +19,13 @@ jobs: - name: Prepare temp directories (NO /tmp usage) run: | + set -euo pipefail mkdir -p "${GITHUB_WORKSPACE}/.tmp" df -h - name: Fix raveos-core-repo pacman repo (overwrite clean) run: | + set -euo pipefail sudo sed -i '/^\[raveos-core-repo\]/,/^$/d' /etc/pacman.conf cat <<'EOF' | sudo tee -a /etc/pacman.conf [raveos-core-repo] @@ -31,38 +33,24 @@ jobs: Server = https://page.rp1.hu/x86_64/ EOF - - name: Update pacman databases - run: sudo pacman -Sy --noconfirm - - - name: Verify archiso - run: mkarchiso --version - - - name: Pre-build runner consistency check + - name: Sync and update runner run: | - IGNORE=$(grep '^IgnorePkg' /etc/pacman.conf | sed 's/IgnorePkg\s*=\s*//' | tr ' ' '\n' | tr ',' '\n') - BROKEN=0 - - while IFS= read -r line; do - pkg=$(echo "$line" | awk '{print $1}') - echo "$IGNORE" | grep -qx "$pkg" && continue - installed=$(echo "$line" | awk '{print $2}') - available=$(pacman -Si "$pkg" 2>/dev/null | grep '^Version' | head -1 | awk '{print $3}') - if [ -n "$available" ] && [ "$(vercmp "$installed" "$available")" -lt 0 ]; then - echo "VERZIO ELTER: $pkg | runner: $installed | repo: $available" - BROKEN=1 - fi - done < <(pacman -Q) - - if [ "$BROKEN" -eq 1 ]; then + set -euo pipefail + sudo pacman -Sy --noconfirm + if pacman -Qu 2>/dev/null | grep -q .; then echo "Elavult csomagok talalhatok, auto-frissites indul..." - sudo pacman -Syu --noconfirm + sudo pacman -Su --noconfirm echo "Runner auto-frissites: OK" else echo "Runner konzisztencia ellenorzes: OK" fi + - name: Verify archiso + run: mkarchiso --version + - name: Setup Chaotic-AUR run: | + set -euo pipefail if [ ! -f /etc/pacman.d/chaotic-mirrorlist ]; then sudo mkdir -p /etc/pacman.d echo 'Server = https://cdn-mirror.chaotic.cx/$repo/$arch' | sudo tee /etc/pacman.d/chaotic-mirrorlist @@ -75,15 +63,18 @@ jobs: - name: Build ISO run: | + set -euo pipefail chmod +x ./build.sh sudo ./build.sh - name: Check build output run: | + set -euo pipefail ls -lh output/*.iso - name: Check ISO for broken library links run: | + set -euo pipefail sudo modprobe loop || true ISO_FILE=$(ls output/*.iso | head -1) MOUNT_DIR=$(mktemp -d) @@ -115,7 +106,7 @@ jobs: - name: Create Forgejo Release and upload ISO run: | - set -e + set -euo pipefail ISO_FILE=$(ls output/*.iso | head -1) ISO_NAME=$(basename "$ISO_FILE") @@ -134,29 +125,33 @@ jobs: Verification: echo \"${ISO_SHA256} ${ISO_NAME}\" | sha256sum -c" - RELEASE=$(curl -s -X POST "https://git.rp1.hu/api/v1/repos/RaveOS/RaveOS-Releases/releases" \ + RELEASE=$(curl -f -s --retry 3 --retry-delay 5 \ + -X POST "https://git.rp1.hu/api/v1/repos/RaveOS/RaveOS-Releases/releases" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/json" \ -d "{\"tag_name\":\"${TAG}\",\"name\":\"RaveOS ${TAG}\",\"body\":$(echo "$RELEASE_BODY" | python3 -c 'import sys,json; print(json.dumps(sys.stdin.read()))'),\"draft\":false,\"prerelease\":false}") RELEASE_ID=$(echo "$RELEASE" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])") + [[ "$RELEASE_ID" =~ ^[0-9]+$ ]] || { echo "HIBA: Ervenytelen RELEASE_ID: $RELEASE_ID"; exit 1; } echo "Release ID: $RELEASE_ID" echo "ISO feltoltes indul: $ISO_NAME ($ISO_SIZE)" - UPLOAD=$(curl -f --progress-bar -X POST "https://git.rp1.hu/api/v1/repos/RaveOS/RaveOS-Releases/releases/${RELEASE_ID}/assets" \ + curl -f --retry 3 --retry-delay 10 --progress-bar \ + -X POST "https://git.rp1.hu/api/v1/repos/RaveOS/RaveOS-Releases/releases/${RELEASE_ID}/assets" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ - -F "attachment=@${ISO_FILE}") - echo "Upload valasz: $UPLOAD" + -F "attachment=@${ISO_FILE}" + echo "ISO feltoltes: OK" echo "Release feltoltve: https://git.rp1.hu/RaveOS/RaveOS-Releases/releases/tag/${TAG}" - RELEASES=$(curl -s "https://git.rp1.hu/api/v1/repos/RaveOS/RaveOS-Releases/releases?limit=50" \ + RELEASES=$(curl -f -s --retry 3 --retry-delay 5 \ + "https://git.rp1.hu/api/v1/repos/RaveOS/RaveOS-Releases/releases?limit=50" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}") echo "$RELEASES" | python3 -c "import sys,json; releases=json.load(sys.stdin); releases.sort(key=lambda r:r['id'],reverse=True); [print(r['id'],r['tag_name']) for r in releases[3:]]" | while IFS=' ' read -r id tag; do - curl -s -X DELETE "https://git.rp1.hu/api/v1/repos/RaveOS/RaveOS-Releases/releases/$id" \ + curl -f -s --retry 3 -X DELETE "https://git.rp1.hu/api/v1/repos/RaveOS/RaveOS-Releases/releases/$id" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" - curl -s -X DELETE "https://git.rp1.hu/api/v1/repos/RaveOS/RaveOS-Releases/tags/$tag" \ + curl -f -s --retry 3 -X DELETE "https://git.rp1.hu/api/v1/repos/RaveOS/RaveOS-Releases/tags/$tag" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" echo "Regi release torolve: $tag" done @@ -10,6 +10,31 @@ Arch Linux alapú egyedi disztribúció tőbb asztali környezettel, automatizá ## Változásnapló +### Build 2026-05-10 + +#### `[iso]` chaotic-rankmirrors — automatikus mirror rangsoroló +- Boot után automatikusan teszteli az összes Chaotic-AUR mirrort válaszidő (TTFB) alapján +- A top 5 leggyorsabb mirrort írja be a `/etc/pacman.d/chaotic-mirrorlist`-be +- `After=network-online.target` — mire a Calamares indul, már a legjobb mirror aktív +- Tesztelt mirrorok: de, cdn, geo, pl, nl, ch, se, fr, gb és régióspecifikus variánsaik + +#### `[iso]` Mirror optimalizálás +- Hivatalos Arch mirrorlist frissítve: HU/AT/DE/PL/CZ régió, HTTPS, rate szerint rendezve +- Chaotic-AUR: DE mirror prioritizálva közép-európai felhasználóknak + +#### `[tools]` raveos-tools 1.0.0-5 +- `update-flatpak` parancs eltávolítva a `rave` bash completionből + +#### `[ci]` Build workflow javítások +- Runner verzió eltérésnél automatikus `pacman -Syu` fut le, nem épít hibát +- ISO mount loop eszköz hiba kezelés javítva — ha a loop eszköz nem elérhető, figyelmeztetés helyett folytatódik a build +- ISO feltöltés: részletesebb logolás, `-f` flag hozzáadva +- Régi release-ek automatikus törlése: mindig csak az utolsó 3 marad + +#### `[ci]` raveos-core-repo repoadd workflow javítás +- `actions/checkout@v4` lecserélve manuális SSH klónra — az HTTPS-en keresztüli nagy bináris repo (1.8GB) SSL EOF hibát okozott Nginx mögött +- SSH klón megkerüli az SSL terminálást, stabil nagy repo esetén is + ### Build 2026-04-08 #### Főbb változások diff --git a/releng/airootfs/etc/systemd/system/chaotic-rankmirrors.service b/releng/airootfs/etc/systemd/system/chaotic-rankmirrors.service new file mode 100644 index 0000000..d0d3a03 --- /dev/null +++ b/releng/airootfs/etc/systemd/system/chaotic-rankmirrors.service @@ -0,0 +1,11 @@ +[Unit] +Description=Rank Chaotic-AUR mirrors by speed +Wants=network-online.target +After=network-online.target + +[Service] +Type=oneshot +ExecStart=/usr/local/bin/chaotic-rankmirrors + +[Install] +WantedBy=multi-user.target diff --git a/releng/airootfs/etc/systemd/system/multi-user.target.wants/chaotic-rankmirrors.service b/releng/airootfs/etc/systemd/system/multi-user.target.wants/chaotic-rankmirrors.service new file mode 120000 index 0000000..0965d05 --- /dev/null +++ b/releng/airootfs/etc/systemd/system/multi-user.target.wants/chaotic-rankmirrors.service @@ -0,0 +1 @@ +/etc/systemd/system/chaotic-rankmirrors.service
\ No newline at end of file diff --git a/releng/airootfs/usr/local/bin/chaotic-rankmirrors b/releng/airootfs/usr/local/bin/chaotic-rankmirrors new file mode 100755 index 0000000..71c256e --- /dev/null +++ b/releng/airootfs/usr/local/bin/chaotic-rankmirrors @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +MIRRORLIST="/etc/pacman.d/chaotic-mirrorlist" +TIMEOUT=6 +TEST_PATH="chaotic-aur/x86_64/chaotic-aur.db" +TOP_N=5 + +MIRRORS=( + "de-mirror" "cdn-mirror" "geo-mirror" "pl-mirror" + "nl-mirror" "ch-mirror" "se-mirror" "fr-mirror" + "gb-mirror" "de-2-mirror" "nl-1-mirror" "pl-1-mirror" + "se-1-mirror" "ch-1-mirror" +) + +tmp=$(mktemp) + +echo "==> Ranking Chaotic-AUR mirrors..." + +for m in "${MIRRORS[@]}"; do + url="https://${m}.chaotic.cx/${TEST_PATH}" + t=$(curl -o /dev/null -s -w "%{time_starttransfer}" \ + --max-time "$TIMEOUT" --connect-timeout 3 \ + -r 0-1023 "$url" 2>/dev/null) + rc=$? + if [ "$rc" -eq 0 ] && [[ "$t" != "0.000000" ]] && [[ -n "$t" ]]; then + echo "${t} ${m}" >> "$tmp" + echo " OK ${t}s ${m}" + else + echo " FAIL ${m}" + fi +done + +if [ ! -s "$tmp" ]; then + echo "==> WARNING: no mirrors responded, keeping original mirrorlist" + rm -f "$tmp" + exit 0 +fi + +mapfile -t top < <(sort -n "$tmp" | head -n "$TOP_N") +rm -f "$tmp" + +cp "$MIRRORLIST" "${MIRRORLIST}.bak" 2>/dev/null || true + +{ + echo "# Chaotic-AUR mirrorlist" + echo "# Generated by chaotic-rankmirrors on $(date)" + echo "" + for e in "${top[@]}"; do + m="${e#* }" + echo "Server = https://${m}.chaotic.cx/\$repo/\$arch" + done +} > "$MIRRORLIST" + +echo "==> Done. Updated mirrorlist with ${#top[@]} fastest mirrors." |