diff --git a/salt/electrum/configure-builder.sls b/salt/electrum/configure-builder.sls index 2ff85d0..9e12976 100644 --- a/salt/electrum/configure-builder.sls +++ b/salt/electrum/configure-builder.sls @@ -44,10 +44,9 @@ include: cmd.run: - require: - file: "{{ slsdotpath }}-save-keys" - - name: gpg --status-fd=2 --homedir . --import download/*.asc + - name: gpg --homedir . --import download/*.asc - cwd: /home/user/.gnupg/electrum - runas: user - - success_stderr: IMPORT_OK "{{ slsdotpath }}-import-ownertrust": cmd.run: diff --git a/salt/mirage-builder/configure.sls b/salt/mirage-builder/configure.sls index 9327777..b3ba374 100644 --- a/salt/mirage-builder/configure.sls +++ b/salt/mirage-builder/configure.sls @@ -1,5 +1,5 @@ {# -SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. +SPDX-FileCopyrightText: 2023 - 2025 Benjamin Grande M. S. SPDX-License-Identifier: AGPL-3.0-or-later #} @@ -55,10 +55,9 @@ include: cmd.run: - require: - file: "{{ slsdotpath }}-save-keys" - - name: gpg --status-fd=2 --homedir . --import download/*.asc + - name: gpg --homedir . --import download/*.asc - cwd: /home/user/.gnupg/mirage-firewall - runas: user - - success_stderr: IMPORT_OK "{{ slsdotpath }}-import-ownertrust": cmd.run: diff --git a/salt/qubes-builder/configure-qusal.sls b/salt/qubes-builder/configure-qusal.sls index ca295c8..98cf7ca 100644 --- a/salt/qubes-builder/configure-qusal.sls +++ b/salt/qubes-builder/configure-qusal.sls @@ -1,5 +1,5 @@ {# -SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. +SPDX-FileCopyrightText: 2023 - 2025 Benjamin Grande M. S. SPDX-License-Identifier: AGPL-3.0-or-later #} @@ -53,10 +53,9 @@ include: cmd.run: - require: - file: "{{ slsdotpath }}-qusal-save-keys" - - name: gpg --status-fd=2 --homedir . --import download/*.asc + - name: gpg --homedir . --import download/*.asc - cwd: /home/user/.gnupg/qusal-builder - runas: user - - success_stderr: IMPORT_OK "{{ slsdotpath }}-qusal-import-ownertrust": cmd.run: diff --git a/salt/qubes-builder/configure.sls b/salt/qubes-builder/configure.sls index 3589b80..e9bb3f7 100644 --- a/salt/qubes-builder/configure.sls +++ b/salt/qubes-builder/configure.sls @@ -1,5 +1,5 @@ {# -SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. +SPDX-FileCopyrightText: 2023 - 2025 Benjamin Grande M. S. SPDX-License-Identifier: AGPL-3.0-or-later #} @@ -46,10 +46,9 @@ include: cmd.run: - require: - file: "{{ slsdotpath }}-save-keys" - - name: gpg --status-fd=2 --homedir . --import download/*.asc + - name: gpg --homedir . --import download/*.asc - cwd: /home/user/.gnupg/qubes-builder - runas: user - - success_stderr: IMPORT_OK "{{ slsdotpath }}-import-ownertrust": cmd.run: diff --git a/salt/sys-bitcoin/configure-builder-common.sls b/salt/sys-bitcoin/configure-builder-common.sls index 32894da..0975e62 100644 --- a/salt/sys-bitcoin/configure-builder-common.sls +++ b/salt/sys-bitcoin/configure-builder-common.sls @@ -1,5 +1,5 @@ {# -SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. +SPDX-FileCopyrightText: 2024 - 2025 Benjamin Grande M. S. SPDX-License-Identifier: AGPL-3.0-or-later #} @@ -35,10 +35,9 @@ include: cmd.run: - require: - file: "{{ slsdotpath }}-save-keys" - - name: gpg --status-fd=2 --homedir . --import download/*.asc + - name: gpg --homedir . --import download/*.asc - cwd: /home/user/.gnupg/bitcoin - runas: user - - success_stderr: IMPORT_OK "{{ slsdotpath }}-import-ownertrust": cmd.run: diff --git a/salt/sys-electrs/configure-builder-source.sls b/salt/sys-electrs/configure-builder-source.sls index 9ed492c..1ecffbe 100644 --- a/salt/sys-electrs/configure-builder-source.sls +++ b/salt/sys-electrs/configure-builder-source.sls @@ -54,10 +54,9 @@ include: cmd.run: - require: - file: "{{ slsdotpath }}-source-save-keys" - - name: gpg --status-fd=2 --homedir . --import download/*.asc + - name: gpg --homedir . --import download/*.asc - cwd: /home/user/.gnupg/electrs - runas: user - - success_stderr: IMPORT_OK "{{ slsdotpath }}-source-import-ownertrust": cmd.run: diff --git a/salt/sys-electrumx/configure-builder.sls b/salt/sys-electrumx/configure-builder.sls index 6e3ab02..0e4ec63 100644 --- a/salt/sys-electrumx/configure-builder.sls +++ b/salt/sys-electrumx/configure-builder.sls @@ -1,5 +1,5 @@ {# -SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. +SPDX-FileCopyrightText: 2024 - 2025 Benjamin Grande M. S. SPDX-License-Identifier: AGPL-3.0-or-later #} @@ -58,10 +58,9 @@ include: cmd.run: - require: - file: "{{ slsdotpath }}-save-keys" - - name: gpg --status-fd=2 --homedir . --import download/*.asc + - name: gpg --homedir . --import download/*.asc - cwd: /home/user/.gnupg/electrumx - runas: user - - success_stderr: IMPORT_OK "{{ slsdotpath }}-import-ownertrust": cmd.run: diff --git a/salt/sys-pihole/install.sls b/salt/sys-pihole/install.sls index 3f8da26..13f41f3 100644 --- a/salt/sys-pihole/install.sls +++ b/salt/sys-pihole/install.sls @@ -107,10 +107,9 @@ include: cmd.run: - require: - file: "{{ slsdotpath }}-save-keys" - - name: gpg --status-fd=2 --homedir . --import download/*.asc + - name: gpg --homedir . --import download/*.asc - cwd: /root/.gnupg/pihole - runas: root - - success_stderr: IMPORT_OK "{{ slsdotpath }}-import-ownertrust": cmd.run: diff --git a/scripts/commit-verify.sh b/scripts/commit-verify.sh index 7573390..1860249 100755 --- a/scripts/commit-verify.sh +++ b/scripts/commit-verify.sh @@ -1,6 +1,6 @@ #!/bin/sh -## SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. +## SPDX-FileCopyrightText: 2024 - 2025 Benjamin Grande M. S. ## ## SPDX-License-Identifier: AGPL-3.0-or-later @@ -46,20 +46,17 @@ gpg_homedir="$(mktemp -d)" trap 'rm -rf -- "${gpg_homedir}"' EXIT INT HUP QUIT ABRT export GNUPGHOME="${gpg_homedir}" otrust="${gpg_homedir}/otrust.txt" -gpg_agent="$(gpgconf --list-components | awk -F: '/^gpg-agent:/{print $3}')" -gpg_cmd="gpg --status-fd=2" -${gpg_cmd} --agent-program "${gpg_agent}" \ - --import "${key_dir}"/*"${key_suffix}" >/dev/null 2>&1 +gpg --import "${key_dir}"/*"${key_suffix}" >/dev/null 2>&1 -${gpg_cmd} --with-colons --list-public-keys | awk -F ':' '{ +gpg --with-colons --list-public-keys | awk -F ':' '{ if (prev_line ~ /^pub$/ && $1 ~ /^fpr$/) { print $10 ":6:" } prev_line = $1 }' | tee -- "${otrust}" >/dev/null -${gpg_cmd} --import-ownertrust "${otrust}" >/dev/null 2>&1 +gpg --import-ownertrust "${otrust}" >/dev/null 2>&1 fail="0"