rpmautspec has some shortcomings (e.g. lack of support for multi-line
changelog entries), but those shortcomings are not very important for
rust packages. Let's just use rpmautospec by default for convenience.
The SPDX license short identifier for "GNU Lesser General Public License
v2.1 or later" is LGPL-2.1-or-later [0]. Add a SPDX to Fedora mapping.
[0]: https://spdx.org/licenses/LGPL-2.1-or-later.html
For example,
```toml
[dependencies]
open-ssl = { version="0.10", package = "openssl", optional = true }
[features]
openssl = ["actix-tls/openssl", "awc/openssl", "open-ssl"]
```
would end up previously with just +openssl subpackage with dependency on
crate(openssl). Now we create +open-ssl subpackage with dependency on
crate(openssl) and +openssl subpackage with dependencies on
crate(actix-tls/openssl), crate(awc/openssl) and +open-ssl subpackage.
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This is not full fix, unfortunately since it breaks cargo-inspect. Paths
on the file system are still with `-`.
This reverts commit cfd3150663.
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
And set Fedora's default behavior is to enable DynamicBuildRequires.
All Fedora crates use dynamic BuildRequires and are built only in
Rawhide and is unlikely that anybody is building hundreds of crates
outside of Fedora infrastructure.
Closes: https://pagure.io/fedora-rust/rust2rpm/issue/97
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Permission to use later versions is included in the license, so the
"-or-later" part does not change anything.
https://fedoraproject.org/wiki/Licensing/MPLv2.0 says:
> 10.2. Effect of New Versions
>
> You may distribute the Covered Software under the terms of the version
> of the License under which You originally received the Covered
> Software, or under the terms of any subsequent version published by
> the license steward.
Fixes#88.
The library semantic-version changed a lot during the last versions,
making the Metadata class very fragile.
A custom-made semantic version parsed, based on some Cargo specifics,
has been implemented to replace the old parser.
As a result of that, new features were implemented, like the support for
wildcard expressions, as documented in the Cargo book.
Fix: #93
We do not need to spawn 7 tasks for each architecture to copy same files
over and over.
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
We need to have an easy way how to skip doing 'cargo build' to speedup a
module builds.
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Before, all known licenses would be listed by --show-license-map, so
grepping the list was enough to find a license. But now we support
alternative syntaxes, so this is not enough. Add a call to translate a
specific license:
$ python3 -m rust2rpm --translate-license GPL-3.0+
Upstream license tag GPL-3.0+ (GPL-3.0-or-later) translated to GPLv3+
GPLv3+
$ python3 -m rust2rpm --show-license-map | grep -F GPL-3.0+
(nada)
This way the python module "knows" its own version. To avoid duplication,
read the value back from setup.py. The reader function only needs to
support the specific format used in the code, so it can be very simplistic.
The "+" variants were described in the comment, but not explicitly
listed in the table. Let's just replace the comment with
machine-readable lines.
Fixes#79.