|
|
|
@ -25,6 +25,20 @@ cargo-toml-patch-comments = [
|
|
|
|
|
""",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[[package.extra-sources]]
|
|
|
|
|
number = 10
|
|
|
|
|
file = "https://github.com/BurntSushi/jiff/archive/%{version}/jiff-%{version}.tar.gz"
|
|
|
|
|
comments = [
|
|
|
|
|
"""\
|
|
|
|
|
Since 0.1.22, the published crates no longer include “non-essential files \
|
|
|
|
|
(including tests and test data).” Since we would like to run the tests, we \
|
|
|
|
|
use the GitHub archive as an additonal source as permitted in \
|
|
|
|
|
https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/#_package_sources, \
|
|
|
|
|
waiting until %%check to copy in the extra files to prove they are not \
|
|
|
|
|
included in the crate sources shipped in the binary RPMs.\
|
|
|
|
|
""",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[[package.extra-patches]]
|
|
|
|
|
number = 10
|
|
|
|
|
file = "0001-Downstream-only-Omit-doctests-that-require-hifitime.patch"
|
|
|
|
@ -59,11 +73,11 @@ file = "0001-EPEL9-Ignore-doctests-that-require-very-recent-Rust-.patch"
|
|
|
|
|
comments = [
|
|
|
|
|
"EPEL9: Ignore doctests that require very recent Rust compilers",
|
|
|
|
|
"""\
|
|
|
|
|
In this crate, doctests and examples (but not the lib and integration tests) \
|
|
|
|
|
are allowed to use Rust features from versions newer than the MSRV. It’s \
|
|
|
|
|
therefore necessary to ignore some of them on EPEL9. If this patch becomes too \
|
|
|
|
|
unwieldy, we could choose to start skipping doctests and/or examples there \
|
|
|
|
|
entirely.\
|
|
|
|
|
In this crate, doctests and examples (but not the lib and integration tests)
|
|
|
|
|
are allowed to use Rust features from versions newer than the MSRV. It’s
|
|
|
|
|
therefore necessary to ignore some of them on EPEL9. If this patch becomes too
|
|
|
|
|
unwieldy, we could choose to start skipping doctests and/or examples there
|
|
|
|
|
entirely.\
|
|
|
|
|
""",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
@ -75,27 +89,34 @@ build = [
|
|
|
|
|
|
|
|
|
|
[scripts.prep]
|
|
|
|
|
pre = [
|
|
|
|
|
"# NOTE: The -p1 in %%autosetup, above, must be replaced with -N so that we can",
|
|
|
|
|
"# do conditional patching, below.",
|
|
|
|
|
"%autopatch -M 999 -p1",
|
|
|
|
|
"# We reserved patch number 1000+<N> for EPEL<N>.",
|
|
|
|
|
"%if 0%{?el9}",
|
|
|
|
|
"""\
|
|
|
|
|
# NOTE: The -p1 in %%autosetup, above, must be replaced with -N so that we can
|
|
|
|
|
# do conditional patching, below.
|
|
|
|
|
%autopatch -M 999 -p1
|
|
|
|
|
# We reserved patch number 1000+<N> for EPEL<N>.\
|
|
|
|
|
""",
|
|
|
|
|
# EPEL9 rpm does not support "%patch <N>", and would quietly attempt and
|
|
|
|
|
# fail to re-apply Patch0 instead of applying the desired patch. We *need*
|
|
|
|
|
# to use "%patch -P <N>" instead.
|
|
|
|
|
"%patch -P 1009 -p1",
|
|
|
|
|
"%endif",
|
|
|
|
|
"# We do not yet have a rust-icu package (although one would be desirable)",
|
|
|
|
|
"tomcli set Cargo.toml del dev-dependencies.icu",
|
|
|
|
|
"""\
|
|
|
|
|
%if 0%{?el9}
|
|
|
|
|
%patch -P 1009 -p1
|
|
|
|
|
%endif
|
|
|
|
|
# We do not yet have a rust-icu package (although one would be desirable)
|
|
|
|
|
tomcli set Cargo.toml del dev-dependencies.icu\
|
|
|
|
|
"""
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[tests]
|
|
|
|
|
comments = [
|
|
|
|
|
[scripts.check]
|
|
|
|
|
pre = [
|
|
|
|
|
"""\
|
|
|
|
|
Since 0.1.22, src/tz/snapshots/ and src/tz/testdata/ are no longer included \
|
|
|
|
|
in the crate, so it is not feasible to run the tests without a separate \
|
|
|
|
|
source archive.\
|
|
|
|
|
""",
|
|
|
|
|
# Copy in snapshots, integration tests, and test data – required to run tests,
|
|
|
|
|
# but not included in the released crate. By doing so here in %%check rather
|
|
|
|
|
# than in %%prep, we prove that the binary RPMs are derived solely from the
|
|
|
|
|
# published crate sources.
|
|
|
|
|
tar -xzvf '%{SOURCE10}' --strip-components=1 \\
|
|
|
|
|
jiff-%{version}/src/tz/snapshots \\
|
|
|
|
|
jiff-%{version}/src/tz/testdata \\
|
|
|
|
|
jiff-%{version}/tests\
|
|
|
|
|
""",
|
|
|
|
|
]
|
|
|
|
|
run = ["none"]
|
|
|
|
|