summaryrefslogtreecommitdiff
path: root/releng
diff options
context:
space:
mode:
Diffstat (limited to 'releng')
-rw-r--r--releng/airootfs/etc/systemd/system/reflector-once.service2
-rwxr-xr-xreleng/airootfs/root/.config/openbox/autostart3
-rwxr-xr-xreleng/airootfs/usr/local/bin/chaotic-rankmirrors4
-rwxr-xr-xreleng/airootfs/usr/local/bin/raveos-telepito-frissites89
-rw-r--r--releng/profiledef.sh1
5 files changed, 95 insertions, 4 deletions
diff --git a/releng/airootfs/etc/systemd/system/reflector-once.service b/releng/airootfs/etc/systemd/system/reflector-once.service
index f36e778..cb5aae6 100644
--- a/releng/airootfs/etc/systemd/system/reflector-once.service
+++ b/releng/airootfs/etc/systemd/system/reflector-once.service
@@ -5,7 +5,7 @@ After=network-online.target
[Service]
Type=oneshot
-ExecStart=/usr/bin/reflector -c HU,AT,DE,PL,CZ --protocol https --sort rate --latest 20 --download-timeout 10 --threads 5 --save /etc/pacman.d/mirrorlist
+ExecStart=/bin/sh -c 'reflector -c HU,AT,DE,PL,CZ,SK --protocol https --completion-percent 100 --delay 3 --latest 20 --sort rate --number 10 --download-timeout 10 --connection-timeout 5 --threads 5 --save /tmp/reflector-uj && grep -q "^Server" /tmp/reflector-uj && install -m644 /tmp/reflector-uj /etc/pacman.d/mirrorlist'
ExecStartPost=/usr/bin/systemctl disable reflector-once.service
[Install]
diff --git a/releng/airootfs/root/.config/openbox/autostart b/releng/airootfs/root/.config/openbox/autostart
index a69fa50..11f17bb 100755
--- a/releng/airootfs/root/.config/openbox/autostart
+++ b/releng/airootfs/root/.config/openbox/autostart
@@ -7,5 +7,6 @@ xset s noblank
# X mar atvette a kepernyot, a Plymouth-quit itt mar zokkenomentes
plymouth quit &
-# Launch Calamares fullscreen
+xterm -geometry 100x30 -T "RaveOS telepito frissites" -e /usr/local/bin/raveos-telepito-frissites
+
calamares &
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
diff --git a/releng/profiledef.sh b/releng/profiledef.sh
index f56a2f4..df9d679 100644
--- a/releng/profiledef.sh
+++ b/releng/profiledef.sh
@@ -24,6 +24,7 @@ file_permissions=(
["/usr/local/bin/choose-mirror"]="0:0:755"
["/usr/local/bin/Installation_guide"]="0:0:755"
["/usr/local/bin/livecd-sound"]="0:0:755"
+ ["/usr/local/bin/raveos-telepito-frissites"]="0:0:755"
["/etc/pacman.d/chaotic-mirrorlist"]="0:0:644"
["/etc/pacman.d/mirrorlist"]="0:0:644"
["/etc/pacman.d/hooks/reflector-mirrorlist.hook"]="0:0:644"