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
Most likely there are some missing checks for None and the program may
segfault, but this can be fixed in future.
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
+ /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 /opt/rust/bin/cargo package -l
+ grep -w -v Cargo.lock
+ xargs -d '\n' /bin/cp --parents -a -t /user/rpmbuild/BUILDROOT/rust-term_size-0.3.0-1.i2n.x86_64/datastore/dev/rust/cargo/registry/term_size-0.3.0
warning: No (git) VCS found for `/datastore/rpmbuild/BUILD/term_size-0.3.0`
/bin/cp: cannot stat 'Cargo.toml.orig': No such file or directory
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
In cargo 1.41, `cargo install` adds a new `.crates2.json` file in the
install root for tracking version upgrades. This would be another file
that `%cargo_install` should remove afterward, but there is also a new
`--no-track` option which disables such metadata files altogether.
This update should be coordinated with the Rust toolchain update in the
distro, e.g. with rust-packaging `Requires: cargo >= 1.41`. The new
option will be rejected as an unstable option on earlier versions.
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>
It is simply impossible to fight against people putting
#![deny(warnings)] into the code…
Closes: https://pagure.io/fedora-rust/rust2rpm/issue/98
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.