From 453ef99617e3ac24fc67093688e9f8eaaa34e731 Mon Sep 17 00:00:00 2001 From: Ben Grande Date: Mon, 6 Nov 2023 13:32:11 +0000 Subject: [PATCH] A --- README.md | 4 +++ qusal/browser/install-chrome.sls | 10 ------- qusal/docker/install-repo.sls | 46 -------------------------------- qusal/docker/install.sls | 4 +-- qusal/reader/create.sls | 4 +-- scripts/salt-lint.sh | 4 +-- scripts/shell-lint.sh | 9 +++++-- 7 files changed, 17 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index 485557d..4f54767 100644 --- a/README.md +++ b/README.md @@ -127,3 +127,7 @@ You can also check these information manually by looking in the file header, a companion `.license` file or in `.reuse/dep5`. All licenses are present in the LICENSES directory. + +Note that submodules have their own licenses and copyrights statements, please +check each one individually using the same methods described above for a full +statement. diff --git a/qusal/browser/install-chrome.sls b/qusal/browser/install-chrome.sls index 9184f80..7712e28 100644 --- a/qusal/browser/install-chrome.sls +++ b/qusal/browser/install-chrome.sls @@ -12,16 +12,6 @@ include: {% from 'utils/macros/install-repo.sls' import install_repo -%} {{ install_repo(sls_path, 'chrome') }} -{# -"{{ slsdotpath }}-google-chrome-repo": - pkgrepo.managed: - - name: deb [signed-by=/usr/share/keyrings/chrome.asc] http://dl.google.com/linux/chrome/deb/ - - dist: {{ grains.get['oscodename'] }} - - comps: main - - key_url: salt://{{ slsdotpath }}/files/repo/chrome.asc - - file: /etc/apt/sources.list.d/chrome.list -#} - "{{ slsdotpath }}-avoid-chrome-installing-own-repo": file.touch: - name: /etc/default/google-chrome diff --git a/qusal/docker/install-repo.sls b/qusal/docker/install-repo.sls index 213f8ba..f4770b0 100644 --- a/qusal/docker/install-repo.sls +++ b/qusal/docker/install-repo.sls @@ -9,50 +9,4 @@ SPDX-License-Identifier: GPL-3.0-or-later {% from 'utils/macros/install-repo.sls' import install_repo -%} {{ install_repo(sls_path, 'docker') }} -"{{ slsdotpath }}-updated": - pkg.uptodate: - - refresh: True - -{% set pkg = { - 'Debian': { - 'pkg_removed': ['docker.io', 'docker-doc', 'docker-compose', - 'podman-docker', 'containerd', 'runc'], - }, - 'RedHat': { - 'pkg_removed': ['docker', 'docker-client', 'docker-client-latest', - 'docker-common', 'docker-latest', - 'docker-latest-logrotate', 'docker-logrotate', - 'docker-selinux', 'docker-engine-selinux', - 'docker-engine'], - }, -}.get(grains.os_family) -%} - -{# -"{{ slsdotpath }}-removed-os-specific": - pkg.removed: - - pkgs: {{ pkg.pkg_removed|sequence|yaml }} -#} - -"{{ slsdotpath }}-installed": - pkg.installed: - - refresh: True - - install_recommends: False - - skip_suggestions: True - - pkgs: - - qubes-core-agent-networking - - man-db - - docker-ce - - docker-ce-cli - - containerd.io - - docker-buildx-plugin - - docker-compose-plugin - -"{{ slsdotpath }}-user-in-docker-group": - user.present: - - name: user - - groups: - - user - - qubes - - docker - {% endif -%} diff --git a/qusal/docker/install.sls b/qusal/docker/install.sls index 213f8ba..5b19cca 100644 --- a/qusal/docker/install.sls +++ b/qusal/docker/install.sls @@ -6,8 +6,8 @@ SPDX-License-Identifier: GPL-3.0-or-later {% if grains['nodename'] != 'dom0' -%} -{% from 'utils/macros/install-repo.sls' import install_repo -%} -{{ install_repo(sls_path, 'docker') }} +include: + - docker.install-repo "{{ slsdotpath }}-updated": pkg.uptodate: diff --git a/qusal/reader/create.sls b/qusal/reader/create.sls index 91b3332..8b7e714 100644 --- a/qusal/reader/create.sls +++ b/qusal/reader/create.sls @@ -20,8 +20,8 @@ prefs: - maxmem: 2000 features: - set: - - default-menu-items: "firefox-esr.desktop chromium.desktop google-chrome.desktop qubes-run-terminal.desktop qubes-start.desktop libreoffice-base.desktop libreoffice-calc.desktop libreoffice-draw.desktop libreoffice-impress.desktop libreoffice-math.desktop libreoffice-startcenter.desktop libreoffice-writer.desktop org.gnome.Evince.desktop qubes-open-file-manager.desktop" - - menu-items: "firefox-esr.desktop chromium.desktop google-chrome.desktop qubes-run-terminal.desktop qubes-start.desktop libreoffice-base.desktop libreoffice-calc.desktop libreoffice-draw.desktop libreoffice-impress.desktop libreoffice-math.desktop libreoffice-startcenter.desktop libreoffice-writer.desktop org.gnome.Evince.desktop qubes-open-file-manager.desktop" + - default-menu-items: "firefox-esr.desktop chromium.desktop google-chrome.desktop qubes-run-terminal.desktop qubes-start.desktop libreoffice-base.desktop libreoffice-calc.desktop libreoffice-draw.desktop libreoffice-impress.desktop libreoffice-math.desktop libreoffice-startcenter.desktop libreoffice-writer.desktop org.gnome.Evince.desktop qubes-open-file-manager.desktop" # noqa: 204 + - menu-items: "firefox-esr.desktop chromium.desktop google-chrome.desktop qubes-run-terminal.desktop qubes-start.desktop libreoffice-base.desktop libreoffice-calc.desktop libreoffice-draw.desktop libreoffice-impress.desktop libreoffice-math.desktop libreoffice-startcenter.desktop libreoffice-writer.desktop org.gnome.Evince.desktop qubes-open-file-manager.desktop" # noqa: 204 {%- endload %} {{ load(defaults) }} diff --git a/scripts/salt-lint.sh b/scripts/salt-lint.sh index 11fc8bf..8cf444d 100755 --- a/scripts/salt-lint.sh +++ b/scripts/salt-lint.sh @@ -25,8 +25,8 @@ elif command -v fdfind >/dev/null; then fi case "${find_tool}" in - fd|fdfind) files="minion.d/qusal.conf $(${find_tool} . qusal/ --max-depth=1 --type=f --extension=sls --extension=top)";; - find) files="minion.d/qusal.conf $(find qusal/* -maxdepth 1 -type f \( -name '*.sls' -o -name '*.top' \))";; + fd|fdfind) files="minion.d/qusal.conf $(${find_tool} . qusal/ --max-depth=2 --type=f --extension=sls --extension=top)";; + find) files="minion.d/qusal.conf $(find qusal/* -maxdepth 2 -type f \( -name '*.sls' -o -name '*.top' \))";; esac salt-lint ${conf} ${files} diff --git a/scripts/shell-lint.sh b/scripts/shell-lint.sh index a7d5a65..f7915a3 100755 --- a/scripts/shell-lint.sh +++ b/scripts/shell-lint.sh @@ -33,14 +33,19 @@ case "${find_tool}" in --exec sh -c ' case $( file -bi "$1" ) in (*/x-shellscript*) printf "%s\n" "$1";; esac' sh)" - files="${files} $(${find_tool} . --max-depth=1 --type=f --extension=sh)" + ## No Shebang + sh_files="$(${find_tool} rc.local qusal/ --type=f)" ;; find) files="$(find scripts/ "${group}"/ -not \( -path "*/zsh" -prune \) -type f -exec sh -c ' case $( file -bi "$1" ) in (*/x-shellscript*) exit 0;; esac exit 1' sh {} \; -print)" - files="${files} $(find . -maxdepth 1 -type f -name "*.sh")" + ## No Shebang + sh_files="$(find "${group}"/ -type f -name "rc.local")" ;; esac +files="$(echo "$files" | sort -u)" +sh_files="$(echo "$sh_files" | sort -u)" shellcheck ${files} +shellcheck -s sh ${sh_files}