Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
74b1d46
create also file with kernel only files for bootloader proposal
jreidinger Jan 14, 2025
0d11399
Revert "create also file with kernel only files for bootloader proposal"
jreidinger Jan 15, 2025
6cc2517
add script to filter out kernel cmdline to live root
jreidinger Jan 15, 2025
8d4679f
add systemd service for filtering kernel
jreidinger Jan 16, 2025
ae97e49
remove space and add note
jreidinger Jan 17, 2025
10a9a8f
first version of info expansion script
jreidinger Jan 17, 2025
d761a98
change param from info to agama.info
jreidinger Jan 20, 2025
b476c61
update systemd services config and scripts
jreidinger Jan 20, 2025
feb8ef7
Merge remote-tracking branch 'origin/master' into info_param
jreidinger Jan 20, 2025
cf47628
fix matching start of line
jreidinger Jan 20, 2025
c3e5920
remove debug output and fix sed
jreidinger Jan 20, 2025
e35af4e
allow password on kernel command line to handle new lines
jreidinger Jan 20, 2025
0138767
remove properly info param
jreidinger Jan 20, 2025
c693a25
add ci for live directory
jreidinger Jan 21, 2025
4960315
Update live/test/info_cmdline_test.rb
jreidinger Jan 21, 2025
67abcfc
fix ci name
jreidinger Jan 21, 2025
bde6563
update kernel cmdline location
jreidinger Jan 29, 2025
74f7c33
follow redirects in info file url
jreidinger Jan 29, 2025
2a78da5
avoid exception if cmdline args does not exist
jreidinger Jan 30, 2025
e0184bd
adapt fixtures to reflect new structure
jreidinger Jan 30, 2025
4dc697b
more test adaptation
jreidinger Jan 30, 2025
5348b50
Added module for translating ifcfg option
teclator Jan 27, 2025
1be61eb
Simplify scripts as many options are not supported
teclator Jan 28, 2025
69d7351
Changes based on CR
teclator Jan 31, 2025
58e31c5
Added changelog
teclator Jan 31, 2025
7d4bfd8
Add support for translating ifcfg kernel cmdline argument to ip (#1957)
teclator Feb 1, 2025
3f83ad4
add first user also to wheel group
jreidinger Feb 3, 2025
dd6442c
open ssh in firewall and enable service if ssh key is used
jreidinger Feb 4, 2025
7533c19
explicitelly lock root password if not set
jreidinger Feb 4, 2025
dd84729
explicitelly add sudo policy to conform new auth model for 16
jreidinger Feb 4, 2025
b1f0cfb
Change the default lsm to SELinux for both Leap and Tumblweed jsc#PED…
lkocman Feb 13, 2025
9ece072
Change the default lsm to SELinux for both Leap and Tumblweed jsc#PED…
imobachgs Feb 13, 2025
5dec8c3
fix name of localization section
jreidinger Jan 24, 2025
1a34d63
fix(ruby): rename L10nReader to LocalizationReader
imobachgs Feb 13, 2025
139323a
fix(ruby): fix script file names handling
jreidinger Jan 24, 2025
a976c51
fix(service): improve handling of scripts filenames
imobachgs Jan 27, 2025
33e5d9a
fix(ruby): better formatting when converting a profile
imobachgs Feb 13, 2025
48f6f79
fix(doc): fix localization section in the docs
imobachgs Feb 13, 2025
864e751
docs(ruby): update changes file
imobachgs Feb 13, 2025
ef358c8
fix(ruby): fix localization and scripts conversion (#1995)
imobachgs Feb 14, 2025
457c5cc
fix(rust): set VC and X11 keymaps
imobachgs Feb 14, 2025
1b6e065
docs(ruby): update changes file
imobachgs Feb 14, 2025
75e99e5
fix(rust): set the correct xkbmap
imobachgs Feb 14, 2025
39dc954
fix(rust): use "dashed" form for systemd-firstboot keymap
imobachgs Feb 14, 2025
a9609cc
docs(rust): update changes file
imobachgs Feb 14, 2025
a355b5a
fix(rust): set VC and X11 keymap (#1997)
imobachgs Feb 14, 2025
1856809
Update web translation files
yast-bot Feb 16, 2025
5013e9a
Update service PO files
yast-bot Feb 16, 2025
0647bb9
feat(rust): add post-partitioning scripts
imobachgs Feb 16, 2025
2353ab1
feat(rust): add post-partitioning scripts to schema
imobachgs Feb 16, 2025
025fb28
feat(ruby): run post-installation scripts
imobachgs Feb 16, 2025
aa7a7f3
feat(ruby): import AutoYaST postpartitioning-scripts
imobachgs Feb 16, 2025
aa08a77
feat(ruby): update AutoYaST compat file
imobachgs Feb 16, 2025
4593f44
docs(ruby): update changes file
imobachgs Feb 17, 2025
76fadfc
Update web translation files (#2000)
imobachgs Feb 17, 2025
c0ba0df
Update service PO files (#2001)
imobachgs Feb 17, 2025
9c56477
chore: update Agama::Users tests
imobachgs Feb 17, 2025
37e1fe7
refactor(ruby): minor Agama::Users refactor
imobachgs Feb 17, 2025
ca747cf
feat: add support for post-partitioning scripts (#2002)
imobachgs Feb 17, 2025
0f6c01c
fix(ruby): fix detection of the "wheel" group
imobachgs Feb 17, 2025
f2336a0
fix(ruby): fix software manager test
imobachgs Feb 17, 2025
672731f
doc: update AutoYaST support documentation
imobachgs Feb 17, 2025
6b2691e
refactor(rust): drop the registration requirement
imobachgs Feb 13, 2025
a6a0318
refactor(ruby): drop the registration requirement
imobachgs Feb 13, 2025
2c986cc
fix(web): drop registration requirement
imobachgs Feb 13, 2025
68557ba
feat(ruby): add a convenience method CmdlineArgs.read
imobachgs Feb 18, 2025
07504fc
feat(ruby): add support for SCC proxy/RMT
imobachgs Feb 18, 2025
2460304
Use sshPublicKey in examples
olafhering Feb 18, 2025
6380a49
docs(ruby): update changes file
imobachgs Feb 18, 2025
1d02e6f
Update live/root/usr/bin/agama-self-update
jreidinger Feb 18, 2025
661afa1
Merge branch 'master' into info_param
jreidinger Feb 18, 2025
2b74fdf
feat: initial SCC proxy support (#2007)
imobachgs Feb 18, 2025
7eaf534
Add the xhci-pci-renesas driver to the initrd if available
lslezak Feb 18, 2025
85bde8d
Apply suggestions from code review
jreidinger Feb 18, 2025
12e0381
fix(live): Add the xhci-pci-renesas driver to the initrd if available…
lslezak Feb 18, 2025
44c75e7
fix(live): fix SLE 16 flavor names
imobachgs Feb 18, 2025
a98d95d
fix(live): enable PXE for SLE 16
imobachgs Feb 18, 2025
52d9fec
Still use dashes in the ISO volume label
lslezak Feb 18, 2025
01228cf
Fix the ISO volume label also in config.sh
lslezak Feb 18, 2025
45e2daf
Merge branch 'master' into info_param
jreidinger Feb 18, 2025
7f85eaa
fix(live): use underscores in openSUSE related flavors too
imobachgs Feb 18, 2025
094929d
feat(live): add agama-cli-bash-completion
imobachgs Feb 18, 2025
111c95c
docs(live): update changes files
imobachgs Feb 18, 2025
e831ed9
adapt to changes in master
jreidinger Feb 18, 2025
ee502f4
Merge remote-tracking branch 'origin/master' into new_auth_model
jreidinger Feb 18, 2025
56fdc9e
Update live/src/agama-installer.changes
jreidinger Feb 18, 2025
319cdf5
fix(live): fix root-PXE tarball
imobachgs Feb 18, 2025
a37db83
Use sshPublicKey in examples (#2008)
imobachgs Feb 18, 2025
5bacf16
Fixed setting the ISO volume label
lslezak Feb 18, 2025
7864454
fix(live): Fix SLE 16 build and enable PXE (#2014)
imobachgs Feb 18, 2025
0522cac
fix(live): bring back the publisher
imobachgs Feb 18, 2025
ad133f3
fix(live): bring back the publisher (#2016)
imobachgs Feb 18, 2025
198b6f3
Only finish in case of finish phase.
teclator Feb 3, 2025
9cad61c
Reboot when finished the auto installation
teclator Feb 3, 2025
057ec3e
Added reboot command to Agama CLI
teclator Feb 4, 2025
4ac28b3
Do not check the installer phase in the CLI
teclator Feb 5, 2025
acf17f7
Added unit test for finishing the installation
teclator Feb 5, 2025
5251347
Added changelog
teclator Feb 5, 2025
5576d46
Apply suggestions from code review
teclator Feb 5, 2025
4a19cc0
Added changes based on code review
teclator Feb 5, 2025
d2001dd
Unattended installation: allow to stop at the end
teclator Feb 13, 2025
948f058
Updated autoinstallation changelog
teclator Feb 13, 2025
8625673
Use a separate environment file
teclator Feb 13, 2025
0533571
Allow to specify the finish method
teclator Feb 17, 2025
62a2f39
Apply suggestions from code review
teclator Feb 18, 2025
1fbf200
Changes based on code review
teclator Feb 18, 2025
092a956
Write only known needed env vars.
teclator Feb 18, 2025
d4bd151
Removed leftover dbg call
teclator Feb 18, 2025
5e945f1
Rewording changelog entry
teclator Feb 18, 2025
5aa343e
Clarify stop
teclator Feb 18, 2025
775e02e
Fixed rename and doc
teclator Feb 18, 2025
46569d7
Fixed unit test
teclator Feb 18, 2025
36ef12e
Fixed openapi spec generation
teclator Feb 18, 2025
52eb8d8
Added some documentation to finish_installation
teclator Feb 19, 2025
2adde5c
Fixed reboot delay caused by the root shell service
lslezak Feb 19, 2025
56dc25b
Merge branch 'master' into storage-config-ui-sync-20250219
dgdavid Feb 19, 2025
819eb2c
Fixed reboot delay caused by the root shell service (#2022)
lslezak Feb 19, 2025
1fba4a7
Merge branch 'master' into storage-config-ui-sync-20250219
dgdavid Feb 19, 2025
f529719
Update Finish method doc
teclator Feb 19, 2025
ada9f71
changes from review
jreidinger Feb 19, 2025
6523fce
Merge branch 'master' into info_param
jreidinger Feb 19, 2025
395beef
Info file parameter support (#1896)
jreidinger Feb 19, 2025
e64e810
Merge branch 'master' into reboot
teclator Feb 19, 2025
8db9ff7
Modify environment file target
teclator Feb 19, 2025
4c22525
feat(live): add the QEMU guest agent
imobachgs Feb 19, 2025
ef65680
Adapted agama-auto to call agama finish with the method given
teclator Feb 19, 2025
9591f49
Fix agama-auto indentation
teclator Feb 19, 2025
f0e421d
docs(live): update changes files
imobachgs Feb 19, 2025
0deb38d
Unattended installation reboots automatically after finish the instal…
teclator Feb 19, 2025
d3772ed
feat(live): add the QEMU guest agent (#2025)
imobachgs Feb 19, 2025
ea97f32
Merge remote-tracking branch 'origin/master' into new_auth_model
jreidinger Feb 19, 2025
9fd9083
add also to SLES explicit wheel group auth
jreidinger Feb 19, 2025
03e4fdd
fix(ux): Improve libzypp callbacks (#1996)
lslezak Feb 19, 2025
af8b78a
Merge branch 'master' into storage-config-ui-sync-20250219
dgdavid Feb 19, 2025
220a43a
make rubocop happy
jreidinger Feb 19, 2025
7650bc7
fix(web): use titleIconVariant prop in Popup
dgdavid Feb 19, 2025
fed8bed
fix(web): adapt PackageErrorquestion to PF6
dgdavid Feb 19, 2025
1398f33
changes
jreidinger Feb 19, 2025
f165e11
Merge branch 'master' into new_auth_model
jreidinger Feb 19, 2025
8303ce0
Unattended support for the new authentication model (#1973)
jreidinger Feb 19, 2025
7ac5882
Merge branch 'master' into storage-config-ui-sync-20250219
dgdavid Feb 19, 2025
e3b060e
fix(service): remove autologin dead code
dgdavid Feb 19, 2025
eadf1b5
doc: update AutoYaST support documentation (#2006)
imobachgs Feb 19, 2025
ff582d4
feat(web): add alsoActiveOn for alternative paths
dgdavid Feb 20, 2025
fc64d41
Merge branch 'master' into storage-config-ui-sync-20250219
dgdavid Feb 20, 2025
5ce093c
Fixed syntax error in 99agama-cmdline dracut module
lslezak Feb 20, 2025
7be700f
Fixed syntax error in 99agama-cmdline dracut module (#2029)
lslezak Feb 20, 2025
e0f5b53
Merge branch 'master' into storage-config-ui-sync-20250219
dgdavid Feb 20, 2025
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
59 changes: 59 additions & 0 deletions .github/workflows/ci-live.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI - ISO definition

on:
push:
paths:
# NOTE: GitHub Actions do not allow using YAML references, the same path
# list is used below for the pull request event. Keep both lists in sync!!

# this file as well
- .github/workflows/ci-live.yml
# any change in the service subfolder
- live/**

pull_request:
paths:
# NOTE: GitHub Actions do not allow using YAML references, the same path
# list is used above for the push event. Keep both lists in sync!!

# this file as well
- .github/workflows/ci-live.yml
# any change in the service subfolder
- live/**

# allow running manually
workflow_dispatch:

jobs:
ruby_tests:
runs-on: ubuntu-latest
env:
COVERAGE: 1

defaults:
run:
working-directory: ./live

strategy:
fail-fast: false
matrix:
distro: [ "tumbleweed" ]

container:
image: registry.opensuse.org/yast/head/containers_${{matrix.distro}}/yast-ruby

steps:

- name: Git Checkout
uses: actions/checkout@v4

- name: Configure and refresh repositories
# disable unused repositories to have faster refresh
run: zypper modifyrepo -d repo-non-oss repo-openh264 repo-update && zypper ref

- name: Install Ruby development files
run: zypper --non-interactive install
make

- name: Run the tests
run: make check
4 changes: 2 additions & 2 deletions autoinstallation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ repository to get an impression of how a profile looks like.

```json
{
"l10n": {
"languages": ["en_US.UTF-8"]
"localization": {
"language": "en_US.UTF-8"
},
"product": {
"id": "Tumbleweed"
Expand Down
25 changes: 17 additions & 8 deletions autoinstallation/bin/agama-auto
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,32 @@ set -ex
# Temporarily skip the AutoYaST XML validation
export YAST_SKIP_XML_VALIDATION=1

if [ -z "$1" ]
then
url=$(awk -F 'agama.auto=' '{sub(/ .*$/, "", $2); print $2}' < /proc/cmdline)
if [ -z "$1" ]; then
url=$(grep 'agama.auto=' </run/agama/cmdline.d/agama.conf | awk -F 'agama.auto=' '{sub(/ .*$/, "", $2); print $2}')
else
url="$1"
fi

if [ -z "$url" ]
then
if [ -z "$url" ]; then
echo "no autoinstallation profile"
exit 0
fi

method=$(grep 'agama.finish=' </run/agama/cmdline.d/agama.conf | awk -F 'agama.finish=' '{sub(/ .*$/, "", $2); print $2}')

echo "Using the profile at $url"

case "$url" in
* )
/usr/bin/agama profile import "$url"
/usr/bin/agama install;;
*)
/usr/bin/agama profile import "$url"
/usr/bin/agama install
case "$method" in
"stop" | "halt" | "poweroff")
/usr/bin/agama finish $method
;;
*)
/usr/bin/agama finish
;;
esac
;;
esac
9 changes: 9 additions & 0 deletions autoinstallation/package/agama-auto.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Thu Feb 13 12:10:11 UTC 2025 - Knut Anderssen <kanderssen@suse.com>

- gh#agama-project/agama#1970
- Adapted agama-auto script to reboot by default once the
unattended installation is finished.
- Allow to modify the finish method through the 'agama.finish'
kernel cmdline argument.

-------------------------------------------------------------------
Fri Sep 20 11:27:29 UTC 2024 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

Expand Down
2 changes: 2 additions & 0 deletions doc/dbus/bus/org.opensuse.Agama.Manager1.bus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
<arg name="tarball_filesystem_path" direction="out" type="s"/>
</method>
<method name="Finish">
<arg name="method" direction="in" type="s"/>
<arg name="result" direction="out" type="b"/>
</method>
<property type="aa{sv}" name="InstallationPhases" access="read"/>
<property type="u" name="CurrentInstallationPhase" access="read"/>
Expand Down
2 changes: 2 additions & 0 deletions doc/dbus/bus/org.opensuse.Agama1.Manager.bus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
<arg name="tarball_filesystem_path" direction="out" type="s"/>
</method>
<method name="Finish">
<arg name="method" direction="in" type="s"/>
<arg name="result" direction="out" type="b"/>
</method>
<property type="aa{sv}" name="InstallationPhases" access="read"/>
<property type="u" name="CurrentInstallationPhase" access="read"/>
Expand Down
21 changes: 21 additions & 0 deletions doc/dbus/org.opensuse.Agama1.Manager.doc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,27 @@
<arg name="tarball_filesystem_path" direction="out" type="s"/>
</method>
<method name="Finish">
<!--
Finish method.

Possible values are: "stop", "reboot", "poweroff", "halt"

* *stop*:
Finish the installation without rebooting or shutting down the machine in order
to inspect it.

* *reboot*:
Finish the installation rebooting into the installed system.

* *poweroff*:
Finish the installation calling shutdown -P

* *halt*:
Finish the installation calling shutdown -H

-->
<arg name="method" direction="in" type="s"/>
<arg name="result" direction="out" type="b"/>
</method>

<!--
Expand Down
5 changes: 4 additions & 1 deletion live/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ARCH = $(shell uname -m)
# files to copy from src/
COPY_FILES = $(patsubst $(SRCDIR)/%,$(DESTDIR)/%,$(wildcard $(SRCDIR)/*))

all: $(DESTDIR) $(COPY_FILES) $(DESTDIR)/config-cdroot.tar.xz $(DESTDIR)/root.tar.xz $(DESTDIR)/root-openSUSE-PXE.tar.xz
all: $(DESTDIR) $(COPY_FILES) $(DESTDIR)/config-cdroot.tar.xz $(DESTDIR)/root.tar.xz $(DESTDIR)/root-PXE.tar.xz

# clean the destination directory (but keep the .osc directory if it is present)
clean:
Expand Down Expand Up @@ -63,4 +63,7 @@ build: $(DESTDIR)
$(MAKE) all
(cd $(DESTDIR) && osc -A $(OBS_API) build -M $(FLAVOR) $(OSC_OPTS) $(OBS_TARGET) $(ARCH) $(KIWI_FILE))

check:
for i in ./test/*_test.*; do $${i}; done

.PHONY: build all clean
5 changes: 3 additions & 2 deletions live/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ This directory contains a set of files that are used to build the Agama Live ISO
- [src](src) subdirectory contains all source files which are copied unmodified to the OBS project
- [root](root) subdirectory contains files which are added to the Live ISO root system (inside the
squashfs image)
- [root-openSUSE-PXE](root-openSUSE-PXE) subdirectory contains specific files for the openSUSE image used for the
PXE boot, see a separate [PXE documentation](PXE.md) for more details about the PXE boot
- [root-PXE](root-PXE) subdirectory contains specific files for the image used for the PXE boot, see
a separate [PXE documentation](PXE.md) for more details about the PXE boot
- [config-cdroot](config-cdroot) subdirectory contains file which are copied to the uncompressed
root of the ISO image, the files can be accessed just by mounting the ISO file or the DVD medium
- [test](test) subdirectory contains tests to verify correctness of content. Can be run with `make check`

## Building the sources

Expand Down
21 changes: 21 additions & 0 deletions live/root/etc/systemd/system/agama-cmdline-process.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[Unit]
Description=Agama kernel cmdline processing

# have to be after network to be able to download info files
# TODO: what to do in air gap scenario where we still need process cmdline?
After=network-online.target

# before starting the Agama servers so they read configuration parsed
Before=agama-web-server.service
Before=agama.service
Before=x11-autologin.service

[Service]
Type=oneshot
Environment=TERM=linux
ExecStart=agama-kernel-cmdline.sh
StandardInput=tty
TimeoutSec=0

[Install]
WantedBy=default.target
8 changes: 3 additions & 5 deletions live/root/etc/systemd/system/agama-self-update.service
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Description=Agama self-update

After=network-online.target

# and after we process agama params like info which can contain password
After=agama-cmdline-process.service

# before starting the Agama servers so they use the new packages
Before=agama-web-server.service
Before=agama.service
Expand All @@ -11,11 +14,6 @@ Before=x11-autologin.service
Before=live-password-dialog.service
Before=live-password-systemd.service

# kernel command line option
ConditionKernelCommandLine=|agama.self_update
# linuxrc/YaST backward compatibility
ConditionKernelCommandLine=|agama.selfupdate

[Service]
Type=oneshot
Environment=TERM=linux
Expand Down
5 changes: 2 additions & 3 deletions live/root/etc/systemd/system/live-password-cmdline.service
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ Before=agama-web-server.service
Before=live-password-dialog.service
Before=live-password-systemd.service

# plain text password or hashed password passed via kernel command line
ConditionKernelCommandLine=|live.password
ConditionKernelCommandLine=|live.password_hash
# and after we process agama params like info which can contain password
After=agama-cmdline-process.service

[Service]
ExecStart=live-password --kernel
Expand Down
4 changes: 2 additions & 2 deletions live/root/etc/systemd/system/live-password-dialog.service
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Before=serial-getty@ttyS1.service
Before=serial-getty@ttyS2.service
Before=serial-getty@ttysclp0.service

# kernel command line option
ConditionKernelCommandLine=live.password_dialog
# and after we process agama params like info which can contain kernel parameters
After=agama-cmdline-process.service

[Service]
Type=oneshot
Expand Down
4 changes: 2 additions & 2 deletions live/root/etc/systemd/system/live-password-systemd.service
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Before=serial-getty@ttyS1.service
Before=serial-getty@ttyS2.service
Before=serial-getty@ttysclp0.service

# kernel command line option
ConditionKernelCommandLine=live.password_systemd
# and after we process agama params like info which can contain kernel parameters
After=agama-cmdline-process.service

[Service]
Type=oneshot
Expand Down
11 changes: 7 additions & 4 deletions live/root/etc/systemd/system/live-root-shell.service
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
[Unit]
Description=Start root shell in a free terminal (usually tty2)
Description=Root shell at tty8
# after setting the host name to correctly display it in the shell prompt
After=agama-hostname.service

[Service]
ExecStart=openvt --verbose --wait bash
# start it again after crashing or accidentally closing the shell via "exit" or Ctrl+D,
# unfortunately it might use a different tty after restart :-/
TTYPath=/dev/tty8
StandardInput=tty
ExecStart=/usr/bin/bash
# start it again after crashing or accidentally closing the shell via "exit" or Ctrl+D
Restart=always
Type=exec
Environment=TERM=linux
# Bash ignores SIGTERM, send SIGHUP to ensure that it terminates cleanly
KillSignal=SIGHUP

[Install]
WantedBy=default.target
2 changes: 2 additions & 0 deletions live/root/tmp/driver_cleanup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def self.from_file(file)

# really delete or just do a smoke test?
do_delete = ARGV[0] == "--delete"
debug = ENV["DEBUG"] == "1"

# read the configuration files
config = File.read(File.join(__dir__, "module.list")).split("\n")
Expand Down Expand Up @@ -129,6 +130,7 @@ def self.from_file(file)

delete_drivers = to_delete.map(&:path)
puts "Found #{delete_drivers.size} drivers to delete"
puts delete_drivers if debug
File.delete(*delete_drivers) if do_delete

# Note: The module dependencies are updated by the config.sh script
Expand Down
4 changes: 4 additions & 0 deletions live/root/usr/bin/agama-kernel-cmdline.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /bin/sh

kernel-cmdline-conf.sh
info-cmdline-conf.sh
4 changes: 4 additions & 0 deletions live/root/usr/bin/agama-self-update
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# This script updates the Agama packages in the Live system from the
# Agama Devel OBS project.

# check if self-update is required
if ! grep -q "[[:space:]^]agama.self_update=1\([[:space:]]\|$\)" /run/agama/cmdline.d/agama.conf; then
exit 0
fi

# first try a quick and simple solution, refreshing the distributions repository takes a
# lot of time so try using only the agama-devel for update
Expand Down
28 changes: 28 additions & 0 deletions live/root/usr/bin/info-cmdline-conf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#! /bin/sh

# Script that expand agama.info parameter by downloading its file and appending it to agama.conf
# the info content is stored in info.conf

set -e

TARGET="${1:-/run/agama/cmdline.d/agama.conf}"
INFO_CONTENT="${2:-/run/agama/cmdline.d/info.conf}"

expand_info_arg() {
INFO_URL=$(sed -n 's/\(.*[[:space:]]\|^\)agama\.info=\([^[:space:]]\+\).*/\2/p' "$TARGET")
if [ -z "${INFO_URL}" ]; then
return 0
fi

# TODO: should we use also --location-trusted if info file url contain user and password?
# if so check with security team
curl --location --silent "${INFO_URL}" > "${INFO_CONTENT}"
# remove info param
sed -in 's/\([[:space:]]\|^\)agama\.info=[^[:space:]]\+//' "${TARGET}"
# and add content of info file
cat "${INFO_CONTENT}" >> "${TARGET}"

return 0
}

expand_info_arg
34 changes: 34 additions & 0 deletions live/root/usr/bin/kernel-cmdline-conf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#! /bin/sh

# Script to clean kernel command line from agama specific parameters. Result is later used for bootloader proposal.

SOURCE="${1:-/proc/cmdline}"
TARGET="${2:-/run/agama/cmdline.d/kernel.conf}"

write_kernel_args() {
DIR=$(dirname "${TARGET}")
mkdir -p "$DIR"
# ensure that kernel cmdline line is created to avoid reading agama params
# if there is no kernel params
touch "${TARGET}"

for _i in $(cat "${SOURCE}"); do
case ${_i} in
# remove all agama kernel params
# Add here also all linuxrc supported parameters
LIBSTORAGE_* | YAST_* | agama* | Y2* | ZYPP_* | autoyast* )
_found=1
;;
esac

if [ -z "$_found" ]; then
echo "Non-Agama parameter found ($_i)"
echo -n " $_i" >>"${TARGET}"
fi
unset _found
done

return 0
}

write_kernel_args
Loading