snap: declare the dual license and ship the license texts
CI / build (push) Successful in 3m11s
CI / test (push) Skipped
CI / snap (push) Failing after 7m18s

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.
This commit is contained in:
2026-09-21 22:41:09 +02:00
parent 6545d327e4
commit edfd7ed5ed
+7
View File
@@ -9,6 +9,7 @@ description: |
This snap uses classic confinement and carries the packaging This snap uses classic confinement and carries the packaging
toolchain it drives (dpkg-dev, git, mmdebstrap, lintian, quilt, ...) toolchain it drives (dpkg-dev, git, mmdebstrap, lintian, quilt, ...)
so it behaves the same on any Debian/Ubuntu host. so it behaves the same on any Debian/Ubuntu host.
license: MIT OR GPL-2.0-only
adopt-info: pkh-part adopt-info: pkh-part
confinement: classic confinement: classic
@@ -83,6 +84,12 @@ parts:
override-prime: | override-prime: |
craftctl default craftctl default
ln -sfn fakeroot-sysv "${CRAFT_PRIME}/usr/bin/fakeroot" 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 # Classic-confined ELFs default to the host loader, which pins the
# snap to hosts shipping at least the build environment's glibc, # snap to hosts shipping at least the build environment's glibc,
# and cannot see the libraries deduplicated against the base. # and cannot see the libraries deduplicated against the base.