SHA256
1
0
forked from pool/libcmpiutil

Compare commits

3 Commits

Author SHA256 Message Date
5aaee27f8e Accepting request 1221693 from systemsmanagement:wbem
- fix version number in _service
- Update to version v0.5.7+git20200407.cd438a8:
  * github: enable lockdown of issues and merge requests
  * libcmpiutil: Fix endianness issues in embedded object parsing
  * Fix compilation on ARM
  * Release 0.5.7
  * libcmpiutil: add time and thread info in debug log
  * libcmpiutil: fix potential debug print crash
  * Added tag release_0_5_6 for changeset c7ba1bbeba54
  * Bump version to 0.5.6
  * libcmpiutil: Add libtool version info
  * libcmpituil: Proper definition of LEX_OUTPUT_ROOT
- drop 0001-libcmpiutil-Fix-endianness-issues-in-embedded-object.patch
  (upstream)
- rename 0002-fix-ARM-build.patch to 0001-fix-ARM-build.patch
  0003-drop-duplicate-definition-of-_FORTIFY_SOURCE.patch
  to 0002-drop-duplicate-definition-of-_FORTIFY_SOURCE.patch

OBS-URL: https://build.opensuse.org/request/show/1221693
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libcmpiutil?expand=0&rev=26
2024-11-06 15:52:08 +00:00
Klaus Kämpf
dcd431d1c4 - fix version number in _service
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:wbem/libcmpiutil?expand=0&rev=25
2024-11-06 08:31:26 +00:00
Klaus Kämpf
9372df95e9 - Update to version v0.5.7+git20200407.cd438a8:
* github: enable lockdown of issues and merge requests
  * libcmpiutil: Fix endianness issues in embedded object parsing
  * Fix compilation on ARM
  * Release 0.5.7
  * libcmpiutil: add time and thread info in debug log
  * libcmpiutil: fix potential debug print crash
  * Added tag release_0_5_6 for changeset c7ba1bbeba54
  * Bump version to 0.5.6
  * libcmpiutil: Add libtool version info
  * libcmpituil: Proper definition of LEX_OUTPUT_ROOT
- drop 0001-libcmpiutil-Fix-endianness-issues-in-embedded-object.patch
  (upstream)
- rename 0002-fix-ARM-build.patch to 0001-fix-ARM-build.patch
  0003-drop-duplicate-definition-of-_FORTIFY_SOURCE.patch
  to 0002-drop-duplicate-definition-of-_FORTIFY_SOURCE.patch

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:wbem/libcmpiutil?expand=0&rev=24
2024-11-05 17:27:08 +00:00
9 changed files with 70 additions and 169 deletions

View File

@@ -1,7 +1,7 @@
From a645d7de82aba87205ac849e65978edb6614a1d1 Mon Sep 17 00:00:00 2001 From f278c309f5e5ee3505bf36f675bd9828d77efe75 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de> From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
Date: Thu, 23 Jun 2022 14:29:39 +0200 Date: Thu, 23 Jun 2022 14:29:39 +0200
Subject: [PATCH 2/3] fix ARM build Subject: [PATCH 1/2] fix ARM build
--- ---
eo_parser_xml.c | 2 +- eo_parser_xml.c | 2 +-
@@ -66,5 +66,5 @@ index fb40c1d..10a143b 100644
} }
-- --
2.36.1 2.47.0

View File

@@ -1,149 +0,0 @@
From e37b8a2831543a6dc82a771160dd270f1e647266 Mon Sep 17 00:00:00 2001
From: Thilo Boehm <tboehm@linux.vnet.ibm.com>
Date: Thu, 8 Aug 2013 15:27:53 +0200
Subject: [PATCH 1/3] libcmpiutil: Fix endianness issues in embedded object
parsing
The auxiliary functions _set_int_prop/parse_int_property only
worked on little-endian archs as they performed an incorrect
reinterpretation of 64bit integers. Fixed by using the proper
CMPIValue union fields.
Signed-off-by: Thilo Boehm <tboehm@linux.vnet.ibm.com>
Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
---
eo_parser.c | 35 ++++++++++++++++++++++-------------
eo_parser_xml.c | 49 +++++++++++++++++++++++++++++++++++++++----------
2 files changed, 61 insertions(+), 23 deletions(-)
diff --git a/eo_parser.c b/eo_parser.c
index 36106fd..4c5b0ee 100644
--- a/eo_parser.c
+++ b/eo_parser.c
@@ -113,31 +113,40 @@ static int _set_int_prop(CMPISint64 value,
CMPIInstance *inst)
{
CMPIStatus s;
- uint64_t unsigned_val = 0;
- int64_t signed_val = 0;
+ CMPIValue val;
- switch(type) {
+ switch (type) {
case CMPI_uint64:
+ val.uint64 = (uint64_t) value;
+ break;
case CMPI_uint32:
+ val.uint32 = (uint32_t) value;
+ break;
case CMPI_uint16:
+ val.uint16 = (uint16_t) value;
+ break;
case CMPI_uint8:
- unsigned_val = (uint64_t) value;
- s = CMSetProperty(inst,
- prop,
- (CMPIValue *) &(unsigned_val),
- type);
+ val.uint8 = (uint8_t) value;
break;
case CMPI_sint64:
+ val.sint64 = (int64_t) value;
+ break;
case CMPI_sint32:
+ val.sint32 = (int32_t) value;
+ break;
case CMPI_sint16:
+ val.sint16 = (int16_t) value;
+ break;
case CMPI_sint8:
+ val.sint8 = (int8_t) value;
+ break;
default:
- signed_val = (int64_t) value;
- s = CMSetProperty(inst,
- prop,
- (CMPIValue *) &(signed_val),
- type);
+ return 0;
}
+ s = CMSetProperty(inst,
+ prop,
+ &val,
+ type);
if (s.rc == CMPI_RC_OK)
return 1;
diff --git a/eo_parser_xml.c b/eo_parser_xml.c
index c8b28cc..551a87b 100644
--- a/eo_parser_xml.c
+++ b/eo_parser_xml.c
@@ -90,11 +90,48 @@ static CMPIType parse_int_property(const char *string,
if (sign) {
int64_t _val;
ret = sscanf(string, "%" SCNi64, &_val);
- val->sint64 = _val;
+ switch (size) {
+ case 8:
+ t = CMPI_sint8;
+ val->sint8 = (int8_t) _val;
+ break;
+ case 16:
+ t = CMPI_sint16;
+ val->sint16 = (int16_t) _val;
+ break;
+ case 32:
+ t = CMPI_sint32;
+ val->sint32 = (int32_t) _val;
+ break;
+ default:
+ case 64:
+ t = CMPI_sint64;
+ val->sint64 = (int64_t) _val;
+ break;
+ };
} else {
uint64_t _val;
ret = sscanf(string, "%" SCNu64, &_val);
- val->uint64 = _val;
+ switch (size) {
+ case 8:
+ t = CMPI_uint8;
+ val->uint8 = (uint8_t) _val;
+ break;
+ case 16:
+ t = CMPI_uint16;
+ val->uint16 = (uint16_t) _val;
+ break;
+ case 32:
+ t = CMPI_uint32;
+ val->uint32 = (uint32_t) _val;
+ break;
+ default:
+ case 64:
+ t = CMPI_uint64;
+ val->uint64 = (uint64_t) _val;
+ break;
+
+ };
}
if (ret != 1) {
@@ -102,14 +139,6 @@ static CMPIType parse_int_property(const char *string,
return CMPI_null;
}
- switch (size) {
- case 8: t = sign ? CMPI_sint8 : CMPI_uint8; break;
- case 16: t = sign ? CMPI_sint16 : CMPI_uint16; break;
- case 32: t = sign ? CMPI_sint32 : CMPI_uint32; break;
- default:
- case 64: t = sign ? CMPI_sint64 : CMPI_uint64; break;
- };
-
return t;
}
--
2.36.1

View File

@@ -1,7 +1,7 @@
From 2b5f416924309f0e0e2e719c57cf07a8b4570e2f Mon Sep 17 00:00:00 2001 From 34fe49afa28628f1bdcd245bc664df4d40bd3003 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de> From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
Date: Thu, 23 Jun 2022 15:48:41 +0200 Date: Thu, 23 Jun 2022 15:48:41 +0200
Subject: [PATCH 3/3] drop duplicate definition of _FORTIFY_SOURCE Subject: [PATCH 2/2] drop duplicate definition of _FORTIFY_SOURCE
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit
@@ -12,11 +12,11 @@ Signed-off-by: Klaus Kämpf <kkaempf@suse.de>
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac diff --git a/configure.ac b/configure.ac
index 8db336e..1dfdd00 100644 index e034760..8609be6 100644
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -26,7 +26,7 @@ CC_WARNINGS="\ @@ -25,7 +25,7 @@ CC_WARNINGS="\
-Wcast-align \ -Wno-format-y2k \
-Wno-unused-value" -Wno-unused-value"
-CFLAGS="$CFLAGS $CC_WARNINGS -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE" -CFLAGS="$CFLAGS $CC_WARNINGS -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE"
@@ -25,5 +25,5 @@ index 8db336e..1dfdd00 100644
AC_CONFIG_HEADER([config.h]) AC_CONFIG_HEADER([config.h])
-- --
2.36.1 2.47.0

20
_service Normal file
View File

@@ -0,0 +1,20 @@
<services>
<service name="download_files" mode="manual"/>
<service name="tar_scm" mode="manual">
<param name="url">https://gitlab.com/libvirt/libcmpiutil.git</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="versionformat">@PARENT_TAG@+git@TAG_OFFSET@.%h</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="versionrewrite-replacement">\1</param>
<param name="revision">master</param>
<param name="changesgenerate">enable</param>
</service>
<service name="recompress" mode="manual">
<param name="file">libcmpiutil-*.tar</param>
<param name="compression">gz</param>
</service>
<service name="set_version" mode="manual">
<param name="basename">libcmpiutil</param>
</service>
</services>

4
_servicedata Normal file
View File

@@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://gitlab.com/libvirt/libcmpiutil.git</param>
<param name="changesrevision">cd438a876f7aa9d67680fd635de531526b4adbc4</param></service></servicedata>

View File

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

View File

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

View File

@@ -1,3 +1,30 @@
-------------------------------------------------------------------
Wed Nov 6 08:31:07 UTC 2024 - Klaus Kämpf <kkaempf@suse.de>
- fix version number in _service
-------------------------------------------------------------------
Tue Nov 05 16:38:10 UTC 2024 - kkaempf@suse.de
- Update to version v0.5.7+git20200407.cd438a8:
* github: enable lockdown of issues and merge requests
* libcmpiutil: Fix endianness issues in embedded object parsing
* Fix compilation on ARM
* Release 0.5.7
* libcmpiutil: add time and thread info in debug log
* libcmpiutil: fix potential debug print crash
* Added tag release_0_5_6 for changeset c7ba1bbeba54
* Bump version to 0.5.6
* libcmpiutil: Add libtool version info
* libcmpituil: Proper definition of LEX_OUTPUT_ROOT
- drop 0001-libcmpiutil-Fix-endianness-issues-in-embedded-object.patch
(upstream)
- rename 0002-fix-ARM-build.patch to 0001-fix-ARM-build.patch
0003-drop-duplicate-definition-of-_FORTIFY_SOURCE.patch
to 0002-drop-duplicate-definition-of-_FORTIFY_SOURCE.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Feb 22 10:09:07 UTC 2024 - Michael Vetter <mvetter@suse.com> Thu Feb 22 10:09:07 UTC 2024 - Michael Vetter <mvetter@suse.com>

View File

@@ -17,16 +17,15 @@
Name: libcmpiutil Name: libcmpiutil
Version: 0.5.7 Version: 0.5.7+git3.cd438a8
Release: 0 Release: 0
Summary: Library of utility functions for CMPI providers Summary: Library of utility functions for CMPI providers
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
URL: http://libvirt.org/sources/CIM/ URL: http://libvirt.org/sources/CIM/
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Source: %{name}-%{version}.tar.bz2 Source: %{name}-%{version}.tar.gz
Patch1: 0001-libcmpiutil-Fix-endianness-issues-in-embedded-object.patch Patch1: 0001-fix-ARM-build.patch
Patch2: 0002-fix-ARM-build.patch Patch2: 0002-drop-duplicate-definition-of-_FORTIFY_SOURCE.patch
Patch3: 0003-drop-duplicate-definition-of-_FORTIFY_SOURCE.patch
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: autoconf-archive BuildRequires: autoconf-archive
BuildRequires: automake BuildRequires: automake
@@ -58,6 +57,7 @@ standardizing method dispatch and argument checking.
Summary: Library of utility functions for CMPI providers Summary: Library of utility functions for CMPI providers
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Obsoletes: libcmpiutil < %{version}-%{release} Obsoletes: libcmpiutil < %{version}-%{release}
Provides: libcmpiutil
%description -n libcmpiutil0 %description -n libcmpiutil0
Libcmpiutil is a library of utility functions for CMPI providers. The Libcmpiutil is a library of utility functions for CMPI providers. The
@@ -81,11 +81,10 @@ standardizing method dispatch and argument checking.
%prep %prep
%setup -q %setup -q
%patch -P 1 -p1
%ifarch %arm %ifarch %arm
%patch -P 2 -p1 %patch -P 1 -p1
%endif %endif
%patch -P 3 -p1 %patch -P 2 -p1
chmod -x *.c *.y *.h *.l chmod -x *.c *.y *.h *.l
%build %build