15
0

- Update to version 3.12.2+git.1666757106.e6ab5bc:

* fix address_from_efi ret=0 message
  * fix function dmi_slot_segment_bus_func null point error in system slot
  * fix warning: this 'if' clause does not guard
  * fix warning: variable 'str_n' set but not used
  * fix warning: passing argument 2 of 'dmi_tpm_vendor_id' makes pointer from integer without a cast
  * fix warning: unused variable 'attr'
  * fix warning: unused variable 'addrstr'
  * fix warning: suggest parentheses around assignment used as truth value
  * fix warning: suggest parentheses around assignment used as truth value
  * src/dmidecode.c: In function 'dmi_tpm_characteristics': src/dmidecode.c:4788:24: warning: 'return' with a value, in function returning void [-Wreturn-type] 4788 | return data_n; | ^~~~~~
  * fix warning: passing argument 3 of 'dmi_slot_peers' from incompatible pointer type
  * fix warning: unused variable 'ver'
  * fix warning: variable 'eptype' set but not used
  * fix warning: suggest parentheses around '&&' within '||'
  * fix warning: comparison of integer expressions of different signedness
  * fix warning: ignoring return value of 'legacy_decode'
  * fix warning argument 1 null where non-null expected
  * Update python-dmidecode to smbios 3.3.0
  * Fix for printing an empty dictionary
  * Fix the failure of opening "/dev/mem": Permission denied
  * Fix bugs: 1. Fix smbios3_decode decoding sysfs table dump error. 2. Fix check smbios version error warning message.
  * Fix reading info permission deny bugs.
- Remove duplicated Makefile_libdir.patch.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dmidecode?expand=0&rev=20
This commit is contained in:
2022-10-26 09:20:33 +00:00
committed by Git OBS Bridge
parent 1b62766a19
commit fbef7af84d
8 changed files with 61 additions and 69 deletions

View File

@@ -1,44 +0,0 @@
---
Makefile | 3 ++-
src/setup_common.py | 9 ++-------
2 files changed, 4 insertions(+), 8 deletions(-)
--- a/Makefile
+++ b/Makefile
@@ -42,9 +42,10 @@ PY_BIN := python3
VERSION := $(shell cd src;$(PY_BIN) -c "from setup_common import *; print(get_version());")
PACKAGE := python-dmidecode
PY_VER := $(shell $(PY_BIN) -c 'import sys; print("%d.%d"%sys.version_info[0:2])')
+PY_VER_DL := $(shell echo $(PY_VER) | tr -d '.')
PY_MV := $(shell echo $(PY_VER) | cut -b 1)
PY := python$(PY_VER)
-SO_PATH := build/lib.linux-$(shell uname -m)-$(PY_VER)
+SO_PATH := build/lib.linux-$(shell uname -m)-cpython-$(PY_VER_DL)
ifeq ($(PY_MV),2)
SO := $(SO_PATH)/dmidecodemod.so
else
--- a/src/setup_common.py
+++ b/src/setup_common.py
@@ -30,12 +30,7 @@ import subprocess, sys
if sys.version_info[0] < 3:
import commands as subprocess
from os import path as os_path
-try:
- from distutils.sysconfig import get_python_lib, get_config_var
- __python_lib = get_python_lib(1)
-except ImportError:
- from sysconfig import get_config_var, get_path
- __python_lib = get_path('platlib')
+from sysconfig import get_config_var, get_path
# libxml2 - C flags
def libxml2_include(incdir):
@@ -55,7 +50,7 @@ def libxml2_include(incdir):
# libxml2 - library flags
def libxml2_lib(libdir, libs):
- libdir.append(__python_lib)
+ libdir.append(get_path('platlib'))
if os_path.exists("/etc/debian_version"): #. XXX: Debian Workaround...
libdir.append("/usr/lib/pymodules/python%d.%d"%sys.version_info[0:2])

View File

@@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/nima/python-dmidecode.git</param>
<param name="changesrevision">467038237266e2c1bec79d1d6698170b81208026</param></service></servicedata>
<param name="changesrevision">e6ab5bc3b8b60fd560e411e148f6bf9571feae47</param></service></servicedata>

View File

@@ -1,33 +1,43 @@
---
src/setup_common.py | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
Makefile | 3 ++-
src/setup_common.py | 9 ++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
--- a/Makefile
+++ b/Makefile
@@ -42,9 +42,10 @@ PY_BIN := python3
VERSION := $(shell cd src;$(PY_BIN) -c "from setup_common import *; print(get_version());")
PACKAGE := python-dmidecode
PY_VER := $(shell $(PY_BIN) -c 'import sys; print("%d.%d"%sys.version_info[0:2])')
+PY_VER_DL := $(shell echo $(PY_VER) | tr -d '.')
PY_MV := $(shell echo $(PY_VER) | cut -b 1)
PY := python$(PY_VER)
-SO_PATH := build/lib.linux-$(shell uname -m)-$(PY_VER)
+SO_PATH := build/lib.linux-$(shell uname -m)-cpython-$(PY_VER_DL)
ifeq ($(PY_MV),2)
SO := $(SO_PATH)/dmidecodemod.so
else
--- a/src/setup_common.py
+++ b/src/setup_common.py
@@ -30,7 +30,12 @@ import subprocess, sys
@@ -30,7 +30,7 @@ import subprocess, sys
if sys.version_info[0] < 3:
import commands as subprocess
from os import path as os_path
-from distutils.sysconfig import get_python_lib
+try:
+ from distutils.sysconfig import get_python_lib, get_config_var
+ __python_lib = get_python_lib(1)
+except ImportError:
+ from sysconfig import get_config_var, get_path
+ __python_lib = get_path('platlib')
+from sysconfig import get_config_var, get_path
# libxml2 - C flags
def libxml2_include(incdir):
@@ -50,7 +55,7 @@ def libxml2_include(incdir):
@@ -50,7 +50,7 @@ def libxml2_include(incdir):
# libxml2 - library flags
def libxml2_lib(libdir, libs):
- libdir.append(get_python_lib(1))
+ libdir.append(__python_lib)
+ libdir.append(get_path('platlib'))
if os_path.exists("/etc/debian_version"): #. XXX: Debian Workaround...
libdir.append("/usr/lib/pymodules/python%d.%d"%sys.version_info[0:2])
@@ -69,7 +74,10 @@ def libxml2_lib(libdir, libs):
@@ -69,7 +69,10 @@ def libxml2_lib(libdir, libs):
libs.append(l.replace("-l", "", 1))
# this library is not reported and we need it anyway

View File

@@ -4,7 +4,7 @@
--- a/src/dmidecode.c
+++ b/src/dmidecode.c
@@ -4533,7 +4533,7 @@ xmlNode *dmi_decode(xmlNode *prnt_n, dmi
@@ -5378,7 +5378,7 @@ xmlNode *dmi_decode(xmlNode *prnt_n, dmi
dmi_memory_device_width(sect_n, "TotalWidth", WORD(data + 0x08));
dmi_memory_device_width(sect_n, "DataWidth", WORD(data + 0x0A));
if (h->length >= 0x20 && WORD(data + 0x0C) == 0x7FFF) {

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f8ca347601deb9507aabf8f78eff9c8189cb2477da11e4cc0fafb483494eaadc
size 150589

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a9d9329d5ad3cce54bdd1db1af5877677416557b5ff19f4ac8265d65ed5d5e35
size 160487

View File

@@ -1,3 +1,31 @@
-------------------------------------------------------------------
Wed Oct 26 09:14:38 UTC 2022 - mcepl@cepl.eu
- Update to version 3.12.2+git.1666757106.e6ab5bc:
* fix address_from_efi ret=0 message
* fix function dmi_slot_segment_bus_func null point error in system slot
* fix warning: this 'if' clause does not guard
* fix warning: variable 'str_n' set but not used
* fix warning: passing argument 2 of 'dmi_tpm_vendor_id' makes pointer from integer without a cast
* fix warning: unused variable 'attr'
* fix warning: unused variable 'addrstr'
* fix warning: suggest parentheses around assignment used as truth value
* fix warning: suggest parentheses around assignment used as truth value
* src/dmidecode.c: In function 'dmi_tpm_characteristics': src/dmidecode.c:4788:24: warning: 'return' with a value, in function returning void [-Wreturn-type] 4788 | return data_n; | ^~~~~~
* fix warning: passing argument 3 of 'dmi_slot_peers' from incompatible pointer type
* fix warning: unused variable 'ver'
* fix warning: variable 'eptype' set but not used
* fix warning: suggest parentheses around '&&' within '||'
* fix warning: comparison of integer expressions of different signedness
* fix warning: ignoring return value of 'legacy_decode'
* fix warning argument 1 null where non-null expected
* Update python-dmidecode to smbios 3.3.0
* Fix for printing an empty dictionary
* Fix the failure of opening "/dev/mem": Permission denied
* Fix bugs: 1. Fix smbios3_decode decoding sysfs table dump error. 2. Fix check smbios version error warning message.
* Fix reading info permission deny bugs.
- Remove duplicated Makefile_libdir.patch.
-------------------------------------------------------------------
Mon Oct 17 18:05:41 UTC 2022 - Matej Cepl <mcepl@suse.com>

View File

@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-dmidecode
Version: 3.12.2+git.1625035095.f0a089a
Version: 3.12.2+git.1666757106.e6ab5bc
Release: 0
Summary: Python module to access DMI data
License: GPL-2.0-only
@@ -27,20 +27,18 @@ Group: System/Libraries
URL: https://github.com/nima/python-dmidecode
# Source0: https://github.com/nima/python-dmidecode/archive/refs/tags/v%%{version}.tar.gz#/python-dmidecode-%%{version}.tar.gz
Source0: python-dmidecode-%{version}.tar.gz
# PATCH-FIX-UPSTREAM huge-memory.patch gh#nima/python-dmidecode#33 mcepl@suse.com
# use DWORD instead of WORD when calling dmi_memory_device_extended_size
Patch0: huge-memory.patch
# PATCH-FIX-UPSTREAM gcc7-inline.patch gh#nima/python-dmidecode#35 mcepl@suse.com
# Don't use inline keyword.
Patch1: gcc7-inline.patch
# PATCH-FIX-UPSTREAM detect-lib-with-py3.patch gh#nima/python-dmidecode#36 mcepl@suse.com
# Make the code future-proof against removal of distutils module.
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
# PATCH-FIX-UPSTREAM Makefile_libdir.patch bsc#[0-9]+ mcepl@suse.com
# Something's wrong with finding libdirs
Patch4: Makefile_libdir.patch
Patch2: 31-version_info-v-version.patch
# PATCH-FIX-UPSTREAM detect-lib-with-py3.patch gh#nima/python-dmidecode#36 mcepl@suse.com
# Make the code future-proof against removal of distutils module.
Patch3: detect-lib-with-py3.patch
Obsoletes: %{oldpython}-dmidecode <= %{version}
Obsoletes: python-python-dmidecode <= %{version}
BuildRequires: %{python_module devel}