srossross / rpmfile

Read rmp archive files
MIT License
29 stars 37 forks source link

RPM header tag "copyright" should be "license" #44

Open tpodowd opened 11 months ago

tpodowd commented 11 months ago

According to https://rpm-software-management.github.io/rpm/manual/tags.html , tag 1014 should called license and not copyright.

Here is one example: https://github.com/srossross/rpmfile/blob/185ac915eb701d15bcb2338ad63ca81366f4ce16/rpmfile/headers.py#L41 https://github.com/srossross/rpmfile/blob/185ac915eb701d15bcb2338ad63ca81366f4ce16/rpmfile/rpmdefs.py#L59 https://github.com/srossross/rpmfile/blob/185ac915eb701d15bcb2338ad63ca81366f4ce16/rpmfile/rpmdefs.py#L69

In the main cli command you are already changing the header title to License... https://github.com/srossross/rpmfile/blob/185ac915eb701d15bcb2338ad63ca81366f4ce16/rpmfile/cli.py#L79-L87

The rpm command itself also does not find a copyright header tag.

$ rpm -q --qf "%{LICENSE}\n" bash
GPLv3+
$ rpm -q --qf "%{COPYRIGHT}\n" bash
error: incorrect format: unknown tag: "COPYRIGHT"
pdxjohnny commented 10 months ago

Are you looking for an alias for the variable or a rename?

tpodowd commented 10 months ago

Hi @pdxjohnny - Thanks for your reply. I would think an alias makes more sense at this stage as folks may already be using copyright. Perhaps, change the the field to license and then make copyright the alias.