#277 Omit SourceLicense tag when using vendor tarball
Merged 24 days ago by decathorpe. Opened a month ago by carlwgeorge.
fedora-rust/ carlwgeorge/rust2rpm no-sourcelicense-tag-with-vendor-tarball  into  main

@@ -37,11 +37,13 @@ 

  {% if crate_license != rpm_license %}

  # Upstream license specification: {{ crate_license|default("(missing)") }}

  {% endif %}

+ {% if not use_vendor_tarball %}

  {% if rust2rpm_legacy %}

  # Source License: {{ rpm_license|default("# FIXME") }}

  {% else %}

  SourceLicense:  {{ rpm_license|default("# FIXME") }}

  {% endif %}

+ {% endif %}

  # FIXME: paste output of %%cargo_license_summary here

  License:        # FIXME

  # LICENSE.dependencies contains a full license breakdown

@@ -28,11 +28,13 @@ 

  Group:          {{ rpm_group }}

  {% endif %}

  

+ {% if not use_vendor_tarball %}

  {% if rust2rpm_legacy %}

  # Source License: {{ rpm_license|default("# FIXME") }}

  {% else %}

  SourceLicense:  {{ rpm_license|default("# FIXME") }}

  {% endif %}

+ {% endif %}

  # FIXME: paste output of %%cargo_license_summary here

  License:        # FIXME

  # LICENSE.dependencies contains a full license breakdown

When using vendored dependencies, the licenses in the sources will typically match the licenses in the binaries. In this scenario the SourceLicense tag can be omitteed since it should match the License tag.

When using vendored dependencies, the licenses in the sources will typically match the licenses in the binaries.

This is not entirely true. There are dependencies that are only required at build-time, so the list of dependencies (and their licenses) in a vendor tarball is a superset of dependencies (and their licenses) that end up in compiled binaries.

However, since specifying the SourceLicense tag is not required, it's still better to give no information here than to give wrong information.

Your changes look good at first glance. I just need to check if the tests still pass.

rebased onto 1ff3e43

24 days ago

Pull-Request has been merged by decathorpe

24 days ago

Ah, now I pressed "Merge" too fast. The tests do fail. Will push a followup fix.

The test fixtures needed to be updated:
https://pagure.io/fedora-rust/rust2rpm/c/fd4aa5a

Now everything is in order. Thanks for your PR! Please run tox yourself next time :wink: