Skip to content

mention relative references, as replacement for relurl #89

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

Merged
merged 3 commits into from
Jul 22, 2025
Merged
Changes from all 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
32 changes: 29 additions & 3 deletions docs/user/urls.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,30 @@ In addition to those schemes, Agama supports a set of specific ones which can be
- [`label`](#label) for finding files in a file system with a given label.
- [`cd`, `dvd`, `hd`](#cd-dvd-and-hd) for finding files on specific devices (prefer `device`).

## Relative references

For `"scripts"` and `"files"` in the Agama JSON config, the `"url"` property
can be a relative reference, where the resolution base is the URL of the containing config.

This is a replacement for the ~~`relurl`~~ scheme used in AutoYaST.

For example, if the configuration below is retrieved from
`https://example.com/machines/sles16.jsonnet`, it refers to
`https://example.com/machines/scripts/snapshot.sh`.

```jsonnet
{
scripts: {
postPartitioning: [
{
name: "snapshot",
url: "scripts/snapshot.sh"
}
]
}
}
```

## Agama specific schemes

The typical protocols are enough for most use cases. However, more specific URLs can be handy in
Expand Down Expand Up @@ -90,12 +114,14 @@ hd:/sles.jsonnet?devices=/dev/sr0
dvd:/autoinst.xml?devices=sr1
```

:::note Prefer `device` to `cd`, `dvd` or `hd` Given that `cd`, `dvd` and `hd` do not offer any
advantage, using `device` might be a better option. :::
:::note
Prefer `device` to `cd`, `dvd` or `hd` Given that `cd`, `dvd` and `hd` do not offer any
advantage, using `device` might be a better option.
:::

### Not supported yet

The `repo://` and `relurl://` URLs are not supported yet, but there are plans to implement them.
The `repo://` URLs are not supported yet, but there are plans to implement them.

[^1]: Agama relies on [curl](https://curl.se/) to support generic protocols (network protocols and
`file://`). So it might happen that some protocol is supported "by accident". However, only the
Expand Down