Skip to content

Sync with master#2188

Merged
joseivanlopez merged 124 commits intoagama-project:storage-lvmfrom
joseivanlopez:merge-master
Mar 21, 2025
Merged

Sync with master#2188
joseivanlopez merged 124 commits intoagama-project:storage-lvmfrom
joseivanlopez:merge-master

Conversation

@joseivanlopez
Copy link
Contributor

Sync storage-lvm branch with master.

yast-bot and others added 30 commits March 2, 2025 03:15
Agama-weblate commit: 99a8c944ddfc13f76cb37d53b000bdbbb8f9b8b1
- **fix(ruby): use the correct scripts type**
- **docs(ruby): update changes file**
…ct#2116)

ensure enhanced_base is installed by default for SLES 16
* Skip SAP, add sudo-policy-wheel-auth-self to mandatory
* Skip SAP, add sudo-policy-wheel-auth-self to mandatory
- Leap 16.0 newly uses a split repodata per $arch
  code-o-o#leap/features#193
Agama-weblate commit: 56278d88c603d28f7acd244dcbe87d0f3acff6b3
Updating the service translation files from the agama-weblate repository
Updating the service translation files from the agama-weblate repository
Additionally changed the logic so the retry count really means
the retry count (it was actually the total amount of attempts).
## Problem

- Related to agama-project#2117
- As discussed on the review, there should be just one automatic retry
to report a failure quicker to the user

## Solution

- Change the number
- Additionally the logic has been changed so the retry count really
means the retry count. Before it was actually the total amount of
attempts, not just the retries.
Removed unnecessary spacing and section regions to streamline the form.
These elements were redundant in simple pages where there is no need to
distinguish between different sections or content.
This change is a step toward having forms display only "required" inputs.
While not yet documented in developer guidelines, it has been discussed
and agreed that forms should show only required inputs or inputs that will
always have a value. Optional fields should be explicitly requested by
the user, effectively making them required once displayed.

In the registration form, this applies to the email input: if the user
does not select "Provide email address," the email input field is neither
rendered nor validated. However, if selected, it is displayed and
validated accordingly.
## Problem

- Cannot submit other branches than `master` to OBS

## Solution

- Make the GitHub Actions more generic, allow submitting any branch to
any OBS project
- It works also with GitHub forks and OBS `home` repositories
- Added a script for creating a new OBS project

## Details

- Run the actions for any branch or tag
- The actions use `OBS_PROJECTS` GitHub variable with mapping "Git
branch/tag name" => "OBS project name"
- Removed creating automatic submit requests, that needs to be done
manually
- See more details about the workflow in the new `README.md` file
- Added CI which runs `shellcheck` for the devel scripts

## Testing

- Tested manually, I configured autosubmission using the `branch2obs.sh`
script from "master" branch of [my GitHub
fork](https://github.com/lslezak/agama) to newly created
[home:lslezak:Agama:branches:master](https://build.opensuse.org/project/show/home:lslezak:Agama:branches:master)
project.
The idea is to make it easier for users to set a hostname when
registering a product, as the product will be registered with the
specified hostname. Instead of adding warnings elsewhere, it’s more
helpful to let users set the hostname directly from the registration
form too, which will be prefilled with the current hostname value.

NOTE: This commit only updates the interface. The logic for setting the
hostname is not yet implemented. Tests are intentionally broken to
prevent overlooking it.
This commit adds only the basic interface components. Logic for setting
the hostname and its options still pending to be implemented.
Alert users that changing the hostname of an already registered product
will not update the hostname used during registration.
## Problem

- There could be a confusion between the official Agama version 12 and
the version from our OBS

## Solution

- Bump the version to `13pre` so it is clear this is not the version 12
but still not the future version 13 (so that 12 is the latest final
release).
- Using a pre version [has been approved by
Imo](agama-project#1968 (comment))
* Save the logs into the installed system.
* Set the proper permissions (700) to the
  /var/log/agama-installation folder.
…oject#2148)

## Problem

Agama does not copy the logs to the installed system, so they are lost.
Additionally, the /var/log/agama-installation permissions are way too
open.

## Solution

* Save the logs into the installed system.
* Set the proper permissions (700) to the /var/log/agama-installation
folder (agama-project#2140).

## Testing

- Added a new unit test
- Tested manually
dgdavid and others added 23 commits March 20, 2025 08:47
This is a re-incarnation of agama-project#2129, that was automatically closed by
Github.

## Problem

Agama does not allow to delete the "/" partition nor the drive
containing it.

But that was only implemented to hide some limitations of the current
UI. In fact, deleting "/" or any other mandatory partition should be
allowed. Of course, a proposal without mandatory mount paths is not
valid and cannot be computed. But that doesn’t mean the user cannot
delete them temporarily in order to create it elsewhere.

## Solution

- Detect and properly report when mandatory partitions are missing.
- Adapt the UI to not panic (ie. resort to an empty state) when there
are configuration errors that can actually be fixed by using the UI.
- Allow to delete all partitions (including "/").
- Adapt the "do not use" button of the drives to the new situation
Co-authored-by: David Díaz <1691872+dgdavid@users.noreply.github.com>
## Problem

Init scripts are executed properly. See agama-project#2144.

## Solution

- Run init scripts properly
- Make agama-scripts.sh idempotent
- Allow setting the scripts path with the SCRIPTS_DIR environment
variable.
- Do not exit with an error if there are not scripts

## Testing

- _Tested manually_
## Problem

When running post-scripts in a chroot there is no DNS resolution because
there is no resolv.conf


- Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1235617
- Trello card: https://trello.com/c/9jDKP62p

## Solution

Create a symling to /run/NetworkManager/resolv.conf if there is no
/mnt/etc/resolv.conf before running the post scripts deleting it once
finished.

## Testing

- *Tested manually*
…t#2181)

## Problem

The agama-self-update checks only agama.self_update and no
inst.self_update which was adopted rececently as reported by
agama-project#2175.

Apart of it, the regular expresion for matching if it is between spaces
or at the beginning of a line is also wrong and a similar fix was
already done by @lslezak for live.password_dialog option
(agama-project#2045).

## Solution

- Fixed regexp matching in the agama-self-update script, using word
boundary matching (\b) and also checking inst and agama prefix.

## Test

- Tested regular expression manually.
- No zypper calls are actually needed
The alert about the hostname for system registration is no longer
necessary once the system has been successfully registered.
* It includes setup-systemd-proxy-env.path which
  was included in microos-tools.
## Problem

The Agama ISO is not building anymore because it is missing
`setup-systemd-proxy-env.path`. This path was part of `microos-tools`,
but it as been [moved to
aaa_base](https://github.com/openSUSE/microos-tools/blob/fa1a910b31274675516b29443923738d3738bba2/NEWS#L2).

## Solution

Add `aaa_base-extras`, which contains the path.

## Testing

- *Tested manually*
…ject#2183)

The alert about the hostname for system registration is not necessary
once the system has been successfully registered.
- Let's keep the messages now, we'll see if that needs more love
- Don't depend on X11 as that service is going to be removed
## Problem

*Customers and partners need a way to patch the Live Media with PTF or
similar mechanism*

- https://jira.suse.com/browse/PED-3670
- https://jira.suse.com/browse/AGM-65

## Solution

There is a new agama-dud systemd service that runs after the
agama-self-update so it overwrites anything that the self-update could
have changed automatically. This service calls agama-dud script that
goes over all inst.dud=... in /run/agama/cmdline.d/agama.conf, downloads
those packages and force-installs/upgrades them with rpm.

The solution is "inspired" by the self-update functionality and other
scripts and services from the project ;)

Things to solve later

- Everything is an RPM, no other type of DUD is supported yet
- There are no checks, no validation, etc.
- Logging should be added too

## Testing

Tested only manually by adding links to RPMs into
/run/agama/cmdline.d/agama.conf and running the new script

## Example of the output

> Downloading DUD from
https://download.opensuse.org/repositories/artwork:/wallpapers/openSUSE_Tumbleweed/noarch/propaganda00-0-2.73.noarch.rpm
> File saved to /tmp/agama-WT3vi0ryww.rpm
> warning: /tmp/agama-WT3vi0ryww.rpm: Header V3 DSA/SHA1 Signature, key
ID 5b8ee893: NOKEY
> Preparing... ################################# [100%]
> Updating / installing...
> 1:propaganda00-0-2.73 ################################# [100%]
@joseivanlopez joseivanlopez marked this pull request as ready for review March 21, 2025 15:38
@joseivanlopez joseivanlopez merged commit 8579583 into agama-project:storage-lvm Mar 21, 2025
7 checks passed
@coveralls
Copy link

coveralls commented Mar 21, 2025

Pull Request Test Coverage Report for Build 13995061843

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 83 of 101 (82.18%) changed or added relevant lines in 22 files are covered.
  • 166 unchanged lines in 16 files lost coverage.
  • Overall coverage increased (+0.1%) to 72.952%

Changes Missing Coverage Covered Lines Changed/Added Lines %
rust/xtask/src/main.rs 0 1 0.0%
rust/agama-server/src/software/web.rs 0 2 0.0%
rust/agama-lib/src/store.rs 0 4 0.0%
rust/agama-lib/src/software/client.rs 0 5 0.0%
rust/agama-server/src/manager/web.rs 0 6 0.0%
Files with Coverage Reduction New Missed Lines %
rust/agama-lib/src/software/store.rs 1 72.73%
service/service/lib/y2storage/agama_proposal.rb 1 98.8%
rust/agama-server/src/manager/web.rs 2 0.0%
service/service/lib/agama/storage/config_checkers/search.rb 2 94.12%
service/service/lib/agama/storage/finisher.rb 2 98.68%
rust/agama-lib/src/install_settings.rs 3 0.0%
rust/agama-lib/src/software/http_client.rs 4 70.0%
rust/agama-lib/src/lib.rs 6 31.25%
rust/xtask/src/main.rs 6 0.0%
rust/agama-lib/src/product/http_client.rs 8 48.28%
Totals Coverage Status
Change from base Build 13988687697: 0.1%
Covered Lines: 20514
Relevant Lines: 28120

💛 - Coveralls

@imobachgs imobachgs mentioned this pull request Mar 27, 2025
imobachgs added a commit that referenced this pull request Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Comments