Skip to content

fix: include RPM doc/licence/readme files in non-RPM packages#1072

Open
Yanhu007 wants to merge 1 commit into
goreleaser:mainfrom
Yanhu007:fix/rpm-doc-type-non-rpm-packagers
Open

fix: include RPM doc/licence/readme files in non-RPM packages#1072
Yanhu007 wants to merge 1 commit into
goreleaser:mainfrom
Yanhu007:fix/rpm-doc-type-non-rpm-packagers

Conversation

@Yanhu007

Copy link
Copy Markdown

Fixes #1037

Problem

Files with type: doc, type: licence, type: license, or type: readme are completely excluded from deb and apk packages. The documentation states these RPM-specific types should be "ignored" (treated as normal files) by other packagers.

isRelevantForPackager returns false for all these types when the packager is not "rpm", causing them to be filtered out entirely.

Fix

Only exclude TypeRPMGhost from non-RPM packagers (ghost files have no actual content, so exclusion makes sense). Doc/licence/license/readme types are no longer excluded, allowing them to be treated as normal files per the documentation.

This matches the documented behavior:

"For packagers other than RPM, [...] the remaining RPM-specific types are the same as '', a normal file."

RPM-specific file types (doc, licence, license, readme) were excluded
from deb and apk packages by isRelevantForPackager, contradicting the
documentation which states they should be treated as normal files by
other packagers.

Only TypeRPMGhost is excluded from non-RPM packagers, since ghost
files have no actual content. Document types are now included as
normal files per the documented behavior.

Fixes goreleaser#1037
@pull-request-size pull-request-size Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 15, 2026
@caarlos0

Copy link
Copy Markdown
Member

this have tests guarding it - i think it may be that we need to update the docs instead 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

type: doc excludes files from non-RPM packages instead of treating them as normal files

2 participants