15
0
Files
python-dmidecode/detect-lib-with-py3.patch

68 lines
2.0 KiB
Diff
Raw Normal View History

---
Makefile | 10 ++++------
- 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
2022-10-26 09:20:33 +00:00
src/setup_common.py | 9 ++++++---
2 files changed, 10 insertions(+), 9 deletions(-)
- 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
2022-10-26 09:20:33 +00:00
--- a/Makefile
+++ b/Makefile
@@ -44,12 +44,11 @@ PACKAGE := python-dmidecode
- 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
2022-10-26 09:20:33 +00:00
PY_VER := $(shell $(PY_BIN) -c 'import sys; print("%d.%d"%sys.version_info[0:2])')
PY_MV := $(shell echo $(PY_VER) | cut -b 1)
PY := python$(PY_VER)
-SO_PATH := build/lib.linux-$(shell uname -m)-$(PY_VER)
ifeq ($(PY_MV),2)
- SO := $(SO_PATH)/dmidecodemod.so
+ SOLIB := dmidecodemod.so
- 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
2022-10-26 09:20:33 +00:00
else
SOABI := $(shell $(PY_BIN) -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))')
- SO := $(SO_PATH)/dmidecodemod.$(SOABI).so
+ SOLIB := dmidecodemod.$(SOABI).so
endif
SHELL := /bin/bash
@@ -59,10 +58,9 @@ SHELL := /bin/bash
all : build dmidump
build: $(PY)-dmidecodemod.so
-$(PY)-dmidecodemod.so: $(SO)
- cp $< $@
-$(SO):
+$(PY)-dmidecodemod.so:
$(PY) src/setup.py build
+ cp $$(find build -name $(SOLIB)) $@
dmidump : src/util.o src/efi.o src/dmilog.o
$(CC) -o $@ src/dmidump.c $^ -g -Wall -D_DMIDUMP_MAIN_
--- a/src/setup_common.py
+++ b/src/setup_common.py
- 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
2022-10-26 09:20:33 +00:00
@@ -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
- 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
2022-10-26 09:20:33 +00:00
+from sysconfig import get_config_var, get_path
# libxml2 - C flags
def libxml2_include(incdir):
- 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
2022-10-26 09:20:33 +00:00
@@ -50,7 +50,7 @@ def libxml2_include(incdir):
# libxml2 - library flags
def libxml2_lib(libdir, libs):
- libdir.append(get_python_lib(1))
- 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
2022-10-26 09:20:33 +00:00
+ 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])
- 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
2022-10-26 09:20:33 +00:00
@@ -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
- libs.append('xml2mod')
+ if get_config_var("SOABI"):
+ libs.append('xml2mod.%s' % get_config_var("SOABI"))
+ else:
+ libs.append('xml2mod')