From 8f3c5dff266120d80b400c96c7db05c47a47dcbf Mon Sep 17 00:00:00 2001 From: Vitezslav Crhonek Date: Wed, 16 Feb 2011 11:39:40 +0100 Subject: [PATCH] Update to upstream version 2.10.1, minor issues cleaning --- .gitignore | 1 + pegasus-2.9.0-cmpi-provider-lib.patch | 14 +-- pegasus-2.9.0-local-or-remote-auth.patch | 138 +++++++++++------------ pegasus-2.9.0-redhat-config.patch | 16 +-- pegasus-2.9.1-makefile-initscript.patch | 42 +++---- sources | 2 +- tog-pegasus.spec | 55 +++++---- 7 files changed, 140 insertions(+), 128 deletions(-) diff --git a/.gitignore b/.gitignore index 77e001d..162083f 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ pegasus-2.7.1.tar.gz pegasus-2.7.2.tar.gz pegasus-2.9.0.tar.gz /pegasus-2.9.2.tar.gz +/pegasus-2.10.0.tar.gz diff --git a/pegasus-2.9.0-cmpi-provider-lib.patch b/pegasus-2.9.0-cmpi-provider-lib.patch index 6feb308..fd9766e 100644 --- a/pegasus-2.9.0-cmpi-provider-lib.patch +++ b/pegasus-2.9.0-cmpi-provider-lib.patch @@ -1,12 +1,12 @@ -diff -up pegasus/src/Pegasus/Config/FixedPropertyTableLinux.h_old pegasus/src/Pegasus/Config/FixedPropertyTableLinux.h ---- pegasus/src/Pegasus/Config/FixedPropertyTableLinux.h_old 2010-11-02 12:06:56.267640012 +0100 -+++ pegasus/src/Pegasus/Config/FixedPropertyTableLinux.h 2010-11-02 12:30:32.090223380 +0100 -@@ -59,7 +59,7 @@ +diff -up pegasus/src/Pegasus/Config/FixedPropertyTableLinux.h.orig pegasus/src/Pegasus/Config/FixedPropertyTableLinux.h +--- pegasus/src/Pegasus/Config/FixedPropertyTableLinux.h.orig 2011-02-14 13:13:08.950012897 +0100 ++++ pegasus/src/Pegasus/Config/FixedPropertyTableLinux.h 2011-02-14 13:14:21.559049744 +0100 +@@ -63,7 +63,7 @@ + {"crlStore", PEGASUS_SSL_SERVER_CRL}, # endif {"repositoryDir", PEGASUS_REPOSITORY_DIR}, - {"providerDir", PEGASUS_EXTRA_PROVIDER_LIB_DIR PEGASUS_PROVIDER_LIB_DIR -- ":/usr/" PEGASUS_ARCH_LIB "/cmpi"}, -+ ":" PEGASUS_DEST_LIB_DIR "/cmpi"}, +- {"providerDir", PEGASUS_PROVIDER_LIB_DIR ":/usr/" PEGASUS_ARCH_LIB "/cmpi"}, ++ {"providerDir", PEGASUS_PROVIDER_LIB_DIR ":" PEGASUS_DEST_LIB_DIR "/cmpi"}, {"providerManagerDir", PEGASUS_PROVIDER_MANAGER_LIB_DIR}, # else /* PEGASUS_OVERRIDE_DEFAULT_RELEASE_DIRS */ {"traceFilePath", "/var/opt/tog-pegasus/cache/trace/cimserver.trc"}, diff --git a/pegasus-2.9.0-local-or-remote-auth.patch b/pegasus-2.9.0-local-or-remote-auth.patch index 98d87dc..eb2c408 100644 --- a/pegasus-2.9.0-local-or-remote-auth.patch +++ b/pegasus-2.9.0-local-or-remote-auth.patch @@ -1,6 +1,6 @@ -diff -up pegasus/src/Executor/PAMAuth.h.local-or-remote-auth pegasus/src/Executor/PAMAuth.h ---- pegasus/src/Executor/PAMAuth.h.local-or-remote-auth 2008-12-02 10:00:13.000000000 +0100 -+++ pegasus/src/Executor/PAMAuth.h 2009-06-08 15:06:26.000000000 +0200 +diff -up pegasus/src/Executor/PAMAuth.h.orig pegasus/src/Executor/PAMAuth.h +--- pegasus/src/Executor/PAMAuth.h.orig 2011-02-14 13:16:01.619503260 +0100 ++++ pegasus/src/Executor/PAMAuth.h 2011-02-14 13:31:30.694134170 +0100 @@ -49,6 +49,9 @@ #include #include @@ -8,10 +8,10 @@ diff -up pegasus/src/Executor/PAMAuth.h.local-or-remote-auth pegasus/src/Executo +#include +typedef bool Boolean; + - /* - **============================================================================== - ** -@@ -393,29 +396,60 @@ static int PAMValidateUserCallback( + #ifdef PEGASUS_FLAVOR + # define PAM_CONFIG_FILE "wbem" PEGASUS_FLAVOR + #else +@@ -398,29 +401,60 @@ static int PAMValidateUserCallback( */ static int PAMAuthenticateInProcess( @@ -30,23 +30,23 @@ diff -up pegasus/src/Executor/PAMAuth.h.local-or-remote-auth pegasus/src/Executo + // NOTE: if any pam call should log anything, our syslog socket will be redirected + // to the AUTH facility, so we need to redirect it back after each pam call. + -+ if ((retcode = pam_start("wbem", username, &pconv, &handle)) != PAM_SUCCESS) ++ if ((retcode = pam_start(PAM_CONFIG_FILE, username, &pconv, &handle)) != PAM_SUCCESS) + { + closelog(); + openlog("cimserver", LOG_PID, LOG_DAEMON); -+ syslog( LOG_ERR, "pam_start failed: %s", pam_strerror(handle, retcode)); ++ syslog(LOG_ERR, "pam_start failed: %s", pam_strerror(handle, retcode)); + syslog(LOG_ERR, "PAM authentication failed for %s user: %s", + isRemoteUser ? "remote" : "local", username); + return -1; + } -- if (pam_start("wbem", username, &pconv, &handle) != PAM_SUCCESS) +- if (pam_start(PAM_CONFIG_FILE, username, &pconv, &handle) != PAM_SUCCESS) + if ((retcode = pam_set_item(handle, PAM_TTY, isRemoteUser ? "wbemNetwork" : "wbemLocal")) != PAM_SUCCESS) + { + pam_end(handle, 0); + closelog(); + openlog("cimserver", LOG_PID, LOG_DAEMON); -+ syslog( LOG_ERR, "pam_set_item(PAM_TTY=wbem) failed: %s", pam_strerror(handle, retcode)); ++ syslog(LOG_ERR, "pam_set_item(PAM_TTY=wbem) failed: %s", pam_strerror(handle, retcode)); + syslog(LOG_ERR, "PAM authentication failed for %s user: %s", + isRemoteUser ? "remote" : "local", username); return -1; @@ -76,7 +76,7 @@ diff -up pegasus/src/Executor/PAMAuth.h.local-or-remote-auth pegasus/src/Executo return -1; } -@@ -439,16 +473,34 @@ static int PAMValidateUserInProcess(cons +@@ -444,16 +478,34 @@ static int PAMValidateUserInProcess(cons PAMData data; struct pam_conv pconv; pam_handle_t* phandle; @@ -85,12 +85,12 @@ diff -up pegasus/src/Executor/PAMAuth.h.local-or-remote-auth pegasus/src/Executo pconv.conv = PAMValidateUserCallback; pconv.appdata_ptr = &data; -- if (pam_start("wbem", username, &pconv, &phandle) != PAM_SUCCESS) -+ if ((retcode = pam_start("wbem", username, &pconv, &phandle)) != PAM_SUCCESS) +- if (pam_start(PAM_CONFIG_FILE, username, &pconv, &phandle) != PAM_SUCCESS) ++ if ((retcode = pam_start(PAM_CONFIG_FILE, username, &pconv, &phandle)) != PAM_SUCCESS) + { + closelog(); + openlog("cimserver", LOG_PID, LOG_DAEMON); -+ syslog( LOG_ERR, "pam_start() failed: %s", pam_strerror(phandle, retcode)); ++ syslog(LOG_ERR, "pam_start() failed: %s", pam_strerror(phandle, retcode)); return -1; + } + @@ -99,7 +99,7 @@ diff -up pegasus/src/Executor/PAMAuth.h.local-or-remote-auth pegasus/src/Executo + pam_end(phandle, 0); + closelog(); + openlog("cimserver", LOG_PID, LOG_DAEMON); -+ syslog( LOG_ERR, "pam_set_item(PAM_TTY=wbemLocal) failed: %s", pam_strerror(phandle, retcode)); ++ syslog(LOG_ERR, "pam_set_item(PAM_TTY=wbemLocal) failed: %s", pam_strerror(phandle, retcode)); + return -1; + } @@ -109,11 +109,11 @@ diff -up pegasus/src/Executor/PAMAuth.h.local-or-remote-auth pegasus/src/Executo pam_end(phandle, 0); + closelog(); + openlog("cimserver", LOG_PID, LOG_DAEMON); -+ syslog( LOG_ERR, "pam_acct_mgmt() failed: %s", pam_strerror(phandle, retcode)); ++ syslog(LOG_ERR, "pam_acct_mgmt() failed: %s", pam_strerror(phandle, retcode)); return -1; } -@@ -467,12 +519,12 @@ static int PAMValidateUserInProcess(cons +@@ -472,12 +524,12 @@ static int PAMValidateUserInProcess(cons **============================================================================== */ @@ -128,9 +128,9 @@ diff -up pegasus/src/Executor/PAMAuth.h.local-or-remote-auth pegasus/src/Executo #endif } -diff -up pegasus/src/Pegasus/Common/AuthenticationInfo.h.local-or-remote-auth pegasus/src/Pegasus/Common/AuthenticationInfo.h ---- pegasus/src/Pegasus/Common/AuthenticationInfo.h.local-or-remote-auth 2008-12-16 19:55:59.000000000 +0100 -+++ pegasus/src/Pegasus/Common/AuthenticationInfo.h 2009-06-08 15:06:26.000000000 +0200 +diff -up pegasus/src/Pegasus/Common/AuthenticationInfo.h.orig pegasus/src/Pegasus/Common/AuthenticationInfo.h +--- pegasus/src/Pegasus/Common/AuthenticationInfo.h.orig 2011-02-14 14:50:41.087630325 +0100 ++++ pegasus/src/Pegasus/Common/AuthenticationInfo.h 2011-02-14 14:52:30.082207742 +0100 @@ -354,6 +354,22 @@ public: return _rep->getRemotePrivilegedUserAccessChecked(); } @@ -154,16 +154,16 @@ diff -up pegasus/src/Pegasus/Common/AuthenticationInfo.h.local-or-remote-auth pe private: AuthenticationInfo(AuthenticationInfoRep* rep) : _rep(rep) -diff -up pegasus/src/Pegasus/Common/AuthenticationInfoRep.cpp.local-or-remote-auth pegasus/src/Pegasus/Common/AuthenticationInfoRep.cpp ---- pegasus/src/Pegasus/Common/AuthenticationInfoRep.cpp.local-or-remote-auth 2008-12-16 19:55:59.000000000 +0100 -+++ pegasus/src/Pegasus/Common/AuthenticationInfoRep.cpp 2009-06-08 15:06:26.000000000 +0200 +diff -up pegasus/src/Pegasus/Common/AuthenticationInfoRep.cpp.orig pegasus/src/Pegasus/Common/AuthenticationInfoRep.cpp +--- pegasus/src/Pegasus/Common/AuthenticationInfoRep.cpp.orig 2011-02-14 14:52:52.401989289 +0100 ++++ pegasus/src/Pegasus/Common/AuthenticationInfoRep.cpp 2011-02-14 14:55:40.179890990 +0100 @@ -44,7 +44,8 @@ const String AuthenticationInfoRep::AUTH AuthenticationInfoRep::AuthenticationInfoRep(Boolean flag) : _connectionAuthenticated(false), - _wasRemotePrivilegedUserAccessChecked(false) + _wasRemotePrivilegedUserAccessChecked(false), -+ _isRemoteUser(true) ++ _isRemoteUser(true) { PEG_METHOD_ENTER( TRC_AUTHENTICATION, "AuthenticationInfoRep::AuthenticationInfoRep"); @@ -184,9 +184,9 @@ diff -up pegasus/src/Pegasus/Common/AuthenticationInfoRep.cpp.local-or-remote-au void AuthenticationInfoRep::setConnectionAuthenticated( Boolean connectionAuthenticated) { -diff -up pegasus/src/Pegasus/Common/AuthenticationInfoRep.h.local-or-remote-auth pegasus/src/Pegasus/Common/AuthenticationInfoRep.h ---- pegasus/src/Pegasus/Common/AuthenticationInfoRep.h.local-or-remote-auth 2008-12-16 19:55:59.000000000 +0100 -+++ pegasus/src/Pegasus/Common/AuthenticationInfoRep.h 2009-06-08 15:06:26.000000000 +0200 +diff -up pegasus/src/Pegasus/Common/AuthenticationInfoRep.h.orig pegasus/src/Pegasus/Common/AuthenticationInfoRep.h +--- pegasus/src/Pegasus/Common/AuthenticationInfoRep.h.orig 2011-02-14 14:55:54.525678940 +0100 ++++ pegasus/src/Pegasus/Common/AuthenticationInfoRep.h 2011-02-14 15:02:45.815917313 +0100 @@ -147,6 +147,13 @@ public: void setSecurityAssociation(); #endif @@ -209,9 +209,9 @@ diff -up pegasus/src/Pegasus/Common/AuthenticationInfoRep.h.local-or-remote-auth }; PEGASUS_NAMESPACE_END -diff -up pegasus/src/Pegasus/Common/Executor.cpp.local-or-remote-auth pegasus/src/Pegasus/Common/Executor.cpp ---- pegasus/src/Pegasus/Common/Executor.cpp.local-or-remote-auth 2008-12-16 19:55:59.000000000 +0100 -+++ pegasus/src/Pegasus/Common/Executor.cpp 2009-06-08 15:06:26.000000000 +0200 +diff -up pegasus/src/Pegasus/Common/Executor.cpp.orig pegasus/src/Pegasus/Common/Executor.cpp +--- pegasus/src/Pegasus/Common/Executor.cpp.orig 2011-02-14 15:03:08.021683671 +0100 ++++ pegasus/src/Pegasus/Common/Executor.cpp 2011-02-14 15:07:44.839168734 +0100 @@ -125,7 +125,8 @@ public: virtual int authenticatePassword( @@ -260,9 +260,9 @@ diff -up pegasus/src/Pegasus/Common/Executor.cpp.local-or-remote-auth pegasus/sr } int Executor::validateUser( -diff -up pegasus/src/Pegasus/Common/Executor.h.local-or-remote-auth pegasus/src/Pegasus/Common/Executor.h ---- pegasus/src/Pegasus/Common/Executor.h.local-or-remote-auth 2008-12-02 10:00:47.000000000 +0100 -+++ pegasus/src/Pegasus/Common/Executor.h 2009-06-08 15:06:26.000000000 +0200 +diff -up pegasus/src/Pegasus/Common/Executor.h.orig pegasus/src/Pegasus/Common/Executor.h +--- pegasus/src/Pegasus/Common/Executor.h.orig 2011-02-14 15:07:53.267218973 +0100 ++++ pegasus/src/Pegasus/Common/Executor.h 2011-02-14 15:08:44.392587890 +0100 @@ -183,7 +183,8 @@ public: */ static int authenticatePassword( @@ -273,10 +273,10 @@ diff -up pegasus/src/Pegasus/Common/Executor.h.local-or-remote-auth pegasus/src/ /** Check whether the given user is valid for the underlying authentcation mechanism. -diff -up pegasus/src/Pegasus/Common/HTTPConnection.cpp.local-or-remote-auth pegasus/src/Pegasus/Common/HTTPConnection.cpp ---- pegasus/src/Pegasus/Common/HTTPConnection.cpp.local-or-remote-auth 2008-12-18 19:52:01.000000000 +0100 -+++ pegasus/src/Pegasus/Common/HTTPConnection.cpp 2009-06-08 15:06:26.000000000 +0200 -@@ -2128,6 +2128,30 @@ void HTTPConnection::_handleReadEvent() +diff -up pegasus/src/Pegasus/Common/HTTPConnection.cpp.orig pegasus/src/Pegasus/Common/HTTPConnection.cpp +--- pegasus/src/Pegasus/Common/HTTPConnection.cpp.orig 2011-02-14 15:09:01.546724864 +0100 ++++ pegasus/src/Pegasus/Common/HTTPConnection.cpp 2011-02-14 15:10:25.210147273 +0100 +@@ -2220,6 +2220,30 @@ void HTTPConnection::_handleReadEvent() message->contentLanguages = contentLanguages; message->dest = _outputMessageQueue->getQueueId(); @@ -307,9 +307,9 @@ diff -up pegasus/src/Pegasus/Common/HTTPConnection.cpp.local-or-remote-auth pega // // The _closeConnection method sets the _connectionClosePending flag. // If we are executing on the client side and the -diff -up pegasus/src/Pegasus/Common/HTTPMessage.cpp.local-or-remote-auth pegasus/src/Pegasus/Common/HTTPMessage.cpp ---- pegasus/src/Pegasus/Common/HTTPMessage.cpp.local-or-remote-auth 2008-12-18 19:52:01.000000000 +0100 -+++ pegasus/src/Pegasus/Common/HTTPMessage.cpp 2009-06-08 15:06:26.000000000 +0200 +diff -up pegasus/src/Pegasus/Common/HTTPMessage.cpp.orig pegasus/src/Pegasus/Common/HTTPMessage.cpp +--- pegasus/src/Pegasus/Common/HTTPMessage.cpp.orig 2011-02-14 15:10:33.796216618 +0100 ++++ pegasus/src/Pegasus/Common/HTTPMessage.cpp 2011-02-14 15:11:13.417152699 +0100 @@ -133,7 +133,8 @@ HTTPMessage::HTTPMessage( queueId(queueId_), authInfo(0), @@ -320,9 +320,9 @@ diff -up pegasus/src/Pegasus/Common/HTTPMessage.cpp.local-or-remote-auth pegasus { if (cimException_) cimException = *cimException_; -diff -up pegasus/src/Pegasus/Common/HTTPMessage.h.local-or-remote-auth pegasus/src/Pegasus/Common/HTTPMessage.h ---- pegasus/src/Pegasus/Common/HTTPMessage.h.local-or-remote-auth 2008-12-18 19:52:01.000000000 +0100 -+++ pegasus/src/Pegasus/Common/HTTPMessage.h 2009-06-08 15:06:26.000000000 +0200 +diff -up pegasus/src/Pegasus/Common/HTTPMessage.h.orig pegasus/src/Pegasus/Common/HTTPMessage.h +--- pegasus/src/Pegasus/Common/HTTPMessage.h.orig 2011-02-14 15:11:20.936089412 +0100 ++++ pegasus/src/Pegasus/Common/HTTPMessage.h 2011-02-14 15:11:49.449641100 +0100 @@ -73,6 +73,7 @@ public: ContentLanguageList contentLanguages; Boolean acceptLanguagesDecoded; @@ -331,9 +331,9 @@ diff -up pegasus/src/Pegasus/Common/HTTPMessage.h.local-or-remote-auth pegasus/s CIMException cimException; void parse( -diff -up pegasus/src/Pegasus/Common/tests/Executor/TestExecutor.cpp.local-or-remote-auth pegasus/src/Pegasus/Common/tests/Executor/TestExecutor.cpp ---- pegasus/src/Pegasus/Common/tests/Executor/TestExecutor.cpp.local-or-remote-auth 2008-12-02 10:01:08.000000000 +0100 -+++ pegasus/src/Pegasus/Common/tests/Executor/TestExecutor.cpp 2009-06-08 15:06:26.000000000 +0200 +diff -up pegasus/src/Pegasus/Common/tests/Executor/TestExecutor.cpp.orig pegasus/src/Pegasus/Common/tests/Executor/TestExecutor.cpp +--- pegasus/src/Pegasus/Common/tests/Executor/TestExecutor.cpp.orig 2011-02-14 15:12:06.539770136 +0100 ++++ pegasus/src/Pegasus/Common/tests/Executor/TestExecutor.cpp 2011-02-14 15:13:14.537240826 +0100 @@ -76,7 +76,7 @@ void testExecutorLoopbackImpl() #endif @@ -352,10 +352,10 @@ diff -up pegasus/src/Pegasus/Common/tests/Executor/TestExecutor.cpp.local-or-rem PEGASUS_TEST_ASSERT(Executor::validateUser("xnonexistentuserx") == -1); char challengeFilePath[EXECUTOR_BUFFER_SIZE]; -diff -up pegasus/src/Pegasus/Security/Authentication/BasicAuthenticationHandler.cpp.local-or-remote-auth pegasus/src/Pegasus/Security/Authentication/BasicAuthenticationHandler.cpp ---- pegasus/src/Pegasus/Security/Authentication/BasicAuthenticationHandler.cpp.local-or-remote-auth 2008-12-16 19:57:08.000000000 +0100 -+++ pegasus/src/Pegasus/Security/Authentication/BasicAuthenticationHandler.cpp 2009-06-08 15:22:26.000000000 +0200 -@@ -152,7 +152,7 @@ Boolean BasicAuthenticationHandler::auth +diff -up pegasus/src/Pegasus/Security/Authentication/BasicAuthenticationHandler.cpp.orig pegasus/src/Pegasus/Security/Authentication/BasicAuthenticationHandler.cpp +--- pegasus/src/Pegasus/Security/Authentication/BasicAuthenticationHandler.cpp.orig 2011-02-14 15:13:40.405462470 +0100 ++++ pegasus/src/Pegasus/Security/Authentication/BasicAuthenticationHandler.cpp 2011-02-14 15:14:31.834866750 +0100 +@@ -153,7 +153,7 @@ Boolean BasicAuthenticationHandler::auth } authInfo->setRemotePrivilegedUserAccessChecked(); @@ -364,9 +364,9 @@ diff -up pegasus/src/Pegasus/Security/Authentication/BasicAuthenticationHandler. // Log audit message. PEG_AUDIT_LOG(logBasicAuthentication( -diff -up pegasus/src/Pegasus/Security/Authentication/BasicAuthenticator.h.local-or-remote-auth pegasus/src/Pegasus/Security/Authentication/BasicAuthenticator.h ---- pegasus/src/Pegasus/Security/Authentication/BasicAuthenticator.h.local-or-remote-auth 2008-12-16 19:57:08.000000000 +0100 -+++ pegasus/src/Pegasus/Security/Authentication/BasicAuthenticator.h 2009-06-08 15:06:26.000000000 +0200 +diff -up pegasus/src/Pegasus/Security/Authentication/BasicAuthenticator.h.orig pegasus/src/Pegasus/Security/Authentication/BasicAuthenticator.h +--- pegasus/src/Pegasus/Security/Authentication/BasicAuthenticator.h.orig 2011-02-14 15:14:38.744727386 +0100 ++++ pegasus/src/Pegasus/Security/Authentication/BasicAuthenticator.h 2011-02-14 15:15:14.442171950 +0100 @@ -65,7 +65,8 @@ public: */ virtual Boolean authenticate( @@ -377,9 +377,9 @@ diff -up pegasus/src/Pegasus/Security/Authentication/BasicAuthenticator.h.local- /** Construct and return the HTTP Basic authentication challenge header @return A string containing the authentication challenge header. -diff -up pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticator.h.local-or-remote-auth pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticator.h ---- pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticator.h.local-or-remote-auth 2008-12-16 19:57:08.000000000 +0100 -+++ pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticator.h 2009-06-08 15:06:26.000000000 +0200 +diff -up pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticator.h.orig pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticator.h +--- pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticator.h.orig 2011-02-14 15:15:34.154626760 +0100 ++++ pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticator.h 2011-02-14 15:16:12.858446134 +0100 @@ -53,7 +53,8 @@ public: Boolean authenticate( @@ -390,9 +390,9 @@ diff -up pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticator.h.loc Boolean validateUser(const String& userName); -diff -up pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorStub.cpp.local-or-remote-auth pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorStub.cpp ---- pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorStub.cpp.local-or-remote-auth 2008-12-16 19:57:08.000000000 +0100 -+++ pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorStub.cpp 2009-06-08 15:06:26.000000000 +0200 +diff -up pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorStub.cpp.orig pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorStub.cpp +--- pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorStub.cpp.orig 2011-02-14 15:16:22.357629018 +0100 ++++ pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorStub.cpp 2011-02-14 15:16:58.699154516 +0100 @@ -73,7 +73,8 @@ PAMBasicAuthenticator::~PAMBasicAuthenti Boolean PAMBasicAuthenticator::authenticate( @@ -403,9 +403,9 @@ diff -up pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorStub.c { PEG_METHOD_ENTER(TRC_AUTHENTICATION, "PAMBasicAuthenticator::authenticate()"); -diff -up pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorUnix.cpp.local-or-remote-auth pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorUnix.cpp ---- pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorUnix.cpp.local-or-remote-auth 2008-12-16 19:57:08.000000000 +0100 -+++ pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorUnix.cpp 2009-06-08 15:06:26.000000000 +0200 +diff -up pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorUnix.cpp.orig pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorUnix.cpp +--- pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorUnix.cpp.orig 2011-02-14 15:17:06.878172796 +0100 ++++ pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorUnix.cpp 2011-02-14 15:18:17.547972458 +0100 @@ -64,13 +64,14 @@ PAMBasicAuthenticator::~PAMBasicAuthenti Boolean PAMBasicAuthenticator::authenticate( @@ -423,9 +423,9 @@ diff -up pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorUnix.c { return false; } -diff -up pegasus/src/Pegasus/Security/Authentication/SecureBasicAuthenticator.cpp.local-or-remote-auth pegasus/src/Pegasus/Security/Authentication/SecureBasicAuthenticator.cpp ---- pegasus/src/Pegasus/Security/Authentication/SecureBasicAuthenticator.cpp.local-or-remote-auth 2008-12-16 19:57:08.000000000 +0100 -+++ pegasus/src/Pegasus/Security/Authentication/SecureBasicAuthenticator.cpp 2009-06-08 15:06:26.000000000 +0200 +diff -up pegasus/src/Pegasus/Security/Authentication/SecureBasicAuthenticator.cpp.orig pegasus/src/Pegasus/Security/Authentication/SecureBasicAuthenticator.cpp +--- pegasus/src/Pegasus/Security/Authentication/SecureBasicAuthenticator.cpp.orig 2011-02-14 15:18:30.200547751 +0100 ++++ pegasus/src/Pegasus/Security/Authentication/SecureBasicAuthenticator.cpp 2011-02-14 15:19:03.483692138 +0100 @@ -236,7 +236,7 @@ Boolean SecureBasicAuthenticator::authen if (Executor::detectExecutor() == 0) { @@ -435,9 +435,9 @@ diff -up pegasus/src/Pegasus/Security/Authentication/SecureBasicAuthenticator.cp { authenticated = true; } -diff -up pegasus/src/Pegasus/Server/HTTPAuthenticatorDelegator.cpp.local-or-remote-auth pegasus/src/Pegasus/Server/HTTPAuthenticatorDelegator.cpp ---- pegasus/src/Pegasus/Server/HTTPAuthenticatorDelegator.cpp.local-or-remote-auth 2008-12-18 19:52:02.000000000 +0100 -+++ pegasus/src/Pegasus/Server/HTTPAuthenticatorDelegator.cpp 2009-06-08 15:06:26.000000000 +0200 +diff -up pegasus/src/Pegasus/Server/HTTPAuthenticatorDelegator.cpp.orig pegasus/src/Pegasus/Server/HTTPAuthenticatorDelegator.cpp +--- pegasus/src/Pegasus/Server/HTTPAuthenticatorDelegator.cpp.orig 2011-02-14 15:19:27.483680767 +0100 ++++ pegasus/src/Pegasus/Server/HTTPAuthenticatorDelegator.cpp 2011-02-14 15:21:04.092710797 +0100 @@ -421,6 +421,9 @@ void HTTPAuthenticatorDelegator::handleH Tracer::LEVEL3, "HTTPAuthenticatorDelegator - Authentication processing start"); diff --git a/pegasus-2.9.0-redhat-config.patch b/pegasus-2.9.0-redhat-config.patch index 5b87fca..81ac5f3 100644 --- a/pegasus-2.9.0-redhat-config.patch +++ b/pegasus-2.9.0-redhat-config.patch @@ -1,17 +1,17 @@ -diff -up pegasus/env_var_Linux.status.redhat-config pegasus/env_var_Linux.status ---- pegasus/env_var_Linux.status.redhat-config 2010-09-17 08:41:32.000000000 +0200 -+++ pegasus/env_var_Linux.status 2010-11-02 12:33:32.196567328 +0100 -@@ -19,7 +19,8 @@ ifndef PEGASUS_STAGING_DIR +diff -up pegasus/env_var_Linux.status.orig pegasus/env_var_Linux.status +--- pegasus/env_var_Linux.status.orig 2011-02-14 13:10:17.943729722 +0100 ++++ pegasus/env_var_Linux.status 2011-02-14 13:11:35.295357177 +0100 +@@ -17,7 +17,8 @@ ifndef PEGASUS_STAGING_DIR PEGASUS_STAGING_DIR = $(PEGASUS_HOME)/stagingDir endif -PEGASUS_ENABLE_CQL=false +PEGASUS_ENABLE_CQL=true +PEGASUS_DEFAULT_ENABLE_OOP=true - PEGASUS_DISABLE_OBJECT_NORMALIZATION=true PEGASUS_DISABLE_PERFINST=yes PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER=true -@@ -28,13 +29,12 @@ PEGASUS_HAS_SSL=yes + PEGASUS_ENABLE_USERGROUP_AUTHORIZATION=true +@@ -25,13 +26,12 @@ PEGASUS_HAS_SSL=yes PEGASUS_USE_SSL_RANDOMFILE=false PEGASUS_NOASSERTS=yes PEGASUS_PAM_AUTHENTICATION=true @@ -26,8 +26,8 @@ diff -up pegasus/env_var_Linux.status.redhat-config pegasus/env_var_Linux.status PEGASUS_ENABLE_INTEROP_PROVIDER=false -@@ -97,7 +97,7 @@ PEGASUS_CONFIG_DIR = /etc/Pegasus - PEGASUS_VARRUN_DIR = /var/run/tog-pegasus +@@ -112,7 +112,7 @@ PEGASUS_INSTALL_LOG = $(PEGASUS_LOG_DIR) + PEGASUS_CIMSERVER_START_FILE = $(PEGASUS_VARRUN_DIR)/cimserver.pid PEGASUS_CIMSERVER_START_LOCK_FILE = $(PEGASUS_VARRUN_DIR)/cimserver_start.lock -PEGASUS_LOCAL_DOMAIN_SOCKET_DIR = $(PEGASUS_VARRUN_DIR)/socket diff --git a/pegasus-2.9.1-makefile-initscript.patch b/pegasus-2.9.1-makefile-initscript.patch index 6322a94..1f96212 100644 --- a/pegasus-2.9.1-makefile-initscript.patch +++ b/pegasus-2.9.1-makefile-initscript.patch @@ -1,27 +1,29 @@ -diff -up pegasus/Makefile.Release_old pegasus/Makefile.Release ---- pegasus/Makefile.Release_old 2010-11-01 15:20:18.487489899 +0100 -+++ pegasus/Makefile.Release 2010-11-01 15:23:12.016562644 +0100 -@@ -426,14 +426,15 @@ ifdef PEGASUS_PAM_AUTHENTICATION +diff -up pegasus/Makefile.Release.orig pegasus/Makefile.Release +--- pegasus/Makefile.Release.orig 2011-02-14 15:22:20.064170152 +0100 ++++ pegasus/Makefile.Release 2011-02-14 15:26:11.087936560 +0100 +@@ -464,15 +464,16 @@ ifdef PEGASUS_PAM_AUTHENTICATION $(COPY) $(ROOT)/rpm/access.conf $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/access.conf endif $(MKDIRHIER) $(PEGASUS_STAGING_DIR)/etc/init.d -- $(COPY) $(ROOT)/rpm/preamble-tog-pegasus.rc $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus -- @$(ECHO-E) "CIMSERVER_BIN=$(PEGASUS_SBIN_DIR)/cimserver" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus -- @$(ECHO-E) "PEGASUS_SCRIPT_DIR=$(PEGASUS_SCRIPT_DIR)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus -- @$(ECHO-E) "PEGASUS_SSL_CONF_FILE=$(PEGASUS_PEM_DIR)/ssl.cnf" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus -- @$(ECHO-E) "PEGASUS_SSL_CERT_FILE=$(PEGASUS_SSL_CERT_FILE_PATH)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus -- @$(ECHO-E) "PEGASUS_SSL_KEY_FILE=$(PEGASUS_SSL_KEY_FILE_PATH)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus -- @$(ECHO-E) "PEGASUS_SSL_TRUSTSTORE=$(PEGASUS_SSL_CLIENT_TRUSTSTORE)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus -- $(CAT) $(ROOT)/rpm/commands-tog-pegasus.rc >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus -+# use tog-pegasus.rc that we already patched, do not create new one +- $(COPY) $(ROOT)/rpm/preamble-tog-pegasus.rc $(PEGASUS_STAGING_DIR)/etc/init.d/$(PEGASUS_FLAVOR)-pegasus +- @$(ECHO-E) "CIMSERVER_BIN=$(PEGASUS_SBIN_DIR)/cimserver" >> $(PEGASUS_STAGING_DIR)/etc/init.d/$(PEGASUS_FLAVOR)-pegasus +- @$(ECHO-E) "PEGASUS_SCRIPT_DIR=$(PEGASUS_SCRIPT_DIR)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/$(PEGASUS_FLAVOR)-pegasus +- @$(ECHO-E) "PEGASUS_SSL_CONF_FILE=$(PEGASUS_PEM_DIR)/ssl.cnf" >> $(PEGASUS_STAGING_DIR)/etc/init.d/$(PEGASUS_FLAVOR)-pegasus +- @$(ECHO-E) "PEGASUS_SSL_CERT_FILE=$(PEGASUS_SSL_CERT_FILE_PATH)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/$(PEGASUS_FLAVOR)-pegasus +- @$(ECHO-E) "PEGASUS_SSL_KEY_FILE=$(PEGASUS_SSL_KEY_FILE_PATH)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/$(PEGASUS_FLAVOR)-pegasus +- @$(ECHO-E) "PEGASUS_SSL_TRUSTSTORE=$(PEGASUS_SSL_CLIENT_TRUSTSTORE)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/$(PEGASUS_FLAVOR)-pegasus +- @$(ECHO-E) "PEGASUS_FLAVOR=$(PEGASUS_FLAVOR)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/$(PEGASUS_FLAVOR)-pegasus +- $(CAT) $(ROOT)/rpm/commands-tog-pegasus.rc >> $(PEGASUS_STAGING_DIR)/etc/init.d/$(PEGASUS_FLAVOR)-pegasus ++ # use tog-pegasus.rc that we already patched, do not create new one + $(COPY) $(ROOT)/rpm/tog-pegasus.rc $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus -+# @$(ECHO-E) "CIMSERVER_BIN=$(PEGASUS_SBIN_DIR)/cimserver" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus -+# @$(ECHO-E) "PEGASUS_SCRIPT_DIR=$(PEGASUS_SCRIPT_DIR)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus -+# @$(ECHO-E) "PEGASUS_SSL_CONF_FILE=$(PEGASUS_PEM_DIR)/ssl.cnf" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus -+# @$(ECHO-E) "PEGASUS_SSL_CERT_FILE=$(PEGASUS_SSL_CERT_FILE_PATH)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus -+# @$(ECHO-E) "PEGASUS_SSL_KEY_FILE=$(PEGASUS_SSL_KEY_FILE_PATH)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus -+# @$(ECHO-E) "PEGASUS_SSL_TRUSTSTORE=$(PEGASUS_SSL_CLIENT_TRUSTSTORE)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus -+# $(CAT) $(ROOT)/rpm/commands-tog-pegasus.rc >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus ++ @$(ECHO-E) "CIMSERVER_BIN=$(PEGASUS_SBIN_DIR)/cimserver" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus ++ @$(ECHO-E) "PEGASUS_SCRIPT_DIR=$(PEGASUS_SCRIPT_DIR)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus ++ @$(ECHO-E) "PEGASUS_SSL_CONF_FILE=$(PEGASUS_PEM_DIR)/ssl.cnf" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus ++ @$(ECHO-E) "PEGASUS_SSL_CERT_FILE=$(PEGASUS_SSL_CERT_FILE_PATH)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus ++ @$(ECHO-E) "PEGASUS_SSL_KEY_FILE=$(PEGASUS_SSL_KEY_FILE_PATH)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus ++ @$(ECHO-E) "PEGASUS_SSL_TRUSTSTORE=$(PEGASUS_SSL_CLIENT_TRUSTSTORE)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus ++ @$(ECHO-E) "PEGASUS_FLAVOR=$(PEGASUS_FLAVOR)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus ++ $(CAT) $(ROOT)/rpm/commands-tog-pegasus.rc >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus endif setpermissions_PegasusSystemFiles: FORCE diff --git a/sources b/sources index d1c1897..4549ae6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dac7e4cf92001441fec14ada4fb480dd pegasus-2.9.2.tar.gz +6d97a13f361d02494304217638a593b1 pegasus-2.10.0.tar.gz diff --git a/tog-pegasus.spec b/tog-pegasus.spec index af7af4e..edc6f56 100644 --- a/tog-pegasus.spec +++ b/tog-pegasus.spec @@ -1,28 +1,27 @@ -%{?!PEGASUS_BUILD_TEST_RPM: %define PEGASUS_BUILD_TEST_RPM 0} +%{?!PEGASUS_BUILD_TEST_RPM: %global PEGASUS_BUILD_TEST_RPM 0} # do "rpmbuild --define 'PEGASUS_BUILD_TEST_RPM 1'" to build test RPM. -%define srcname pegasus -%define major_ver 2.9 -%define pegasus_gid 65 -%define pegasus_uid 66 +%global srcname pegasus +%global major_ver 2.10 +%global pegasus_gid 65 +%global pegasus_uid 66 Name: tog-pegasus -Version: %{major_ver}.2 -Release: 3%{?dist} +Version: %{major_ver}.0 +Release: 1%{?dist} Epoch: 2 Summary: OpenPegasus WBEM Services for Linux -Group: Systems Management/Base +Group: System Environment/Daemons License: MIT URL: http://www.openpegasus.org -Source0: http://www.openpegasus.org/uploads/40/18361/pegasus-%{version}.tar.gz +Source0: http://www.openpegasus.org//uploads/40/21822/pegasus-%{version}.tar.gz # 1: Description of security enhacements Source1: README.RedHat.Security # 2: Script for setting SSL certificates - used in init script when cimserver is started for the first time Source2: genOpenPegasusSSLCerts # 3: Description of SSL settings Source3: README.RedHat.SSL -BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) # 0: Still not fixed by http://cvs.rdg.opengroup.org/bugzilla/show_bug.cgi?id=5008 # Changes to the init script to make it LSB compliant @@ -77,7 +76,7 @@ sources. %package devel Summary: The OpenPegasus Software Development Kit -Group: Systems Management/Base +Group: Development/Tools Requires: tog-pegasus >= %{version}-%{release} Obsoletes: tog-pegasus-sdk @@ -89,7 +88,8 @@ supports C provider developers via the CMPI interface. %package libs Summary: The OpenPegasus Libraries -Group: Systems Management/Base +Group: System Environment/Libraries +Conflicts: libcmpiCppImpl0 %description libs The OpenPegasus libraries. @@ -97,7 +97,7 @@ The OpenPegasus libraries. %if %{PEGASUS_BUILD_TEST_RPM} %package test Summary: The OpenPegasus Tests -Group: Systems Management/Base +Group: Development/Debug Requires: tog-pegasus >= %{version}-%{release}, make %description test @@ -238,8 +238,8 @@ make -f $PEGASUS_ROOT/Makefile.Release stage \ # move files to right directories mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/ mv $RPM_BUILD_ROOT/etc/init.d/tog-pegasus $RPM_BUILD_ROOT/etc/rc.d/init.d/tog-pegasus -# cimserver_planned.conf is on the right place since 2.9.2 -#mv $RPM_BUILD_ROOT/var/lib/Pegasus/cimserver_planned.conf $RPM_BUILD_ROOT/etc/Pegasus/cimserver_planned.conf +# cimserver_planned.conf is on the right place since 2.9.2 (update - not in 2.10.0) +mv $RPM_BUILD_ROOT/var/lib/Pegasus/cimserver_planned.conf $RPM_BUILD_ROOT/etc/Pegasus/cimserver_planned.conf mkdir -p $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version} mv $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{major_ver}/* $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version} rm -rf $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{major_ver} @@ -323,12 +323,7 @@ rm -rf $RPM_BUILD_ROOT %pre -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 || :; -elif [ $1 -gt 1 ]; then +if [ $1 -gt 1 ]; then if [ -d /var/lib/Pegasus/repository ]; then if [ -d /var/lib/Pegasus/prev_repository ]; then mv /var/lib/Pegasus/prev_repository /var/lib/Pegasus/prev_repository_`date '+%Y-%m-%d-%s.%N'`.rpmsave; @@ -339,8 +334,8 @@ fi :; %post -ldconfig; -chkconfig --add tog-pegasus; +/sbin/ldconfig; +/sbin/chkconfig --add tog-pegasus; if [ $1 -ge 1 ]; then echo `date` >> /var/lib/Pegasus/log/install.log 2>&1 || :; if [ $1 -gt 1 ]; then @@ -370,6 +365,15 @@ if [ $1 -eq 0 ] ; then 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 || :; +fi +:; + %post libs if [ $1 -eq 1 ]; then # Create Symbolic Links for SDK Libraries @@ -395,6 +399,11 @@ fi %changelog +* Wed Feb 16 2011 Vitezslav Crhonek - 2:2.10.1-1 +- Update to upstream version 2.10.1 +- Move creating of the 'pegasus' user and group to the 'libs' %%pre +- Use %%global instead of %%define and some minor spec file cleaning + * Wed Feb 09 2011 Fedora Release Engineering - 2:2.9.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild