Skip to content

Commit

Permalink
Merge branch 'master' into confirm_format
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs authored Oct 1, 2024
2 parents cfc80e9 + 8c2780d commit 8afe8cb
Show file tree
Hide file tree
Showing 102 changed files with 15,034 additions and 13,939 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
timeout-minutes: 60
runs-on: ubuntu-latest
# do not run scheduled jobs in forks, in forks only allow manual run ("workflow_dispatch")
if: github.repository_owner == 'openSUSE' || github.event_name == 'workflow_dispatch'
if: (!github.event.repository.fork) || github.event_name == 'workflow_dispatch'

steps:

Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
# see https://github.com/marketplace/actions/irc-message-action
uses: Gottox/irc-message-action@v2
# never run in forks or when triggered manually
if: failure() && github.repository_owner == 'openSUSE' && github.event_name != 'workflow_dispatch'
if: failure() && !github.event.repository.fork && github.event_name != 'workflow_dispatch'
with:
channel: "#yast"
nickname: github-action
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/obs-staging-autoinstallation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- master
- release
paths:
# run only when an autoinstallation source is changed
- autoinstallation/**
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/obs-staging-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- master
- release
paths:
# run only when a source file is changed
- puppeteer/**
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/obs-staging-live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- master
- release
paths:
# run only when a live ISO source is changed
- live/**
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/obs-staging-products.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- master
- release
paths:
# run only when a Rust source is changed
- products.d/**
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/obs-staging-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- master
- release
paths:
# run only when a Rust source is changed
- rust/**
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/obs-staging-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- master
- release
paths:
# run only when a service source is changed
- service/**
Expand Down
46 changes: 29 additions & 17 deletions .github/workflows/obs-staging-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,27 @@ on:

jobs:
update_staging_package:
# do not run in forks which do not set the OBS_PROJECT variable
if: vars.OBS_PROJECT != ''
# do not run in forks which do not set the OBS_PROJECT variable,
# for the "release" branch or a git tag use the OBS_PROJECT_RELEASE variable
if: vars.OBS_PROJECT != '' || ((github.ref_name == 'release' || github.ref_type == 'tag') && vars.OBS_PROJECT_RELEASE != '')

runs-on: ubuntu-latest

container:
image: registry.opensuse.org/opensuse/tumbleweed:latest

steps:
- name: Select OBS project
id: obs_project
run: |-
if [ "${{ github.ref_name }}" = "release" -o "${{ github.ref_type }}" = "tag" ]; then
echo "OBS_PROJECT=${{ vars.OBS_PROJECT_RELEASE }}" >> "$GITHUB_OUTPUT"
echo "OBS project: ${{ vars.OBS_PROJECT_RELEASE }}"
else
echo "OBS_PROJECT=${{ vars.OBS_PROJECT }}" >> "$GITHUB_OUTPUT"
echo "OBS project: ${{ vars.OBS_PROJECT }}"
fi
- name: Configure and refresh repositories
# disable unused repositories to have a faster refresh
run: zypper modifyrepo -d repo-non-oss repo-openh264 repo-update && zypper ref
Expand Down Expand Up @@ -64,51 +76,51 @@ jobs:
OBS_USER: ${{ secrets.OBS_USER }}
OBS_PASSWORD: ${{ secrets.OBS_PASSWORD }}

- name: Checkout ${{ vars.OBS_PROJECT }} ${{ inputs.package_name }}
run: osc co ${{ vars.OBS_PROJECT }} ${{ inputs.package_name }}
- name: Checkout ${{ steps.obs_project.outputs.OBS_PROJECT }} ${{ inputs.package_name }}
run: osc co ${{ steps.obs_project.outputs.OBS_PROJECT }} ${{ inputs.package_name }}

- name: Configure git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Update service revision
# only when a tag has been pushed
if: ${{ github.ref_type == 'tag' }}
# only when a tag has been pushed, or "release" branch updated
if: github.ref_type == 'tag' || github.ref_name == 'release'
run: |-
echo "Updating revision to ${{ github.ref_name }}"
echo "Updating revision to \"${{ github.ref_name }}\""
sed -i -e 's#<param name="revision">.*</param>#<param name="revision">${{ github.ref_name }}</param>#' _service
working-directory: ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}
working-directory: ./${{ steps.obs_project.outputs.OBS_PROJECT }}/${{ inputs.package_name }}

- name: Copy optional service file
# patch the URL in the file so it works also from forks, forks also by
# default do not inherit the tags so remove the version format option if
# no tag is present
if: inputs.service_file != ''
run: |
sed -e 's#<param name="url">.*</param>#<param name="url">https://github.com/${{ github.repository }}.git</param>#' ${{ inputs.service_file }} > ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}/_service
if [ -z "$(git tag -l)" ]; then sed -i -e 's#<param name="versionformat">.*</param>##' ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}/_service; fi
sed -e 's#<param name="url">.*</param>#<param name="url">https://github.com/${{ github.repository }}.git</param>#' ${{ inputs.service_file }} > ./${{ steps.obs_project.outputs.OBS_PROJECT }}/${{ inputs.package_name }}/_service
if [ -z "$(git tag -l)" ]; then sed -i -e 's#<param name="versionformat">.*</param>##' ./${{ steps.obs_project.outputs.OBS_PROJECT }}/${{ inputs.package_name }}/_service; fi
- name: Run services
run: osc service manualrun
working-directory: ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}
working-directory: ./${{ steps.obs_project.outputs.OBS_PROJECT }}/${{ inputs.package_name }}

- name: Cleanup
# sometimes the "osc service" run does not cleanup properly all
# downloaded NPM package tarballs and they are accidentally added to the
# OBS package, so delete any TGZ files present
run: rm -vf *.tgz
working-directory: ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}
working-directory: ./${{ steps.obs_project.outputs.OBS_PROJECT }}/${{ inputs.package_name }}

- name: Check status
run: osc addremove && osc diff && osc status
working-directory: ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}
working-directory: ./${{ steps.obs_project.outputs.OBS_PROJECT }}/${{ inputs.package_name }}

- name: Commit ${{ inputs.package_name }} to ${{ vars.OBS_PROJECT }}
- name: Commit ${{ inputs.package_name }} to ${{ steps.obs_project.outputs.OBS_PROJECT }}
run: |-
osc commit -m "Updated to $(sed -e '/^version:/!d' -e 's/version: *\(.*\)/\1/' agama.obsinfo) ($(sed -e '/^commit:/!d' -e 's/commit: *\(.*\)/\1/' agama.obsinfo))"
working-directory: ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}
working-directory: ./${{ steps.obs_project.outputs.OBS_PROJECT }}/${{ inputs.package_name }}

- name: Submit the package
# only when a tag has been pushed
if: ${{ github.ref_type == 'tag' }}
if: github.ref_type == 'tag'
run: osc sr --yes -m "Releasing version ${{ github.ref_name }}"
working-directory: ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}
working-directory: ./${{ steps.obs_project.outputs.OBS_PROJECT }}/${{ inputs.package_name }}
1 change: 1 addition & 0 deletions .github/workflows/obs-staging-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- master
- release
paths:
# run only when a web frontend source is changed
- web/**
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/weblate-merge-po.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
pull-requests: write

# do not run in forks
if: github.repository == 'openSUSE/agama'
if: !github.event.repository.fork

runs-on: ubuntu-latest

Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
uses: actions/checkout@v4
with:
path: agama-weblate
repository: openSUSE/agama-weblate
repository: ${{ github.repository_owner }}/agama-weblate

- name: Update PO files
working-directory: ./agama
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/weblate-merge-products-po.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
pull-requests: write

# do not run in forks
if: github.repository == 'openSUSE/agama'
if: !github.event.repository.fork

runs-on: ubuntu-latest

Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
uses: actions/checkout@v4
with:
path: agama-weblate
repository: openSUSE/agama-weblate
repository: ${{ github.repository_owner }}/agama-weblate

- name: Validate the product PO files
working-directory: ./agama-weblate
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/weblate-merge-service-po.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
pull-requests: write

# do not run in forks
if: github.repository_owner == 'openSUSE'
if: !github.event.repository.fork

runs-on: ubuntu-latest

Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
uses: actions/checkout@v4
with:
path: agama-weblate
repository: openSUSE/agama-weblate
repository: ${{ github.repository_owner }}/agama-weblate

- name: Validate the service PO files
working-directory: ./agama-weblate
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/weblate-update-pot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
update-pot:
# do not run in forks
if: github.repository == 'openSUSE/agama'
if: !github.event.repository.fork

runs-on: ubuntu-latest

Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
uses: actions/checkout@v4
with:
path: agama-weblate
repository: openSUSE/agama-weblate
repository: ${{ github.repository_owner }}/agama-weblate
token: ${{ secrets.GH_TOKEN }}

- name: Configure Git
Expand Down
6 changes: 5 additions & 1 deletion autoinstallation/package/_service
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<services>
<service name="obs_scm" mode="manual">
<param name="url">https://github.com/openSUSE/agama.git</param>
<!-- the URL is modified by the .github/workflows/obs-staging-shared.yml
action when submitting to OBS -->
<param name="url">https://github.com/agama-project/agama.git</param>
<param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="scm">git</param>
<!-- the revision might be changed to "release" branch or a git tag by the
.github/workflows/obs-staging-shared.yml action when submitting to OBS -->
<param name="revision">master</param>
<param name="subdir">autoinstallation</param>
<param name="without-version">enable</param>
Expand Down
34 changes: 20 additions & 14 deletions doc/auto_storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ Btrfs
snapshots [<boolean=false>]
quotas [<boolean=false>]
Size <'default'|string|SizeRange>
Size <string|SizeRange>
SizeRange
min <string>
Expand Down Expand Up @@ -400,9 +400,18 @@ The second option is to provide a minimum size and an optional maximum one. The
be between those thresholds. If the maximum is omitted or set to `null`, the device will grow as
much as possible, taking into account the available spaces and all the other specified sizes.

The third option is to use the string "default". That means Agama will decide the size based on the
mount point and the settings of the product. From a more technical point of view, that translates
into the following:
It is also possible to specify "current" as a minimum or maximum size limit for partitions and
logical volumes that already exist in the system (so "current" can only be used for device
specifications that contain a `search` section). The usage of "current" and how it affects
resizing the corresponding devices is explained at a separate section below.

If the size is completely omitted for a device that already exists (ie. combined with `search`),
then Agama would act as if both min and max limits would have been set to "current" (which implies
the partition or logical volume will not be resized).

On the other hand, if the size is omitted for a device that will be created, Agama will decide the
size based on the mount point and the settings of the product. From a more technical point of view,
that translates into the following:

- If the mount path corresponds to a volume supporting `auto_size`, that feature will be used.
- If it corresponds to a volume without `auto_size`, the min and max sizes of the volumes will be
Expand All @@ -411,15 +420,12 @@ into the following:
- If the product does not specify a default volume, the behavior is still not defined (there are
several reasonable options).

It is also possible to specify "current" as a size value for partitions and logical volumes that
already exist in the system. The usage of "current" and how it affects resizing the corresponding
devices is explained at a separate section below.

#### Under Discussion

As explained, it should be possible to specify the sizes as "default", as a range or as a fixed
value. But in the last two cases, a parseable string like "40 GiB" may not be the only option to
represent a size. The following two possibilities are also under consideration.
As explained, it should be possible to specify the sizes as a fixed value or as a range. But a
a parseable string like "40 GiB" may not be the only option to represent a size or a range limit.
The following two possibilities are also under consideration.

- `{ "gib": 40 }`
- `{ "value": 40, "units": "gib" }`
Expand Down Expand Up @@ -767,7 +773,7 @@ In any case, note that resizing a partition can be limited depending on its cont
type, etc.

Combining `search` and `resize` is enough to indicate Agama is expected to resize a given partition
if possible. The keyword "current" can be used eveywhere a size is expected and it is always
if possible. The keyword "current" can be used as min and/or max for the size range and it is always
equivalent to the exact original size of the device. The simplest way to use "current" is to just
specify that the matched device should keep its original size. That's the default for searched (and
found) devices if `size` is completely omitted.
Expand All @@ -781,16 +787,16 @@ found) devices if `size` is completely omitted.
"search": {
"condition": { "property": "fsLabel", "value": "reuse" }
},
"size": "current"
"size": { "min": "current", "max": "current" }
}
]
}
]
}
```

Using "current" for the min and max values of a size allows to specify how a device could be resized
if possible. See the following examples with explanatory filesystem labels.
Other combinations can be used to specify how a device could be resized if possible. See the
following examples with explanatory filesystem labels.

```json
"storage": {
Expand Down
14 changes: 7 additions & 7 deletions doc/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,21 @@ The basic translation workflow looks like this:
1. The translatable texts are marked for translation in the source code, usually
with the `_()` function or something similar
2. The translatable string are collected into a POT file which is uploaded to
the staging [agama-weblate](https://github.com/openSUSE/agama-weblate) GitHub
the staging [agama-weblate](https://github.com/agama-project/agama-weblate) GitHub
repository
3. The POT file is loaded by the Weblate into the
[agama](https://l10n.opensuse.org/projects/agama/) project
4. Translators then can translate the English texts into other languages
5. Weblate pushes back the translations in the PO files back to the
[agama-weblate](https://github.com/openSUSE/agama-weblate) repository
[agama-weblate](https://github.com/agama-project/agama-weblate) repository
6. The translations in the PO files are regularly copied to the main repository
using pull requests
7. The PO files are processed during build so the translations can be used
later at runtime

## Staging Translation Repository

The special [agama-weblate](https://github.com/openSUSE/agama-weblate)
The special [agama-weblate](https://github.com/agama-project/agama-weblate)
repository works like a buffer between the Agama sources and the Weblate tool.

We do not want to spam the Weblate tool with every trivial change in the texts
Expand All @@ -114,7 +114,7 @@ of seconds.
## Synchronization

The content between the main [agama](https://github.com/openSUSE/agama) and
the translation [agama-weblate](https://github.com/openSUSE/agama-weblate)
the translation [agama-weblate](https://github.com/agama-project/agama-weblate)
GitHub repositories is synchronized automatically using the GitHub Actions.

### Uploading Translatable Texts
Expand Down Expand Up @@ -160,7 +160,7 @@ separate translation component for each Agama part (the web frontend, the D-Bus
backend and the command line interface).

For reading the translations it uses the [agama-weblate](
https://github.com/openSUSE/agama-weblate) GitHub repository, but for the source
https://github.com/agama-project/agama-weblate) GitHub repository, but for the source
code locations it uses the original [agama](https://github.com/openSUSE/agama)
repository. That means after clicking the source location link in the Weblate
you will see the correct source location in the other repository.
Expand Down Expand Up @@ -526,14 +526,14 @@ UI.
[language package](#backend-translations) is installed.
3. The text should be [extracted into the POT file](#building-pot-file)
4. The [agama.pot](
https://github.com/openSUSE/agama-weblate/blob/master/web/agama.pot) in the
https://github.com/agama-project/agama-weblate/blob/master/web/agama.pot) in the
`agama-weblate` repository is up to date, if not then run the [Weblate Update
POT](https://github.com/openSUSE/agama/actions/workflows/weblate-update-pot.yml)
Github Action manually.
5. The text is translated in the [Weblate repository](
https://l10n.opensuse.org/projects/agama/).
6. The translation is included in the respective PO file in the [agama-weblate](
https://github.com/openSUSE/agama-weblate) repository.
https://github.com/agama-project/agama-weblate) repository.
7. The PO file in the [agama](
https://github.com/openSUSE/agama/tree/master/web/po) repository is up to
date, if not the check whether there is an [open pull request](
Expand Down
Loading

0 comments on commit 8afe8cb

Please sign in to comment.