Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
c618a40e3d
!13 update to upstream version 23
From: @desert-sailor 
Reviewed-by: @jingxiaolu 
Signed-off-by: @jingxiaolu
2023-07-21 07:43:56 +00:00
desert-sailor
604a325631 Upgrade to version 23 2023-07-18 11:37:01 +08:00
openeuler-ci-bot
0943b59504
!11 update to 21
From: @tianlijing 
Reviewed-by: @zengwefeng 
Signed-off-by: @zengwefeng
2022-08-08 02:17:47 +00:00
tianlijing
63bbc5da09 update to 21 2022-08-03 14:31:27 +08:00
openeuler-ci-bot
87a1bfd8ef
!9 [sync] PR-7: openEuler-22.03-LTS-Next Packages upgrade
From: @openeuler-sync-bot 
Reviewed-by: @jingxiaolu 
Signed-off-by: @jingxiaolu
2022-04-19 11:03:08 +00:00
cherry530
ba67d77c16 remove unuse files
(cherry picked from commit 26305e818cd08f4eabf3245410914e4db107b4ee)
2022-04-12 16:47:17 +08:00
openeuler-ci-bot
1af619b6eb !5 fix install fail issue because nothing provides rust-srpm-macros = 15
From: @tong_1001
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2021-03-18 14:50:55 +08:00
sxt1001
4ebd055764 fix install fail issue because nothing provides rust-srpm-macros = 15 2021-03-18 10:34:49 +08:00
openeuler-ci-bot
1f98e035bc !4 Upgrade to version 15
From: @tong_1001
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2021-02-02 21:25:42 +08:00
sxt1001
13966b3cb7 Upgrade to version 15 2021-02-02 20:16:02 +08:00
5 changed files with 61 additions and 40 deletions

View File

@ -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 1182850..5066587 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 | xargs -d '\\\n' %{__cp} --parents -a -t $REG_DIR \
%{__mv} Cargo.toml{.deps,} \
%{__cp} -a Cargo.toml $REG_DIR/Cargo.toml \
--
2.22.0

View 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

View File

@ -3,22 +3,26 @@
%global debug_package %{nil}
Name: rust-packaging
Version: 10
Version: 23
Release: 1
Summary: RPM macros for building Rust packages on various architectures
License: MIT
URL: https://pagure.io/fedora-rust/rust2rpm
Source: https://releases.pagure.org/fedora-rust/rust2rpm/rust2rpm-%{version}.tar.xz
Patch0001: 0001-macros-Do-not-use-awk-s-inplace-feature.patch
Source: https://pagure.io/fedora-rust/rust2rpm/archive/v%{version}/rust2rpm-v%{version}.tar.gz
Patch1: 0001-remove-test-spec-with-opensuse-tomlfile.patch
BuildRequires: python3-devel python3-setuptools
BuildRequires: python3-pbr python3-pip python3-wheel
BuildRequires: python3-hatchling python3-virtualenv
# use for check
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
Requires: gawk python3-rust2rpm = %{version}-%{release}
Requires: rust-srpm-macros = %{version} rust cargo
Requires: rust-srpm-macros rust cargo
%description
The package provides macros for building projects in Rust
@ -36,18 +40,25 @@ Provides: rust2rpm = %{version}-%{release}
Convert Rust packages to RPM.
%prep
%autosetup -n rust2rpm-%{version} -p1
%autosetup -n rust2rpm-v%{version} -p1
%build
%py3_build
%pyproject_build
%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}%{_fileattrsdir} data/cargo.attr
%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
%defattr(-,root,root)
@ -62,8 +73,23 @@ py.test-%{python3_version} -vv test.py
%{_bindir}/rust2rpm
%{_bindir}/cargo-inspector
%{python3_sitelib}/rust2rpm/
%{python3_sitelib}/rust2rpm-*.egg-info/
%{python3_sitelib}/rust2rpm-*.dist-info/
%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
- update to 21
* Tue Jan 18 2022 SimpleUpdate Robot <tc@openeuler.org> - 20-1
- Upgrade to version 20
* Thu Mar 18 2021 shixuantong <shixuantong@huawei.com> - 15-2
- fix install fail issue because nothing provides rust-srpm-macros = 15
* Tue Feb 02 2021 shixuantong <shixuantong@huawei.com> - 15-1
- Upgrade to version 15
* Wed Mar 4 2020 hexiujun <hexiujun1@huawei.com> - 10-1
- Package init

Binary file not shown.

BIN
rust2rpm-v23.tar.gz Normal file

Binary file not shown.