Skip to content

Commit

Permalink
Merge pull request #88 from jcronenberg/merge_master
Browse files Browse the repository at this point in the history
Merge upstream master
  • Loading branch information
cfconrad authored Aug 12, 2024
2 parents 1addbf0 + d710ad5 commit ee5b812
Show file tree
Hide file tree
Showing 545 changed files with 36,117 additions and 30,677 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
/*.pot
*.mo
*.bz2
# Do NOT ignore .github: for git this is a no-op
# but it helps ripgrep (rg) which would otherwise ignore dotfiles and dotdirs
!/.github/
115 changes: 42 additions & 73 deletions PACKAGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,17 @@

This document summarizes the process we follow to build the Agama packages.

The Agama packages are available in two OBS projects:

- [systemsmanagement:Agama:Staging](
https://build.opensuse.org/project/show/systemsmanagement:Agama:Staging) -
contains the latest packages built from the `master` branch in Git. This
project contains unstable development version of Agama. It is intended for
development or testing new unfinished features.

These packages are automatically updated whenever the master branch is changed.

- [systemsmanagement:Agama:Devel](
https://build.opensuse.org/project/show/systemsmanagement:Agama:Devel) -
contains the latest released version of the Agama project. These packages
should be more stable than in the Staging project. It is intended for testing.

These packages are updated automatically when a new version is released. See
more detail in the [bumping the version](#bumping-the-version) section below.
The Agama packages are available in the
[systemsmanagement:Agama:Devel](https://build.opensuse.org/project/show/systemsmanagement:Agama:Devel)
OBS project. These packages are automatically updated whenever the master branch is changed or when
a new version is released.

You can find more details the automatic OBS synchronization in the
[obs_integration.md](doc/obs_integration.md) file.

The process to build each package is slightly different depending on the
technology we are using. While the Ruby-based one (`rubygem-agama-yast`) is
built as any other YaST package, Agama server (`agama`), the CLI (`agama-cli`),
and the web UI (`cockpit-agama`) rely on
The process to build each package is slightly different depending on the technology we are using.
While the Ruby-based one (`rubygem-agama-yast`) is built as any other YaST package, the Agama server
(`agama`), the CLI (`agama-cli`), and the web UI (`agama-web-ui`) rely on
[OBS source services](https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.source_service.html).

## Versioning Policy
Expand All @@ -41,14 +27,12 @@ they contain changes or not.
In order to release a new version, we need to:

1. `(cd service; bundle install)` # Updates Gemfile.lock which is part of the repository
2. Add entries in the changes files.
`osc vc service/package`
`osc vc rust/package`
`osc vc web/package`
2. Add entries in the changes files. `osc vc service/package` `osc vc rust/package`
`osc vc web/package`
3. Open a pull request to get these changes into the repository.
4. Once the pull request is merged, tag the repository with the proper version number. The processes
to build the packages use this information to infer the version. You can set
the tag with the `rake tag` command.
to build the packages use this information to infer the version. You can set the tag with the
`rake tag` command.

```shell
# automatic version, use the current <major version> + 1
Expand All @@ -59,78 +43,63 @@ In order to release a new version, we need to:

You need to push the tag to the server manually, see the `rake tag` output.

After creating the tag on the server the GitHub Actions will publish the
packages in the [systemsmanagement:Agama:Devel](
https://build.opensuse.org/project/show/systemsmanagement:Agama:Devel)
After creating the tag on the server the GitHub Actions will publish the packages in the
[systemsmanagement:Agama:Devel](https://build.opensuse.org/project/show/systemsmanagement:Agama:Devel)
project and create submit requests to openSUSE Factory.

## Building the Packages

The packages are updated automatically using the GitHub actions. Here are details
for manual update.
The packages are updated automatically using the GitHub actions. Here are details for manual update.

### Service

You can check the current package in
[systemsmanagement:Agama:Staging/rubygem-agama-yast](
https://build.opensuse.org/package/show/systemsmanagement:Agama:Staging/rubygem-agama-yast).
[systemsmanagement:Agama:Devel/rubygem-agama-yast](https://build.opensuse.org/package/show/systemsmanagement:Agama:Devel/rubygem-agama-yast).

Use `rake` to update the package in OBS as you would do with any other YaST package:

cd service
rake osc:commit
cd service
rake osc:commit

If you just want to build the package locally, run:

rake osc:build

### The Cockpit Module

The current package is [systemsmanagement:Agama:Staging/cockpit-agama](
https://build.opensuse.org/package/show/systemsmanagement:Agama:Staging/cockpit-agama).

It relies on [OBS Source
Services](https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.source_service.html) to
fetch the sources (including the dependencies), set the version and build the package. You can
figure out most details by checking the [_service](web/package/_service) file.

To manually update the package in the build service, you just need to type:
rake osc:build

sudo zypper install obs-service-node_modules
osc service manualrun
osc commit -m "Update sources"
### Agama server, command-line and web-based user interface

If you want to build the package locally, just checkout (or branch) the package and run `osc build`.
You can find the current packages in OBS:

The version number is inferred from the repository tags (see [Releasing a new
version](#releasing-a-new-version)): it uses the latest tag and the offset of the latest commit
respect such a tag. (e.g. `2.1+42`).
- [systemsmanagement:Agama:Devel/agama](https://build.opensuse.org/package/show/systemsmanagement:Agama:Devel/agama)
for the server and the command-line.
- [systemsmanagement:Agama:Devel/agama-web-ui](https://build.opensuse.org/package/show/systemsmanagement:Agama:Devel/agama-web-ui)
for the web-based user interface.

You can read more about the overall approach of this package in the following article: [Git work
flows in the upcoming 2.7 release](https://openbuildservice.org/2016/04/08/new_git_in_27/).
As mentioned before, those packages are built using a service-based approach. You need to make sure
you installed the required OBS services: `obs-service-obs_scm`, `osb-service-cargo`, and
`obs-service-node_modules`.

### Server and Command-line Interface
zypper --non-interactive install --no-recommends \
obs-service-download_files obs-service-format_spec_file \
obs-service-obs_scm obs-service-cargo obs-service-node_modules

The current package is [systemsmanagement:Agama:Staging/agama](
https://build.opensuse.org/package/show/systemsmanagement:Agama:Staging/agama),
which includes `agama` and `agama-cli` as a subpackage.
After checking out or branching the package, you need to run the following commands.

To manually update the package in the build service, run the following commands:
osc service manualrun
osc commit -m "Update sources" # or osc build

sudo zypper install obs-service-cargo_vendor obs-service-cargo_audit # from Factory or devel:languages:rust
osc service manualrun
osc addremove *
osc commit -m "Update sources"
If you want to use a different Git branch, set another version, etc. just adapt the `_service`
accordingly before running the `osc service manualrun` command.

If you want to build the package locally, just checkout (or branch) the package and run `osc build`.
The version number is inferred from the repository tags (see
[Releasing a new version](#releasing-a-new-version)): it uses the latest tag and the offset of the
latest commit respect such a tag. (e.g. `2.1+42`).

The version number is inferred from the repository tags (see [Releasing a new
version](#releasing-a-new-version)): it uses the latest tag and the offset of the latest commit
respect such a tag. (e.g. `2.1+42`).
You can read more about the overall approach of this package in the following article:
[Git work flows in the upcoming 2.7 release](https://openbuildservice.org/2016/04/08/new_git_in_27/).

### The Live ISO

The ISO is built in the [systemsmanagement:Agama:Staging/agama-live](
https://build.opensuse.org/package/show/systemsmanagement:Agama:Staging/agama-live)
The ISO for openSUSE products is built in the
[systemsmanagement:Agama:Devel/agama-installer-openSUSE](https://build.opensuse.org/package/show/systemsmanagement:Agama:Devel/agama-installer-openSUSE)
OBS project. The sources are maintained in the [live](live) subdirectory. See
[live/README.md](live/README.md) for more details.
71 changes: 38 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,52 @@
[![Coverage Status](https://coveralls.io/repos/github/openSUSE/agama/badge.svg?branch=master)](https://coveralls.io/github/openSUSE/agama?branch=master)
[![Translation Status](https://l10n.opensuse.org/widgets/agama/-/agama-web/svg-badge.svg)](https://l10n.opensuse.org/engage/agama/)

Agama is a new Linux installer born in the core of the YaST team. It is designed to offer re-usability, integration with third party tools and the possibility of building advanced user interfaces over it.
Agama is a new Linux installer born in the core of the YaST team. It is designed to offer
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) |

<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) |

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

|||
|-|-|
| | |
| ------------------------------------------------------ | --------------------------------------------------------------- |
| ![Installing](./doc/images/screenshots/installing.png) | ![Installation finished](./doc/images/screenshots/finished.png) |

*Note for developers: For updating the screenshots see the
[integration test documentation](playwright/README.md#updating-the-screenshots).*

</details>

## Why a New Installer

This new project follows two main motivations: to overcome some of the limitations of YaST and to serve as installer for new projects, like those based on SUSE Linux Framework One.
This new project follows two main motivations: to overcome some of the limitations of YaST and to
serve as installer for new projects, like those based on SUSE Linux Framework One.

YaST is a mature installer and control center for SUSE and openSUSE operating systems. With more than 20 years behind it, YaST is a competent and flexible installer able to cover uncountable use cases. But time goes by, and the good old YaST is starting to show its age in some aspects:
YaST is a mature installer and control center for SUSE and openSUSE operating systems. With more
than 20 years behind it, YaST is a competent and flexible installer able to cover uncountable use
cases. But time goes by, and the good old YaST is starting to show its age in some aspects:

* The architecture of YaST is complex and its code-base has too much technical debt.
* Designing and building rich and modern user interfaces is a real challenge.
* Sharing logic with other tools like Salt or Ansible is very difficult.
* Some in-house solutions like [libyui](https://github.com/libyui/libyui) make more difficult to contribute to the project.
- The architecture of YaST is complex and its code-base has too much technical debt.
- Designing and building rich and modern user interfaces is a real challenge.
- Sharing logic with other tools like Salt or Ansible is very difficult.
- Some in-house solutions like [libyui](https://github.com/libyui/libyui) make more difficult to
contribute to the project.

## Running Agama

The easiest way to give Agama a try is to grab a live ISO image and boot it in a virtual
machine. This is also the recommended way if you only want to play and see it in action. If you want
to have a closer look, then clone and configure the project as explained in the next section.
The easiest way to give Agama a try is to grab a live ISO image and boot it in a virtual machine.
This is also the recommended way if you only want to play and see it in action. If you want to have
a closer look, then clone and configure the project as explained in the next section.

You can download the ISO from the [openSUSE Build
Service](https://download.opensuse.org/repositories/systemsmanagement:/Agama:/Devel/images/iso/).
You can download the ISO from the
[openSUSE Build Service](https://download.opensuse.org/repositories/systemsmanagement:/Agama:/Devel/images/iso/).

> [!NOTE]
> Make sure to download the correct ISO file according to your system architecture (eg. you would
Expand All @@ -65,24 +67,27 @@ might want to access remotely to the installer. If you know the IP address of th
need to point your browser to `https://$IP`.

For the case you do not know the address, or just for convenience, the Live ISO is configured to use
mDNS (sometimes called Avahi, Zeroconf, Bonjour) for hostname resolution. Therefore, connecting to `https://agama.local` should do the trick.
mDNS (sometimes called Avahi, Zeroconf, Bonjour) for hostname resolution. Therefore, connecting to
`https://agama.local` should do the trick.

>[!WARNING]
> [!WARNING]
> Do not use the `.local` hostnames in untrusted networks (like public WiFi networks, shared
> networks), it is a security risk. An attacker can easily send malicious responses for the `.local`
> hostname resolutions and point you to a wrong Agama instance which could for example steal your
> hostname resolutions and point you to a wrong Agama instance which could for example steal your
> root password!
If you have troubles or you want to know more about this feature, check our [Avahi/mDNS](./doc/avahi.md) documentation.
If you have troubles or you want to know more about this feature, check our
[Avahi/mDNS](./doc/avahi.md) documentation.

## Other Resources

* If you want to know how Agama works, you should read about [Agama's architecture](/doc/architecture.md)
* If you would like to [contribute](#how-to-contribute), you might be interested in:
* [Running Agama from sources](./doc/running.md).
* [Working with Agama's web server](./rust/WEB-SERVER.md).
* [Working with Agama's web UI](./web/README.md).
* You can check the overall status of the project through the [status page](/STATUS.md).
- If you want to know how Agama works, you should read about
[Agama's architecture](/doc/architecture.md)
- If you would like to [contribute](#how-to-contribute), you might be interested in:
- [Running Agama from sources](./doc/running.md).
- [Working with Agama's web server](./rust/WEB-SERVER.md).
- [Working with Agama's web UI](./web/README.md).
- You can check the overall status of the project through the [status page](/STATUS.md).

## How to Contribute

Expand Down
11 changes: 1 addition & 10 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ end

Yast::Tasks.configuration do |conf|
conf.obs_api = "https://api.opensuse.org"
conf.obs_project = ENV["OBS_PROJECT"] || "systemsmanagement:Agama:Staging"
conf.obs_project = ENV["OBS_PROJECT"] || "systemsmanagement:Agama:Devel"
conf.package_dir = File.join(Rake.original_dir, "package")
conf.obs_target = "openSUSE_Tumbleweed"
package_name = package_name_from(Rake.original_dir)
Expand Down Expand Up @@ -177,15 +177,6 @@ if ENV["YUPDATE_FORCE"] == "1" || File.exist?("/.packages.initrd") || live_iso?
end
end

# update also the tests if they are present in the system
if ENV["YUPDATE_SKIP_TESTS"] != "1" && File.exist?("/usr/share/agama-playwright")
puts "Installing the integration tests..."

# we are installing into an empty chroot, make sure the target exists
FileUtils.mkdir_p(File.join(destdir, "/usr/share"))
FileUtils.cp_r("playwright/.", File.join(destdir, "/usr/share/agama-playwright"))
end

if ENV["YUPDATE_SKIP_PRODUCTS"] != "1"
files = Dir.glob("products.d/*.y{a}ml")
files.each do |f|
Expand Down
Loading

0 comments on commit ee5b812

Please sign in to comment.