!13 update to upstream version 23
From: @desert-sailor Reviewed-by: @jingxiaolu Signed-off-by: @jingxiaolu
This commit is contained in:
commit
c618a40e3d
@ -1,30 +0,0 @@
|
|||||||
From fac21ad662a14a4f901b3365a25749b516918554 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
|
|
||||||
Date: Mon, 24 Jun 2019 20:27:20 +0200
|
|
||||||
Subject: [PATCH] macros: Do not use awk's inplace feature
|
|
||||||
|
|
||||||
gawk 5.x changed variable name to `inplace::suffix` but gawk 4.x does
|
|
||||||
not like that name so we can't set both.
|
|
||||||
|
|
||||||
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
|
|
||||||
---
|
|
||||||
data/macros.cargo | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/data/macros.cargo b/data/macros.cargo
|
|
||||||
index 9bafc86..d13b7fa 100644
|
|
||||||
--- a/data/macros.cargo
|
|
||||||
+++ b/data/macros.cargo
|
|
||||||
@@ -89,7 +89,8 @@ if %__cargo_is_lib; then \
|
|
||||||
# Drop all dependency/features information \
|
|
||||||
# so that cargo doesn't fail resolving dependencies: \
|
|
||||||
# https://github.com/rust-lang/cargo/pull/6729 \
|
|
||||||
- %{__awk} -i inplace -v INPLACE_SUFFIX=.deps '/^\\\[((.+\\\.)?((dev|build)-)?dependencies|features)/{f=1;next} /^\\\[/{f=0}; !f' Cargo.toml \
|
|
||||||
+ mv Cargo.toml{,.deps} \
|
|
||||||
+ awk '/^\\\[((.+\\\.)?((dev|build)-)?dependencies|features)/{f=1;next} /^\\\[/{f=0}; !f' Cargo.toml.deps > Cargo.toml \
|
|
||||||
%{__cargo} package -l | grep -w -E -v 'Cargo.(lock|toml.orig)' | xargs -d '\\\n' %{__cp} --parents -a -t $REG_DIR \
|
|
||||||
%{__mv} Cargo.toml{.deps,} \
|
|
||||||
%{__cp} -a Cargo.toml $REG_DIR/Cargo.toml \
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
25
0001-remove-test-spec-with-opensuse-tomlfile.patch
Normal file
25
0001-remove-test-spec-with-opensuse-tomlfile.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 01a5884b86f26a13b181d26d9082c674b2646b04 Mon Sep 17 00:00:00 2001
|
||||||
|
From: desert-sailor <dxwangk@isoftstone.com>
|
||||||
|
Date: Tue, 18 Jul 2023 10:18:30 +0800
|
||||||
|
Subject: [PATCH] remove test spec with opensuse tomlfile
|
||||||
|
|
||||||
|
---
|
||||||
|
rust2rpm/tests/test_generator.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/rust2rpm/tests/test_generator.py b/rust2rpm/tests/test_generator.py
|
||||||
|
index acf93ce..00eb9a8 100644
|
||||||
|
--- a/rust2rpm/tests/test_generator.py
|
||||||
|
+++ b/rust2rpm/tests/test_generator.py
|
||||||
|
@@ -65,7 +65,7 @@ def mock_spec_file_render(crate, tomlfile, target, tmpdir):
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("tomlfile", tomlfiles)
|
||||||
|
-@pytest.mark.parametrize("target", ["plain", "fedora", "mageia", "opensuse"])
|
||||||
|
+@pytest.mark.parametrize("target", ["plain", "fedora", "mageia"])
|
||||||
|
def test_spec(tomlfile, target, tmpdir):
|
||||||
|
crate = tomlfile.with_suffix("").name
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -3,18 +3,22 @@
|
|||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
|
|
||||||
Name: rust-packaging
|
Name: rust-packaging
|
||||||
Version: 21
|
Version: 23
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: RPM macros for building Rust packages on various architectures
|
Summary: RPM macros for building Rust packages on various architectures
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://pagure.io/fedora-rust/rust2rpm
|
URL: https://pagure.io/fedora-rust/rust2rpm
|
||||||
Source: https://pagure.io/fedora-rust/rust2rpm/archive/v%{version}/rust2rpm-v%{version}.tar.gz
|
Source: https://pagure.io/fedora-rust/rust2rpm/archive/v%{version}/rust2rpm-v%{version}.tar.gz
|
||||||
|
Patch1: 0001-remove-test-spec-with-opensuse-tomlfile.patch
|
||||||
Patch0001: 0001-macros-Do-not-use-awk-s-inplace-feature.patch
|
|
||||||
|
|
||||||
BuildRequires: python3-devel python3-setuptools
|
BuildRequires: python3-devel python3-setuptools
|
||||||
|
BuildRequires: python3-pbr python3-pip python3-wheel
|
||||||
|
BuildRequires: python3-hatchling python3-virtualenv
|
||||||
# use for check
|
# use for check
|
||||||
BuildRequires: python3-pytest cargo python3-semantic_version
|
BuildRequires: python3-pytest cargo python3-semantic_version
|
||||||
|
BuildRequires: python3-tox-current-env
|
||||||
|
BuildRequires: python3-termcolor python3-jinja2
|
||||||
|
BuildRequires: python3-pyparsing python3-tqdm python3-requests
|
||||||
|
|
||||||
# gawk is needed for stripping dev-deps in macro
|
# gawk is needed for stripping dev-deps in macro
|
||||||
Requires: gawk python3-rust2rpm = %{version}-%{release}
|
Requires: gawk python3-rust2rpm = %{version}-%{release}
|
||||||
@ -39,15 +43,22 @@ Convert Rust packages to RPM.
|
|||||||
%autosetup -n rust2rpm-v%{version} -p1
|
%autosetup -n rust2rpm-v%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%pyproject_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install
|
%pyproject_install
|
||||||
install -D -p -m 0644 -t %{buildroot}%{_rpmmacrodir} data/macros.rust data/macros.cargo
|
install -D -p -m 0644 -t %{buildroot}%{_rpmmacrodir} data/macros.rust data/macros.cargo
|
||||||
install -D -p -m 0644 -t %{buildroot}%{_fileattrsdir} data/cargo.attr
|
install -D -p -m 0644 -t %{buildroot}%{_fileattrsdir} data/cargo.attr
|
||||||
|
|
||||||
%check
|
%check
|
||||||
py.test-%{python3_version} -vv test.py
|
TOX_TESTENV_PASSENV="${TOX_TESTENV_PASSENV:-*}" \
|
||||||
|
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" \
|
||||||
|
PATH="%{buildroot}%{_bindir}:$PATH" \
|
||||||
|
PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}" \
|
||||||
|
PYTHONDONTWRITEBYTECODE=1 \
|
||||||
|
%{?__pytest_addopts:PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} %{__pytest_addopts}"} \
|
||||||
|
PYTEST_XDIST_AUTO_NUM_WORKERS=%{_smp_build_ncpus} \
|
||||||
|
%{__python3} -m tox -e py%{python3_version_nodots} --current-env
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -62,9 +73,12 @@ py.test-%{python3_version} -vv test.py
|
|||||||
%{_bindir}/rust2rpm
|
%{_bindir}/rust2rpm
|
||||||
%{_bindir}/cargo-inspector
|
%{_bindir}/cargo-inspector
|
||||||
%{python3_sitelib}/rust2rpm/
|
%{python3_sitelib}/rust2rpm/
|
||||||
%{python3_sitelib}/rust2rpm-*.egg-info/
|
%{python3_sitelib}/rust2rpm-*.dist-info/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 18 2023 Dongxing Wang <dxwangk@isoftstone.com> - 23-1
|
||||||
|
- update to 23
|
||||||
|
|
||||||
* Sat Aug 06 2022 tianlijing <tianlijing@kylinos.cn> - 21-1
|
* Sat Aug 06 2022 tianlijing <tianlijing@kylinos.cn> - 21-1
|
||||||
- update to 21
|
- update to 21
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
BIN
rust2rpm-v23.tar.gz
Normal file
BIN
rust2rpm-v23.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user