mirror of
https://github.com/ben-grande/qusal.git
synced 2025-08-03 19:54:12 -04:00
refactor: initial commit
This commit is contained in:
commit
5eebd789ed
591 changed files with 18598 additions and 0 deletions
29
salt/utils/tools/builder/README.md
Normal file
29
salt/utils/tools/builder/README.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
# builder
|
||||
|
||||
Build tools for packaging in Qubes OS.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Description](#description)
|
||||
* [Installation](#installation)
|
||||
* [Usage](#usage)
|
||||
|
||||
## Description
|
||||
|
||||
This is not necessary for qubes-builder, it is just a set of useful tools for
|
||||
building packages in UNIX distributions.
|
||||
|
||||
## Installation
|
||||
|
||||
Install builder tools on templates:
|
||||
```sh
|
||||
qubesctl --skip-dom0 --targets=TEMPLATEVMS state.apply utils.tools.builder.core
|
||||
```
|
||||
Install documentation tools on templates:
|
||||
```sh
|
||||
qubesctl --skip-dom0 --targets=TEMPLATEVMS state.apply utils.tools.builder.doc
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Standard builder usage, no extra configuration required.
|
46
salt/utils/tools/builder/core.sls
Normal file
46
salt/utils/tools/builder/core.sls
Normal file
|
@ -0,0 +1,46 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
{% if grains['nodename'] != 'dom0' -%}
|
||||
|
||||
"{{ slsdotpath }}-core-updated":
|
||||
pkg.uptodate:
|
||||
- refresh: True
|
||||
|
||||
"{{ slsdotpath }}-core-installed":
|
||||
pkg.installed:
|
||||
- refresh: True
|
||||
- install_recommends: False
|
||||
- skip_suggestions: True
|
||||
- pkgs:
|
||||
- qubes-core-agent-networking
|
||||
- qubes-core-agent-passwordless-root
|
||||
- bash-completion
|
||||
- make
|
||||
- rpmlint
|
||||
- rpm
|
||||
- licensecheck
|
||||
- devscripts
|
||||
|
||||
{% set pkg = {
|
||||
'Debian': {
|
||||
'pkg': ['equivs', 'dctrl-tools', 'build-essential' 'debhelper', 'quilt',
|
||||
'lintian', 'mmdebstrap'],
|
||||
},
|
||||
'RedHat': {
|
||||
'pkg': ['rpmdevtools', 'rpm-sign', 'rpm-build', 'fedora-packager',
|
||||
'fedora-review'],
|
||||
},
|
||||
}.get(grains.os_family) -%}
|
||||
|
||||
"{{ slsdotpath }}-core-installed-os-specific":
|
||||
pkg.installed:
|
||||
- refresh: True
|
||||
- install_recommends: False
|
||||
- skip_suggestions: True
|
||||
- pkgs: {{ pkg.pkg|sequence|yaml }}
|
||||
|
||||
{% endif -%}
|
25
salt/utils/tools/builder/doc.sls
Normal file
25
salt/utils/tools/builder/doc.sls
Normal file
|
@ -0,0 +1,25 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
{% if grains['nodename'] != 'dom0' -%}
|
||||
|
||||
"{{ slsdotpath }}-doc-updated":
|
||||
pkg.uptodate:
|
||||
- refresh: True
|
||||
|
||||
"{{ slsdotpath }}-doc-installed":
|
||||
pkg.installed:
|
||||
- refresh: True
|
||||
- install_recommends: False
|
||||
- skip_suggestions: True
|
||||
- pkgs:
|
||||
- pandoc
|
||||
- ronn
|
||||
- groff
|
||||
- man-db
|
||||
- less
|
||||
|
||||
{% endif -%}
|
35
salt/utils/tools/zsh/README.md
Normal file
35
salt/utils/tools/zsh/README.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# zsh
|
||||
|
||||
Zsh environment in Qubes OS.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Description](#description)
|
||||
* [Installation](#installation)
|
||||
* [Usage](#usage)
|
||||
|
||||
## Description
|
||||
|
||||
Install Zsh, setup it to be the user shell and touch ~/.zshrc to avoid
|
||||
warnings.
|
||||
|
||||
## Installation
|
||||
|
||||
- Top
|
||||
```sh
|
||||
qubesctl top.enable utils.tools.zsh
|
||||
qubesctl --targets=TARGET state.apply
|
||||
qubesctl top.disable utils.tools.zsh
|
||||
```
|
||||
|
||||
- State
|
||||
<!-- pkg:begin:post-install -->
|
||||
```sh
|
||||
qubesctl --skip-dom0 --targets=TEMPLATEVMS state.apply utils.tools.zsh.change-shell
|
||||
qubesctl --skip-dom0 --targets=APPVMS state.apply utils.tools.zsh.touch-zshrc
|
||||
```
|
||||
<!-- pkg:end:post-install -->
|
||||
|
||||
## Usage
|
||||
|
||||
Standard Zsh usage. No extra configuration required.
|
20
salt/utils/tools/zsh/change-shell.sls
Normal file
20
salt/utils/tools/zsh/change-shell.sls
Normal file
|
@ -0,0 +1,20 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
{% if grains['nodename'] != 'dom0' -%}
|
||||
|
||||
include:
|
||||
- .install
|
||||
|
||||
## chsh is not in Fedora and usermod covers a wider range.
|
||||
"{{ slsdotpath }}-change-user-shell-to-zsh":
|
||||
cmd.run:
|
||||
- name: usermod -s /bin/zsh user
|
||||
- runas: root
|
||||
- require:
|
||||
- sls: {{ slsdotpath }}.install
|
||||
|
||||
{% endif -%}
|
9
salt/utils/tools/zsh/change-shell.top
Normal file
9
salt/utils/tools/zsh/change-shell.top
Normal file
|
@ -0,0 +1,9 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'*':
|
||||
- utils.tools.zsh.change-shell
|
10
salt/utils/tools/zsh/init.sls
Normal file
10
salt/utils/tools/zsh/init.sls
Normal file
|
@ -0,0 +1,10 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
include:
|
||||
- .install
|
||||
- .touch-zshrc
|
||||
- .change-shell
|
11
salt/utils/tools/zsh/init.top
Normal file
11
salt/utils/tools/zsh/init.top
Normal file
|
@ -0,0 +1,11 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'*':
|
||||
- utils.tools.zsh.touch-zshrc
|
||||
- utils.tools.zsh.install
|
||||
- utils.tools.zsh.change-shell
|
26
salt/utils/tools/zsh/install.sls
Normal file
26
salt/utils/tools/zsh/install.sls
Normal file
|
@ -0,0 +1,26 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
{% if grains['nodename'] != 'dom0' -%}
|
||||
|
||||
include:
|
||||
- .touch-zshrc
|
||||
|
||||
"{{ slsdotpath }}-updated":
|
||||
pkg.uptodate:
|
||||
- refresh: True
|
||||
|
||||
"{{ slsdotpath }}-installed":
|
||||
pkg.installed:
|
||||
- refresh: True
|
||||
- install_recommends: False
|
||||
- skip_suggestions: True
|
||||
- pkgs:
|
||||
- zsh
|
||||
- zsh-autosuggestions
|
||||
- zsh-syntax-highlighting
|
||||
|
||||
{% endif -%}
|
9
salt/utils/tools/zsh/install.top
Normal file
9
salt/utils/tools/zsh/install.top
Normal file
|
@ -0,0 +1,9 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'*':
|
||||
- utils.tools.zsh.install
|
16
salt/utils/tools/zsh/touch-zshrc.sls
Normal file
16
salt/utils/tools/zsh/touch-zshrc.sls
Normal file
|
@ -0,0 +1,16 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
# zsh complains if there is no .zshrc when.
|
||||
# Only useful if not using the dotfiles but installing zsh.
|
||||
|
||||
"{{ slsdotpath }}-touch-home-zshrc":
|
||||
file.touch:
|
||||
- name: /home/user/.zshrc
|
||||
|
||||
"{{ slsdotpath }}-touch-skel-zshrc":
|
||||
file.touch:
|
||||
- name: /etc/skel/.zshrc
|
9
salt/utils/tools/zsh/touch-zshrc.top
Normal file
9
salt/utils/tools/zsh/touch-zshrc.top
Normal file
|
@ -0,0 +1,9 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'*':
|
||||
- utils.tools.zsh.touch-zshrc
|
Loading…
Add table
Add a link
Reference in a new issue