Compare commits

...

No commits in common. 'c9' and 'c10-beta' have entirely different histories.
c9 ... c10-beta

@ -0,0 +1,164 @@
diff -urN pegasus.old/mak/platform_LINUX_RISCV64_GNU.mak pegasus.new/mak/platform_LINUX_RISCV64_GNU.mak
--- pegasus.old/mak/platform_LINUX_RISCV64_GNU.mak 1970-01-01 01:00:00.000000000 +0100
+++ pegasus.new/mak/platform_LINUX_RISCV64_GNU.mak 2024-03-01 13:41:39.061839325 +0000
@@ -0,0 +1,36 @@
+#//%LICENSE////////////////////////////////////////////////////////////////
+#//
+#// Licensed to The Open Group (TOG) under one or more contributor license
+#// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
+#// this work for additional information regarding copyright ownership.
+#// Each contributor licenses this file to you under the OpenPegasus Open
+#// Source License; you may not use this file except in compliance with the
+#// License.
+#//
+#// Permission is hereby granted, free of charge, to any person obtaining a
+#// copy of this software and associated documentation files (the "Software"),
+#// to deal in the Software without restriction, including without limitation
+#// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+#// and/or sell copies of the Software, and to permit persons to whom the
+#// Software is furnished to do so, subject to the following conditions:
+#//
+#// The above copyright notice and this permission notice shall be included
+#// in all copies or substantial portions of the Software.
+#//
+#// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+#// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+#// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+#// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+#// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+#// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+#// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#//
+#//////////////////////////////////////////////////////////////////////////
+# Platform Configuration for Linux on PPC
+# If you have generic Linux config options, please place them in config-linux.mak
+
+include $(ROOT)/mak/config-linux.mak
+
+ARCHITECTURE = RISCV64
+CXX_MACHINE_OPTIONS =
+LINK_MACHINE_OPTIONS =
diff -urN pegasus.old/src/Pegasus/Common/Config.h pegasus.new/src/Pegasus/Common/Config.h
--- pegasus.old/src/Pegasus/Common/Config.h 2024-03-01 13:41:15.281485846 +0000
+++ pegasus.new/src/Pegasus/Common/Config.h 2024-03-01 13:42:22.162479987 +0000
@@ -102,6 +102,8 @@
# include <Pegasus/Common/Platform_LINUX_XSCALE_GNU.h>
#elif defined (PEGASUS_PLATFORM_LINUX_AARCH64_GNU)
# include <Pegasus/Common/Platform_LINUX_AARCH64_GNU.h>
+#elif defined (PEGASUS_PLATFORM_LINUX_RISCV64_GNU)
+# include <Pegasus/Common/Platform_LINUX_RISCV64_GNU.h>
#elif defined (PEGASUS_PLATFORM_LINUX_X86_64_CLANG)
# include <Pegasus/Common/Platform_LINUX_X86_64_CLANG.h>
#elif defined (PEGASUS_PLATFORM_LINUX_IX86_CLANG)
diff -urN pegasus.old/src/Pegasus/Common/Platform_LINUX_RISCV64_GNU.h pegasus.new/src/Pegasus/Common/Platform_LINUX_RISCV64_GNU.h
--- pegasus.old/src/Pegasus/Common/Platform_LINUX_RISCV64_GNU.h 1970-01-01 01:00:00.000000000 +0100
+++ pegasus.new/src/Pegasus/Common/Platform_LINUX_RISCV64_GNU.h 2024-03-01 13:41:39.061839325 +0000
@@ -0,0 +1,108 @@
+//%LICENSE////////////////////////////////////////////////////////////////
+//
+// Licensed to The Open Group (TOG) under one or more contributor license
+// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
+// this work for additional information regarding copyright ownership.
+// Each contributor licenses this file to you under the OpenPegasus Open
+// Source License; you may not use this file except in compliance with the
+// License.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+//////////////////////////////////////////////////////////////////////////
+//
+//%/////////////////////////////////////////////////////////////////////////////
+
+/*****************************************************************************
+ The platform configuration files in pegasus/src/Pegasus/Common/Platform_*.h
+ are intended to normalize platform/compiler differences so that Pegasus code
+ can be written to work on all platforms without requiring platform ifdefs.
+ Since these files are part of the Pegasus SDK, their contents should be
+ the minimum that achieves the stated purpose.
+
+ Examples of differences that are normalized here are support for C++
+ namespaces, 64-bit integer type, support for C++ template specialization.
+
+ Examples of things that are not appropriate in these files are the enablement
+ of Pegasus features for a specific platform and other build configuration.
+******************************************************************************/
+
+#ifndef Pegasus_Platform_LINUX_RISCV64_GNU_h
+#define Pegasus_Platform_LINUX_RISCV64_GNU_h
+
+#include <stddef.h>
+
+#define PEGASUS_OS_TYPE_UNIX
+
+#ifndef PEGASUS_PLATFORM_LINUX_GENERIC_GNU
+#define PEGASUS_PLATFORM_LINUX_GENERIC_GNU
+#endif
+
+#define PEGASUS_OS_LINUX
+
+#define PEGASUS_POINTER_64BIT
+
+#define PEGASUS_COMPILER_GNU
+
+#define PEGASUS_UINT64 unsigned long long
+
+#define PEGASUS_SINT64 long long
+
+#define PEGASUS_HAVE_NAMESPACES
+
+#define PEGASUS_HAVE_FOR_SCOPE
+
+#define PEGASUS_HAVE_TEMPLATE_SPECIALIZATION
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#ifndef _REENTRANT
+#define _REENTRANT
+#endif
+#define _THREAD_SAFE
+#include <features.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/param.h> /* For MAXHOSTNAMELEN */
+#include <limits.h> /* _POSIX_HOST_NAME_MAX */
+
+#if (__GNUC__ >= 4)
+# define PEGASUS_EXPORT __attribute__ ((visibility("default")))
+# define PEGASUS_IMPORT __attribute__ ((visibility("default")))
+# define PEGASUS_HIDDEN_LINKAGE __attribute__((visibility("hidden")))
+#endif
+
+#define PEGASUS_HAVE_PTHREADS
+
+#define PEGASUS_HAVE_NANOSLEEP
+
+#define PEGASUS_HAS_SIGNALS
+
+#define PEGASUS_INTEGERS_BOUNDARY_ALIGNED
+
+/* getifaddrs() avilable in gcc version >= 3.4 */
+#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
+# define PEGASUS_HAS_GETIFADDRS
+#endif
+
+/* use POSIX read-write locks on this platform */
+#define PEGASUS_USE_POSIX_RWLOCK
+
+#endif /* Pegasus_Platform_LINUX_RISCV64_GNU_h */

@ -0,0 +1,54 @@
diff -up pegasus/src/Pegasus/Common/CIMName.h.orig pegasus/src/Pegasus/Common/CIMName.h
--- pegasus/src/Pegasus/Common/CIMName.h.orig 2008-12-02 10:00:43.000000000 +0100
+++ pegasus/src/Pegasus/Common/CIMName.h 2021-06-23 09:32:06.900922384 +0200
@@ -88,6 +88,8 @@ public:
*/
CIMName(const char* name);
+ CIMName(const CIMName& other) : cimName(other.cimName) {}
+
/**
Assigns the value of the specified CIMName object to this object.
@param name The CIMName object from which to assign this
@@ -279,6 +281,8 @@ public:
*/
CIMNamespaceName(const char* name);
+ CIMNamespaceName(const CIMNamespaceName& other) : cimNamespaceName(other.cimNamespaceName) {}
+
/**
Assigns the value of the specified CIMNamespaceName object to this
object.
diff -up pegasus/src/Pegasus/Common/Memory.h.orig pegasus/src/Pegasus/Common/Memory.h
--- pegasus/src/Pegasus/Common/Memory.h.orig 2008-12-02 10:00:48.000000000 +0100
+++ pegasus/src/Pegasus/Common/Memory.h 2021-06-23 09:32:06.901922405 +0200
@@ -59,7 +59,7 @@ PEGASUS_NAMESPACE_BEGIN
template<class T>
inline void Zeros(T* items, Uint32 size)
{
- memset(items, 0, sizeof(T) * size);
+ memset(static_cast<void*>(items), 0, sizeof(T) * size);
}
template<class T>
@@ -157,7 +157,7 @@ inline void CopyToRaw(Real64* to, const
inline void CopyToRaw(Char16* to, const Char16* from, Uint32 size)
{
- memcpy(to, from, sizeof(Char16) * size);
+ memcpy(static_cast<void*>(to), from, sizeof(Char16) * size);
}
template<class T>
diff -up pegasus/src/Pegasus/Common/Threads.h.orig pegasus/src/Pegasus/Common/Threads.h
--- pegasus/src/Pegasus/Common/Threads.h.orig 2013-02-13 19:21:14.000000000 +0100
+++ pegasus/src/Pegasus/Common/Threads.h 2021-06-23 09:32:06.901922405 +0200
@@ -245,7 +245,7 @@ inline bool Threads::null(const ThreadTy
inline void Threads::clear(ThreadType& x)
{
- memset(&x, 0, sizeof(x));
+ memset(static_cast<void*>(&x), 0, sizeof(x));
}
#endif /* defined(PEGASUS_HAVE_PTHREADS) */

@ -1,6 +1,3 @@
This patch is required because net-smp is not build with DES support,
so usmDESPrivProtocol is not available.
diff -up pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_netsnmp.cpp.orig pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_netsnmp.cpp
--- pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_netsnmp.cpp.orig 2021-06-23 09:57:12.052712533 +0200
+++ pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_netsnmp.cpp 2021-06-23 10:06:19.893857294 +0200

@ -0,0 +1,3 @@
#Type Name ID GECOS Home directory Shell
g pegasus 65
u pegasus 66 "tog-pegasus OpenPegasus WBEM/CIM services" /var/lib/Pegasus /sbin/nologin

@ -3,12 +3,10 @@
%global srcname pegasus
%global major_ver 2.14
%global pegasus_gid 65
%global pegasus_uid 66
Name: tog-pegasus
Version: %{major_ver}.1
Release: 64%{?dist}
Release: 73%{?dist}
Epoch: 2
Summary: OpenPegasus WBEM Services for Linux
@ -38,6 +36,8 @@ Source10: generate-certs
Source11: snmptrapd.conf
# 12: repupgrade man page based on pegasus/src/Clients/repupgrade/doc/repupgrade.html
Source12: repupgrade.1.gz
# 13: sysusers conf file for dynamic creation of the 'pegasus' user and group
Source13: tog-pegasus.sysusers
# 1: http://cvs.rdg.opengroup.org/bugzilla/show_bug.cgi?id=5011
# Removing insecure -rpath
@ -104,8 +104,12 @@ Patch43: pegasus-2.14.1-fix-Wreserved-user-defined-literal.patch
Patch44: pegasus-2.14.1-crypto-policy-compliance.patch
# 45: add required lib to fix FTBS
Patch45: pegasus-2.14.1-add-pegwsmserver-to-ldd-libs.patch
# 46: Remove DES support.
Patch46: pegasus-snmp-disable-des.patch
# 46: fixes FTBFS
Patch46: pegasus-2.14.1-build-fixes-2.patch
# 47: disable DES no longer supported in net-snmp
Patch47: pegasus-2.14.1-snmp-disable-des.patch
# 48: add RISC-V support
Patch48: add-riscv64-support.patch
BuildRequires: procps, libstdc++, pam-devel
BuildRequires: openssl, openssl-devel
@ -113,7 +117,7 @@ BuildRequires: bash, sed, grep, coreutils, procps, gcc, gcc-c++
BuildRequires: libstdc++, make, pam-devel
BuildRequires: openssl-devel
BuildRequires: net-snmp-devel, openslp-devel
BuildRequires: systemd-units
BuildRequires: systemd-units systemd-rpm-macros
Requires: net-snmp-libs
Requires: %{name}-libs = %{epoch}:%{version}-%{release}
Requires: openssl
@ -132,7 +136,6 @@ sources.
%package devel
Summary: The OpenPegasus Software Development Kit
Requires: tog-pegasus >= %{version}-%{release}
Obsoletes: tog-pegasus-sdk
%description devel
The OpenPegasus WBEM Services for Linux SDK is the developer's kit for the
@ -197,6 +200,9 @@ The OpenPegasus WBEM tests for the OpenPegasus %{version} Linux rpm.
%ifarch aarch64
%global PEGASUS_HARDWARE_PLATFORM LINUX_AARCH64_GNU
%endif
%ifarch riscv64
%global PEGASUS_HARDWARE_PLATFORM LINUX_RISCV64_GNU
%endif
%global PEGASUS_ARCH_LIB %{_lib}
%global OPENSSL_HOME /usr
@ -259,7 +265,9 @@ yes | mak/CreateDmtfSchema 238 %{SOURCE9} cim_schema_2.38.0
%patch43 -p1 -b .Wreserved-user-defined-literal-fix
%patch44 -p1 -b .crypto-policy-compliance
%patch45 -p1 -b .add-pegwsmserver-to-ldd-libs
%patch46 -p1 -b .snmp-disable-des
%patch46 -p1 -b .build-fixes-2
%patch47 -p1 -b .snmp-disable-des
%patch48 -p1 -b .add-riscv64-support
%build
@ -366,6 +374,9 @@ install -p Schemas/CIM238/DMTF/Core/CIM_AbstractComponent.mof $RPM_BUILD_ROOT/us
mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man1/
cp %SOURCE12 ${RPM_BUILD_ROOT}/%{_mandir}/man1/
# install sysusers conf file
install -p -D -m 0644 %{SOURCE13} %{buildroot}%{_sysusersdir}/tog-pegasus.conf
%check
# run unit tests
export LD_LIBRARY_PATH=$RPM_BUILD_ROOT/usr/%{_lib}
@ -438,8 +449,10 @@ rm $RPM_BUILD_ROOT/usr/share/Pegasus/test/testtracer4.trace.0
/usr/share/Pegasus/html
%files libs
%{_sysusersdir}/tog-pegasus.conf
%defattr(0755, root, pegasus, 0755)
%{_libdir}/*
%{_libdir}/*.so*
%{_libdir}/Pegasus
%exclude /usr/lib/debug
%exclude /usr/lib/systemd
%exclude %{_tmpfilesdir}
@ -513,9 +526,9 @@ fi
%pre libs
if [ $1 -eq 1 ]; then
# first install: create the 'pegasus' user and group:
/usr/sbin/groupadd -g %{pegasus_gid} -f -r pegasus >/dev/null 2>&1 || :;
/usr/sbin/useradd -u %{pegasus_uid} -r -N -M -g pegasus -s /sbin/nologin -d /var/lib/Pegasus \
-c "tog-pegasus OpenPegasus WBEM/CIM services" pegasus >/dev/null 2>&1 || :;
{
%sysusers_create_compat %{SOURCE13}
} >/dev/null 2>&1 || :;
fi
:;
@ -561,29 +574,54 @@ fi
%changelog
* Tue Feb 01 2022 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.14.1-64
- Fix build flags
Resolves: #2044895
* Fri Mar 01 2024 misaka00251 <liuxin@iscas.ac.cn> - 2:2.14.1-73
- Add riscv64 support
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2:2.14.1-72
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2:2.14.1-71
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Feb 10 2023 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.14.1-70
- SPDX migration
- Remove -devel Obsoletes
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2:2.14.1-69
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Nov 23 2022 Florian Weimer <fweimer@redhat.com> - 2:2.14.1-68
- Avoid tog-pegasus-libs file conflict on i686 (#2145172)
* Tue Aug 02 2022 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.14.1-67
- Use systemd-sysusers for the 'pegasus' user and group creation
Resolves: #2095477
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2:2.14.1-66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jan 31 2022 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.14.1-65
- Fix preun systemd macro call
Resolves: #2048002
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2:2.14.1-63
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon Jan 24 2022 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.14.1-64
- Fix build flags
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2:2.14.1-63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.14.1-62
- Improve error message without DES support in SNMP
Resolves: rhbz#1972623
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 2:2.14.1-62
- Rebuilt with OpenSSL 3.0.0
* Wed Jun 16 2021 Florian Weimer <fweimer@redhat.com> - 2:2.14.1-61
- Port to net-snmp without DES support (#1958073)
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2:2.14.1-61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 2:2.14.1-60
- Rebuilt for RHEL 9 BETA for openssl 3.0
Related: rhbz#1971065
* Wed Jun 23 2021 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.14.1-60
- Fix build issues
- Reflect disabling of DES in net-snmp
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2:2.14.1-59
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2:2.14.1-59
- Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2:2.14.1-58
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save