Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
75c30f78fc
!29 [sync] PR-27: strip binary file
From: @openeuler-sync-bot 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2023-03-04 03:50:24 +00:00
zhouwenpei
af6557c0c3 strip binary file
(cherry picked from commit 28d2b4d97de190e8405e233c83dc98ae6bdb08be)
2023-03-02 09:41:15 +08:00
openeuler-ci-bot
d638396fc0
!22 [sync] PR-18: 添加sw架构
From: @openeuler-sync-bot 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2022-11-30 01:54:54 +00:00
Wu Zixuan
afe421c571 Add sw64 architecture
Signed-off-by: Wu Zixuan <wuzx1226@qq.com>
(cherry picked from commit 2791cbd9c286fad63ea5061a67021e96723ec37a)
2022-11-28 16:52:04 +08:00
openeuler-ci-bot
ff48ffbd96
!20 [sync] PR-16: strip binary files
From: @openeuler-sync-bot 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2022-11-25 13:13:02 +00:00
yangcheng1203
21d407f66c strip binary files
(cherry picked from commit 069e312541a320fa1afa2af4a724623ac4739f5a)
2022-11-24 14:31:02 +08:00
openeuler-ci-bot
e80aaaf5fb
!15 [sync] PR-14: fix test case failed
From: @openeuler-sync-bot 
Reviewed-by: @dwl301 
Signed-off-by: @dwl301
2022-04-14 13:59:51 +00:00
dongyuzhen
c3c2d83a1a fix test case failed
(cherry picked from commit e44b464a5382d1c987aba0ca2198e8ad40bfe6a4)
2022-04-14 21:11:47 +08:00
openeuler-ci-bot
ab49a25d32 !9 python-dmidecode: remove python2-dmidecode subpackage
From: @chengguipeng_xian
Reviewed-by: @orange-snn
Signed-off-by: @orange-snn
2020-10-31 18:36:42 +08:00
chengguipeng
ec997c6fe7 python-dmidecode: remove python2-dmidecode subpackage
Signed-off-by: chengguipeng <chengguipeng1@huawei.com>
2020-10-31 18:13:41 +08:00
2 changed files with 65 additions and 50 deletions

View File

@ -0,0 +1,26 @@
diff -Nuar python-dmidecode-3.12.2.org/src/dmidecode.c python-dmidecode-3.12.2.sw/src/dmidecode.c
--- python-dmidecode-3.12.2.org/src/dmidecode.c 2022-02-26 07:07:27.810000000 +0000
+++ python-dmidecode-3.12.2.sw/src/dmidecode.c 2022-02-26 07:08:59.290000000 +0000
@@ -2,10 +2,10 @@
/*. ******* coding:utf-8 AUTOHEADER START v1.1 *******
*. vim: fileencoding=utf-8 syntax=c sw=2 ts=2 et
*.
- *. © 2007-2013 Nima Talebi <nima@autonomy.net.au>
- *. © 2009-2013 David Sommerseth <davids@redhat.com>
- *. © 2002-2010 Jean Delvare <khali@linux-fr.org>
- *. © 2000-2002 Alan Cox <alan@redhat.com>
+ *. © 2007-2013 Nima Talebi <nima@autonomy.net.au>
+ *. © 2009-2013 David Sommerseth <davids@redhat.com>
+ *. © 2002-2010 Jean Delvare <khali@linux-fr.org>
+ *. © 2000-2002 Alan Cox <alan@redhat.com>
*.
*. This file is part of Python DMI-Decode.
*.
@@ -831,6 +831,7 @@
{ 0x2B, "Atom" },
{ 0x30, "Alpha" },
+ { 0x9916, "Sw_64" },
{ 0x31, "Alpha 21064" },
{ 0x32, "Alpha 21066" },
{ 0x33, "Alpha 21164" },

View File

@ -1,14 +1,16 @@
Name: python-dmidecode
Version: 3.12.2
Release: 19
Release: 25
Summary: Python extension module for dmidecode
License: GPLv2
URL: http://projects.autonomy.net.au/python-dmidecode/
Source0: https://github.com/nima/python-dmidecode/archive/v%{version}.tar.gz
%ifarch sw_64
Patch1: python-dmidecode-3.12.2-sw.patch
%endif
BuildRequires: gcc libxml2-devel python2-libxml2 python3-libxml2
BuildRequires: python2-devel python3-devel
BuildRequires: gcc libxml2-devel python3-libxml2 python3-devel
%description
Dmidecode reports information about your system's hardware as described in
@ -24,16 +26,6 @@ Python-dmidecode is a python extension module that uses the code-base
of the 'dmidecode' utility and uses libxml2 to display data as python
data structures or XML data.
%package -n python2-dmidecode
Summary: A python 2 extension module to get DMI data
Requires: python2-libxml2
%{?python_provide:%python_provide python2-dmidecode}
%description -n python2-dmidecode
Python2-dmidecode is a python 2 extension module that uses the code-base
of the 'dmidecode' utility and uses libxml2 to display data as python 2
data structures or XML data.
%package -n python3-dmidecode
Summary: A python 3 module to access DMI data
Requires: python3-libxml2
@ -46,50 +38,27 @@ data structures or XML data.
%package_help
%prep
%autosetup -c -n %{name}-%{version} -p1
cp -a %{name}-%{version} python2
cp -a %{name}-%{version} python3
rm -r %{name}-%{version}
pushd python3
%autosetup -n %{name}-%{version} -p1
sed -i 's/python2/python3/g' Makefile unit-tests/Makefile
popd
%build
export CFLAGS="${CFLAGS-} -std=gnu89"
pushd python2
make build
popd
pushd python3
make build
popd
export PYTHON_BIN=%{__python3}
export PYTHON_VERSION=%{python3_version}
export CFLAGS="%{build_cflags} -std=gnu89"
export CC=gcc
%make_build
%install
pushd python2
%{__python2} src/setup.py install --root %{buildroot} --prefix=%{_prefix}
popd
pushd python3
export CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="${RPM_LD_FLAGS}"
%{__python3} src/setup.py install --root %{buildroot} --prefix=%{_prefix}
popd
%check
pushd python2/unit-tests
make
popd
pushd python3/unit-tests
make
popd
%files -n python2-dmidecode
%license python2/doc/LICENSE python2/doc/AUTHORS python2/doc/AUTHORS.upstream
%{python2_sitearch}/dmidecode.py
%{python2_sitearch}/dmidecode.pyc
%{python2_sitearch}/dmidecode.pyo
%{python2_sitearch}/dmidecodemod.so
%{python2_sitearch}/python_dmidecode-3.12.2-py2.7.egg-info
%{_datadir}/python-dmidecode/pymap.xml
export PYTHONPATH=%{buildroot}%{python3_sitearch}
export PYTHON_BIN=%{__python3}
make -C unit-tests
%files -n python3-dmidecode
%license python3/doc/LICENSE python3/doc/AUTHORS python3/doc/AUTHORS.upstream
%license doc/LICENSE doc/AUTHORS doc/AUTHORS.upstream
%{python3_sitearch}/__pycache__/*.pyc
%{python3_sitearch}/dmidecode.py
%{python3_sitearch}/dmidecodemod.cpython-3*.so
@ -97,17 +66,37 @@ popd
%{_datadir}/python-dmidecode/pymap.xml
%files help
%doc python2/README python2/doc/README.upstream
%doc python3/README python3/doc/README.upstream
%doc README doc/README.upstream
%changelog
* Wed Mar 01 2023 zhouwenpei<zhouwenpei@h-partners.com>- 3.12.2-25
- strip binary file
* Wed Nov 23 2022 wuzx<wuzx1226@qq.com> - 3.12.2-24
- Add sw64 architecture
* Mon Jun 6 2022 yangcheng <yangcheng87@h-partners.com> - 3.12.2-23
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:strip binary file
* Thu Apr 14 2022 dongyuzhen <dongyuzhen@h-partners.com> - 3.12.2-22
- fix test case failed
* Sat Mar 20 2021 Dehui Fan<fandehui1@huawei.com> - 3.12.2-21
- strip binary files
* Fri Oct 30 2020 chengguipeng <chengguipeng1@huawei.com> - 3.12.2-20
- remove python2-dmidecode subpackage
* Wed Sep 9 2020 hanhui <hanhui15@huawei.com> - 3.12.2-19
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:modify source url
* Thu Jun 16 2020 hanhui <hanhui15@huawei.com> - 3.12.2-18
* Tue Jun 16 2020 hanhui <hanhui15@huawei.com> - 3.12.2-18
- Type:bugfix
- Id:NA
- SUG:NA