Compare commits
6 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 24f5579881 | |||
| cfd62019a9 | |||
| a305e32e03 | |||
| ae4e5ce904 | |||
| c4ad78ac15 | |||
| c311896e40 |
9
_service
9
_service
@@ -1,15 +1,14 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="versionprefix">3.12.2+git</param>
|
||||
<service name="tar_scm" mode="manual">
|
||||
<param name="versionprefix">3.12.3+git</param>
|
||||
<param name="url">https://github.com/nima/python-dmidecode.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="exclude">.git*</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="changesauthor">mcepl@cepl.eu</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
<service name="recompress" mode="manual">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">gz</param>
|
||||
</service>
|
||||
<service name="set_version" mode="disabled" />
|
||||
<service name="set_version" mode="manual" />
|
||||
</services>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/nima/python-dmidecode.git</param>
|
||||
<param name="changesrevision">e6ab5bc3b8b60fd560e411e148f6bf9571feae47</param></service></servicedata>
|
||||
<param name="changesrevision">4fdb678f9bea418318131884dd3ffb0a9ab9d1d6</param></service></servicedata>
|
||||
12
fix-loglevel.patch
Normal file
12
fix-loglevel.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --color -Naur python-dmidecode-3.12.3-orig/src/efi.c python-dmidecode-3.12.3/src/efi.c
|
||||
--- python-dmidecode-3.12.3-orig/src/efi.c 2022-11-17 06:51:28
|
||||
+++ python-dmidecode-3.12.3/src/efi.c 2025-02-25 14:25:32
|
||||
@@ -84,7 +84,7 @@
|
||||
}
|
||||
|
||||
if(ret == 0){
|
||||
- log_append(logp, LOGFL_NODUPS, LOG_DEBUG, "%s: entry point at 0x%08llx", eptype, (unsigned long long)*address);
|
||||
+ log_append(logp, LOGFL_NODUPS, LOG_WARNING, "%s: entry point at 0x%08llx", eptype, (unsigned long long)*address);
|
||||
}
|
||||
|
||||
return ret;
|
||||
74
gcc14.patch
Normal file
74
gcc14.patch
Normal file
@@ -0,0 +1,74 @@
|
||||
Index: python-dmidecode-3.12.3/src/dmidecodemodule.c
|
||||
===================================================================
|
||||
--- python-dmidecode-3.12.3.orig/src/dmidecodemodule.c
|
||||
+++ python-dmidecode-3.12.3/src/dmidecodemodule.c
|
||||
@@ -54,13 +54,13 @@
|
||||
#include <mcheck.h>
|
||||
|
||||
#if (PY_VERSION_HEX < 0x03030000)
|
||||
-char *PyUnicode_AsUTF8(PyObject *unicode) {
|
||||
+const char *PyUnicode_AsUTF8(PyObject *unicode) {
|
||||
PyObject *as_bytes = PyUnicode_AsUTF8String(unicode);
|
||||
if (!as_bytes) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- return PyBytes_AsString(as_bytes);
|
||||
+ return (const char*)PyBytes_AsString(as_bytes);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -479,7 +479,7 @@ xmlNode *__dmidecode_xml_getsection(opti
|
||||
if(opt->type == -1) {
|
||||
char *err = log_retrieve(opt->logdata, LOG_ERR);
|
||||
log_clear_partial(opt->logdata, LOG_ERR, 0);
|
||||
- _pyReturnError(PyExc_RuntimeError, "Invalid type id '%s' -- %s", typeid, err);
|
||||
+ PyReturnError(PyExc_RuntimeError, "Invalid type id '%s' -- %s", typeid, err);
|
||||
free(err);
|
||||
return NULL;
|
||||
}
|
||||
@@ -657,7 +657,7 @@ static PyObject *dmidecode_get_slot(PyOb
|
||||
|
||||
static PyObject *dmidecode_get_section(PyObject *self, PyObject *args)
|
||||
{
|
||||
- char *section = NULL;
|
||||
+ const char *section = NULL;
|
||||
if (PyUnicode_Check(args)) {
|
||||
section = PyUnicode_AsUTF8(args);
|
||||
} else if (PyBytes_Check(args)) {
|
||||
@@ -788,7 +788,7 @@ static PyObject *dmidecode_get_dev(PyObj
|
||||
|
||||
static PyObject *dmidecode_set_dev(PyObject * self, PyObject * arg)
|
||||
{
|
||||
- char *f = NULL;
|
||||
+ const char *f = NULL;
|
||||
if(PyUnicode_Check(arg)) {
|
||||
f = PyUnicode_AsUTF8(arg);
|
||||
} else if(PyBytes_Check(arg)) {
|
||||
@@ -835,7 +835,7 @@ static PyObject *dmidecode_set_dev(PyObj
|
||||
|
||||
static PyObject *dmidecode_set_pythonxmlmap(PyObject * self, PyObject * arg)
|
||||
{
|
||||
- char *fname = NULL;
|
||||
+ const char *fname = NULL;
|
||||
|
||||
if (PyUnicode_Check(arg)) {
|
||||
fname = PyUnicode_AsUTF8(arg);
|
||||
@@ -913,7 +913,7 @@ static PyMethodDef DMIDataMethods[] = {
|
||||
{(char *)"pythonmap", dmidecode_set_pythonxmlmap, METH_O,
|
||||
(char *) "Use another python dict map definition. The default file is " PYTHON_XML_MAP},
|
||||
|
||||
- {(char *)"xmlapi", dmidecode_xmlapi, METH_VARARGS | METH_KEYWORDS,
|
||||
+ {(char *)"xmlapi", (PyCFunction)dmidecode_xmlapi, METH_VARARGS | METH_KEYWORDS,
|
||||
(char *) "Internal API for retrieving data as raw XML data"},
|
||||
|
||||
|
||||
@@ -1024,7 +1024,7 @@ initdmidecodemod(void)
|
||||
// Assign this options struct to the module as well with a destructor, that way it will
|
||||
// clean up the memory for us.
|
||||
// TODO: destructor has wrong type under py3?
|
||||
- PyModule_AddObject(module, "options", PyCapsule_New(opt, NULL, destruct_options));
|
||||
+ PyModule_AddObject(module, "options", PyCapsule_New(opt, NULL, (PyCapsule_Destructor)destruct_options));
|
||||
global_options = opt;
|
||||
#ifdef IS_PY3K
|
||||
return module;
|
||||
3
python-dmidecode-3.12.3+git.1676426290.4fdb678.tar.gz
Normal file
3
python-dmidecode-3.12.3+git.1676426290.4fdb678.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cadb432bcae58105f8003b768dd17b0164aff494372f9724fc27de9542ce62f1
|
||||
size 160736
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:44d45d7d8344290c259c989d3af3f614c7837cbd85052d486adfa46a1c777164
|
||||
size 156670
|
||||
@@ -1,3 +1,25 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 25 15:20:48 UTC 2025 - mcepl@cepl.eu
|
||||
|
||||
- Update to version 3.12.2+git.1676426290.4fdb678:
|
||||
* Fix dmi_cache_size_2 will add unit twice.
|
||||
* v3.12.3
|
||||
* Add defined BIGENDIAN in types.h
|
||||
* Solve dmi_memory_device_extended_size WORD issue
|
||||
* Add bus address for type 09 in pymap.xml
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 3 10:46:32 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Add patch fix-loglevel.patch to fix invalid log level error.
|
||||
gh#nima/python-dmidecode#60 bsc#1237685
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 22 06:56:53 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Add gcc14.patch to make it compatible with gcc14
|
||||
gh#nima/python-dmidecode#59
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 13 12:46:21 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
|
||||
4
python-dmidecode.obsinfo
Normal file
4
python-dmidecode.obsinfo
Normal file
@@ -0,0 +1,4 @@
|
||||
name: python-dmidecode
|
||||
version: 3.12.2+git.1676426290.4fdb678
|
||||
mtime: 1676426290
|
||||
commit: 4fdb678f9bea418318131884dd3ffb0a9ab9d1d6
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-dmidecode
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -20,13 +20,14 @@
|
||||
%define modname dmidecode
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-dmidecode
|
||||
Version: 3.12.3
|
||||
Version: 3.12.3+git.1676426290.4fdb678
|
||||
Release: 0
|
||||
Summary: Python module to access DMI data
|
||||
License: GPL-2.0-only
|
||||
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: https://github.com/nima/python-dmidecode/archive/refs/tags/v%%{version}.tar.gz#/python-dmidecode-%%{version}.tar.gz
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source99: python-dmidecode.rpmlintrc
|
||||
# PATCH-FIX-UPSTREAM gcc7-inline.patch gh#nima/python-dmidecode#35 mcepl@suse.com
|
||||
# Don't use inline keyword.
|
||||
@@ -37,6 +38,10 @@ 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
|
||||
# PATCH-FIX-UPSTREAM gcc14.patch gh#nima/python-dmidecode#59 -- daniel.garcia@suse.com
|
||||
Patch4: gcc14.patch
|
||||
# PATCH-FIX-OPENSUSE fix-loglevel.patch gh#nima/python-dmidecode#60
|
||||
Patch5: fix-loglevel.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
@@ -61,7 +66,7 @@ of the 'dmidecode' utility, and presents the data as python data
|
||||
structures or as XML data using libxml2.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%autosetup -p1 -n %{name}-%{version}
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
@@ -109,7 +114,7 @@ fi
|
||||
%ghost %{_datadir}/python-dmidecode/pymap.xml
|
||||
%{_datadir}/python-dmidecode/pymap-%{python_bin_suffix}.xml
|
||||
# %%{python_sitearch}/python_dmidecode-%%{version}*-info
|
||||
%{python_sitearch}/python_dmidecode-3.12.2*-info
|
||||
%{python_sitearch}/python_dmidecode-*-info
|
||||
%{python_sitearch}/dmidecode.py
|
||||
%{python_sitearch}/dmidecodemod.*.so
|
||||
%pycache_only %{python_sitearch}/__pycache__/dmidecode*.pyc
|
||||
|
||||
Reference in New Issue
Block a user