Skip to content

Commit

Permalink
feat(salt): +install +enable RPM Fusion repos
Browse files Browse the repository at this point in the history
Install and enable the RPM Fusion repositories.

This closes #85 and closes #87.

Squashed commit of the following:

commit 6209c448be710c759e3c26b049268eea84107252
Author: xbc5 <87829033+xbc5@users.noreply.github.com>
Date:   Thu Jul 14 11:25:23 2022 +0100

    enable the repo

commit 361e1e68fc0b9b500229bbff56ee285c931c4543
Author: xbc5 <87829033+xbc5@users.noreply.github.com>
Date:   Thu Jul 14 10:55:38 2022 +0100

    enable it in the dnf top

commit 70555a1148383e7c13f86c010d52840dade674b8
Author: xbc5 <87829033+xbc5@users.noreply.github.com>
Date:   Thu Jul 14 10:54:43 2022 +0100

    rename state file, it doesn't apply to dom0

commit 43e141aa51946558df8fcde52425853a0d169074
Author: xbc5 <87829033+xbc5@users.noreply.github.com>
Date:   Thu Jul 14 10:51:35 2022 +0100

    remove yaml declaration, LSP complains about jinja template blocks

commit 32aed5edf742fa3f67ee22f8a2690c8c6aa1bada
Author: xbc5 <87829033+xbc5@users.noreply.github.com>
Date:   Thu Jul 14 10:51:04 2022 +0100

    ignore non-free, it's not needed, too small, has installation issues

commit 61d968a9eadebd6eded5ad98a3d96ca94ef2b2ae
Author: xbc5 <87829033+xbc5@users.noreply.github.com>
Date:   Thu Jul 14 10:50:08 2022 +0100

    require keys before installation

commit c09e3b0fc9d809ad6b378d9663838d12e77fb953
Author: xbc5 <87829033+xbc5@users.noreply.github.com>
Date:   Thu Jul 14 10:49:46 2022 +0100

    use proper state name

commit a5474353d3cc9536d9aef9fe9c76d70bfe536947
Author: xbc5 <87829033+xbc5@users.noreply.github.com>
Date:   Thu Jul 14 10:33:02 2022 +0100

    install ALL GPG keys for DNF

commit bed1b80a659ca2a0f3bad05ad51c25cfdfdde2a6
Author: xbc5 <87829033+xbc5@users.noreply.github.com>
Date:   Thu Jul 14 10:12:39 2022 +0100

    create state
  • Loading branch information
xbc5 committed Jul 14, 2022
1 parent 1bf52c7 commit 9bbbae7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/salt/user_salt/states/dnf/core/admin.sls
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ dnf-plugins-core-installed:
pkg.installed:
- name: dnf-plugins-core

all-dnf-gpg-keys-installed:
pkg.installed:
- name: distribution-gpg-keys
22 changes: 22 additions & 0 deletions src/salt/user_salt/states/dnf/rpmfusion/templatevm.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
include:
- states.dnf.core.admin

rpmfusion-free-repo-installed:
cmd.run:
- watch_in:
- cmd: dnf-repo-protocol-set-to-https
- require:
- pkg: all-dnf-gpg-keys-installed
- runas: root
{# no --assumeyes because keys should already be installed and verified by requisite -#}
- name: dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm

rpmfusion-repo-enabled:
cmd.run:
- require:
- cmd: rpmfusion-free-repo-installed
- pkg: dnf-plugins-core-installed # config-manager is a plug-in
- runas: root
- name: |
dnf config-manager --set-enabled rpmfusion-free; \
dnf config-manager --set-enabled rpmfusion-free-updates
11 changes: 6 additions & 5 deletions src/salt/user_salt/tops/dnf.top
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
user:
dom0:
- states.dnf.core.admin # apply HTTPs to all repos (except unsupported qubes-os.org)
- states.dnf.core.dom0 # apply dom0 config file
- states.dnf.core.admin # apply HTTPs to all repos (except unsupported qubes-os.org)
- states.dnf.core.dom0 # apply dom0 config file
{{ pillar.template.name }}:
- states.dnf.core.templatevm # basic config, with plug-ins
- states.dnf.core.admin # apply HTTPs to all repos
- states.dnf.rawhide.admin # will apply HTTPs again if necessary
- states.dnf.core.templatevm # basic config, with plug-ins
- states.dnf.core.admin # apply HTTPs to all repos
- states.dnf.rawhide.admin # will apply HTTPs again if necessary
- states.dnf.rpmfusion.templatevm # only free

0 comments on commit 9bbbae7

Please sign in to comment.