!8 [sync] PR-6: RPM removed %buildarch macro
From: @openeuler-sync-bot Reviewed-by: @lyn1001 Signed-off-by: @lyn1001
This commit is contained in:
commit
0ed54e9d4f
44
0001-RPM-removed-buildarch-macro.patch
Normal file
44
0001-RPM-removed-buildarch-macro.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From c492be59b02791c5ef084ead9842f5ca07cbdf64 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Fri, 8 Nov 2019 21:52:11 +0100
|
||||
Subject: [PATCH] RPM removed %buildarch macro
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
macros.erlang | 2 +-
|
||||
testing.py | 6 ++++++
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/macros.erlang b/macros.erlang
|
||||
index 6fe859e..0f6e49f 100644
|
||||
--- a/macros.erlang
|
||||
+++ b/macros.erlang
|
||||
@@ -1,7 +1,7 @@
|
||||
# handy macros for erlang-related packages
|
||||
|
||||
%_erldir %{_libdir}/erlang
|
||||
-%_erllibdir %(a=%{buildarch}; if [ "$a" == "noarch" ] ; then echo %{_datadir}/erlang/lib; else echo %{_erldir}/lib; fi)
|
||||
+%_erllibdir %(if [ "%{_target_cpu}" == "noarch" ] ; then echo %{_datadir}/erlang/lib; else echo %{_erldir}/lib; fi)
|
||||
|
||||
%__rebar /usr/bin/rebar
|
||||
|
||||
diff --git a/testing.py b/testing.py
|
||||
index 4a5c263..d0edd07 100644
|
||||
--- a/testing.py
|
||||
+++ b/testing.py
|
||||
@@ -34,6 +34,12 @@ class TestAllMethods(unittest.TestCase):
|
||||
Deps = ['erlang-erts', 'erlang-kernel', 'erlang-stdlib']
|
||||
self.assertEqual(M.inspect_beam_file('noarch', "./test.beam"), Deps)
|
||||
|
||||
+ def test_check_for_absense_of_buildarch_macro(self):
|
||||
+ self.assertEqual(rpm.expandMacro("%{buildarch}"), "%{buildarch}")
|
||||
+
|
||||
+ def test_check_for_target_cpu_macro(self):
|
||||
+ self.assertNotEqual(rpm.expandMacro("%{_target_cpu}"), "%{_target_cpu}")
|
||||
+
|
||||
if __name__ == "__main__":
|
||||
M = __import__("erlang-find-requires")
|
||||
|
||||
--
|
||||
2.42.0.windows.2
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: erlang-rpm-macros
|
||||
Version: 0.3.1
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Macros for simplifying building of Erlang packages
|
||||
License: MIT
|
||||
URL: https://github.com/fedora-erlang/erlang-rpm-macros
|
||||
@ -10,6 +10,9 @@ BuildArch: noarch
|
||||
BuildRequires: erlang-crypto erlang-erlsyslog erlang-erts python3-pybeam
|
||||
BuildRequires: python3-pyelftools python3-rpm
|
||||
Requires: rpm-build >= 4.11 python3-pybeam python3-pyelftools python3-rpm
|
||||
|
||||
Patch0001: 0001-RPM-removed-buildarch-macro.patch
|
||||
|
||||
%description
|
||||
Macros for simplifying building of Erlang packages.
|
||||
|
||||
@ -38,5 +41,8 @@ make check
|
||||
%{_rpmconfigdir}/macros.d/macros.erlang
|
||||
|
||||
%changelog
|
||||
* Thu Oct 26 2023 liubo <liubo1@xfusion.com> - 0.3.1-2
|
||||
- RPM removed %buildarch macro
|
||||
|
||||
* Sat Sep 19 2020 huanghaitao <huanghaitao8@huawei.com> - 0.3.1-1
|
||||
- package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user