From edfd7ed5ed64bff4b435ce5f6c8870677167d684 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Mon, 21 Sep 2026 22:41:09 +0200 Subject: [PATCH] snap: declare the dual license and ship the license texts The store listing carries the crate's MIT OR GPL-2.0-only expression, and both texts ride along in the snap under /usr/share/doc/pkh: the MIT grant requires the notice to accompany copies, and GPL-2 requires the license text with distribution. --- snap/snapcraft.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 88063cb..9880a1d 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -9,6 +9,7 @@ description: | This snap uses classic confinement and carries the packaging toolchain it drives (dpkg-dev, git, mmdebstrap, lintian, quilt, ...) so it behaves the same on any Debian/Ubuntu host. +license: MIT OR GPL-2.0-only adopt-info: pkh-part confinement: classic @@ -83,6 +84,12 @@ parts: override-prime: | craftctl default ln -sfn fakeroot-sysv "${CRAFT_PRIME}/usr/bin/fakeroot" + # Ship the license texts with the binary: the MIT grant requires + # the notice to accompany copies, and GPL-2 requires the license + # text alongside distribution. + mkdir -p "${CRAFT_PRIME}/usr/share/doc/pkh" + cp "${CRAFT_PART_SRC}/LICENSE-MIT" "${CRAFT_PART_SRC}/LICENSE-GPL" \ + "${CRAFT_PRIME}/usr/share/doc/pkh/" # Classic-confined ELFs default to the host loader, which pins the # snap to hosts shipping at least the build environment's glibc, # and cannot see the libraries deduplicated against the base.