forked from pool/python-dmidecode
- Harmonize Factory with the SLE version (update-alternatives
instead of the subpackages). - Add proper Provides/Obsoletes - Introduce update-alternatives for /usr/share/python-dmidecode/pymap.xml. * Fixed memory Type Detail map size (bsc#1194351). Python one. - Rename huge-memory.diff to huge-memory.patch (i.e., remove huge-memory.diff and add huge-memory.patch). - Fix URL of Source0 (their own website is down, use GitHub release). - Add 31-version_info-v-version.patch to make tests 3.10 compatible. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dmidecode?expand=0&rev=10
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
python-dmidecode-3.12.2/src/setup_common.py | 7 +++++--
|
||||
src/setup_common.py | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/src/setup_common.py
|
||||
|
||||
@@ -1,8 +1,25 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 4 09:24:04 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Harmonize Factory with the SLE version (update-alternatives
|
||||
instead of the subpackages).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 28 10:41:11 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add proper Provides/Obsoletes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 24 22:57:21 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Cleanup multi-version builds.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 24 21:15:44 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Introduce update-alternatives for
|
||||
/usr/share/python-dmidecode/pymap.xml.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 24 06:32:14 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
@@ -21,14 +38,20 @@ Sat Dec 04 00:01:25 UTC 2021 - mcepl@cepl.eu
|
||||
* fix RESOURCE_LEAK errors detected by covscan in src/xmlpythonizer.c
|
||||
* Update README
|
||||
* fix RESOURCE_LEAK errors detected by covscan in src/dmidecodemodule.c
|
||||
* Fixed memory Type Detail map size (bsc#1194351).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 2 23:52:35 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Brutal simplification of the SPEC file to the standard single-spec
|
||||
Python one. In the end we need one shared package and multiple
|
||||
python-versioned ones.
|
||||
Python one.
|
||||
- Removal of support for Python 2 (bsc#1193262)
|
||||
- Rename huge-memory.diff to huge-memory.patch (i.e., remove
|
||||
huge-memory.diff and add huge-memory.patch).
|
||||
- Fix URL of Source0 (their own website is down, use GitHub
|
||||
release).
|
||||
- Add 31-version_info-v-version.patch to make tests 3.10
|
||||
compatible.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 19 07:53:52 UTC 2017 - mc@suse.com
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file
|
||||
# spec file for package python-dmidecode
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
@@ -17,10 +17,8 @@
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define python_subpackage_only 1
|
||||
%define oldpython python
|
||||
|
||||
Name: %{oldpython}-dmidecode
|
||||
Name: python-dmidecode
|
||||
Version: 3.12.2+git.1625035095.f0a089a
|
||||
Release: 0
|
||||
Summary: Python module to access DMI data
|
||||
@@ -35,16 +33,20 @@ Patch2: detect-lib-with-py3.patch
|
||||
# PATCH-FIX-UPSTREAM 31-version_info-v-version.patch gh#nima/python-dmidecode#31 mcepl@suse.com
|
||||
# use sys.version_info instead of sys.version
|
||||
Patch3: 31-version_info-v-version.patch
|
||||
Provides: python-dmidecode = %{version}-%{release}
|
||||
Obsoletes: python-dmidecode < %{version}-%{release}
|
||||
BuildRequires: %{python_module devel}
|
||||
%if 0%{?sle_version} && 0%{?sle_version} < 150400
|
||||
BuildRequires: %{oldpython}-libxml2-python
|
||||
BuildRequires: %{oldpython}3-libxml2-python
|
||||
BuildRequires: python2-libxml2-python
|
||||
BuildRequires: python3-libxml2-python
|
||||
%else
|
||||
BuildRequires: %{python_module libxml2}
|
||||
%endif
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -52,15 +54,6 @@ python-dmidecode is a python extension module that uses the code-base
|
||||
of the 'dmidecode' utility, and presents the data as python data
|
||||
structures or as XML data using libxml2.
|
||||
|
||||
%package -n python-python-dmidecode
|
||||
Summary: Python module to access DMI data
|
||||
Requires: %{oldpython}-dmidecode = %{version}-%{release}
|
||||
|
||||
%description -n python-python-dmidecode
|
||||
A Python extension module that uses the code-base of the
|
||||
'dmidecode' utility, and presents the data as Python data
|
||||
structures or as XML data using libxml2.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
@@ -72,26 +65,40 @@ sed -i 's/python2/python3/g' Makefile unit-tests/Makefile
|
||||
}
|
||||
|
||||
%install
|
||||
%{python_expand $python src/setup.py install --root %{buildroot} --prefix=%{_prefix}
|
||||
%{python_expand rm -f %{buildroot}%{_datadir}/python-dmidecode/pymap.xml
|
||||
$python src/setup.py install --root %{buildroot} --prefix=%{_prefix}
|
||||
ls -l %{buildroot}%{_datadir}/python-dmidecode/
|
||||
mv %{buildroot}%{_datadir}/python-dmidecode/pymap{,-%{$python_bin_suffix}}.xml
|
||||
touch %{buildroot}%{_datadir}/python-dmidecode/pymap.xml
|
||||
%fdupes %{buildroot}%{$python_sitearch}
|
||||
}
|
||||
|
||||
%check
|
||||
pushd unit-tests
|
||||
%{python_expand export PYTHON=$python
|
||||
%make_build
|
||||
}
|
||||
%python_expand PYTHON=$python %make_build
|
||||
popd
|
||||
|
||||
%post
|
||||
PRIO=$(echo %{python_version}|tr -d '.')
|
||||
/usr/sbin/update-alternatives --install %{_datadir}/python-dmidecode/pymap.xml pymap.xml \
|
||||
%{_datadir}/python-dmidecode/pymap-%{python_bin_suffix}.xml ${PRIO}
|
||||
|
||||
%postun
|
||||
if [ ! -f %{_datadir}/python-dmidecode/pymap-%{python_bin_suffix}.xml ] ; then
|
||||
MAJVER=$(ver=%{python_version}; echo ${ver:0:1})
|
||||
/usr/sbin/update-alternatives --remove pymap.xml \
|
||||
%{_datadir}/python-dmidecode/pymap-%{python_bin_suffix}.xml
|
||||
fi
|
||||
|
||||
%clean
|
||||
|
||||
%files
|
||||
%files %{python_files}
|
||||
%license doc/LICENSE
|
||||
%doc README doc/README.upstream doc/AUTHORS doc/AUTHORS.upstream
|
||||
%dir %{_datadir}/python-dmidecode/
|
||||
%{_datadir}/python-dmidecode/
|
||||
|
||||
%files %{python_files python-dmidecode}
|
||||
%ghost %{_sysconfdir}/alternatives/pymap.xml
|
||||
%ghost %{_datadir}/python-dmidecode/pymap.xml
|
||||
%{_datadir}/python-dmidecode/pymap-%{python_bin_suffix}.xml
|
||||
%{python_sitearch}/dmidecode*
|
||||
%{python_sitearch}/*.egg-info
|
||||
%pycache_only %{python_sitearch}/__pycache__/*
|
||||
|
||||
Reference in New Issue
Block a user