diff --git a/live/root/etc/systemd/system/agama-dud.service b/live/root/etc/systemd/system/agama-dud.service new file mode 100644 index 0000000000..4ac4598547 --- /dev/null +++ b/live/root/etc/systemd/system/agama-dud.service @@ -0,0 +1,28 @@ +[Unit] +Description=Agama DUD + +After=network-online.target + +# and after we process agama params like info which can contain password +After=agama-cmdline-process.service +# the DUD should replace wrong self_update +After=agama-self-update.service + +# before starting the Agama servers so they use the new packages +Before=agama-web-server.service +Before=agama.service +# before interactive password services +Before=live-password-dialog.service +Before=live-password-systemd.service + +[Service] +Type=oneshot +Environment=TERM=linux +ExecStart=agama-dud +TTYReset=yes +TTYVHangup=yes +StandardInput=tty +TimeoutStartSec=infinity + +[Install] +WantedBy=default.target diff --git a/live/root/usr/bin/agama-dud b/live/root/usr/bin/agama-dud new file mode 100644 index 0000000000..ac22c9a420 --- /dev/null +++ b/live/root/usr/bin/agama-dud @@ -0,0 +1,27 @@ +#!/bin/sh + +# Experimental DUD funtionality for Agama +# +# Usage: inst.dud=URI [inst.dud=URI] +# +# This is a very simple version of the DUD functionality +# - There can be multiple inst.dud=URI entries, but... +# - All of them are considered to be RPMs +# - The script does not check if downloading succeeded +# - Or for any deps of the package +# - Of whether installation/upgrade succeeded +# - Does not restart itself if the script is updated + +# check if there is any DUD +if ! grep -q "\b\(inst\|agama\)\.dud=.\+\b" /run/agama/cmdline.d/agama.conf; then + echo "No DUD present" + exit 0 +fi + +for URI in `sed -n 's/\(.*[[:space:]]\|^\)\(inst\|agama\)\.dud=\([^[:space:]]\+\).*/\3/p' /run/agama/cmdline.d/agama.conf`; do + echo "Downloading DUD from" $URI + TMPDUD=`mktemp /tmp/agama-XXXXXXXXXX.rpm` + agama download $URI $TMPDUD; + rpm --upgrade --force --verbose --hash --noverify --nodeps --excludedocs $TMPDUD + rm $TMPDUD +done diff --git a/live/src/agama-installer.changes b/live/src/agama-installer.changes index 1b6f656e7d..b73b772b0d 100644 --- a/live/src/agama-installer.changes +++ b/live/src/agama-installer.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 21 09:58:52 AM UTC 2025 - Lukas Ocilka + +- Added the initial functionality for inst.dud + (jsc#3670 and jsc#AGM-65) + ------------------------------------------------------------------- Fri Mar 21 07:31:34 UTC 2025 - Imobach Gonzalez Sosa