Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions live/root/etc/systemd/system/agama-dud.service
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions live/root/usr/bin/agama-dud
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions live/src/agama-installer.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Mar 21 09:58:52 AM UTC 2025 - Lukas Ocilka <locilka@suse.com>

- Added the initial functionality for inst.dud
(jsc#3670 and jsc#AGM-65)

-------------------------------------------------------------------
Fri Mar 21 07:31:34 UTC 2025 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

Expand Down