mirror of
https://github.com/ben-grande/qusal.git
synced 2024-12-24 23:19:37 -05: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 top.enable fedora-minimal
|
||||||
sudo qubesctl --targets=fedora-39-minimal state.apply
|
sudo qubesctl --targets=fedora-39-minimal state.apply
|
||||||
sudo qubesctl top.disable fedora-minimal
|
sudo qubesctl top.disable fedora-minimal
|
||||||
|
sudo qubesctl state.apply fedora-minimal.prefs
|
||||||
```
|
```
|
||||||
|
|
||||||
- State:
|
- State:
|
||||||
@ -28,6 +29,7 @@ sudo qubesctl top.disable fedora-minimal
|
|||||||
```sh
|
```sh
|
||||||
sudo qubesctl state.apply fedora-minimal.create
|
sudo qubesctl state.apply fedora-minimal.create
|
||||||
sudo qubesctl --skip-dom0 --targets=fedora-39-minimal state.apply fedora-minimal.install
|
sudo qubesctl --skip-dom0 --targets=fedora-39-minimal state.apply fedora-minimal.install
|
||||||
|
sudo qubesctl state.apply fedora-minimal.prefs
|
||||||
```
|
```
|
||||||
<!-- pkg:end:post-install -->
|
<!-- pkg:end:post-install -->
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
|||||||
{%- import slsdotpath ~ "/template.jinja" as template -%}
|
{%- import slsdotpath ~ "/template.jinja" as template -%}
|
||||||
|
|
||||||
include:
|
include:
|
||||||
|
- fedora.create
|
||||||
- .clone
|
- .clone
|
||||||
|
|
||||||
"dvm-{{ template.template }}-absent":
|
"dvm-{{ template.template }}-absent":
|
||||||
@ -62,3 +63,22 @@ features:
|
|||||||
- menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop"
|
- menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop"
|
||||||
{%- endload %}
|
{%- endload %}
|
||||||
{{ load(defaults) }}
|
{{ 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:
|
include:
|
||||||
- fedora.create
|
- fedora.create
|
||||||
- .clone
|
- .clone
|
||||||
|
- fedora-minimal.prefs
|
||||||
|
|
||||||
{% load_yaml as defaults -%}
|
{% load_yaml as defaults -%}
|
||||||
name: tpl-{{ slsdotpath }}
|
name: tpl-{{ slsdotpath }}
|
||||||
force: True
|
force: True
|
||||||
require:
|
require:
|
||||||
- sls: {{ slsdotpath }}.clone
|
- sls: {{ slsdotpath }}.clone
|
||||||
|
- sls: fedora-minimal.prefs
|
||||||
prefs:
|
prefs:
|
||||||
- audiovm: ""
|
- audiovm: ""
|
||||||
{%- endload %}
|
{%- endload %}
|
||||||
@ -48,15 +50,20 @@ features:
|
|||||||
{{ load(defaults) }}
|
{{ load(defaults) }}
|
||||||
|
|
||||||
"{{ slsdotpath }}-set-management_dispvm-to-dvm-fedora":
|
"{{ slsdotpath }}-set-management_dispvm-to-dvm-fedora":
|
||||||
cmd.run:
|
qvm.vm:
|
||||||
- require:
|
- require:
|
||||||
- qvm: dvm-fedora
|
- 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
|
## https://github.com/QubesOS/qubes-issues/issues/8806
|
||||||
"{{ slsdotpath }}-install-":
|
"{{ slsdotpath }}-install-salt-deps":
|
||||||
cmd.run:
|
cmd.script:
|
||||||
- require:
|
- require:
|
||||||
- qvm: tpl-{{ slsdotpath }}
|
- qvm: "{{ slsdotpath }}-set-management_dispvm-to-dvm-fedora"
|
||||||
- name: qvm-run -u root tpl-{{ slsdotpath }} -- dnf install --refresh --assumeyes --setopt=install_weak_deps=False python3-urllib3
|
- 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
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
#}
|
#}
|
||||||
|
|
||||||
base:
|
base:
|
||||||
'tpl-mgmt':
|
'tpl-mgmt':
|
||||||
- match: glob
|
|
||||||
- mgmt.install
|
- 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
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
#}
|
#}
|
||||||
|
|
||||||
"{{ slsdotpath }}-set-management_dispvm":
|
include:
|
||||||
cmd.run:
|
- .create
|
||||||
- name: qubes-prefs management_dispvm dvm-{{ slsdotpath }}
|
|
||||||
|
"{{ 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":
|
"{{ slsdotpath }}-remove-default-mgmt-dvm":
|
||||||
qvm.absent:
|
qvm.absent:
|
||||||
- name: default-mgmt-dvm
|
|
||||||
- require:
|
- 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
|
## https://github.com/QubesOS/qubes-issues/issues/8806
|
||||||
"{{ slsdotpath }}-shutdown-template":
|
"{{ slsdotpath }}-shutdown-template":
|
||||||
qvm.shutdown:
|
qvm.shutdown:
|
||||||
|
- require:
|
||||||
|
- qvm: "{{ slsdotpath }}-set-management_dispvm-to-default"
|
||||||
- name: tpl-{{ slsdotpath }}
|
- name: tpl-{{ slsdotpath }}
|
||||||
|
- flags:
|
||||||
|
- force
|
||||||
|
@ -35,6 +35,7 @@ template.
|
|||||||
sudo qubesctl top.enable qubes-builder
|
sudo qubesctl top.enable qubes-builder
|
||||||
sudo qubesctl --targets=tpl-qubes-builder,dvm-qubes-builder,qubes-builder state.apply
|
sudo qubesctl --targets=tpl-qubes-builder,dvm-qubes-builder,qubes-builder state.apply
|
||||||
sudo qubesctl top.disable qubes-builder
|
sudo qubesctl top.disable qubes-builder
|
||||||
|
sudo qubesctl state.apply qubes-builder.prefs
|
||||||
```
|
```
|
||||||
|
|
||||||
- State
|
- State
|
||||||
@ -42,6 +43,7 @@ sudo qubesctl top.disable qubes-builder
|
|||||||
```sh
|
```sh
|
||||||
sudo qubesctl state.apply qubes-builder.create
|
sudo qubesctl state.apply qubes-builder.create
|
||||||
sudo qubesctl --skip-dom0 --targets=tpl-qubes-builder state.apply qubes-builder.install
|
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=dvm-qubes-builder state.apply qubes-builder.configure-qubes-executor
|
||||||
sudo qubesctl --skip-dom0 --targets=qubes-builder state.apply qubes-builder.configure
|
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:
|
include:
|
||||||
- .clone
|
- .clone
|
||||||
|
- fedora-minimal.prefs
|
||||||
|
|
||||||
{% load_yaml as defaults -%}
|
{% load_yaml as defaults -%}
|
||||||
name: tpl-{{ slsdotpath }}
|
name: tpl-{{ slsdotpath }}
|
||||||
force: True
|
force: True
|
||||||
require:
|
require:
|
||||||
- sls: {{ slsdotpath }}.clone
|
- sls: {{ slsdotpath }}.clone
|
||||||
|
- sls: fedora-minimal.prefs
|
||||||
prefs:
|
prefs:
|
||||||
- audiovm: ""
|
- audiovm: ""
|
||||||
{%- endload %}
|
{%- endload %}
|
||||||
@ -85,3 +87,22 @@ features:
|
|||||||
|
|
||||||
{% from 'utils/macros/policy.sls' import policy_set with context -%}
|
{% from 'utils/macros/policy.sls' import policy_set with context -%}
|
||||||
{{ policy_set(sls_path, '70') }}
|
{{ 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