From aa6a0c2a4575ac60c050deceb8a9272bb7c95f14 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Tue, 4 Feb 2025 17:36:01 +0100 Subject: chore(treewide): Add License via reuse --- .envrc | 12 +++++- .gitignore | 10 +++++ .reuse/templates/default.jinja2 | 12 ++++++ README.md | 16 +++++++- flake.lock.license | 9 +++++ flake.nix | 9 +++++ scripts/mk_key.sh | 45 +++++++++++++--------- .../hu/bopqzgiaibk5g9s434j77phzb91hqmxb.license | 9 +++++ .../openpgpkey/b-peetz.de/hu/policy.license | 9 +++++ .../openpgpkey/s-schoeffel.de/hu/policy.license | 9 +++++ ...nx9k7iihjcuk6h7tc7u6qtuu@s-schoeffel.de.license | 9 +++++ ...sfxbue8h8afysdecgty3f5pfx4wcmt6@sils.li.license | 9 +++++ .../openpgpkey/sils.li/hu/policy.license | 9 +++++ ...fxbue8h8afysdecgty3f5pfx4wcmt6@vhack.eu.license | 9 +++++ .../openpgpkey/vhack.eu/hu/policy.license | 9 +++++ stored_keys.md | 12 ++++++ treefmt.nix | 9 +++++ update.sh | 10 +++++ 18 files changed, 195 insertions(+), 21 deletions(-) create mode 100644 flake.lock.license create mode 100644 src/.well-known/openpgpkey/b-peetz.de/hu/bopqzgiaibk5g9s434j77phzb91hqmxb.license create mode 100644 src/.well-known/openpgpkey/b-peetz.de/hu/policy.license create mode 100644 src/.well-known/openpgpkey/s-schoeffel.de/hu/policy.license create mode 100644 src/.well-known/openpgpkey/s-schoeffel.de/hu/zuwf9qt9nx9k7iihjcuk6h7tc7u6qtuu@s-schoeffel.de.license create mode 100644 src/.well-known/openpgpkey/sils.li/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@sils.li.license create mode 100644 src/.well-known/openpgpkey/sils.li/hu/policy.license create mode 100644 src/.well-known/openpgpkey/vhack.eu/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@vhack.eu.license create mode 100644 src/.well-known/openpgpkey/vhack.eu/hu/policy.license diff --git a/.envrc b/.envrc index 0f36b0a..f051440 100644 --- a/.envrc +++ b/.envrc @@ -1,10 +1,20 @@ #! /usr/bin/env sh +# pgp-wkd - A web key directory for pgp-keys +# +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: CC-BY-SA-4.0 +# +# This file is part of pgp-wkd. +# +# You should have received a copy of the License along with this program. +# If not, see . + use flake || use nix watch_file flake.nix PATH_add ./scripts if on_git_branch; then - echo && git status --short --branch + echo && git status --short --branch fi diff --git a/.gitignore b/.gitignore index b50689b..e7a3233 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,13 @@ +# pgp-wkd - A web key directory for pgp-keys +# +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: CC-BY-SA-4.0 +# +# This file is part of pgp-wkd. +# +# You should have received a copy of the License along with this program. +# If not, see . + # build /result diff --git a/.reuse/templates/default.jinja2 b/.reuse/templates/default.jinja2 index 906bd21..7e7162a 100644 --- a/.reuse/templates/default.jinja2 +++ b/.reuse/templates/default.jinja2 @@ -1,3 +1,15 @@ +{# +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see . +#} + pgp-wkd - A web key directory for pgp-keys {% for copyright_line in copyright_lines %} diff --git a/README.md b/README.md index 486eafc..00f2826 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,15 @@ + + # GPG WKD setup > The source of the WKD at vhack.eu @@ -5,10 +17,12 @@ The directory structure follows the advanced way to implement the [WKD][1] specification. ## Current GPG-Keys: + These are listed in [the keys file](./stored_keys.md). Use the [mk_key](./scripts/mk_key.sh) script to add a key (see it's help for options). -## Reference +## Reference + All directories must also server a `policy` file. This can however be zero size. (source: [2]) diff --git a/flake.lock.license b/flake.lock.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/flake.lock.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see . diff --git a/flake.nix b/flake.nix index 4090ae9..a6a49ce 100644 --- a/flake.nix +++ b/flake.nix @@ -1,3 +1,12 @@ +# pgp-wkd - A web key directory for pgp-keys +# +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: CC-BY-SA-4.0 +# +# This file is part of pgp-wkd. +# +# You should have received a copy of the License along with this program. +# If not, see . { description = "The source of the wkd at vhack.eu"; diff --git a/scripts/mk_key.sh b/scripts/mk_key.sh index 2c98cc8..1e38025 100755 --- a/scripts/mk_key.sh +++ b/scripts/mk_key.sh @@ -1,12 +1,22 @@ #!/usr/bin/env sh +# pgp-wkd - A web key directory for pgp-keys +# +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: CC-BY-SA-4.0 +# +# This file is part of pgp-wkd. +# +# You should have received a copy of the License along with this program. +# If not, see . + die() { - echo "$@"; - exit 1; + echo "$@" + exit 1 } help() { - cat << EOF + cat < "$dir/$key_hash" && - - printf "%s%s%s%s\n" '`' "$dir/$key_hash" '`' " -> $full_key_id" >> stored_keys.md && - - echo "Key export done!"; + gpg --no-armor --export "$key_id" >"$dir/$key_hash" && + printf "%s%s%s%s\n" '`' "$dir/$key_hash" '`' " -> $full_key_id" >>stored_keys.md && + echo "Key export done!" } for arg in "$@"; do case "$arg" in - "--help" | "-h") - help; - exit 0; - ;; + "--help" | "-h") + help + exit 0 + ;; esac done - -key_id="$1"; -key_email="$2"; -key_hash="$3"; +key_id="$1" +key_email="$2" +key_hash="$3" shift 3 [ -z "$key_id" ] && die "No KEY_ID specified, see '--help'!" diff --git a/src/.well-known/openpgpkey/b-peetz.de/hu/bopqzgiaibk5g9s434j77phzb91hqmxb.license b/src/.well-known/openpgpkey/b-peetz.de/hu/bopqzgiaibk5g9s434j77phzb91hqmxb.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/src/.well-known/openpgpkey/b-peetz.de/hu/bopqzgiaibk5g9s434j77phzb91hqmxb.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see . diff --git a/src/.well-known/openpgpkey/b-peetz.de/hu/policy.license b/src/.well-known/openpgpkey/b-peetz.de/hu/policy.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/src/.well-known/openpgpkey/b-peetz.de/hu/policy.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see . diff --git a/src/.well-known/openpgpkey/s-schoeffel.de/hu/policy.license b/src/.well-known/openpgpkey/s-schoeffel.de/hu/policy.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/src/.well-known/openpgpkey/s-schoeffel.de/hu/policy.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see . diff --git a/src/.well-known/openpgpkey/s-schoeffel.de/hu/zuwf9qt9nx9k7iihjcuk6h7tc7u6qtuu@s-schoeffel.de.license b/src/.well-known/openpgpkey/s-schoeffel.de/hu/zuwf9qt9nx9k7iihjcuk6h7tc7u6qtuu@s-schoeffel.de.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/src/.well-known/openpgpkey/s-schoeffel.de/hu/zuwf9qt9nx9k7iihjcuk6h7tc7u6qtuu@s-schoeffel.de.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see . diff --git a/src/.well-known/openpgpkey/sils.li/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@sils.li.license b/src/.well-known/openpgpkey/sils.li/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@sils.li.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/src/.well-known/openpgpkey/sils.li/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@sils.li.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see . diff --git a/src/.well-known/openpgpkey/sils.li/hu/policy.license b/src/.well-known/openpgpkey/sils.li/hu/policy.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/src/.well-known/openpgpkey/sils.li/hu/policy.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see . diff --git a/src/.well-known/openpgpkey/vhack.eu/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@vhack.eu.license b/src/.well-known/openpgpkey/vhack.eu/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@vhack.eu.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/src/.well-known/openpgpkey/vhack.eu/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@vhack.eu.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see . diff --git a/src/.well-known/openpgpkey/vhack.eu/hu/policy.license b/src/.well-known/openpgpkey/vhack.eu/hu/policy.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/src/.well-known/openpgpkey/vhack.eu/hu/policy.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see . diff --git a/stored_keys.md b/stored_keys.md index 19c384e..781168a 100644 --- a/stored_keys.md +++ b/stored_keys.md @@ -1,3 +1,15 @@ + + `./src/.well-known/openpgpkey/b-peetz.de/hu/bopqzgiaibk5g9s434j77phzb91hqmxb` -> Benedikt Peetz `./src/.well-known/openpgpkey/sils.li/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@sils.li` -> Silas Schöffel `./src/.well-known/openpgpkey/s-schoeffel.de/hu/zuwf9qt9nx9k7iihjcuk6h7tc7u6qtuu@s-schoeffel.de` -> Silas Schöffel diff --git a/treefmt.nix b/treefmt.nix index 1cbab40..292902b 100644 --- a/treefmt.nix +++ b/treefmt.nix @@ -1,3 +1,12 @@ +# pgp-wkd - A web key directory for pgp-keys +# +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: CC-BY-SA-4.0 +# +# This file is part of pgp-wkd. +# +# You should have received a copy of the License along with this program. +# If not, see . { treefmt-nix, pkgs, diff --git a/update.sh b/update.sh index 49216b8..fdfd9c3 100755 --- a/update.sh +++ b/update.sh @@ -1,3 +1,13 @@ #!/usr/bin/env sh +# pgp-wkd - A web key directory for pgp-keys +# +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: CC-BY-SA-4.0 +# +# This file is part of pgp-wkd. +# +# You should have received a copy of the License along with this program. +# If not, see . + nix flake update -- cgit 1.4.1