Commit graph

10 commits

Author SHA1 Message Date
a16df5f90f
Enforce consistent formatting with black 2022-07-24 18:47:09 +02:00
c4488a3fe8
Prettify and slightly reformat printed log messages 2022-07-24 12:52:09 +02:00
67c878e32a
Implement simple logging; ensure rust2rpm --stdout still works 2022-07-24 11:21:30 +02:00
03584a81e4 Stop translating license for Fedora and EPEL
The infrastracture to translate the license remains in place.
We can remove it later, when all users are gone. I'm keeping
the behaviour for Mageia unchanged for now. I assume that they'll
want to follow the change in Fedora later too.

We still want to do syntax cleanup with translate_slashes().

Fixes #193.
2022-07-04 09:45:25 +02:00
1100c60d7b Fix insertion of newlines in license conversion comments
We would end up with not-enough/one-too-many in various cases.
2021-11-28 12:50:19 +01:00
04f63e0f20 Add AGPL-3.0-or-later and automatically translate "+" suffix into "-or-later"
This way we don't need to add all the deprecated variants with "+" suffix.

Fixes #84.
2019-06-02 15:51:05 +02:00
Igor Gnatenko
2b20b9e369
trivial: Use same codestyle
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-03-16 15:15:49 +01:00
7f2885fbfd Add rust2rpm --show-license-map
This is helpful when debugging the list.
2018-08-16 16:16:02 +02:00
d5d78d9fb1 Use fedora tags also for megeia 2018-08-16 16:16:02 +02:00
73998d6adc Translate SPDX licenses to Fedora license tags, warn about "/"
"/" is deprecated everywhere, so warn about that.
Translation from SPDX is only used for fedora or epel targets.

The Fedora license list coalesces various license variants that have different
SPDX license tags into a single license tag. Most notably, this is done for the
39 BSD variants and 18 MIT variants on the Fedora good licenses list. When a
spdx→fedora mapping exists, it should always be unambiguous, because SPDX
considers any change in the license text to be a unique license, and Fedora is
more permissive in that regard.

To make a review of the translation easy, debug info is output to stdout, and
comments are inserted into the spec when some translation is required or when
there are problems with the upstream licensing.

The license list is pulled from the spdx project:
$ curl 'https://docs.google.com/spreadsheets/d/1LUJuzGKC5K2yYuAg8S-2VYbS2dmg_4IlFdpqj7n9Ghg/export?format=csv&id=1LUJuzGKC5K2yYuAg8S-2VYbS2dmg_4IlFdpqj7n9Ghg&gid=138634715' > rust2rpm/spdx_to_fedora.csv

v2:
- apply "/" replacement always

v3:
- print to stderr
- use csv.DictReader
- filter out empty license lines
2018-08-16 16:16:02 +02:00