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.
Setting 'None' to the 'packager' field caused generated
spec files to have the packager identity of "None" instead
of using the fallbacks as specified in the spec template.
This adjustment makes the spec template fallbacks for the
packager identity work as expected.
Signed-off-by: Neal Gompa <ngompa13@gmail.com>
This has good impact on performance and binary size at cost of
compilation time. As nice side effect, it fixes bug which breaks
compilation of binaries in Fedora Rawhide.
For example, ffsend binary went from 107M to 70M.
References: https://bugzilla.redhat.com/show_bug.cgi?id=1701339
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
We don't need it right now since we don't support filtering unneeded
dependencies on cargo level.
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
OBS doesn't allow importing files starting with `.` so we need another
file name.
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
In order to support more flexible automation mechanisms, allow
injecting the packager identity through environment variables as an
override from the regular detection mechanisms.
Moreover, there are cases where we want to force the fallback identity,
so we now have a way to force that through an environment variable.
These are intended to be used with multi-user automation systems so
that the correct identity is set regardless of what the host system
is actually configured with.
Signed-off-by: Neal Gompa <ngompa13@gmail.com>
When building matrixmultiply v0.2.2:
BUILDSTDERR: /usr/bin/cp: cannot stat 'spare': No such file or directory
BUILDSTDERR: /usr/bin/cp: failed to get attributes of 'kernels': No such file or directory
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
For Rust packages created through the OBS source service, the
changelog is managed by an external <pkg>.changes file that is
transformed into an RPM changelog and appended to the spec file
automatically by the Open Build Service.
Having a default entry means that the changelog handling will not
always work correctly and package builds may fail due to changelog
entries not being in reverse chronological order.
This also is a future enabler for other workflows for external
changelog management in automated package builds.
Signed-off-by: Neal Gompa <ngompa13@gmail.com>
Subsequent invocations would fail with an error about a corrupted file.
We don't have support for resuming a failed download, so let's remove the
partial download results.
"/" 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