feat: added support for importing custom keys for rpm-ostree module
This commit is contained in:
parent
b7de5f34ce
commit
bbddb6c3f7
3 changed files with 13 additions and 0 deletions
|
|
@ -4,6 +4,8 @@ The [`rpm-ostree`](https://coreos.github.io/rpm-ostree/) module offers pseudo-de
|
|||
|
||||
The module first downloads the repository files from repositories declared under `repos:` into `/etc/yum.repos.d/`. The magic string `%OS_VERSION%` is substituted with the current VERSION_ID (major Fedora version), which can be used, for example, for pulling correct versions of repositories from [Fedora's Copr](https://copr.fedorainfracloud.org/).
|
||||
|
||||
If you use a repo that requires adding custom keys (eg. brave browser) you can import the keys by decalring the key urls in under `keys:`. The magic string acts the same as it does in `repos`.
|
||||
|
||||
Then the module installs the packages declared under `install:` using `rpm-ostree install`, it removes the packages declared under `remove:` using `rpm-ostree override remove`. If there are packages declared under both `install:` and `remove:` a hybrid command `rpm-ostree remove <packages> --install <packages>` is used, which should allow you to switch required packages for other ones.
|
||||
|
||||
Installing RPM packages directly from a `http(s)` url that points to the RPM file is also supported, you can just put the URLs under `install:` and they'll be installed along with the other packages. The magic string `%OS_VERSION%` is substituted with the current VERSION_ID (major Fedora version) like with the `repos:` property.
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ example: |
|
|||
repos:
|
||||
- https://copr.fedorainfracloud.org/coprs/atim/starship/repo/fedora-%OS_VERSION%/atim-starship-fedora-%OS_VERSION%.repo # when including COPR repos, use the %OS_VERSION% magic string
|
||||
- https://pkgs.tailscale.com/stable/fedora/tailscale.repo
|
||||
- https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
|
||||
keys:
|
||||
- https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
|
||||
install:
|
||||
- python3-pip
|
||||
- libadwaita
|
||||
|
|
|
|||
|
|
@ -13,6 +13,14 @@ if [[ ${#REPOS[@]} -gt 0 ]]; then
|
|||
done
|
||||
fi
|
||||
|
||||
get_yaml_array KEYS '.keys[]' "$1"
|
||||
if [[ ${#KEYS[@]} -gt 0 ]]; then
|
||||
echo "Adding keys"
|
||||
for KEY in "${KEYS[@]}"; do
|
||||
rpm --import "${KEY//[$'\t\r\n ']}"
|
||||
done
|
||||
fi
|
||||
|
||||
# Create symlinks to fix packages that create directories in /opt
|
||||
get_yaml_array OPTFIX '.optfix[]' "$1"
|
||||
if [[ ${#OPTFIX[@]} -gt 0 ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue