import RHEL 10 Beta tog-pegasus-2.14.1-73.el10

This commit is contained in:
eabdullin 2024-11-20 13:34:22 +00:00
parent df2fa43eea
commit d927e2b611
46 changed files with 443 additions and 36 deletions

6
.gitignore vendored
View File

@ -1,3 +1,3 @@
SOURCES/cim_schema_2.38.0Experimental-MOFs.zip cim_schema_2.38.0Experimental-MOFs.zip
SOURCES/pegasus-2.14.1.tar.gz pegasus-2.14.1.tar.gz
SOURCES/repupgrade.1.gz repupgrade.1.gz

View File

@ -1,3 +0,0 @@
151955bd95cefac21c67996b59910d61461e2132 SOURCES/cim_schema_2.38.0Experimental-MOFs.zip
c832eaf240f6dfba843c4937f7a935382d48b9be SOURCES/pegasus-2.14.1.tar.gz
2d9a12d6983385fe75b06103fd032eec05353085 SOURCES/repupgrade.1.gz

164
add-riscv64-support.patch Normal file
View File

@ -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 */

View File

@ -0,0 +1,10 @@
diff -up pegasus/src/Pegasus/ExportClient/tests/libraries.mak.orig pegasus/src/Pegasus/ExportClient/tests/libraries.mak
--- pegasus/src/Pegasus/ExportClient/tests/libraries.mak.orig 2020-11-26 10:20:13.938292092 +0100
+++ pegasus/src/Pegasus/ExportClient/tests/libraries.mak 2020-11-26 10:25:30.248432039 +0100
@@ -35,4 +35,5 @@ LIBRARIES= \
pegrepository \
pegconfig \
pegclient \
- pegcommon
+ pegcommon \
+ pegwsmserver

View File

@ -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) */

View File

@ -0,0 +1,22 @@
--- pegasus/src/Pegasus/Common/InternalException.cpp.orig 2020-03-25 04:14:59.507215411 +0000
+++ pegasus/src/Pegasus/Common/InternalException.cpp 2020-03-25 04:06:31.545770255 +0000
@@ -982,7 +982,7 @@ SocketWriteError::~SocketWriteError()
// PEGASUS_MAXELEMENTS_NUM HTTP header fields in a single HTTP message
//==============================================================================
TooManyHTTPHeadersException::TooManyHTTPHeadersException()
- : Exception("more than "PEGASUS_MAXELEMENTS
+ : Exception("more than " PEGASUS_MAXELEMENTS
" header fields detected in HTTP message")
{
}
--- pegasus/src/Pegasus/Client/tests/slp/slpclient.cpp.orig 2020-03-25 04:21:46.078970915 +0000
+++ pegasus/src/Pegasus/Client/tests/slp/slpclient.cpp 2020-03-25 04:22:16.302878401 +0000
@@ -49,7 +49,7 @@ int main(int argc, char** argv)
Array<Attribute> criteria;
Attribute attr(
- PEG_WBEM_SLP_SERVICE_ID"="PEG_WBEM_SLP_SERVICE_ID_DEFAULT);
+ PEG_WBEM_SLP_SERVICE_ID"=" PEG_WBEM_SLP_SERVICE_ID_DEFAULT);
Array<CIMServerDescription> connections;
SLPClientOptions* opts = (SLPClientOptions*)NULL;
if (argc == 2)

View File

@ -0,0 +1,52 @@
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
@@ -247,6 +247,16 @@ void snmpDeliverTrap_netsnmp::_createSes
#ifdef PEGASUS_ENABLE_NET_SNMPV3
case _SNMPv3_TRAP:
{
+ if(snmpSecPrivProto == 1)
+ {
+ //DES is no longer supported.
+ PEG_METHOD_EXIT();
+ throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,
+ MessageLoaderParms(
+ _MSG_DES_NOT_SUPPORTED_KEY,
+ _MSG_DES_NOT_SUPPORTED));
+ }
+
snmpSession.version = SNMP_VERSION_3;
CString securityNameCStr = securityName.getCString();
size_t securityNameLen = strlen(securityNameCStr);
@@ -321,14 +331,7 @@ void snmpDeliverTrap_netsnmp::_createSes
SNMP_FREE(snmpSession.securityPrivProto);
//Privacy
- if(snmpSecPrivProto == 1) //DES
- {
- snmpSession.securityPrivProto = snmp_duplicate_objid(
- usmDESPrivProtocol,
- USM_PRIV_PROTO_DES_LEN);
- snmpSession.securityPrivProtoLen = USM_PRIV_PROTO_DES_LEN;
- }
- else if(snmpSecPrivProto == 2) // AES
+ if(snmpSecPrivProto == 2) // AES
{
snmpSession.securityPrivProto = snmp_duplicate_objid(
usmAESPrivProtocol,
diff -up pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_netsnmp.h.orig pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_netsnmp.h
--- pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_netsnmp.h.orig 2021-06-23 09:57:54.014119384 +0200
+++ pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_netsnmp.h 2021-06-23 10:05:04.489320833 +0200
@@ -64,6 +64,12 @@ static const char _MSG_VERSION_NOT_SUPPO
"Handler.snmpIndicationHandler.snmpDeliverTrap_netsnmp."
"_MSG_VERSION_NOT_SUPPORTED";
+static const char _MSG_DES_NOT_SUPPORTED[] =
+ "DES support is disabled in SNMP.";
+static const char _MSG_DES_NOT_SUPPORTED_KEY[] =
+ "Handler.snmpIndicationHandler.snmpDeliverTrap_netsnmp."
+ "_MSG_DES_NOT_SUPPORTED";
+
static const char _MSG_SESSION_SEND_FAILED[] =
"Snmp Indication Handler failed to send the trap: ";
static const char _MSG_SESSION_SEND_FAILED_KEY[] =

3
sources Normal file
View File

@ -0,0 +1,3 @@
SHA512 (cim_schema_2.38.0Experimental-MOFs.zip) = c45368ae3973d1fcafa82446d76f93af7e83d4587f913c892f88d8068d4f3ccaac4bfd22976095205b7d3233f11283d1c59a5c7928ada5243e0cbd8e845e3dad
SHA512 (pegasus-2.14.1.tar.gz) = 41a44028ae181ff7ea11f3df05f54086afa457c06e25678572c543f44882a44640d332c6b5e482c22cf009a4eb424aee34ee1fa2f5ebba338a53f4e07c5e7fc9
SHA512 (repupgrade.1.gz) = 0977c2b439ac4fce8f1277e3a5c01cfaf1a55b5fb552aa1763a51a2e27240edb4dffae74a5f4a9f6582b3732c8905319ff9614d3bc975bea212e7926c4f6699a

View File

@ -3,16 +3,13 @@
%global srcname pegasus %global srcname pegasus
%global major_ver 2.14 %global major_ver 2.14
%global pegasus_gid 65
%global pegasus_uid 66
Name: tog-pegasus Name: tog-pegasus
Version: %{major_ver}.1 Version: %{major_ver}.1
Release: 46%{?dist} Release: 73%{?dist}
Epoch: 2 Epoch: 2
Summary: OpenPegasus WBEM Services for Linux Summary: OpenPegasus WBEM Services for Linux
Group: System Environment/Daemons
License: MIT License: MIT
URL: http://www.openpegasus.org URL: http://www.openpegasus.org
Source0: https://collaboration.opengroup.org/pegasus/documents/27211/pegasus-%{version}.tar.gz Source0: https://collaboration.opengroup.org/pegasus/documents/27211/pegasus-%{version}.tar.gz
@ -39,6 +36,8 @@ Source10: generate-certs
Source11: snmptrapd.conf Source11: snmptrapd.conf
# 12: repupgrade man page based on pegasus/src/Clients/repupgrade/doc/repupgrade.html # 12: repupgrade man page based on pegasus/src/Clients/repupgrade/doc/repupgrade.html
Source12: repupgrade.1.gz 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 # 1: http://cvs.rdg.opengroup.org/bugzilla/show_bug.cgi?id=5011
# Removing insecure -rpath # Removing insecure -rpath
@ -98,9 +97,19 @@ Patch40: pegasus-2.14.1-tesid.patch
Patch41: pegasus-2.14.1-ssl-cert-path.patch Patch41: pegasus-2.14.1-ssl-cert-path.patch
# 42: port to openssl-1.1 # 42: port to openssl-1.1
Patch42: pegasus-2.14.1-openssl-1.1-fix.patch Patch42: pegasus-2.14.1-openssl-1.1-fix.patch
# 43: comply with system crypto policy # 43: fix -Wreserved-user-defined-literal warnings which prevents building with clang
Patch43: pegasus-2.14.1-fix-Wreserved-user-defined-literal.patch
# 44: comply with Fedora crypto policy
# (use 'PROFILE=SYSTEM' instead of 'DEFAULT' in SSL_CTX_set_cipher_list calls) # (use 'PROFILE=SYSTEM' instead of 'DEFAULT' in SSL_CTX_set_cipher_list calls)
Patch43: pegasus-2.14.1-crypto-policy-compliance.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: 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: procps, libstdc++, pam-devel
BuildRequires: openssl, openssl-devel BuildRequires: openssl, openssl-devel
@ -108,7 +117,7 @@ BuildRequires: bash, sed, grep, coreutils, procps, gcc, gcc-c++
BuildRequires: libstdc++, make, pam-devel BuildRequires: libstdc++, make, pam-devel
BuildRequires: openssl-devel BuildRequires: openssl-devel
BuildRequires: net-snmp-devel, openslp-devel BuildRequires: net-snmp-devel, openslp-devel
BuildRequires: systemd-units BuildRequires: systemd-units systemd-rpm-macros
Requires: net-snmp-libs Requires: net-snmp-libs
Requires: %{name}-libs = %{epoch}:%{version}-%{release} Requires: %{name}-libs = %{epoch}:%{version}-%{release}
Requires: openssl Requires: openssl
@ -126,9 +135,7 @@ sources.
%package devel %package devel
Summary: The OpenPegasus Software Development Kit Summary: The OpenPegasus Software Development Kit
Group: Development/Tools
Requires: tog-pegasus >= %{version}-%{release} Requires: tog-pegasus >= %{version}-%{release}
Obsoletes: tog-pegasus-sdk
%description devel %description devel
The OpenPegasus WBEM Services for Linux SDK is the developer's kit for the The OpenPegasus WBEM Services for Linux SDK is the developer's kit for the
@ -138,7 +145,6 @@ supports C provider developers via the CMPI interface.
%package libs %package libs
Summary: The OpenPegasus Libraries Summary: The OpenPegasus Libraries
Group: System Environment/Libraries
Conflicts: libcmpiCppImpl0 Conflicts: libcmpiCppImpl0
Requires(pre): /usr/sbin/useradd Requires(pre): /usr/sbin/useradd
Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/sbin/groupadd
@ -150,7 +156,6 @@ The OpenPegasus libraries.
%if %{PEGASUS_BUILD_TEST_RPM} %if %{PEGASUS_BUILD_TEST_RPM}
%package test %package test
Summary: The OpenPegasus Tests Summary: The OpenPegasus Tests
Group: Development/Debug
Requires: tog-pegasus >= %{version}-%{release}, make Requires: tog-pegasus >= %{version}-%{release}, make
Requires: %{name}-libs = %{epoch}:%{version}-%{release} Requires: %{name}-libs = %{epoch}:%{version}-%{release}
@ -195,6 +200,9 @@ The OpenPegasus WBEM tests for the OpenPegasus %{version} Linux rpm.
%ifarch aarch64 %ifarch aarch64
%global PEGASUS_HARDWARE_PLATFORM LINUX_AARCH64_GNU %global PEGASUS_HARDWARE_PLATFORM LINUX_AARCH64_GNU
%endif %endif
%ifarch riscv64
%global PEGASUS_HARDWARE_PLATFORM LINUX_RISCV64_GNU
%endif
%global PEGASUS_ARCH_LIB %{_lib} %global PEGASUS_ARCH_LIB %{_lib}
%global OPENSSL_HOME /usr %global OPENSSL_HOME /usr
@ -254,7 +262,12 @@ yes | mak/CreateDmtfSchema 238 %{SOURCE9} cim_schema_2.38.0
%patch40 -p1 -b .testid %patch40 -p1 -b .testid
%patch41 -p1 -b .ssl-cert-path %patch41 -p1 -b .ssl-cert-path
%patch42 -p1 -b .openssl-1.1-fix %patch42 -p1 -b .openssl-1.1-fix
%patch43 -p1 -b .crypto-policy-compliance %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 .build-fixes-2
%patch47 -p1 -b .snmp-disable-des
%patch48 -p1 -b .add-riscv64-support
%build %build
@ -275,16 +288,16 @@ export LD_LIBRARY_PATH=$PEGASUS_HOME/lib
export PATH=$PEGASUS_HOME/bin:$PATH export PATH=$PEGASUS_HOME/bin:$PATH
export PEGASUS_EXTRA_C_FLAGS="$RPM_OPT_FLAGS -fPIC -g -Wall -Wno-unused -fno-strict-aliasing" export PEGASUS_EXTRA_C_FLAGS="$RPM_OPT_FLAGS -fPIC -g -Wall -Wno-unused -fno-strict-aliasing"
export PEGASUS_EXTRA_CXX_FLAGS="$PEGASUS_EXTRA_C_FLAGS" export PEGASUS_EXTRA_CXX_FLAGS="$PEGASUS_EXTRA_C_FLAGS -std=c++14"
export PEGASUS_EXTRA_LINK_FLAGS="$RPM_OPT_FLAGS" export PEGASUS_EXTRA_LINK_FLAGS="$RPM_OPT_FLAGS -Wl,-z,now"
export PEGASUS_EXTRA_PROGRAM_LINK_FLAGS="-g -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack" export PEGASUS_EXTRA_PROGRAM_LINK_FLAGS="-g -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack"
export SYS_INCLUDES=-I/usr/kerberos/include export SYS_INCLUDES=-I/usr/kerberos/include
make %{?_smp_mflags} -f ${PEGASUS_ROOT}/Makefile.Release create_ProductVersionFile %make_build -f ${PEGASUS_ROOT}/Makefile.Release create_ProductVersionFile
make %{?_smp_mflags} -f ${PEGASUS_ROOT}/Makefile.Release create_CommonProductDirectoriesInclude %make_build -f ${PEGASUS_ROOT}/Makefile.Release create_CommonProductDirectoriesInclude
make %{?_smp_mflags} -f ${PEGASUS_ROOT}/Makefile.Release create_ConfigProductDirectoriesInclude %make_build -f ${PEGASUS_ROOT}/Makefile.Release create_ConfigProductDirectoriesInclude
make %{?_smp_mflags} -f ${PEGASUS_ROOT}/Makefile.Release all %make_build -f ${PEGASUS_ROOT}/Makefile.Release all
make %{?_smp_mflags} -f ${PEGASUS_ROOT}/Makefile.Release repository %make_build -f ${PEGASUS_ROOT}/Makefile.Release repository
%install %install
@ -361,6 +374,9 @@ install -p Schemas/CIM238/DMTF/Core/CIM_AbstractComponent.mof $RPM_BUILD_ROOT/us
mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man1/ mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man1/
cp %SOURCE12 ${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 %check
# run unit tests # run unit tests
export LD_LIBRARY_PATH=$RPM_BUILD_ROOT/usr/%{_lib} export LD_LIBRARY_PATH=$RPM_BUILD_ROOT/usr/%{_lib}
@ -433,8 +449,10 @@ rm $RPM_BUILD_ROOT/usr/share/Pegasus/test/testtracer4.trace.0
/usr/share/Pegasus/html /usr/share/Pegasus/html
%files libs %files libs
%{_sysusersdir}/tog-pegasus.conf
%defattr(0755, root, pegasus, 0755) %defattr(0755, root, pegasus, 0755)
%{_libdir}/* %{_libdir}/*.so*
%{_libdir}/Pegasus
%exclude /usr/lib/debug %exclude /usr/lib/debug
%exclude /usr/lib/systemd %exclude /usr/lib/systemd
%exclude %{_tmpfilesdir} %exclude %{_tmpfilesdir}
@ -488,7 +506,7 @@ fi
:; :;
%preun %preun
%systemd_preun stop tog-pegasus.service %systemd_preun tog-pegasus.service
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
# Package removal, not upgrade # Package removal, not upgrade
rm -rf /var/run/tog-pegasus rm -rf /var/run/tog-pegasus
@ -508,9 +526,9 @@ fi
%pre libs %pre libs
if [ $1 -eq 1 ]; then if [ $1 -eq 1 ]; then
# first install: create the 'pegasus' user and group: # 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 \ %sysusers_create_compat %{SOURCE13}
-c "tog-pegasus OpenPegasus WBEM/CIM services" pegasus >/dev/null 2>&1 || :; } >/dev/null 2>&1 || :;
fi fi
:; :;
@ -556,17 +574,101 @@ fi
%changelog %changelog
* Mon Jun 29 2020 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.14.1-46 * Fri Mar 01 2024 misaka00251 <liuxin@iscas.ac.cn> - 2:2.14.1-73
- Comply with system crypto policy - Add riscv64 support
Resolves: #1842838
* Tue May 05 2020 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.14.1-45 * 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
* 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
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 2:2.14.1-62
- Rebuilt with OpenSSL 3.0.0
* 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 23 2021 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.14.1-60
- Fix build issues
- Reflect disabling of DES in net-snmp
* 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
* Thu Nov 26 2020 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.14.1-57
- Fix FTBFS
- Use make macros, patch by Tom Stellard <tstellar@redhat.com>
* Thu Aug 27 2020 Josef Řídký <jridky@redhat.com> - 2:2.14.1-56
- Rebuilt for new net-snmp release
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2:2.14.1-55
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Jeff Law <law@redhat.com> - 2:2.14.1-54
- Force C++14 as this code is not C++17 ready
* Thu Jun 25 2020 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.14.1-53
- Comply with Fedora crypto policy
* Wed Mar 25 2020 Tom Stellard <tstellar@redhat.com> - 2:2.14.1-52
- Fix -Wreserved-user-defined-literal warnings
* Thu Feb 27 2020 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.14.1-51
- Fix tmpfiles path - Fix tmpfiles path
Resolves: #1805977
* Wed Aug 01 2018 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.14.1-44 * Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2:2.14.1-50
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2:2.14.1-49
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2:2.14.1-48
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Jan 14 2019 Björn Esser <besser82@fedoraproject.org> - 2:2.14.1-47
- Rebuilt for libcrypt.so.2 (#1666033)
* Wed Aug 01 2018 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.14.1-46
- Review and fix %%files section because of failing rpm -V - Review and fix %%files section because of failing rpm -V
* Tue Jul 24 2018 Adam Williamson <awilliam@redhat.com> - 2:2.14.1-45
- Rebuild for new net-snmp
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2:2.14.1-44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2:2.14.1-43 * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2:2.14.1-43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

3
tog-pegasus.sysusers Normal file
View File

@ -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