Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Devel project instead of Staging #1425

Merged
merged 6 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
8 changes: 4 additions & 4 deletions .github/workflows/obs-staging-live.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Submit agama-live
name: Submit agama-installer-openSUSE

on:
# runs on pushes targeting the default branch
Expand Down Expand Up @@ -43,8 +43,8 @@ jobs:
OBS_USER: ${{ secrets.OBS_USER }}
OBS_PASSWORD: ${{ secrets.OBS_PASSWORD }}

- name: Checkout ${{ vars.OBS_PROJECT }} agama-live
run: osc co -o dist ${{ vars.OBS_PROJECT }} agama-live
- name: Checkout ${{ vars.OBS_PROJECT }} agama-installer-openSUSE
run: osc co -o dist ${{ vars.OBS_PROJECT }} agama-installer-openSUSE
working-directory: ./live

- name: Build sources
Expand All @@ -59,6 +59,6 @@ jobs:
run: osc diff && osc status
working-directory: ./live/dist

- name: Commit agama-live to ${{ vars.OBS_PROJECT }}
- name: Commit agama-installer-openSUSE to ${{ vars.OBS_PROJECT }}
run: osc commit -m "Updated to Agama $GITHUB_SHA"
working-directory: ./live/dist
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 the
imobachgs marked this conversation as resolved.
Show resolved Hide resolved
[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, Agama server
imobachgs marked this conversation as resolved.
Show resolved Hide resolved
(`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.
2 changes: 1 addition & 1 deletion 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
17 changes: 1 addition & 16 deletions STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,6 @@

## Packages

### [OBS systemsmanagement:Agama:Staging](https://build.opensuse.org/project/show/systemsmanagement:Agama:Staging)

[![Submit agama](https://github.com/openSUSE/agama/actions/workflows/obs-staging-rust.yml/badge.svg)](https://github.com/openSUSE/agama/actions/workflows/obs-staging-rust.yml)
[![Submit cockpit-agama](https://github.com/openSUSE/agama/actions/workflows/obs-staging-web.yml/badge.svg)](https://github.com/openSUSE/agama/actions/workflows/obs-staging-web.yml)
[![Submit rubygem-agama-yast](https://github.com/openSUSE/agama/actions/workflows/obs-staging-service.yml/badge.svg)](https://github.com/openSUSE/agama/actions/workflows/obs-staging-service.yml)
[![Submit cockpit-agama-playwright](https://github.com/openSUSE/agama/actions/workflows/obs-staging-playwright.yml/badge.svg)](https://github.com/openSUSE/agama/actions/workflows/obs-staging-playwright.yml)

[![OBS Staging/agama](https://img.shields.io/obs/systemsmanagement:Agama:Staging/agama/openSUSE_Tumbleweed/x86_64?label=Package%20agama)](https://build.opensuse.org/package/show/systemsmanagement:Agama:Staging/agama)
[![OBS Staging/cockpit-agama](https://img.shields.io/obs/systemsmanagement:Agama:Staging/cockpit-agama/openSUSE_Tumbleweed/x86_64?label=Package%20cockpit-agama)](https://build.opensuse.org/package/show/systemsmanagement:Agama:Staging/cockpit-agama)
[![OBS Staging/rubygem-agama-yast](https://img.shields.io/obs/systemsmanagement:Agama:Staging/rubygem-agama-yast/openSUSE_Tumbleweed/x86_64?label=Package%20rubygem-agama-yast)](https://build.opensuse.org/package/show/systemsmanagement:Agama:Staging/rubygem-agama-yast)
[![OBS Staging/agama-products-opensuse](https://img.shields.io/obs/systemsmanagement%3AAgama%3AStaging/agama-products-opensuse/openSUSE_Tumbleweed/x86_64?label=Package%20agama-products-opensuse)](https://build.opensuse.org/package/show/systemsmanagement:Agama:Staging/agama-products-opensuse)
[![OBS Staging/cockpit-agama-playwright](https://img.shields.io/obs/systemsmanagement:Agama:Staging/cockpit-agama-playwright/openSUSE_Tumbleweed/x86_64?label=Package%20cockpit-agama-playwright)](https://build.opensuse.org/package/show/systemsmanagement:Agama:Staging/cockpit-agama-playwright)
[![OBS Staging/agama-live](https://img.shields.io/obs/systemsmanagement:Agama:Staging/agama-live:openSUSE/images/x86_64?label=Live%20ISO)](https://build.opensuse.org/package/show/systemsmanagement:Agama:Staging/agama-live)

### [OBS systemsmanagement:Agama:Devel](https://build.opensuse.org/project/show/systemsmanagement:Agama:Devel)

![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/openSUSE/agama?label=Version&sort=semver)
Expand All @@ -42,5 +28,4 @@
[![OBS Devel/agama](https://img.shields.io/obs/systemsmanagement:Agama:Devel/agama/openSUSE_Tumbleweed/x86_64?label=Package%20agama)](https://build.opensuse.org/package/show/systemsmanagement:Agama:Devel/agama)
[![OBS Devel/cockpit-agama](https://img.shields.io/obs/systemsmanagement:Agama:Devel/cockpit-agama/openSUSE_Tumbleweed/x86_64?label=Package%20cockpit-agama)](https://build.opensuse.org/package/show/systemsmanagement:Agama:Devel/cockpit-agama)
[![OBS Devel/rubygem-agama-yast](https://img.shields.io/obs/systemsmanagement:Agama:Devel/rubygem-agama-yast/openSUSE_Tumbleweed/x86_64?label=Package%20rubygem-agama-yast)](https://build.opensuse.org/package/show/systemsmanagement:Agama:Devel/rubygem-agama-yast)
[![OBS Devel/agama-live](https://img.shields.io/obs/systemsmanagement:Agama:Devel/agama-live:openSUSE/images/x86_64?label=Live%20ISO)](https://build.opensuse.org/package/show/systemsmanagement:Agama:Devel/agama-live)

[![OBS Devel/agama-installer-openSUSE](https://img.shields.io/obs/systemsmanagement:Agama:Devel/agama-installer-openSUSE:openSUSE/images/x86_64?label=Live%20ISO)](https://build.opensuse.org/package/show/systemsmanagement:Agama:Devel/agama-installer-openSUSE)
2 changes: 1 addition & 1 deletion doc/live_iso.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Notes:
> This feature is experimental and untested!

The Agama packages on the Live ISO can be automatically updated from the OBS
Staging project.
Devel project.

* Use the `agama.self_update` boot parameter to run the self-update
automatically during boot.
Expand Down
Loading