fpm icon indicating copy to clipboard operation
fpm copied to clipboard

--deb-changelog creates changelog at /usr/share/doc/<package>/changelog.gz instead of /usr/share/doc/<package>/changelog.Debian.gz

Open jean-christophe-manciot opened this issue 6 years ago • 4 comments

Ubuntu 19.04 fpm 1.9.3

For instance:

fpm -s dir -t deb -C consul/bin --prefix /usr/bin --name ${package} --verbose --version "${release_number}" --iteration ${os_version} --category admin --provides ${package} --architecture native --maintainer "Jean-Christophe Manciot <[email protected]>" --description "$(cat description-pak)" --deb-changelog "${changelog_file}" --url "https://github.com/hashicorp/consul" --depends "libc6"

creates a deb which contains:

dpkg --contents consul_1.4.0+b1-19.04_amd64.deb | grep changelog
-rw-r--r-- 0/0           45921 2018-12-05 10:36 ./usr/share/doc/consul/changelog.gz

This makes the changelog unreadable by apt changelog and does not respect debian policy.

It seems that --deb-changelog is mixed with --deb-upstream-changelog.

jean-christophe-manciot avatar Dec 05 '18 12:12 jean-christophe-manciot

In addition to that the file inside changelog.gz is called changelog instead of changelog.Debian. The issue is still present in fpm 1.11.0.

vsvyatski avatar Mar 18 '19 14:03 vsvyatski

Same issue here. lintian -i foobar.deb reports this error:

E: foobar: debian-changelog-file-missing-or-wrong-name
N: 
N:    Each Debian package (which provides a /usr/share/doc/<pkg> directory)
N:    must install a Debian changelog file in
N:    /usr/share/doc/<pkg>/changelog.Debian.gz
N:    
N:    A common error is to name the Debian changelog like an upstream
N:    changelog (/usr/share/doc/<pkg>/changelog.gz); therefore, lintian will
N:    apply further checks to such a file if it exists even after issuing this
N:    error.
N:    
N:    Refer to Debian Policy Manual section 12.7 (Changelog files) for
N:    details.
N:    
N:    Severity: serious, Certainty: certain
N:    
N:    Check: changelog-file, Type: binary

infertux avatar Oct 27 '19 07:10 infertux

Unfortunately that's an issue in lintian as the Debian Packaging Policy (1) concerning changelog states:

If the package has only one file which is used both as the Debian changelog and the upstream release notes or changelog, because there is no separate upstream maintainer, then that file should usually be installed as /usr/share/doc/package/NEWS.gz or /usr/share/doc/package/changelog.gz (depending on whether the file is release notes or a changelog); if there is a separate upstream maintainer, but no upstream release notes or changelog, then the Debian changelog should still be called changelog.Debian.gz.

To fix lintian I changed the code from renaming the changelog to copying it with PR https://github.com/jordansissel/fpm/pull/1695. This results in the warning 'duplicate-changelog-files' but at least it's now a warning and not an error.

(1) https://www.debian.org/doc/debian-policy/ch-docs.html#s-changelogs

root360-AndreasUlm avatar Mar 31 '20 10:03 root360-AndreasUlm