fix(release): install every licence file in the packages

The deb, rpm, ipk and Arch packages and the Alpine recipe took only
LICENSES/Apache-2.0.txt. They now take the whole LICENSES directory and
THIRD-PARTY-NOTICES.txt, and the release job fails if the documentation
directory holds a file the rpm list in install/nfpm/doona.yaml leaves out.
This commit is contained in:
Zakk committed 2026-09-30 12:14:28 +10:00
1 parent b1ac2f3b72
commit 45649cfb62
3 files changed
+30 -5

No files matched your search

+9 -4
View File
@@ -61,10 +61,15 @@ jobs:
mkdir -p "$program" "$fonts"
tar -xzf "release/doona-${NPM}.tar.gz" -C "$program"
tar -xzf "release/doona-fonts-${NPM}.tar.gz" -C "$fonts"
mkdir -p build/stage/doona/usr/share/doc/doona/LICENSES build/stage/doona-fonts/usr/share/doc/doona
mv "$program"/LICENSE "$program"/NOTICE "$program"/README.md "$program"/CHANGELOG.md build/stage/doona/usr/share/doc/doona/
mv "$program"/LICENSES/Apache-2.0.txt build/stage/doona/usr/share/doc/doona/LICENSES/
rmdir "$program"/LICENSES
doc=build/stage/doona/usr/share/doc/doona
mkdir -p "$doc" build/stage/doona-fonts/usr/share/doc/doona
mv "$program"/LICENSE "$program"/LICENSES "$program"/NOTICE "$program"/THIRD-PARTY-NOTICES.txt \
"$program"/README.md "$program"/CHANGELOG.md "$doc"/
# rpm takes the documentation files one by one from doona.yaml; a file it does not list would be missing.
(cd "$doc" && find . -type f) | sort | while read -r file; do
grep -qxF " dst: /usr/share/doc/doona/${file#./}" install/nfpm/doona.yaml ||
{ echo "install/nfpm/doona.yaml does not list ${file#./} for rpm" >&2; exit 1; }
done
cp "$fonts"/fonts/OFL.txt build/stage/doona-fonts/usr/share/doc/doona/OFL.txt
for packager in deb rpm ipk archlinux; do
for config in install/nfpm/doona.yaml install/nfpm/doona-fonts.yaml; do
+1 -1
View File
@@ -28,7 +28,7 @@ package() {
rm -rf "$pkgdir"/usr/share/doona/LICENSE "$pkgdir"/usr/share/doona/LICENSES "$pkgdir"/usr/share/doona/NOTICE "$pkgdir"/usr/share/doona/*.md
install -Dm644 "$srcdir"/web/NOTICE -t "$pkgdir"/usr/share/doc/$pkgname/
install -Dm644 "$srcdir"/web/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
install -Dm644 "$srcdir"/web/LICENSES/Apache-2.0.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
install -Dm644 "$srcdir"/web/LICENSES/*.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
}
fonts() {
+20
View File
@@ -32,6 +32,26 @@ contents:
dst: /usr/share/doc/doona/LICENSES/Apache-2.0.txt
type: license
packager: rpm
- src: build/stage/doona/usr/share/doc/doona/LICENSES/CC-BY-3.0.txt
dst: /usr/share/doc/doona/LICENSES/CC-BY-3.0.txt
type: license
packager: rpm
- src: build/stage/doona/usr/share/doc/doona/LICENSES/CC-BY-SA-4.0.txt
dst: /usr/share/doc/doona/LICENSES/CC-BY-SA-4.0.txt
type: license
packager: rpm
- src: build/stage/doona/usr/share/doc/doona/LICENSES/CC0-1.0.txt
dst: /usr/share/doc/doona/LICENSES/CC0-1.0.txt
type: license
packager: rpm
- src: build/stage/doona/usr/share/doc/doona/LICENSES/LicenseRef-GitHub-Logos.txt
dst: /usr/share/doc/doona/LICENSES/LicenseRef-GitHub-Logos.txt
type: license
packager: rpm
- src: build/stage/doona/usr/share/doc/doona/THIRD-PARTY-NOTICES.txt
dst: /usr/share/doc/doona/THIRD-PARTY-NOTICES.txt
type: license
packager: rpm
- src: build/stage/doona/usr/share/doc/doona/NOTICE
dst: /usr/share/doc/doona/NOTICE
type: doc