From 269445fce6b45e67e072dfd85c54e32ec64a6c8a Mon Sep 17 00:00:00 2001 From: Nippy Date: Thu, 7 May 2026 18:12:16 +0200 Subject: update raveos theme --- .forgejo/workflows/build-iso.yml | 111 ++++++++++++++++++++++++--------------- 1 file changed, 69 insertions(+), 42 deletions(-) (limited to '.forgejo') diff --git a/.forgejo/workflows/build-iso.yml b/.forgejo/workflows/build-iso.yml index 6e060f7..7181d4a 100644 --- a/.forgejo/workflows/build-iso.yml +++ b/.forgejo/workflows/build-iso.yml @@ -20,10 +20,9 @@ jobs: - name: Prepare temp directories (NO /tmp usage) run: | mkdir -p "${GITHUB_WORKSPACE}/.tmp" - mkdir -p "${GITHUB_WORKSPACE}/release-tmp" df -h - - name: Fix raveos-core-repo pacman repo (overwrite clean) + - name: Fix raveos-core-repo pacman repo (overwrite clean) run: | sudo sed -i '/^\[raveos-core-repo\]/,/^$/d' /etc/pacman.conf cat <<'EOF' | sudo tee -a /etc/pacman.conf @@ -38,6 +37,28 @@ jobs: - name: Verify archiso run: mkarchiso --version + - name: Pre-build runner consistency check + 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' | awk '{print $3}') + if [ -n "$available" ] && [ "$installed" != "$available" ]; then + echo "VERZIO ELTER: $pkg | runner: $installed | repo: $available" + BROKEN=1 + fi + done < <(pacman -Q) + + if [ "$BROKEN" -eq 1 ]; then + echo "HIBA: A runner csomagjai elternek a repotol. Frissitsd: sudo pacman -Syu" + exit 1 + fi + echo "Runner konzisztencia ellenorzes: OK" + - name: Setup Chaotic-AUR run: | if [ ! -f /etc/pacman.d/chaotic-mirrorlist ]; then @@ -59,58 +80,65 @@ jobs: run: | ls -lh output/*.iso - - name: Generate release info + - name: Check ISO for broken library links + run: | + ISO_FILE=$(ls output/*.iso | head -1) + MOUNT_DIR=$(mktemp -d) + sudo mount -o loop,ro "$ISO_FILE" "$MOUNT_DIR" + + BROKEN=0 + while IFS= read -r bin; do + result=$(sudo chroot "$MOUNT_DIR" ldd "${bin#$MOUNT_DIR}" 2>/dev/null | grep "not found" || true) + if [ -n "$result" ]; then + echo "TOROTT: $bin" + echo "$result" + BROKEN=1 + fi + done < <(find "$MOUNT_DIR" -type f \( -name "*.so*" -o -perm /111 \) 2>/dev/null | xargs -r file 2>/dev/null | grep ELF | cut -d: -f1) + + sudo umount "$MOUNT_DIR" + rmdir "$MOUNT_DIR" + + if [ "$BROKEN" -eq 1 ]; then + echo "HIBA: Torott library linkek az ISO-ban. Build leallitva." + exit 1 + fi + echo "ISO library ellenorzes: OK" + + - name: Create Forgejo Release and upload ISO run: | + set -e + ISO_FILE=$(ls output/*.iso | head -1) ISO_NAME=$(basename "$ISO_FILE") ISO_SIZE=$(du -h "$ISO_FILE" | cut -f1) ISO_SHA256=$(sha256sum "$ISO_FILE" | cut -d' ' -f1) BUILD_DATE=$(date '+%Y-%m-%d %H:%M:%S') - COMMIT_SHA=${GITHUB_SHA} COMMIT_SHORT=${GITHUB_SHA::7} + TAG="v$(date '+%Y.%m.%d')-${COMMIT_SHORT}" - cat < release-info.md - # RaveOS Latest Release - - **Build Date:** ${BUILD_DATE} - **Filename:** ${ISO_NAME} - **Size:** ${ISO_SIZE} - **SHA256:** ${ISO_SHA256} - **Source Commit:** ${COMMIT_SHORT} + RELEASE_BODY="Build Date: ${BUILD_DATE} + Filename: ${ISO_NAME} + Size: ${ISO_SIZE} + SHA256: ${ISO_SHA256} + Source Commit: ${COMMIT_SHORT} - ## Download - - [Download ${ISO_NAME}](https://git.rp1.hu/RaveOS/RaveOS-Releases/raw/branch/main/${ISO_NAME}) - - ## Verification - - \`\`\`bash - wget https://git.rp1.hu/RaveOS/RaveOS-Releases/raw/branch/main/${ISO_NAME} - echo "${ISO_SHA256} ${ISO_NAME}" | sha256sum -c - \`\`\` - EOF - - cat release-info.md - - - - name: Push ISO to Releases repository - run: | - set -e + Verification: + echo \"${ISO_SHA256} ${ISO_NAME}\" | sha256sum -c" - cd "${GITHUB_WORKSPACE}/release-tmp" - rm -rf ./* + RELEASE=$(curl -s -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}") - git clone --depth=1 git@git.rp1.hu:RaveOS/RaveOS-Releases.git . - git config user.name "RaveOS Builder" - git config user.email "builder@raveos.local" + RELEASE_ID=$(echo "$RELEASE" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])") + echo "Release ID: $RELEASE_ID" - rm -f *.iso - cp "${GITHUB_WORKSPACE}/output/"*.iso . - cp "${GITHUB_WORKSPACE}/release-info.md" README.md + curl -s -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}" - git add . - git commit -m "Release $(ls *.iso)" - git push origin main + echo "Release feltoltve: https://git.rp1.hu/RaveOS/RaveOS-Releases/releases/tag/${TAG}" - name: Cleanup (SAFE) if: always() @@ -119,7 +147,6 @@ jobs: sudo umount -R "${GITHUB_WORKSPACE}/output" 2>/dev/null || true sudo rm -rf "${GITHUB_WORKSPACE}/work" sudo rm -rf "${GITHUB_WORKSPACE}/output" - sudo rm -rf "${GITHUB_WORKSPACE}/release-tmp" sudo rm -rf "${GITHUB_WORKSPACE}/.tmp" sudo rm -rf /var/cache/pacman/pkg/* df -h -- cgit v1.3