Open filips123 opened 3 years ago
The assumption for license-file
is that it's a plain file used for Cargo.
I suppose cargo-deb could try being smart about this and see if the file already uses Debian's syntax, and not add its fields if it does.
Considering that license-file
inside [package.metadata.deb]
section already uses a different format (array with filename and numbers of lines to skip) than package-level license-file
(just string filename), could there be another array element to tell cargo-deb to now add any fields?
For example:
# Standard Cargo.toml stuff
# ...
[package.metadata.deb]
license-file = ["debian/copyright", "0", true]
# So this means debian/copyright filename, skip zero lines, and it is already Debian-formatted file so don't add any new fields
There could be (although arrays need all elements to be strings, so ["path", "0", "true"]
), but the downside is that this requires us documenting it and users knowing to set it. I much prefer "just works" approach.
I created a custom copyright file that complies with
debian/copyright
file specification and I would like to package it into a DEB archive.If I just add
license-file = ["debian/copyright", "0"]
toCargo.toml
, the file will be packed into an archive, butcargo-deb
will add auto-generated lines at the start of file, causing duplicated or possibly incorrect data.Maybe there could be an additional option in
license-file
to prevent adding auto-generated lines to the copyright/license file?