summaryrefslogtreecommitdiff
path: root/releng/airootfs/usr
diff options
context:
space:
mode:
authorNippy <nippy@Beller-Mac-mini.lan>2026-11-06 20:57:12 +0100
committerNippy <nippy@Beller-Mac-mini.lan>2026-11-06 20:57:12 +0100
commit3d4d28b63a8338d8f84c3d5bd41d3fdb751ac71e (patch)
tree5a2e901f8a74ebe160190de3bb483bcb3c946e9f /releng/airootfs/usr
parenta0c3322a1d9ef920e518a8899dc9dbb3c1216815 (diff)
downloadRaveOS-build-iso-3d4d28b63a8338d8f84c3d5bd41d3fdb751ac71e.tar.gz
RaveOS-build-iso-3d4d28b63a8338d8f84c3d5bd41d3fdb751ac71e.zip
fixing
Diffstat (limited to 'releng/airootfs/usr')
-rwxr-xr-xreleng/airootfs/usr/local/bin/chaotic-rankmirrors4
-rwxr-xr-xreleng/airootfs/usr/local/bin/raveos-telepito-frissites89
2 files changed, 91 insertions, 2 deletions
diff --git a/releng/airootfs/usr/local/bin/chaotic-rankmirrors b/releng/airootfs/usr/local/bin/chaotic-rankmirrors
index 931d923..43273c2 100755
--- a/releng/airootfs/usr/local/bin/chaotic-rankmirrors
+++ b/releng/airootfs/usr/local/bin/chaotic-rankmirrors
@@ -18,7 +18,7 @@ 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}" \
+ t=$(curl -f -o /dev/null -s -w "%{time_starttransfer}" \
--max-time "$TIMEOUT" --connect-timeout 3 \
-r 0-1023 "$url" 2>/dev/null)
rc=$?
@@ -36,7 +36,7 @@ if [ ! -s "$tmp" ]; then
exit 0
fi
-sorted=$(sort -n "$tmp")
+sorted=$(LC_ALL=C sort -n "$tmp")
rm -f "$tmp"
cp "$MIRRORLIST" "${MIRRORLIST}.bak" 2>/dev/null || true
diff --git a/releng/airootfs/usr/local/bin/raveos-telepito-frissites b/releng/airootfs/usr/local/bin/raveos-telepito-frissites
new file mode 100755
index 0000000..b763885
--- /dev/null
+++ b/releng/airootfs/usr/local/bin/raveos-telepito-frissites
@@ -0,0 +1,89 @@
+#!/bin/bash
+set -uo pipefail
+
+NAPLO=/var/log/raveos-telepito-frissites.log
+CSOMAGOK=(calamares raveos-calamares-module raveos-calamares-theme)
+MENTES=/tmp/calamares-elozo.tar
+LISTA=/tmp/calamares-elozo.lista
+REPOCONF=/tmp/raveos-csak-repo.conf
+
+exec > >(tee -a "$NAPLO") 2>&1
+echo "== RaveOS telepito frissites: $(date)"
+
+van_net() {
+ curl -fsI --max-time 6 https://page.rp1.hu/x86_64/ >/dev/null || curl -fsI --max-time 6 https://rp1.hu/ >/dev/null
+}
+
+for _ in $(seq 1 10); do
+ van_net && break
+ sleep 2
+done
+
+if ! van_net; then
+ echo "Nincs internet. Valassz wifi halozatot a listabol (Esc: kihagyas)."
+ sleep 2
+ nmtui-connect </dev/tty >/dev/tty 2>&1
+ for _ in $(seq 1 10); do
+ van_net && break
+ sleep 2
+ done
+fi
+
+if ! van_net; then
+ echo "Nincs internet, a telepito a meglevo verzioval indul."
+ sleep 2
+ exit 0
+fi
+
+for _ in $(seq 1 60); do
+ systemctl is-active --quiet pacman-init.service && break
+ sleep 1
+done
+
+sed -n '1,/^\[core\]/p' /etc/pacman.conf | sed '$d' > "$REPOCONF"
+
+if ! timeout 60 pacman --config "$REPOCONF" -Sy; then
+ echo "A RaveOS repo nem erheto el, a telepito a meglevo verzioval indul."
+ sleep 2
+ exit 0
+fi
+
+FRISS=$(pacman --config "$REPOCONF" -Qu "${CSOMAGOK[@]}" 2>/dev/null)
+if [ -z "$FRISS" ]; then
+ echo "A telepito naprakesz."
+ exit 0
+fi
+echo "Elerheto frissites:"
+echo "$FRISS"
+
+{
+ pacman -Qlq "${CSOMAGOK[@]}" | grep -v '/$'
+ for cs in "${CSOMAGOK[@]}"; do
+ ls -d /var/lib/pacman/local/"$cs"-[0-9]* 2>/dev/null
+ done
+} | sed 's#^/##' | sort > "$LISTA"
+tar -cf "$MENTES" -C / -T "$LISTA" 2>/dev/null
+
+visszaallit() {
+ echo "$1"
+ rm -f /var/lib/pacman/db.lck
+ pacman -Qlq "${CSOMAGOK[@]}" 2>/dev/null | grep -v '/$' | sed 's#^/##' | sort > "$LISTA.uj"
+ comm -13 "$LISTA" "$LISTA.uj" | while IFS= read -r f; do rm -f "/$f"; done
+ for cs in "${CSOMAGOK[@]}"; do
+ rm -rf /var/lib/pacman/local/"$cs"-[0-9]*
+ done
+ tar -xf "$MENTES" -C /
+ sleep 3
+ exit 0
+}
+
+if ! timeout 180 pacman --config "$REPOCONF" -S --needed --noconfirm "${CSOMAGOK[@]}"; then
+ visszaallit "A frissites nem sikerult, visszaallitas."
+fi
+
+if ldd /usr/bin/calamares /usr/lib/libcalamares*.so* /usr/lib/calamares/modules/*/*.so 2>&1 | grep -q "not found"; then
+ visszaallit "Az uj telepito hianyzo konyvtarat igenyel, visszaallitas a regi verziora."
+fi
+
+echo "A telepito frissitve."
+sleep 1