mirror of
https://github.com/ben-grande/qusal.git
synced 2024-10-01 02:35:49 -04:00
fix: install salt depends in fedora-39-minimal
Fixes: https://github.com/ben-grande/qusal/issues/38
This commit is contained in:
parent
81bf77cabe
commit
cf88ad1ed4
@ -21,6 +21,7 @@ it.
|
||||
sudo qubesctl top.enable fedora-minimal
|
||||
sudo qubesctl --targets=fedora-39-minimal state.apply
|
||||
sudo qubesctl top.disable fedora-minimal
|
||||
sudo qubesctl state.apply fedora-minimal.prefs
|
||||
```
|
||||
|
||||
- State:
|
||||
@ -28,6 +29,7 @@ sudo qubesctl top.disable fedora-minimal
|
||||
```sh
|
||||
sudo qubesctl state.apply fedora-minimal.create
|
||||
sudo qubesctl --skip-dom0 --targets=fedora-39-minimal state.apply fedora-minimal.install
|
||||
sudo qubesctl state.apply fedora-minimal.prefs
|
||||
```
|
||||
<!-- pkg:end:post-install -->
|
||||
|
||||
|
@ -9,6 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
{%- import slsdotpath ~ "/template.jinja" as template -%}
|
||||
|
||||
include:
|
||||
- fedora.create
|
||||
- .clone
|
||||
|
||||
"dvm-{{ template.template }}-absent":
|
||||
@ -62,3 +63,22 @@ features:
|
||||
- menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop"
|
||||
{%- endload %}
|
||||
{{ load(defaults) }}
|
||||
|
||||
"{{ slsdotpath }}-set-management_dispvm-to-dvm-fedora":
|
||||
qvm.vm:
|
||||
- require:
|
||||
- qvm: dvm-fedora
|
||||
- name: {{ template.template }}
|
||||
- prefs:
|
||||
- management_dispvm: dvm-fedora
|
||||
|
||||
## TODO: Remove when template with patch reaches upstream or updates enforce
|
||||
## salt-deps to be installed.
|
||||
## https://github.com/QubesOS/qubes-issues/issues/8806
|
||||
"{{ slsdotpath }}-install-salt-deps":
|
||||
cmd.script:
|
||||
- require:
|
||||
- qvm: "{{ slsdotpath }}-set-management_dispvm-to-dvm-fedora"
|
||||
- name: salt-patch.sh
|
||||
- source: salt://fedora-minimal/files/admin/bin/salt-patch.sh
|
||||
- args: {{ template.template }}
|
||||
|
16
salt/fedora-minimal/files/admin/bin/salt-patch.sh
Executable file
16
salt/fedora-minimal/files/admin/bin/salt-patch.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
## SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
##
|
||||
## SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
## TODO: Remove when template with patch reaches upstream or updates enforce
|
||||
## salt-deps to be installed.
|
||||
## https://github.com/QubesOS/qubes-issues/issues/8806
|
||||
|
||||
set -eu
|
||||
|
||||
qube="${1}"
|
||||
qvm-run --user=root --pass-io --filter-escape-chars --no-color-output \
|
||||
--no-color-stderr "${qube}" -- \
|
||||
"dnf --quiet install --refresh --assumeyes --setopt=install_weak_deps=False python3-urllib3"
|
29
salt/fedora-minimal/prefs.sls
Normal file
29
salt/fedora-minimal/prefs.sls
Normal file
@ -0,0 +1,29 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
{%- import slsdotpath ~ "/template.jinja" as template -%}
|
||||
|
||||
include:
|
||||
- .create
|
||||
|
||||
"{{ slsdotpath }}-set-management_dispvm-to-default":
|
||||
qvm.vm:
|
||||
- require:
|
||||
- cmd: "{{ slsdotpath }}-install-salt-deps"
|
||||
- name: {{ template.template }}
|
||||
- prefs:
|
||||
- management_dispvm: "*default*"
|
||||
|
||||
## TODO: Remove when template with patch reaches upstream or updates enforce
|
||||
## salt-deps to be installed.
|
||||
## https://github.com/QubesOS/qubes-issues/issues/8806
|
||||
"{{ slsdotpath }}-shutdown-template":
|
||||
qvm.shutdown:
|
||||
- require:
|
||||
- qvm: "{{ slsdotpath }}-set-management_dispvm-to-default"
|
||||
- name: {{ template.template }}
|
||||
- flags:
|
||||
- force
|
10
salt/fedora-minimal/prefs.top
Normal file
10
salt/fedora-minimal/prefs.top
Normal file
@ -0,0 +1,10 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'dom0':
|
||||
- match: nodegroup
|
||||
- fedora-minimal.prefs
|
@ -9,12 +9,14 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
include:
|
||||
- fedora.create
|
||||
- .clone
|
||||
- fedora-minimal.prefs
|
||||
|
||||
{% load_yaml as defaults -%}
|
||||
name: tpl-{{ slsdotpath }}
|
||||
force: True
|
||||
require:
|
||||
- sls: {{ slsdotpath }}.clone
|
||||
- sls: fedora-minimal.prefs
|
||||
prefs:
|
||||
- audiovm: ""
|
||||
{%- endload %}
|
||||
@ -48,15 +50,20 @@ features:
|
||||
{{ load(defaults) }}
|
||||
|
||||
"{{ slsdotpath }}-set-management_dispvm-to-dvm-fedora":
|
||||
cmd.run:
|
||||
qvm.vm:
|
||||
- require:
|
||||
- qvm: dvm-fedora
|
||||
- name: qubes-prefs management_dispvm dvm-fedora
|
||||
- name: tpl-{{ slsdotpath }}
|
||||
- prefs:
|
||||
- management_dispvm: dvm-fedora
|
||||
|
||||
## TODO: Remove when template with patch reaches upstream.
|
||||
## TODO: Remove when template with patch reaches upstream or updates enforce
|
||||
## salt-deps to be installed.
|
||||
## https://github.com/QubesOS/qubes-issues/issues/8806
|
||||
"{{ slsdotpath }}-install-":
|
||||
cmd.run:
|
||||
"{{ slsdotpath }}-install-salt-deps":
|
||||
cmd.script:
|
||||
- require:
|
||||
- qvm: tpl-{{ slsdotpath }}
|
||||
- name: qvm-run -u root tpl-{{ slsdotpath }} -- dnf install --refresh --assumeyes --setopt=install_weak_deps=False python3-urllib3
|
||||
- qvm: "{{ slsdotpath }}-set-management_dispvm-to-dvm-fedora"
|
||||
- name: salt-patch.sh
|
||||
- source: salt://fedora-minimal/files/admin/bin/salt-patch.sh
|
||||
- args: tpl-{{ slsdotpath }}
|
||||
|
@ -1,10 +1,9 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'tpl-mgmt':
|
||||
- match: glob
|
||||
- mgmt.install
|
||||
|
@ -1,21 +1,33 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
"{{ slsdotpath }}-set-management_dispvm":
|
||||
cmd.run:
|
||||
- name: qubes-prefs management_dispvm dvm-{{ slsdotpath }}
|
||||
include:
|
||||
- .create
|
||||
|
||||
"{{ slsdotpath }}-set-management_dispvm-to-default":
|
||||
qvm.vm:
|
||||
- require:
|
||||
- cmd: "{{ slsdotpath }}-install-salt-deps"
|
||||
- name: tpl-{{ slsdotpath }}
|
||||
- prefs:
|
||||
- management_dispvm: "*default*"
|
||||
|
||||
"{{ slsdotpath }}-remove-default-mgmt-dvm":
|
||||
qvm.absent:
|
||||
- name: default-mgmt-dvm
|
||||
- require:
|
||||
- cmd: {{ slsdotpath }}-set-management_dispvm
|
||||
- qvm: {{ slsdotpath }}-set-management_dispvm-to-default
|
||||
- name: default-mgmt-dvm
|
||||
|
||||
## TODO: Remove when template with patch reaches upstream.
|
||||
## TODO: Remove when template with patch reaches upstream or updates enforce
|
||||
## salt-deps to be installed.
|
||||
## https://github.com/QubesOS/qubes-issues/issues/8806
|
||||
"{{ slsdotpath }}-shutdown-template":
|
||||
qvm.shutdown:
|
||||
- require:
|
||||
- qvm: "{{ slsdotpath }}-set-management_dispvm-to-default"
|
||||
- name: tpl-{{ slsdotpath }}
|
||||
- flags:
|
||||
- force
|
||||
|
@ -35,6 +35,7 @@ template.
|
||||
sudo qubesctl top.enable qubes-builder
|
||||
sudo qubesctl --targets=tpl-qubes-builder,dvm-qubes-builder,qubes-builder state.apply
|
||||
sudo qubesctl top.disable qubes-builder
|
||||
sudo qubesctl state.apply qubes-builder.prefs
|
||||
```
|
||||
|
||||
- State
|
||||
@ -42,6 +43,7 @@ sudo qubesctl top.disable qubes-builder
|
||||
```sh
|
||||
sudo qubesctl state.apply qubes-builder.create
|
||||
sudo qubesctl --skip-dom0 --targets=tpl-qubes-builder state.apply qubes-builder.install
|
||||
sudo qubesctl state.apply qubes-builder.prefs
|
||||
sudo qubesctl --skip-dom0 --targets=dvm-qubes-builder state.apply qubes-builder.configure-qubes-executor
|
||||
sudo qubesctl --skip-dom0 --targets=qubes-builder state.apply qubes-builder.configure
|
||||
```
|
||||
|
@ -8,12 +8,14 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
include:
|
||||
- .clone
|
||||
- fedora-minimal.prefs
|
||||
|
||||
{% load_yaml as defaults -%}
|
||||
name: tpl-{{ slsdotpath }}
|
||||
force: True
|
||||
require:
|
||||
- sls: {{ slsdotpath }}.clone
|
||||
- sls: fedora-minimal.prefs
|
||||
prefs:
|
||||
- audiovm: ""
|
||||
{%- endload %}
|
||||
@ -85,3 +87,22 @@ features:
|
||||
|
||||
{% from 'utils/macros/policy.sls' import policy_set with context -%}
|
||||
{{ policy_set(sls_path, '70') }}
|
||||
|
||||
"{{ slsdotpath }}-set-management_dispvm-to-dvm-fedora":
|
||||
qvm.vm:
|
||||
- require:
|
||||
- qvm: dvm-fedora
|
||||
- name: tpl-{{ slsdotpath }}
|
||||
- prefs:
|
||||
- management_dispvm: dvm-fedora
|
||||
|
||||
## TODO: Remove when template with patch reaches upstream or updates enforce
|
||||
## salt-deps to be installed.
|
||||
## https://github.com/QubesOS/qubes-issues/issues/8806
|
||||
"{{ slsdotpath }}-install-salt-deps":
|
||||
cmd.script:
|
||||
- require:
|
||||
- qvm: "{{ slsdotpath }}-set-management_dispvm-to-dvm-fedora"
|
||||
- name: salt-patch.sh
|
||||
- source: salt://fedora-minimal/files/admin/bin/salt-patch.sh
|
||||
- args: tpl-{{ slsdotpath }}
|
||||
|
27
salt/qubes-builder/prefs.sls
Normal file
27
salt/qubes-builder/prefs.sls
Normal file
@ -0,0 +1,27 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
include:
|
||||
- .create
|
||||
|
||||
"{{ slsdotpath }}-set-management_dispvm-to-default":
|
||||
qvm.vm:
|
||||
- require:
|
||||
- cmd: "{{ slsdotpath }}-install-salt-deps"
|
||||
- name: tpl-{{ slsdotpath }}
|
||||
- prefs:
|
||||
- management_dispvm: "*default*"
|
||||
|
||||
## TODO: Remove when template with patch reaches upstream or updates enforce
|
||||
## salt-deps to be installed.
|
||||
## https://github.com/QubesOS/qubes-issues/issues/8806
|
||||
"{{ slsdotpath }}-shutdown-template":
|
||||
qvm.shutdown:
|
||||
- require:
|
||||
- qvm: "{{ slsdotpath }}-set-management_dispvm-to-default"
|
||||
- name: tpl-{{ slsdotpath }}
|
||||
- flags:
|
||||
- force
|
10
salt/qubes-builder/prefs.top
Normal file
10
salt/qubes-builder/prefs.top
Normal file
@ -0,0 +1,10 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'dom0':
|
||||
- match: nodegroup
|
||||
- qubes-builder.prefs
|
Loading…
Reference in New Issue
Block a user