rpms/tog-pegasus/devel pegasus-2.5.1-PIE.patch, NONE, 1.1 pegasus-2.5.1-cmpi-provider-lib.patch, NONE, 1.1 pegasus-2.5.1-enable_cql.patch, NONE, 1.1 pegasus-2.5.1-initscript.patch, NONE, 1.1 pegasus-2.5.1-linkflags.patch, NONE, 1.1 pegasus-2.5.1-local-or-remote-auth.patch, NONE, 1.1 pegasus-2.5.1-no-rpath.patch, NONE, 1.1 pegasus-2.5.1-pam-wbem.patch, NONE, 1.1 pegasus-2.5.1-redhat-config.patch, NONE, 1.1 pegasus-2.5.1-warnings.patch, NONE, 1.1 pegasus_rpm_build_env.sh, NONE, 1.1 .cvsignore, 1.3, 1.4 sources, 1.4, 1.5 tog-pegasus.spec, 1.24, 1.25

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Apr 7 02:40:23 UTC 2006


Author: jvdias

Update of /cvs/dist/rpms/tog-pegasus/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv8580

Modified Files:
	.cvsignore sources tog-pegasus.spec 
Added Files:
	pegasus-2.5.1-PIE.patch pegasus-2.5.1-cmpi-provider-lib.patch 
	pegasus-2.5.1-enable_cql.patch pegasus-2.5.1-initscript.patch 
	pegasus-2.5.1-linkflags.patch 
	pegasus-2.5.1-local-or-remote-auth.patch 
	pegasus-2.5.1-no-rpath.patch pegasus-2.5.1-pam-wbem.patch 
	pegasus-2.5.1-redhat-config.patch pegasus-2.5.1-warnings.patch 
	pegasus_rpm_build_env.sh 
Log Message:
upgrade to 2.5.1

pegasus-2.5.1-PIE.patch:
 Clients/cimauth/Makefile                        |    2 ++
 Clients/cimconfig/Makefile                      |    2 ++
 Clients/cimprovider/Makefile                    |    2 ++
 Clients/cimuser/Makefile                        |    2 ++
 Clients/osinfo/Makefile                         |    2 ++
 Clients/repupgrade/Makefile                     |    2 ++
 Clients/wbemexec/Makefile                       |    2 ++
 Pegasus/Compiler/cmdline/cimmof/Makefile        |    2 ++
 Pegasus/Compiler/cmdline/cimmofl/Makefile       |    2 ++
 Pegasus/ProviderManager2/ProviderAgent/Makefile |    4 ++--
 Server/Makefile                                 |    3 +++
 11 files changed, 23 insertions(+), 2 deletions(-)

--- NEW FILE pegasus-2.5.1-PIE.patch ---
--- pegasus/src/Pegasus/Compiler/cmdline/cimmof/Makefile.PIE	2006-01-30 11:17:34.000000000 -0500
+++ pegasus/src/Pegasus/Compiler/cmdline/cimmof/Makefile	2006-04-06 16:17:54.000000000 -0400
@@ -32,6 +32,8 @@
 DIR = Pegasus/Compiler/cmdline/cimmof
 include $(ROOT)/mak/config.mak
 
+FLAGS := $(FLAGS:-fPIC=-fPIE) 
+
 LOCAL_DEFINES = -DPEGASUS_CMDLINE_INTERNAL -DPEGASUS_INTERNALONLY
 
 LIBRARIES = \
--- pegasus/src/Pegasus/Compiler/cmdline/cimmofl/Makefile.PIE	2006-01-30 11:17:34.000000000 -0500
+++ pegasus/src/Pegasus/Compiler/cmdline/cimmofl/Makefile	2006-04-06 16:17:43.000000000 -0400
@@ -32,6 +32,8 @@
 DIR = Pegasus/Compiler/cmdline/cimmofl
 include $(ROOT)/mak/config.mak
 
+FLAGS := $(FLAGS:-fPIC=-fPIE) 
+
 LOCAL_DEFINES = -DPEGASUS_INTERNALONLY
 
 PROGRAM = cimmofl
--- pegasus/src/Pegasus/ProviderManager2/ProviderAgent/Makefile.PIE	2006-01-30 11:18:16.000000000 -0500
+++ pegasus/src/Pegasus/ProviderManager2/ProviderAgent/Makefile	2006-04-05 21:05:58.000000000 -0400
@@ -29,11 +29,12 @@
 #//
 #//==============================================================================
 ROOT = ../../../..
-
 DIR = Pegasus/ProviderManager2/ProviderAgent
 
 include $(ROOT)/mak/config.mak
 
+FLAGS := $(FLAGS:-fPIC=-fPIE)
+
 LIBRARIES = \
     pegprovidermanager \
     pegprovider \
@@ -56,4 +57,3 @@
 tests:
 
 poststarttests:
-
--- pegasus/src/Server/Makefile.PIE	2006-01-30 11:19:33.000000000 -0500
+++ pegasus/src/Server/Makefile	2006-04-05 21:05:58.000000000 -0400
@@ -30,8 +30,11 @@
 #//==============================================================================
 ROOT = ../..
 DIR = Server
+
 include $(ROOT)/mak/config.mak
 
+FLAGS := $(FLAGS:-fPIC=-fPIE)
+
 LIBRARIES = \
     pegclient \
     pegserver \
--- pegasus/src/Clients/cimprovider/Makefile.PIE	2006-01-30 11:16:33.000000000 -0500
+++ pegasus/src/Clients/cimprovider/Makefile	2006-04-06 16:17:31.000000000 -0400
@@ -36,6 +36,8 @@
 
 include $(ROOT)/mak/config.mak
 
+FLAGS := $(FLAGS:-fPIC=-fPIE) 
+
 LIBRARIES = \
     pegcliutils \
     pegclient \
--- pegasus/src/Clients/osinfo/Makefile.PIE	2006-01-30 11:16:35.000000000 -0500
+++ pegasus/src/Clients/osinfo/Makefile	2006-04-06 16:17:14.000000000 -0400
@@ -35,6 +35,8 @@
 DIR = Clients/osinfo
 include $(ROOT)/mak/config.mak
 
+FLAGS := $(FLAGS:-fPIC=-fPIE) 
+
 LIBRARIES = \
     pegcliutils \
     peggetoopt \
--- pegasus/src/Clients/cimuser/Makefile.PIE	2006-01-30 11:16:33.000000000 -0500
+++ pegasus/src/Clients/cimuser/Makefile	2006-04-06 16:17:01.000000000 -0400
@@ -36,6 +36,8 @@
 
 include $(ROOT)/mak/config.mak
 
+FLAGS := $(FLAGS:-fPIC=-fPIE) 
+
 LIBRARIES = \
     pegcliutils \
     pegclient \
--- pegasus/src/Clients/repupgrade/Makefile.PIE	2006-01-30 11:16:36.000000000 -0500
+++ pegasus/src/Clients/repupgrade/Makefile	2006-04-06 16:16:37.000000000 -0400
@@ -36,6 +36,8 @@
 
 include $(ROOT)/mak/config.mak
 
+FLAGS := $(FLAGS:-fPIC=-fPIE) 
+
 LOCAL_DEFINES = -DPEGASUS_INTERNALONLY
 
 LIBRARIES = \
--- pegasus/src/Clients/cimauth/Makefile.PIE	2006-01-30 11:16:32.000000000 -0500
+++ pegasus/src/Clients/cimauth/Makefile	2006-04-06 16:16:17.000000000 -0400
@@ -36,6 +36,8 @@
 
 include $(ROOT)/mak/config.mak
 
+FLAGS := $(FLAGS:-fPIC=-fPIE) 
+
 LIBRARIES = \
     pegcliutils \
     pegclient \
--- pegasus/src/Clients/cimconfig/Makefile.PIE	2006-01-30 11:16:32.000000000 -0500
+++ pegasus/src/Clients/cimconfig/Makefile	2006-04-06 16:15:59.000000000 -0400
@@ -36,6 +36,8 @@
 
 include $(ROOT)/mak/config.mak
 
+FLAGS := $(FLAGS:-fPIC=-fPIE) 
+
 LIBRARIES = \
     pegcliutils \
     pegclient \
--- pegasus/src/Clients/wbemexec/Makefile.PIE	2006-01-30 11:16:37.000000000 -0500
+++ pegasus/src/Clients/wbemexec/Makefile	2006-04-06 16:15:23.000000000 -0400
@@ -36,6 +36,8 @@
 
 include $(ROOT)/mak/config.mak
 
+FLAGS := $(FLAGS:-fPIC=-fPIE) 
+
 ifdef PEGASUS_HAS_SSL
   FLAGS += -DPEGASUS_HAS_SSL -DPEGASUS_SSL_RANDOMFILE
   SYS_INCLUDES += -I$(OPENSSL_HOME)/include

pegasus-2.5.1-cmpi-provider-lib.patch:
 FixedPropertyTableLinux.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

--- NEW FILE pegasus-2.5.1-cmpi-provider-lib.patch ---
--- pegasus/src/Pegasus/Config/FixedPropertyTableLinux.h.cmpi_provider_lib	2006-03-14 16:06:37.000000000 -0500
+++ pegasus/src/Pegasus/Config/FixedPropertyTableLinux.h	2006-04-05 20:06:55.000000000 -0400
@@ -65,8 +65,8 @@
     {"crlStore",             PEGASUS_SSL_SERVER_CRL},
 #endif
     {"repositoryDir",        PEGASUS_REPOSITORY_DIR},
-    {"providerDir",          PEGASUS_PROVIDER_LIB_DIR":/usr/lib/cmpi"},
-#else
+    {"providerDir",          PEGASUS_PROVIDER_LIB_DIR ":" PEGASUS_DEST_LIB_DIR "/cmpi"},
+#else /* PEGASUS_OVERRIDE_DEFAULT_RELEASE_DIRS */
     {"traceFilePath",       "/var/opt/tog-pegasus/cache/trace/cimserver.trc"},
 #if !defined(PEGASUS_USE_SYSLOGS)
     {"logdir",              "/var/opt/tog-pegasus/log"},
@@ -84,8 +84,8 @@
     {"providerDir",         "/opt/tog-pegasus/providers/lib"},
 #endif
     {"messageDir",         "/opt/tog-pegasus/share/locale/ICU_Messages"},
-#endif
-#endif
+#endif /* PEGASUS_OVERRIDE_DEFAULT_RELEASE_DIRS */
+#endif /*  defined(PEGASUS_USE_RELEASE_DIRS) && !defined(PEGASUS_OS_LSB) */
 #if defined(PEGASUS_USE_RELEASE_DIRS) && defined(PEGASUS_OS_LSB)
     {"traceFilePath",       "/var/opt/lsb-pegasus/cache/cimserver.trc"},
 #if !defined(PEGASUS_USE_SYSLOGS)

pegasus-2.5.1-enable_cql.patch:
 env_var_Linux.status |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

--- NEW FILE pegasus-2.5.1-enable_cql.patch ---
--- pegasus/env_var_Linux.status.enable-cql	2006-03-15 20:33:51.000000000 -0500
+++ pegasus/env_var_Linux.status	2006-04-06 15:19:35.000000000 -0400
@@ -18,7 +18,7 @@
 PEGASUS_STAGING_DIR = $(PEGASUS_HOME)/stagingDir
 endif
 
-PEGASUS_DISABLE_CQL=true
+PEGASUS_ENABLE_CQL=true
 PEGASUS_DISABLE_OBJECT_NORMALIZATION=true
 PEGASUS_DISABLE_PERFINST=yes
 PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER=true
@@ -26,7 +26,6 @@
 PEGASUS_HAS_SSL=yes
 PEGASUS_NOASSERTS=yes
 PEGASUS_PAM_AUTHENTICATION=true
-PEGASUS_USE_PAM_STANDALONE_PROC=true
 PEGASUS_USE_RELEASE_CONFIG_OPTIONS=true
 PEGASUS_USE_RELEASE_DIRS=true
 PEGASUS_USE_SYSLOGS=true
@@ -64,9 +63,10 @@
 PEGASUS_LOCAL_AUTH_DIR = $(PEGASUS_VARDATA_CACHE_DIR)/localauth
 PEGASUS_TRACE_DIR = $(PEGASUS_VARDATA_CACHE_DIR)/trace
 PEGASUS_TRACE_FILE_PATH = $(PEGASUS_VARDATA_CACHE_DIR)/trace/cimserver.trc
+PEGASUS_CONFIG_DIR = /etc/Pegasus
 PEGASUS_PLANNED_CONFIG_FILE = cimserver_planned.conf
 PEGASUS_PLANNED_CONFIG_FILE_PATH = \
-     $(PEGASUS_VARDATA_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)
+     $(PEGASUS_CONFIG_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)
 PEGASUS_CURRENT_CONFIG_FILE = cimserver_current.conf
 PEGASUS_CURRENT_CONFIG_FILE_PATH = \
      $(PEGASUS_VARDATA_DIR)/$(PEGASUS_CURRENT_CONFIG_FILE)
@@ -74,8 +74,6 @@
 PEGASUS_LOG_DIR = $(PEGASUS_VARDATA_DIR)/log
 PEGASUS_INSTALL_LOG = $(PEGASUS_LOG_DIR)/install.log
 
-PEGASUS_CONFIG_DIR = /etc/Pegasus
-
 PEGASUS_VARRUN_DIR = /var/run/tog-pegasus
 PEGASUS_CIMSERVER_START_FILE = $(PEGASUS_VARRUN_DIR)/cimserver.pid
 CIMSERVER_LOCK_FILE = $(PEGASUS_VARRUN_DIR)/cimserver_start.lock

pegasus-2.5.1-initscript.patch:
 tog-pegasus.rc |  122 ++++++++++++++++++++++++++++++---------------------------
 1 files changed, 66 insertions(+), 56 deletions(-)

--- NEW FILE pegasus-2.5.1-initscript.patch ---
--- pegasus/rpm/tog-pegasus.rc.initscript	2006-01-30 11:16:24.000000000 -0500
+++ pegasus/rpm/tog-pegasus.rc	2006-04-06 14:38:57.000000000 -0400
@@ -1,80 +1,85 @@
-#//%2006////////////////////////////////////////////////////////////////////////
-#//
-#// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
-#// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
-#// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
-#// IBM Corp.; EMC Corporation, The Open Group.
-#// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
-#// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
-#// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
-#// EMC Corporation; VERITAS Software Corporation; The Open Group.
-#// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
-#// EMC Corporation; Symantec Corporation; The Open Group.
-#//
-#// 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.
-#//
-#//==============================================================================
-#! /bin/sh
-#//
-#//%/////////////////////////////////////////////////////////////////////////////
-
-### BEGIN INIT INFO
-# Provides: tog-pegasus
-# Required-Start: $syslog $network
-# Should-Start: $time
-# Required-Stop: $syslog
-# Default-Start:  3 5
-# Default-Stop: 0 1 2 6
-# Description:	  init script for Pegasus CIM server
-### END INIT INFO
-
-CIMSERVER_BIN=/opt/tog-pegasus/sbin/cimserver
+#!/bin/bash
+#
+# chkconfig:	- 98 1
+# description:  The Open Group Pegasus cimserver initscript
+# processname:  cimserver
+# pidfile:      /var/run/tog-pegasus/cimserver.pid
+#
+CIMSERVER_BIN=/usr/sbin/cimserver
 prog=cimserver
+LOCKFILE=/var/lock/subsys/tog-pegasus
+. /etc/rc.d/init.d/functions
 
-test -x $CIMSERVER_BIN || exit 5
+if [ ! -x $CIMSERVER_BIN ]; then
+    echo -n "tog-pegasus $1: $CIMSERVER_BIN not found or not executable.";
+    failure;
+    exit 1;
+fi;
+
+[ -e /etc/sysconfig/tog-pegasus ] && . /etc/sysconfig/tog-pegasus;
+
+PEGASUS_SSL_CONF_FILE=${PEGASUS_SSL_CONF_FILE:=/etc/Pegasus/ssl.cnf}
+PEGASUS_SSL_CERT_FILE=${PEGASUS_SSL_CERT_FILE:=/etc/Pegasus/server.pem}
+PEGASUS_SSL_KEY_FILE=${PEGASUS_SSL_KEY_FILE:=/etc/Pegasus/file.pem}
+PEGASUS_SSL_TRUSTSTORE=${PEGASUS_SSL_TRUSTSTORE:=/etc/Pegasus/client.pem}
 
-. /lib/lsb/init-functions
 RETVAL=0
 
 case "$1" in
-     start)
+     start)	
+	if [ ! -e ${PEGASUS_SSL_CONF_FILE} ] || [ ! -e ${PEGASUS_SSL_CERT_FILE} ] || 
+	   [ ! -e ${PEGASUS_SSL_KEY_FILE} ]  || [ ! -e ${PEGASUS_SSL_TRUSTSTORE} ]; then
+	   if [ -x /usr/share/Pegasus/scripts/genOpenPegasusSSLCerts ]; then
+	       echo -n "tog-pegasus: Generating cimserver SSL certificates...";
+	       /usr/share/Pegasus/scripts/genOpenPegasusSSLCerts;
+	       if [ $? -eq 0 ]; then
+		   success;
+	       else
+		   failure;
+	       fi;
+	       echo;
+	   fi;
+	fi;
 	echo -n $"Starting up CIM server: "
 	$CIMSERVER_BIN
 	RETVAL=$?
-	[ "$RETVAL" -eq 0 ] && log_success_msg $"$prog start" || log_failure_msg $"$prog start"
-	echo
+	if [ "$RETVAL" -eq 0 ]; then
+	    touch $LOCKFILE;
+	    success;
+	else
+	    failure;
+	fi;
+	echo;
 	;;
 
      stop)
 	echo -n $"Shutting down CIM server: "
 	killproc cimserver
 	RETVAL=$?
-	[ "$RETVAL" -eq 0 ] && log_success_msg $"$prog stop" || log_failure_msg $"$prog stop"
+	if [ "$RETVAL" -eq 0 ]; then
+	    rm -f $LOCKFILE;
+	    rm -f /var/run/tog-pegasus/socket/*;
+	    rm -f /var/run/tog-pegasus/cimserver.pid;
+	    success;
+	else
+	    failure;
+	fi
 	echo
 	;;
+
      status)
 	pid=`pidofproc $CIMSERVER_BIN`
 	RETVAL=$?
 	if [ "$RETVAL" -eq 0 ]; then
-		echo "CIM server is running"
+	    echo -n $"CIM server ($pid) is running";
+	    success;
 	else
-		echo "CIM server is not running"
+	    echo -n $"CIM server is not running";
+	    failure;
 	fi
+	echo
 	;;
+
      condrestart)
 	pid=`pidofproc $CIMSERVER_BIN`
 	RETVAL=$?
@@ -83,13 +88,18 @@
 	    RETVAL=$?;
 	fi;
         ;;
+
      try-restart)
-	$0 stop && $0 start
+	$0 stop && $0 start;
+	RETVAL=$?;
 	;;
+
      restart|force-reload)
-	$0 stop
-	$0 start
+	$0 stop;
+	$0 start;
+	RETVAL=$?;
 	;;
+
      reload)
 	;;
      *)

pegasus-2.5.1-linkflags.patch:
 library.mak |    4 ++++
 program.mak |    4 ++++
 2 files changed, 8 insertions(+)

--- NEW FILE pegasus-2.5.1-linkflags.patch ---
--- pegasus/mak/library.mak.linkflags	2006-01-30 11:16:23.000000000 -0500
+++ pegasus/mak/library.mak	2006-04-05 17:11:23.000000000 -0400
@@ -40,6 +40,10 @@
 
 include $(ROOT)/mak/common.mak
 
+ifdef PEGASUS_EXTRA_LIBRARY_LINK_FLAGS
+    EXTRA_LINK_FLAGS = $(PEGASUS_EXTRA_LIBRARY_LINK_FLAGS)
+endif
+
 ################################################################################
 ##
 ## Build list of object names.
--- pegasus/mak/program.mak.linkflags	2006-01-30 11:16:23.000000000 -0500
+++ pegasus/mak/program.mak	2006-04-05 17:10:37.000000000 -0400
@@ -38,6 +38,10 @@
 
 include $(ROOT)/mak/common.mak
 
+ifdef PEGASUS_EXTRA_PROGRAM_LINK_FLAGS
+    EXTRA_LINK_FLAGS = $(PEGASUS_EXTRA_PROGRAM_LINK_FLAGS)
+endif
+
 ifeq ($(OS_TYPE),windows)
 include $(ROOT)/mak/program-windows.mak
 endif

pegasus-2.5.1-local-or-remote-auth.patch:
 Common/AuthenticationInfo.h                            |   16 ++
 Common/AuthenticationInfoRep.cpp                       |   12 +-
 Common/AuthenticationInfoRep.h                         |   11 +
 Common/HTTPConnection.cpp                              |   24 ++++
 Common/HTTPMessage.cpp                                 |    3 
 Common/HTTPMessage.h                                   |    3 
 Security/Authentication/BasicAuthenticationHandler.cpp |    2 
 Security/Authentication/BasicAuthenticator.h           |    3 
 Security/Authentication/PAMBasicAuthenticator.h        |   12 +-
 Security/Authentication/PAMBasicAuthenticatorStub.cpp  |    3 
 Security/Authentication/PAMBasicAuthenticatorUnix.cpp  |  100 ++++++++++++++---
 Server/HTTPAuthenticatorDelegator.cpp                  |    3 
 12 files changed, 165 insertions(+), 27 deletions(-)

--- NEW FILE pegasus-2.5.1-local-or-remote-auth.patch ---
--- pegasus/src/Pegasus/Server/HTTPAuthenticatorDelegator.cpp.local-or-remote-auth	2006-03-10 18:18:37.000000000 -0500
+++ pegasus/src/Pegasus/Server/HTTPAuthenticatorDelegator.cpp	2006-04-05 20:35:40.000000000 -0400
@@ -384,6 +384,9 @@
         }
     }
 
+    // Let Authenticators know whether this user is Local or Remote:
+    httpMessage->authInfo->setRemoteUser( httpMessage->fromRemoteHost );
+
     //
     // Handle authentication:
     //
--- pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorUnix.cpp.local-or-remote-auth	2006-01-30 11:18:28.000000000 -0500
+++ pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorUnix.cpp	2006-04-05 20:40:40.000000000 -0400
@@ -48,6 +48,8 @@
 #include <prot.h>
 #endif
 
+#include <syslog.h>
+
 #if defined (PEGASUS_USE_PAM_STANDALONE_PROC)
 #include <Pegasus/Common/Logger.h>
 #include <Pegasus/Common/IPC.h>
@@ -131,7 +133,8 @@
 
 Boolean PAMBasicAuthenticator::authenticate(
     const String& userName, 
-    const String& password) 
+    const String& password,
+    Boolean isRemoteUser) 
 {
     PEG_METHOD_ENTER(TRC_AUTHENTICATION,
         "PAMBasicAuthenticator::authenticate()");
@@ -139,7 +142,7 @@
     Boolean authenticated;
 
 #if !defined(PEGASUS_USE_PAM_STANDALONE_PROC)
-        authenticated = _authenticateByPAM(userName, password);
+    authenticated = _authenticateByPAM(userName, password, isRemoteUser);
 #else
         //
         // Mutex to Serialize Authentication calls.
@@ -147,8 +150,9 @@
         Tracer::trace(TRC_AUTHENTICATION, Tracer::LEVEL4,
            "Authentication Mutex lock.");
         AutoMutex lock(_authSerializeMutex);
-        authenticated = _pamBasicAuthenticatorStandAlone.authenticate(
-            userName, password);
+        authenticated =
+                _pamBasicAuthenticatorStandAlone->authenticate(userName,
+                                                              password);
 #endif
 
     PEG_METHOD_EXIT();
@@ -157,7 +161,8 @@
 
 Boolean PAMBasicAuthenticator::_authenticateByPAM(
     const String& userName, 
-    const String& password) 
+    const String& password,
+    Boolean isRemoteUser) 
 {
     PEG_METHOD_ENTER(TRC_AUTHENTICATION,
         "PAMBasicAuthenticator::_authenticateByPAM()");
@@ -167,6 +172,7 @@
     pam_handle_t *phandle;
     char *name;
     APP_DATA mydata;
+    int retcode;
 
     //
     // Store the password for PAM authentication
@@ -180,13 +186,31 @@
 //    Tracer::trace(TRC_AUTHENTICATION, Tracer::LEVEL4,
 //       "PAMBasicAuthenticator::_authenticateByPAM() - userName = %s; userPassword = %s",
 //       (const char *)userName.getCString(), (const char *)password.getCString());
+    
+    // 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.
 
     //
     //Call pam_start since you need to before making any other PAM calls
     //
-    if ( ( pam_start(service, 
+
+    if ( (retcode = pam_start(service, 
         (const char *)userName.getCString(), &pconv, &phandle) ) != PAM_SUCCESS ) 
     {
+	closelog();
+	openlog("cimserver", LOG_PID, LOG_DAEMON);
+	syslog( LOG_ERR, "pam_start failed: %s", pam_strerror(phandle, retcode));
+        PEG_METHOD_EXIT();
+        return (authenticated);
+    }
+   
+
+    if ( (retcode = pam_set_item(phandle, PAM_TTY, isRemoteUser ? "wbemNetwork" : "wbemLocal")) != PAM_SUCCESS )
+    {
+	pam_end(phandle, 0);	
+	closelog();
+	openlog("cimserver", LOG_PID, LOG_DAEMON);
+	syslog( LOG_ERR, "pam_set_item(PAM_TTY=wbem) failed: %s", pam_strerror(phandle, retcode));
         PEG_METHOD_EXIT();
         return (authenticated);
     }
@@ -194,7 +218,7 @@
     //
     //Call pam_authenticate to authenticate the user
     //
-    if ( ( pam_authenticate(phandle, 0) ) == PAM_SUCCESS ) 
+    if ( ( retcode = pam_authenticate(phandle, 0) ) == PAM_SUCCESS ) 
     {
        Tracer::trace(TRC_AUTHENTICATION, Tracer::LEVEL4,
          "pam_authenticate successful.");
@@ -203,22 +227,40 @@
         //checking for password and account expiration, as well as verifying access 
         //hour restrictions.
         //
-        if ( ( pam_acct_mgmt(phandle, 0) ) == PAM_SUCCESS ) 
+
+        if ( ( retcode = pam_acct_mgmt(phandle, 0) ) == PAM_SUCCESS ) 
         {
            Tracer::trace(TRC_AUTHENTICATION, Tracer::LEVEL4,
               "pam_acct_mgmt successful.");
             authenticated = true;
-        }
+        }else
+	{
+	    closelog();
+	    openlog("cimserver", LOG_PID, LOG_DAEMON);
+	    syslog(LOG_ERR, "pam_acct_mgmt failed: %s",pam_strerror(phandle, retcode));
+	}
+    }else
+    {
+        closelog();
+	openlog("cimserver", LOG_PID, LOG_DAEMON);
+	syslog(LOG_ERR, "pam_authenticate failed: %s",pam_strerror(phandle, retcode));
     }
-
     //
     //Call pam_end to end our PAM work
     //
     pam_end(phandle, 0);
+    closelog();
+    openlog("cimserver", LOG_PID, LOG_DAEMON);
 
-    PEG_METHOD_EXIT();
+    if ( ! authenticated )
+	syslog(LOG_ERR, "PAM authentication failed for %s user: %s",
+	       isRemoteUser ? "remote" : "local",
+	       (const char*)userName.getCString()
+	      );
 
+    PEG_METHOD_EXIT();
     return (authenticated);
+
 }
 
 Boolean PAMBasicAuthenticator::validateUser(const String& userName)
@@ -233,6 +275,7 @@
     pam_handle_t *phandle;
     char *name;
     APP_DATA mydata;
+    int retcode;
 
     const char *service = "wbem";
     pconv.conv = PAMBasicAuthenticator::pamValidateUserCallback;
@@ -241,21 +284,43 @@
     //
     // Call pam_start since you need to before making any other PAM calls
     //
-    if ( pam_start(service,
-     (const char *)userName.getCString(), &pconv, &phandle) != PAM_SUCCESS)
-    {
+    if ( (retcode = 
+	  pam_start(service,(const char *)userName.getCString(), &pconv, &phandle) 
+	 ) != PAM_SUCCESS
+       )
+    {
+	closelog();
+	openlog("cimserver", LOG_PID, LOG_DAEMON);
+	syslog( LOG_ERR, "pam_start() failed: %s", pam_strerror(phandle, retcode));
         PEG_METHOD_EXIT();
         return (authenticated);
     }
 
+    if ( (retcode = pam_set_item(phandle, PAM_TTY, "wbemLocal")) != PAM_SUCCESS )
+    {
+	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));
+        PEG_METHOD_EXIT();
+        return (authenticated);
+    }
     //
     // Call pam_acct_mgmt, to check if the user account is valid. This includes
     // checking for account expiration, as well as verifying access
     // hour restrictions.
     //
-    if ( pam_acct_mgmt(phandle, 0) == PAM_SUCCESS )
-    {
+    if ( (retcode = pam_acct_mgmt(phandle, 0)) == PAM_SUCCESS )
+    {	
         authenticated = true;
+    }else
+    {
+	pam_end(phandle, 0);
+	closelog();
+	openlog("cimserver", LOG_PID, LOG_DAEMON);
+	syslog( LOG_ERR, "pam_acct_mgmt() failed: %s", pam_strerror(phandle, retcode));
+        PEG_METHOD_EXIT();
+        return (authenticated);
     }
 
     //
@@ -263,6 +328,9 @@
     //
     pam_end(phandle, 0);
 
+    closelog();
+    openlog("cimserver", LOG_PID, LOG_DAEMON);
+
 #else
     //
     // Mutex to Serialize Authentication calls.
--- pegasus/src/Pegasus/Security/Authentication/BasicAuthenticator.h.local-or-remote-auth	2006-01-30 11:18:28.000000000 -0500
+++ pegasus/src/Pegasus/Security/Authentication/BasicAuthenticator.h	2006-04-05 20:35:40.000000000 -0400
@@ -67,7 +67,8 @@
     */
     virtual Boolean authenticate(
         const String& userName, 
-        const String& password) = 0;
+        const String& password,
+	Boolean isRemoteUser) = 0;
 
     /** Construct and return the HTTP Basic authentication challenge header
         @return A string containing the authentication challenge header.
--- pegasus/src/Pegasus/Security/Authentication/BasicAuthenticationHandler.cpp.local-or-remote-auth	2006-01-30 11:18:28.000000000 -0500
+++ pegasus/src/Pegasus/Security/Authentication/BasicAuthenticationHandler.cpp	2006-04-05 20:35:40.000000000 -0400
@@ -138,7 +138,7 @@
     authInfo->setAuthenticatedUser(userName);
     authInfo->setAuthenticatedPassword(password);
 #else
-    authenticated = _basicAuthenticator->authenticate(userName, password);
+    authenticated = _basicAuthenticator->authenticate(userName, password, authInfo->isRemoteUser());
 
     if (authenticated)
     {
--- pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorStub.cpp.local-or-remote-auth	2006-01-30 11:18:28.000000000 -0500
+++ pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorStub.cpp	2006-04-05 20:35:40.000000000 -0400
@@ -92,7 +92,8 @@
 
 Boolean PAMBasicAuthenticator::authenticate(
     const String& userName, 
-    const String& password) 
+    const String& password,
+    Boolean isRemoteUser) 
 {
     PEG_METHOD_ENTER(TRC_AUTHENTICATION,
         "PAMBasicAuthenticator::authenticate()");
--- pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticator.h.local-or-remote-auth	2006-01-30 11:18:28.000000000 -0500
+++ pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticator.h	2006-04-05 20:35:40.000000000 -0400
@@ -73,7 +73,8 @@
     */
     Boolean authenticate(
         const String& userName,
-        const String& password);
+        const String& password,
+	Boolean isRemoteUser);
 
     /** Verify PAM account management for the requesting user.
         @param userName String containing the user name
@@ -102,7 +103,8 @@
 
     Boolean _authenticateByPAM(
         const String& userName,
-        const String& password);
+        const String& password,
+	Boolean isRemoteUser);
 
     void _createPAMStandalone();
 
@@ -158,7 +160,8 @@
     */
     Boolean authenticate(
         const String& userName, 
-        const String& password);
+        const String& password,
+	Boolean isRemoteUser);
 
     /** Verify whether the user is valid.
         @param userName String containing the user name
@@ -220,7 +223,8 @@
 
     Boolean _authenticateByPAM(
 	const String& userName,
-	const String& password);
+	const String& password,
+	Boolean isRemoteUser);
 
 #if defined(PEGASUS_USE_PAM_STANDALONE_PROC)
     PAMBasicAuthenticatorStandAlone _pamBasicAuthenticatorStandAlone;
--- pegasus/src/Pegasus/Common/AuthenticationInfoRep.cpp.local-or-remote-auth	2006-01-30 11:16:46.000000000 -0500
+++ pegasus/src/Pegasus/Common/AuthenticationInfoRep.cpp	2006-04-05 20:35:40.000000000 -0400
@@ -57,7 +57,8 @@
     _privileged(false),
     _authType(String::EMPTY),
     _authStatus(NEW_REQUEST),
-    _exportConnection(false)
+    _exportConnection(false),
+    _remoteUser(true)
 { 
     PEG_METHOD_ENTER(
         TRC_AUTHENTICATION, "AuthenticationInfoRep::AuthenticationInfoRep");
@@ -180,5 +181,14 @@
     PEG_METHOD_EXIT();
 }
 
+void   AuthenticationInfoRep::setRemoteUser(Boolean remoteUser)
+{
+    PEG_METHOD_ENTER(TRC_AUTHENTICATION,
+        "AuthenticationInfoRep::setRemoteUser");
+
+    _remoteUser = remoteUser;
+
+    PEG_METHOD_EXIT();
+}
 
 PEGASUS_NAMESPACE_END
--- pegasus/src/Pegasus/Common/HTTPMessage.cpp.local-or-remote-auth	2006-01-30 11:17:04.000000000 -0500
+++ pegasus/src/Pegasus/Common/HTTPMessage.cpp	2006-04-05 20:35:40.000000000 -0400
@@ -119,7 +119,8 @@
     queueId(queueId_),
     authInfo(0),
     acceptLanguagesDecoded(false),
-    contentLanguagesDecoded(false)
+    contentLanguagesDecoded(false),
+    fromRemoteHost(true)
 {
 	if (cimException_)
 		cimException = *cimException_;
--- pegasus/src/Pegasus/Common/AuthenticationInfo.h.local-or-remote-auth	2006-01-30 11:16:46.000000000 -0500
+++ pegasus/src/Pegasus/Common/AuthenticationInfo.h	2006-04-05 20:35:40.000000000 -0400
@@ -331,6 +331,22 @@
         _rep->setClientCertificateChain(clientCertificate);
 	}
 
+     /** Indicate whether the user is Remote 
+     */
+     Boolean isRemoteUser() const
+     {
+         _checkRep();
+         return _rep->isRemoteUser();
+     }
+
+     /** Set the Remote User flag
+     */
+     void setRemoteUser(Boolean remoteUser)
+     {
+         _checkRep();
+         _rep->setRemoteUser(remoteUser);
+     }
+
 private:
 
     AuthenticationInfo(AuthenticationInfoRep* rep) : _rep(rep)
--- pegasus/src/Pegasus/Common/HTTPConnection.cpp.local-or-remote-auth	2006-02-28 21:21:37.000000000 -0500
+++ pegasus/src/Pegasus/Common/HTTPConnection.cpp	2006-04-05 20:35:40.000000000 -0400
@@ -1828,6 +1828,30 @@
             "_requestCount = %d", _requestCount.get());
         message->dest = _outputMessageQueue->getQueueId();
 //        SendForget(message);
+	
+	// Allow authenticators to differentiate Remote and Local users:
+	struct sockaddr_in sin_peer, sin_svr; // don't need to worry about IPv6 yet ...
+	socklen_t slen1=sizeof(struct sockaddr_in), slen2=sizeof(struct sockaddr_in);
+	uint32_t  sock = _socket.get()->getSocket() ;
+	memset(&sin_peer,'\0',slen1);
+	memset(&sin_svr, '\0',slen2);
+	if ( ( ::getpeername( sock, (struct sockaddr*)&sin_peer, &slen1) == 0 )
+	   ||( ::getsockname( sock, (struct sockaddr*)&sin_svr,  &slen2) == 0 )
+	   )
+	{
+	    if( sin_peer.sin_family == AF_INET )
+	    {
+		if( ((ntohl( sin_peer.sin_addr.s_addr ) >> 24) & 0xff) == 127 )
+		    // message was sent FROM localhost interface
+		    message->fromRemoteHost = false;
+	    }
+	    if( sin_svr.sin_family == AF_INET )
+	    {
+		if( ((ntohl( sin_svr.sin_addr.s_addr ) >> 24) & 0xff) == 127 )
+		    // message was sent TO localhost interface
+		    message->fromRemoteHost = false;
+	    }
+	}
 
         //
         // Set the entry status to BUSY.
--- pegasus/src/Pegasus/Common/AuthenticationInfoRep.h.local-or-remote-auth	2006-01-30 11:16:46.000000000 -0500
+++ pegasus/src/Pegasus/Common/AuthenticationInfoRep.h	2006-04-05 20:37:59.000000000 -0400
@@ -143,6 +143,14 @@
 
     void setExportConnection(Boolean exportConnection);
 
+    Boolean isRemoteUser() const
+    {
+        return _remoteUser;
+    }
+
+    void setRemoteUser(Boolean remoteUser);
+
+
 	//PEP187
     Array<SSLCertificateInfo*> getClientCertificateChain()
 	{
@@ -173,7 +181,8 @@
 #endif
 
     Boolean _exportConnection;
-	Array<SSLCertificateInfo*> _clientCertificate;
+    Array<SSLCertificateInfo*> _clientCertificate;
+    Boolean _remoteUser;
 };
 
 PEGASUS_NAMESPACE_END
--- pegasus/src/Pegasus/Common/HTTPMessage.h.local-or-remote-auth	2006-01-30 11:17:04.000000000 -0500
+++ pegasus/src/Pegasus/Common/HTTPMessage.h	2006-04-05 20:35:40.000000000 -0400
@@ -80,7 +80,8 @@
       ContentLanguageList contentLanguages;
       Boolean acceptLanguagesDecoded;
       Boolean contentLanguagesDecoded;
-			CIMException cimException;
+      Boolean fromRemoteHost;	       
+      CIMException cimException;
 
       void parse(
 	 String& startLine,

pegasus-2.5.1-no-rpath.patch:
 library-unix.mak |    6 +++---
 program-unix.mak |   14 ++------------
 2 files changed, 5 insertions(+), 15 deletions(-)

--- NEW FILE pegasus-2.5.1-no-rpath.patch ---
--- pegasus/mak/library-unix.mak.no-rpath	2006-01-30 11:16:23.000000000 -0500
+++ pegasus/mak/library-unix.mak	2006-04-05 19:31:23.000000000 -0400
@@ -81,14 +81,14 @@
   ifneq ($(PEGASUS_PLATFORM),DARWIN_PPC_GNU)
    ifdef PEGASUS_USE_RELEASE_DIRS
       LINK_COMMAND = $(CXX) -shared $(LINK_MACHINE_OPTIONS)
-      LINK_ARGUMENTS = -Wl,-hlib$(LIBRARY)$(LIB_SUFFIX)  -Xlinker -rpath -Xlinker $(PEGASUS_DEST_LIB_DIR)
+      LINK_ARGUMENTS = -Wl,-hlib$(LIBRARY)$(LIB_SUFFIX)  $(EXTRA_LINK_ARGUMENTS)
    else
       LINK_COMMAND = $(CXX) -shared $(LINK_MACHINE_OPTIONS)
-      LINK_ARGUMENTS = -Wl,-hlib$(LIBRARY)$(LIB_SUFFIX)  -Xlinker -rpath -Xlinker $(LIB_DIR) $(EXTRA_LINK_ARGUMENTS)
+      LINK_ARGUMENTS = -Wl,-hlib$(LIBRARY)$(LIB_SUFFIX)  $(EXTRA_LINK_ARGUMENTS)
    endif
   else
     LINK_COMMAND = $(CXX) -dynamiclib
-    LINK_ARGUMENTS = --helplib$(LIBRARY)$(LIB_SUFFIX) -ldl
+    LINK_ARGUMENTS = --helplib$(LIBRARY)$(LIB_SUFFIX) -ldl $(EXTRA_LINK_ARGUMENTS)
   endif
   ifeq ($(PEGASUS_PLATFORM), SOLARIS_SPARC_GNU)
 	LINK_ARGUMENTS = -Wl,-hlib$(LIBRARY)$(LIB_SUFFIX) -Xlinker -L$(LIB_DIR) $(EXTRA_LINK_ARGUMENTS)
--- pegasus/mak/program-unix.mak.no-rpath	2006-01-30 11:16:23.000000000 -0500
+++ pegasus/mak/program-unix.mak	2006-04-05 19:41:59.000000000 -0400
@@ -30,22 +30,12 @@
 #//==============================================================================
 INCLUDES = -I$(ROOT)/src $(EXTRA_INCLUDES)
 
-ifndef LINK_RPATH
-    LINK_RPATH = -Xlinker -rpath
-endif
-
 LINK_DEST_LIB = -Xlinker $(PEGASUS_DEST_LIB_DIR)
 
 LINK_LIB_DIR = -Xlinker $(LIB_DIR)
 
 LINK_ICU = -Xlinker ${ICU_INSTALL}/lib
 
-ifndef LINK_RPATH_LINK
-    LINK_RPATH_LINK = -Xlinker -rpath-link
-endif
-
-
-
 TMP_OBJECTS = $(foreach i,$(SOURCES),$(OBJ_DIR)/$i)
 
 ifeq ($(OS_TYPE),windows)
@@ -118,9 +108,9 @@
           endif
         else
           ifdef  PEGASUS_USE_RELEASE_DIRS
-	    $(LINK_WRAPPER) $(CXX) $(FLAGS) $(EXTRA_LINK_FLAGS) $(LINK_RPATH) $(LINK_DEST_LIB) $(LINK_RPATH_LINK) $(LINK_LIB_DIR) -L$(LIB_DIR) $(EXE_OUTPUT) $(OBJECTS) $(DYNAMIC_LIBRARIES) $(SYS_LIBS)
+	    $(LINK_WRAPPER) $(CXX) $(FLAGS) $(EXTRA_LINK_FLAGS) -L$(LIB_DIR) $(EXE_OUTPUT) $(OBJECTS) $(DYNAMIC_LIBRARIES) $(SYS_LIBS)
           else
-	    $(LINK_WRAPPER) $(CXX) $(FLAGS) $(EXTRA_LINK_FLAGS) $(LINK_RPATH) $(LINK_LIB_DIR) -L$(LIB_DIR) $(EXE_OUTPUT) $(OBJECTS) $(DYNAMIC_LIBRARIES) $(SYS_LIBS) 
+	    $(LINK_WRAPPER) $(CXX) $(FLAGS) $(EXTRA_LINK_FLAGS) -L$(LIB_DIR) $(EXE_OUTPUT) $(OBJECTS) $(DYNAMIC_LIBRARIES) $(SYS_LIBS) 
           endif
         endif      
       else

pegasus-2.5.1-pam-wbem.patch:
 wbem |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)

--- NEW FILE pegasus-2.5.1-pam-wbem.patch ---
--- pegasus/rpm/wbem.pam-wbem	2006-01-17 14:17:43.000000000 -0500
+++ pegasus/rpm/wbem	2006-04-05 19:26:46.000000000 -0400
@@ -1,13 +1,7 @@
 #%PAM-1.0
-auth        required      $ISA/pam_env.so
-auth        sufficient    $ISA/pam_unix.so nullok
-auth        required      $ISA/pam_deny.so
-
-account     required      $ISA/pam_unix.so
-
-password    required      $ISA/pam_cracklib.so retry=3 type=
-password    sufficient    $ISA/pam_unix.so nullok use_authtok md5 shadow
-password    required      $ISA/pam_deny.so
-
-session     required      $ISA/pam_limits.so
-session     required      $ISA/pam_unix.so
+auth       include      system-auth
+account    required     pam_access.so accessfile=/etc/Pegasus/access.conf
+account    include      system-auth
+password   include      system-auth
+session    include      system-auth
+session    required     pam_loginuid.so 

pegasus-2.5.1-redhat-config.patch:
 Makefile.Release     |    6 +++---
 env_var_Linux.status |   10 ++++------
 2 files changed, 7 insertions(+), 9 deletions(-)

--- NEW FILE pegasus-2.5.1-redhat-config.patch ---
--- pegasus/env_var_Linux.status.redhat-config	2006-03-15 20:33:51.000000000 -0500
+++ pegasus/env_var_Linux.status	2006-04-06 19:15:13.000000000 -0400
@@ -18,7 +18,7 @@
 PEGASUS_STAGING_DIR = $(PEGASUS_HOME)/stagingDir
 endif
 
-PEGASUS_DISABLE_CQL=true
+PEGASUS_ENABLE_CQL=true
 PEGASUS_DISABLE_OBJECT_NORMALIZATION=true
 PEGASUS_DISABLE_PERFINST=yes
 PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER=true
@@ -26,7 +26,6 @@
 PEGASUS_HAS_SSL=yes
 PEGASUS_NOASSERTS=yes
 PEGASUS_PAM_AUTHENTICATION=true
-PEGASUS_USE_PAM_STANDALONE_PROC=true
 PEGASUS_USE_RELEASE_CONFIG_OPTIONS=true
 PEGASUS_USE_RELEASE_DIRS=true
 PEGASUS_USE_SYSLOGS=true
@@ -64,18 +63,17 @@
 PEGASUS_LOCAL_AUTH_DIR = $(PEGASUS_VARDATA_CACHE_DIR)/localauth
 PEGASUS_TRACE_DIR = $(PEGASUS_VARDATA_CACHE_DIR)/trace
 PEGASUS_TRACE_FILE_PATH = $(PEGASUS_VARDATA_CACHE_DIR)/trace/cimserver.trc
+PEGASUS_CONFIG_DIR = /etc/Pegasus
 PEGASUS_PLANNED_CONFIG_FILE = cimserver_planned.conf
 PEGASUS_PLANNED_CONFIG_FILE_PATH = \
-     $(PEGASUS_VARDATA_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)
+     $(PEGASUS_CONFIG_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)
 PEGASUS_CURRENT_CONFIG_FILE = cimserver_current.conf
 PEGASUS_CURRENT_CONFIG_FILE_PATH = \
-     $(PEGASUS_VARDATA_DIR)/$(PEGASUS_CURRENT_CONFIG_FILE)
+     $(PEGASUS_CONFIG_DIR)/$(PEGASUS_CURRENT_CONFIG_FILE)
 
 PEGASUS_LOG_DIR = $(PEGASUS_VARDATA_DIR)/log
 PEGASUS_INSTALL_LOG = $(PEGASUS_LOG_DIR)/install.log
 
-PEGASUS_CONFIG_DIR = /etc/Pegasus
-
 PEGASUS_VARRUN_DIR = /var/run/tog-pegasus
 PEGASUS_CIMSERVER_START_FILE = $(PEGASUS_VARRUN_DIR)/cimserver.pid
 CIMSERVER_LOCK_FILE = $(PEGASUS_VARRUN_DIR)/cimserver_start.lock
--- pegasus/Makefile.Release.redhat-config	2006-01-30 11:16:16.000000000 -0500
+++ pegasus/Makefile.Release	2006-04-06 20:14:11.000000000 -0400
@@ -590,10 +590,10 @@
 	$(foreach i, $(MANAGEDSYSTEM_MOF_FILES), $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Pr__r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/Pegasus/$(i);)
 
 stage_PegasusVarDataDirectoryFiles: FORCE
-	$(COPY) $(ROOT)/src/Server/cimserver_planned.conf $(PEGASUS_STAGING_DIR)$(PEGASUS_VARDATA_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)
+	$(COPY) $(ROOT)/src/Server/cimserver_planned.conf $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)
 
 setpermissions_PegasusVarDataDirectoryFiles: FORCE
-	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Pr________)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_VARDATA_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)
+	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Pr________)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)
 
 stage_genOpenPegasusSSLCertsFile: FORCE
 	@$(RM) $(PEGASUS_STAGING_DIR)$(PEGASUS_SCRIPT_DIR)/genOpenPegasusSSLCerts
@@ -1233,7 +1233,7 @@
 	@$(ECHO-E) "%config %attr($(Prwxr_x___),$(INSTALL_USR),$(INSTALL_GRP))"\
             "/etc/init.d/tog-pegasus" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
 	@$(ECHO-E) "%config(noreplace)" \
-            "$(PEGASUS_VARDATA_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)" \
+            "$(PEGASUS_CONFIG_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
 	@$(ECHO-E) "%config(noreplace) $(PEGASUS_CONFIG_DIR)/access.conf" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)

pegasus-2.5.1-warnings.patch:
 Common/Packer.h                               |    4 ++--
 Common/ResponseHandler.cpp                    |    4 ++--
 Common/String.cpp                             |    4 ++--
 Common/StringInline.h                         |    4 ++--
 Config/ConfigManager.cpp                      |    2 +-
 ProviderManager2/CMPI/CMPIProviderManager.cpp |    6 +++---
 6 files changed, 12 insertions(+), 12 deletions(-)

--- NEW FILE pegasus-2.5.1-warnings.patch ---
--- pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp.warnings	2006-02-28 14:53:30.000000000 -0500
+++ pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp	2006-04-05 19:27:27.000000000 -0400
@@ -88,7 +88,7 @@
    char **props;
    int pCount;
   public:
-   CMPIPropertyList(CIMPropertyList &propertyList) {
+    CMPIPropertyList(CIMPropertyList &propertyList) : props(0L), pCount(0) {
       if (!propertyList.isNull()) {
         Array<CIMName> p=propertyList.getPropertyNameArray();
         pCount=p.size();
@@ -2497,7 +2497,7 @@
 
     try
     {
-        indProvRecord *provRec;
+        indProvRecord *provRec = 0L;
         if (provTab.lookup (ph.GetProvider ().getName (), provRec))
         {
             provRec->enabled = true;
@@ -2587,7 +2587,7 @@
     PEG_METHOD_ENTER (TRC_PROVIDERMANAGER,
         "CMPIProviderManager::_callDisableIndications");
 
-    indProvRecord * provRec;
+    indProvRecord * provRec = 0L;
     if (provTab.lookup (ph.GetProvider ().getName (), provRec))
     {
         provRec->enabled = false;
--- pegasus/src/Pegasus/Config/ConfigManager.cpp.warnings	2006-03-14 16:06:37.000000000 -0500
+++ pegasus/src/Pegasus/Config/ConfigManager.cpp	2006-04-05 19:27:27.000000000 -0400
@@ -758,7 +758,7 @@
     //
     for (Uint32 i = 0; i < NUM_PROPERTIES; i++)
     {
-        const char* fixedValue;
+        const char* fixedValue = 0L;
 
         _properties[i].propertyOwner->initialize();
 
--- pegasus/src/Pegasus/Common/Packer.h.warnings	2006-01-30 11:17:07.000000000 -0500
+++ pegasus/src/Pegasus/Common/Packer.h	2006-04-05 19:27:27.000000000 -0400
@@ -173,12 +173,12 @@
 
 inline void Packer::packReal32(Buffer& out, Real32 x)
 {
-    packUint32(out, *((Uint32*)&x));
+    packUint32(out, (Uint32)x);
 }
 
 inline void Packer::packReal64(Buffer& out, Real64 x)
 {
-    packUint64(out, *((Uint64*)&x));
+    packUint64(out, (Uint64)x);
 }
 
 inline void Packer::packChar16(Buffer& out, Char16 x)
--- pegasus/src/Pegasus/Common/StringInline.h.warnings	2006-01-30 11:17:08.000000000 -0500
+++ pegasus/src/Pegasus/Common/StringInline.h	2006-04-05 19:30:43.000000000 -0400
@@ -102,7 +102,7 @@
 
 PEGASUS_STRING_INLINE const Char16* String::getChar16Data() const 
 { 
-    return (Char16*)_rep->data; 
+    return (Char16*)&(_rep->data[0]); 
 }
 
 PEGASUS_STRING_INLINE Char16& String::operator[](Uint32 i) 
@@ -145,7 +145,7 @@
 
 PEGASUS_STRING_INLINE Uint32 String::find(const String& s) const
 {
-    return StringFindAux(_rep, (Char16*)s._rep->data, s._rep->size);
+    return StringFindAux(_rep, (Char16*)&(s._rep->data[0]), s._rep->size);
 }
 
 PEGASUS_STRING_INLINE String& String::append(const Char16& c)
--- pegasus/src/Pegasus/Common/ResponseHandler.cpp.warnings	2006-01-30 11:17:07.000000000 -0500
+++ pegasus/src/Pegasus/Common/ResponseHandler.cpp	2006-04-05 19:27:27.000000000 -0400
@@ -79,7 +79,7 @@
 ResponseHandlerRep* _getRep(
     const ResponseHandler* object)
 {
-    ResponseHandlerRep* rep;
+    ResponseHandlerRep* rep = 0L;
     Boolean found;
 
     AutoMutex lock(repTableMutex);
@@ -91,7 +91,7 @@
 void _deleteRep(
     ResponseHandler* object)
 {
-    ResponseHandlerRep* rep;
+    ResponseHandlerRep* rep = 0L;
     Boolean found;
 
     AutoMutex lock(repTableMutex);
--- pegasus/src/Pegasus/Common/String.cpp.warnings	2006-01-30 11:17:08.000000000 -0500
+++ pegasus/src/Pegasus/Common/String.cpp	2006-04-05 19:27:27.000000000 -0400
@@ -843,7 +843,7 @@
 
 String& String::append(const String& str)
 {
-    return append((Char16*)str._rep->data, str._rep->size);
+    return append((Char16*)(&(str._rep->data[0])), str._rep->size);
 }
 
 String& String::append(const char* str, Uint32 size)
@@ -905,7 +905,7 @@
         if (n == PEG_NOT_FOUND || n > _rep->size - index)
             n = _rep->size - index;
 
-        return String((Char16*)_rep->data + index, n);
+        return String((Char16*)(_rep->data + index), n);
     }
 
     return String();


--- NEW FILE pegasus_rpm_build_env.sh ---
# pegasus_rpm_build_env.sh:
#
# Open Pegasus RPM %build + %install environment setup.
#
# Expects these variables to be set on entry:
#    RPM_ARCH      : rpmbuild architecture identifier
#    RPM_OPT_FLAGS : rpmbuild compile options
#    RPM_BUILD_DIR : rpmbuild source directory
#    RPM_BUILD_ROOT: rpmbuild build destination directory
#    RPM_ARCH_LIB  : %{_lib} : lib or lib64
#    SRCNAME       : name of pegasus source directory
#    
# compile options:
#
export PEGASUS_EXTRA_C_FLAGS="$RPM_OPT_FLAGS -Wno-unused"
export PEGASUS_EXTRA_CXX_FLAGS="$PEGASUS_EXTRA_C_FLAGS"
export PEGASUS_EXTRA_PROGRAM_LINK_FLAGS="-pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack"
export SYS_INCLUDES=-I/usr/kerberos/include
#
# build object directories:
#
SRCNAME=${SRCNAME:-pegasus}
export PEGASUS_ROOT=${RPM_BUILD_DIR}/${SRCNAME}
export PEGASUS_HOME=${RPM_BUILD_DIR}/${SRCNAME}/build
#
# build time settings:
export PEGASUS_ARCH_LIB=${RPM_ARCH_LIB:-lib}
export PEGASUS_ENVVAR_FILE=${PEGASUS_ROOT}/env_var_Linux.status
export OPENSSL_HOME=/usr
export OPENSSL_BIN=/usr/bin
export LD_LIBRARY_PATH=${PEGASUS_HOME}/lib
export PATH=${PEGASUS_HOME}/bin:${PATH}
#
# PEGASUS_PLATFORM (hardware platform) setup:
#
if [ -z "$RPM_ARCH" ]; then
    export RPM_ARCH=`/bin/uname -i`;
fi;
case ${RPM_ARCH} in
  ia64)
    export PEGASUS_PLATFORM=LINUX_IA64_GNU;
    ;;
  x86_64)
    export PEGASUS_PLATFORM=LINUX_X86_64_GNU;
    ;;
  ppc)
    export PEGASUS_PLATFORM=LINUX_PPC_GNU;
    ;;
  ppc64|pseries)
    export PEGASUS_PLATFORM=LINUX_PPC64_GNU;
    ;;
  s390)
    export PEGASUS_PLATFORM=LINUX_ZSERIES_GNU;
    export PEGASUS_EXTRA_C_FLAGS="$PEGASUS_EXTRA_C_FLAGS -fsigned-char";
    export PEGASUS_EXTRA_CXX_FLAGS="$PEGASUS_EXTRA_C_FLAGS";
    ;;
  s390x|zseries)
    export PEGASUS_PLATFORM=LINUX_ZSERIES64_GNU;
    export PEGASUS_EXTRA_C_FLAGS="$PEGASUS_EXTRA_C_FLAGS -fsigned-char";
    export PEGASUS_EXTRA_CXX_FLAGS="$PEGASUS_EXTRA_C_FLAGS";
    ;;
  i386)
    export PEGASUS_PLATFORM=LINUX_IX86_GNU
    ;;
  *)
    echo "Architecture unsupported by pegasus: $RPM_ARCH";
    exit 1;
    ;;
esac;


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/tog-pegasus/devel/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore	3 Oct 2005 17:52:26 -0000	1.3
+++ .cvsignore	7 Apr 2006 02:40:20 -0000	1.4
@@ -1,2 +1,3 @@
 tog-pegasus-2.4.1.Beta-1.tar.gz
 pegasus-2.5.tar.gz
+pegasus-2.5.1.tar.gz


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/tog-pegasus/devel/sources,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sources	3 Oct 2005 17:52:26 -0000	1.4
+++ sources	7 Apr 2006 02:40:20 -0000	1.5
@@ -1 +1 @@
-0b068fd576f199f8a0946e2f659acfe4  pegasus-2.5.tar.gz
+b7b392d2ff7ba9a4a3b8d7722d47314b  pegasus-2.5.1.tar.gz


Index: tog-pegasus.spec
===================================================================
RCS file: /cvs/dist/rpms/tog-pegasus/devel/tog-pegasus.spec,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- tog-pegasus.spec	7 Mar 2006 19:02:19 -0000	1.24
+++ tog-pegasus.spec	7 Apr 2006 02:40:20 -0000	1.25
@@ -1,45 +1,81 @@
-################################################################################
+#==============================================================================
 #
 #               OpenPegasus (Red Hat release) RPM .spec file
 #
-%{?!WITH_TEST:   %define WITH_TEST        0}
-# do "rpmbuild --define 'WITH_TEST 1'" to build test RPM .
-# NOTE: Must use "rpm -[iU]vh --define 'WITH_TEST 1'" for all RPMs if test rpm
-#       is to be installed.
-#       DO NOT install test rpm for production use.
-%{?!AUTOSTART:   %define AUTOSTART        0}
-# Use "rpm -[iU]vh --define 'AUTOSTART 1'" in order to have cimserver enabled
-# (chkconfig --level=345 tog-pegasus on) after installation.
-#
-#%define		debug_package	%{nil}
-Summary: 	OpenPegasus WBEM Services for Linux
-Name:    	tog-pegasus
-Version: 	2.5
-Release:	9
-Epoch:   	2
-Group:   	Systems Management/Base
-License: 	Open Group Pegasus Open Source
-BuildRoot: 	%{_tmppath}/%{name}-%{version}-%{release}-root
-URL:		http://www.openpegasus.org/
-%define srcname pegasus
-Source0: 	%{srcname}-%{version}.tar.gz
-Source1:        rpm_build_env
-Source2:        README.RedHat.Security
-Source3:        access.conf
-Source4:        genSSLcerts
-Patch0:         pegasus-2.5-redhat.patch
-Patch1:         pegasus-2.5-local-or-remote-auth.patch
-Patch2:         pegasus-2.5-make_install.patch
-Patch3:         pegasus-2.5-add_cmpi_provider_lib.patch
-Patch4:		pegasus-2.5-enable_cql.patch
-Patch5:		pegasus-2.5-bz173401.patch
-Patch6:         pegasus-2.5-syslog_h.patch
-Patch7:		pegasus-2.5-install_id.patch
-BuildRequires:    bash, sed, grep, coreutils, procps, gcc, gcc-c++, libstdc++, make, pam-devel, krb5-devel, krb5-libs, openssl-devel >= 0.9.6, e2fsprogs
-Requires:         bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam, krb5-libs, e2fsprogs, redhat-lsb, chkconfig, SysVinit, bind-utils, bind-libs, net-tools
-Requires(post):   bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam, krb5-libs, e2fsprogs, redhat-lsb, chkconfig, SysVinit, bind-utils, bind-libs, net-tools 
-Requires(pre):    bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam, krb5-libs, e2fsprogs, redhat-lsb, chkconfig, SysVinit, bind-utils, bind-libs, net-tools
-Requires(postun): bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam, krb5-libs, e2fsprogs, redhat-lsb, chkconfig, SysVinit, bind-utils, bind-libs, net-tools
+#  tog-pegasus.spec
+#
+#   Copyright (c) 2000 - 2006, 
+#     The Open Group; Hewlett-Packard Development Company, L.P.;  IBM Corp.;
+#     BMC Software;   Tivoli Systems.
+#     Licensed under the "Open Group Pegasus Open Source" license 
+#     shipped with this software.
+#
+#  Upstream tog-pegasus.spec file modified for Red Hat build -
+#  April 2006, Jason Vas Dias <jvdias at redhat.com>, Red Hat Inc.
+#
+#==============================================================================
+
+%{?!LINUX_VERSION: 		%define LINUX_VERSION  FC6}
+#
+%{?!PEGASUS_BUILD_TEST_RPM:   	%define PEGASUS_BUILD_TEST_RPM        0}
+# do "rpmbuild --define 'PEGASUS_BUILD_TEST_RPM 1'" to build test RPM.
+#
+%{?!NOCLEAN:     		%define NOCLEAN 0}
+# ^- 1: don't do %clean
+%{?!NODEBUGINFO: 		%define NODEBUGINFO 0}
+# ^- 1: don't generate debuginfo or strip binaries
+%if %{NODEBUGINFO}
+%define debug_package   %{nil}
+%endif
+%define srcname    	pegasus
+%define pegasus_gid	65
+%define pegasus_uid	66
+
+Version: 		2.5.1
+Release: 		1%{?LINUX_VERSION:.%{LINUX_VERSION}}
+Epoch:   		2
+#
+Summary:   		OpenPegasus WBEM Services for Linux
+Name:      		tog-pegasus
+Group:     		Systems Management/Base
+URL:       		http://www.openpegasus.org
+#
+License:   		Open Group Pegasus Open Source
+#
+BuildRoot: 		%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+#
+Source:    		http://www.openpegasus.org/uploads/40/10123/%{srcname}-%{version}.tar.gz
+Source1:		pegasus_rpm_build_env.sh
+Source2:        	README.RedHat.Security
+#
+Patch0:			pegasus-2.5.1-initscript.patch
+Patch1:			pegasus-2.5.1-no-rpath.patch
+Patch2:			pegasus-2.5.1-linkflags.patch
+Patch3:			pegasus-2.5.1-PIE.patch
+Patch4:			pegasus-2.5.1-warnings.patch
+Patch5:			pegasus-2.5.1-redhat-config.patch
+Patch6:			pegasus-2.5.1-cmpi-provider-lib.patch
+Patch7:			pegasus-2.5.1-local-or-remote-auth.patch
+Patch8:			pegasus-2.5.1-pam-wbem.patch
+#
+Conflicts: 		openwbem
+Provides: 		tog-pegasus-cimserver
+#
+BuildRequires:      	bash, sed, grep, coreutils, procps, gcc, gcc-c++
+BuildRequires:      	libstdc++, make, pam-devel
+BuildRequires:      	openssl-devel >= 0.9.6, e2fsprogs
+Requires:           	bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
+Requires:          	redhat-lsb, chkconfig, SysVinit
+Requires:           	e2fsprogs, bind-utils, net-tools
+Requires(post):     	bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
+Requires(post):    	redhat-lsb, chkconfig, SysVinit
+Requires(post):     	e2fsprogs, bind-utils, net-tools
+Requires(pre):      	bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
+Requires(pre):     	redhat-lsb, chkconfig, SysVinit
+Requires(pre):      	e2fsprogs, bind-utils, net-tools
+Requires(postun):   	bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
+Requires(postun):  	redhat-lsb, chkconfig, SysVinit
+Requires(postun):   	e2fsprogs, bind-utils, net-tools
 
 %description
 OpenPegasus WBEM Services for Linux enables management solutions that deliver
@@ -49,93 +85,89 @@
 sources.
 
 %package devel
-Summary:      The OpenPegasus Software Development Kit
-Group:        Systems Management/Base
-Requires:     tog-pegasus >= 2.5
+Summary: 		The OpenPegasus Software Development Kit
+Group: 			Systems Management/Base
+Requires: 		tog-pegasus >= %{version}
+Obsoletes: 		tog-pegasus-sdk
+Requires:		make, gcc, gcc-c++
+Requires(preun): 	make
 
 %description devel
-The OpenPegasus WBEM Services for Linux SDK is the developer's kit for the OpenPegasus WBEM
-Services for Linux release. It provides Linux C++ developers with the WBEM files required to
-build WBEM Clients and Providers. It also supports C provider developers via the CMPI interface.
+The OpenPegasus WBEM Services for Linux SDK is the developer's kit for the
+OpenPegasus WBEM Services for Linux release. It provides Linux C++ developers
+with the WBEM files required to build WBEM Clients and Providers. It also
+supports C provider developers via the CMPI interface.
+
+%if %{PEGASUS_BUILD_TEST_RPM}
 
-%if %{WITH_TEST}
 %package test
-Summary:      The OpenPegasus Tests
-Group:        Systems Management/Base
-Autoreq:      0
-Requires:     tog-pegasus >= 2.5
+Summary: 		The OpenPegasus Tests
+Group: 			Systems Management/Base
+Requires: 		tog-pegasus >= %{version} 
+Requires(post): 	make
+Requires(postun): 	make
 
 %description test
-The OpenPegasus WBEM tests for the OpenPegasus 2.5 Linux rpm.
+The OpenPegasus WBEM tests for the OpenPegasus %{version} Linux rpm.
 **********************************************************************************
 *** DO NOT INSTALL THIS RPM ON A PRODUCTION SYSTEM - THIS IS FOR TESTING ONLY. ***
 **********************************************************************************
+
 %endif
 
 %prep
-%setup -q -n %{srcname}-%{version}
-%patch0 -p1 -b .redhat
-%patch1 -p1 -b .local_or_remote_auth
-%patch2 -p1 -b .make_install
-%patch3 -p1 -b .add_cmpi_provider_lib
-%patch4 -p1 -b .enable_cql
-# %patch5 -p1 -b .bz173401
-# now fixed with openssl-0.9.8a-3+
-%patch6 -p1 -b .syslog_h
-%patch7 -p1 -b .install_id
+%setup -q -n %{srcname}
+%patch0 -p1 -b .initscript
+%patch1 -p1 -b .no-rpath
+%patch2 -p1 -b .linkflags
+%patch3 -p1 -b .PIE
+%patch4 -p1 -b .warnings
+%patch5 -p1 -b .redhat-config
+%patch6 -p1 -b .cmpi-provider-lib
+%patch7 -p1 -b .local-or-remote-auth
+%patch8 -p1 -b .pam-wbem
 
 %build
-rm -rf $RPM_BUILD_ROOT
+rm -rf ${RPM_BUILD_ROOT} || :;
 export RPM_ARCH_LIB=%{_lib}
 . %SOURCE1
-make
-export LD_LIBRARY_PATH=$PEGASUS_HOME/%{_lib}
-export PATH=$PEGASUS_HOME/bin:$PATH
-make repository
-make --directory=mak -f SDKMakefile stageSDK
-%if %{WITH_TEST}
-export PEGASUS_ENVVAR_FILE=${PEGASUS_ROOT}/env_var_Linux.status
-export PEGASUS_STAGING_DIR=$RPM_BUILD_ROOT
-make --directory=$PEGASUS_ROOT -f Makefile.ReleaseTest stageTEST
-unset  PEGASUS_STAGING_DIR
+%if %{PEGASUS_BUILD_TEST_RPM}
+export PEGASUS_DISPLAYCONSUMER_DIR=/var/lib/Pegasus/log
 %endif
+make -f $PEGASUS_ROOT/Makefile.Release create_ProductVersionFile
+make -f $PEGASUS_ROOT/Makefile.Release create_CommonProductDirectoriesInclude
+make -f $PEGASUS_ROOT/Makefile.Release create_ConfigProductDirectoriesInclude
+make -f $PEGASUS_ROOT/Makefile.Release all
+make -f $PEGASUS_ROOT/Makefile.Release repository
 
 %install
-export RPM_ARCH_LIB=%{_lib}
 . %SOURCE1
-export PEGASUS_DESTDIR=$RPM_BUILD_ROOT
-export PEGASUS_ENVVAR_FILE=${PEGASUS_ROOT}/env_var_Linux.status
-export PATH=${PEGASUS_HOME}/bin:$PATH
-export LD_LIBRARY_PATH=${PEGASUS_HOME}/%{_lib}:/%{_lib}:/usr/%{_lib}
-unset  PEGASUS_STAGING_DIR
-export PEGASUS_SDK_STAGING_DIR=${PEGASUS_HOME}/stageSDK
-# why oh why did they make /usr/bin/install fail on the chown!!! :
-export INSTALL_USER=`id -un`
-export INSTALL_GROUP=`id -gn`
-#
-make install
-rm -rf $PEGASUS_HOME
-mkdir -p $RPM_BUILD_ROOT{${PEGASUS_CONFIG_DIR},${PEGASUS_VARRUN_DIR},${PEGASUS_LOG_DIR},$PEGASUS_VARDATA_DIR}
-touch $RPM_BUILD_ROOT{${PEGASUS_CONFIG_DIR}/{cimserver_{current,planned}.conf,ssl.cnf,client.pem,server.pem,file.pem,client_2048.pem,server_2048.pem,file_2048.pem},${PEGASUS_LOG_DIR}/install.log,${PEGASUS_VARRUN_DIR}/cimxml.socket}
-mkdir -p $RPM_BUILD_ROOT/var/lib/Pegasus/prev_repository
-cp -fp %SOURCE2 ${PEGASUS_ROOT}/doc
-cp -fp %SOURCE3 $RPM_BUILD_ROOT/${PEGASUS_CONFIG_DIR}/access.conf
-chmod 640 $RPM_BUILD_ROOT/${PEGASUS_CONFIG_DIR}/access.conf
-mkdir -p $RPM_BUILD_ROOT/${PEGASUS_PRODSHARE_DIR}/scripts
-cp -fp %SOURCE4 $RPM_BUILD_ROOT/${PEGASUS_PRODSHARE_DIR}/scripts
-chmod 750 $RPM_BUILD_ROOT/${PEGASUS_PRODSHARE_DIR}/scripts/genSSLcerts
-mkdir -p $R$RPM_BUILD_ROOT/usr/%{_lib}/cmpi
-#/usr/lib/rpm/brp-compress
-#exit 0
-:;
+export PEGASUS_STAGING_DIR=$RPM_BUILD_ROOT;
+%if %{PEGASUS_BUILD_TEST_RPM}
+export PEGASUS_BUILD_TEST_RPM=%{PEGASUS_BUILD_TEST_RPM};
+%endif
+make -f $PEGASUS_ROOT/Makefile.Release stage;
+cp -fp %SOURCE2 doc
+mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d;
+mkdir -p ${RPM_BUILD_ROOT}/var/run/tog-pegasus/socket;
+mv ${RPM_BUILD_ROOT}/etc/init.d ${RPM_BUILD_ROOT}/etc/rc.d ||:;
+cp -fp rpm/tog-pegasus.rc ${RPM_BUILD_ROOT}/etc/rc.d/init.d/tog-pegasus;
+touch ${RPM_BUILD_ROOT}{/etc/Pegasus/{cimserver_current.conf,cimserver_planned.conf,cimserver_trust,indication_trust,crl},/var/run/tog-pegasus/{socket/cimxml.socket,cimserver.pid,cimserver_start.lock}}
+rm -rf ${RPM_BUILD_ROOT}/usr/share/doc/%{name}-2.5
+%if %{NODEBUGINFO}
+    /usr/lib/rpm/brp-compress;
+    exit 0;
+%endif
 
 %files
-%defattr(0640,root,pegasus,0750)
-%dir /etc/Pegasus
-%dir /var/lib/Pegasus
-%attr(1750,root,pegasus) /var/run/tog-pegasus
-%dir /var/log/Pegasus
-%config %attr(750,root,root) /etc/rc.d/init.d/tog-pegasus
+%defattr(0750, root, pegasus, 0750)
+/usr/%{_lib}/*
+/usr/sbin/*
+/usr/bin/*
+/usr/share/Pegasus/scripts
+%config /etc/rc.d/init.d/tog-pegasus
+%defattr(0640, root, pegasus, 0750)
+%dir   /etc/Pegasus
 %ghost %config(noreplace) /etc/Pegasus/cimserver_current.conf
 %ghost %config(noreplace) /etc/Pegasus/cimserver_planned.conf
 %config(noreplace) /etc/Pegasus/access.conf
@@ -144,101 +176,116 @@
 %ghost /etc/Pegasus/client.pem
 %ghost /etc/Pegasus/server.pem
 %ghost /etc/Pegasus/file.pem
-%ghost /etc/Pegasus/client_2048.pem
-%ghost /etc/Pegasus/server_2048.pem
-%ghost /etc/Pegasus/file_2048.pem
-%ghost /var/log/Pegasus/install.log
-%ghost /var/lib/Pegasus/prev_repository
+%ghost /etc/Pegasus/cimserver_trust
+%ghost /etc/Pegasus/indication_trust
+%ghost /etc/Pegasus/crl
+%dir /var/lib/Pegasus
 /var/lib/Pegasus/repository
 /var/lib/Pegasus/cache
-%attr(0750,root,pegasus) /usr/sbin/*
-%attr(0755,root,pegasus) /usr/bin/*
-%attr(0755,root,pegasus) /usr/%{_lib}/*.so.*
-%dir /usr/%{_lib}/Pegasus/providers
-%dir /usr/%{_lib}/cmpi
-%attr(0755,root,pegasus) /usr/%{_lib}/Pegasus/providers/*.so.*
+%dir /var/lib/Pegasus/log
+%ghost /var/lib/Pegasus/log/install.log
+%dir   %attr(1750,root,pegasus) /var/run/tog-pegasus
+%ghost /var/run/tog-pegasus/cimserver.pid
+%ghost /var/run/tog-pegasus/cimserver_start.lock
+%dir   %attr(1750,root,pegasus) /var/run/tog-pegasus/socket
+%ghost %attr(1640,root,pegasus) /var/run/tog-pegasus/socket/cimxml.socket
+/usr/share/man/man8/*
+%defattr(0644, root, pegasus, 0755)
+%dir /usr/share/Pegasus
 /usr/share/Pegasus/mof
-%dir /usr/share/Pegasus/scripts
-%attr(0755,root,pegasus) /usr/share/Pegasus/scripts/genSSLcerts
-/usr/share/man/man*/*
-%doc doc/license.txt doc/Admin_Guide_Release.pdf doc/README.RedHat.Security doc/SecurityGuidelinesForDevelopers.html doc/PegasusSSLGuidelines.htm doc/MessageQueueService.html doc/ProviderLoading.txt 
+/usr/share/man/man1/*
+%doc doc/license.txt doc/Admin_Guide_Release.pdf doc/PegasusSSLGuidelines.htm doc/SecurityGuidelinesForDevelopers.html doc/README.RedHat.Security src/Clients/repupgrade/doc/repupgrade.html 
 
 %files devel
 %defattr(0644,root,pegasus,0755)
 /usr/include/Pegasus
 /usr/share/Pegasus/samples
 /usr/share/Pegasus/html
-%attr(0755,root,pegasus) /usr/%{_lib}/*.so
-%attr(0755,root,pegasus) /usr/%{_lib}/Pegasus/providers/*.so
-
-%if %{WITH_TEST}
-
-%post test
-/etc/init.d/tog-pegasus stop
-cd /var/lib/Pegasus
-mv repository repository.bak
-mv testrepository repository
-/usr/share/Pegasus/scripts/genSSLcerts
-cd /usr/share/Pegasus/test
-make create_providerlinks
-make tests
 
+%if %{PEGASUS_BUILD_TEST_RPM}
 %files test
-%defattr(-,root,root,-)
+%defattr(0640,root,pegasus,0750)
+%dir /usr/share/Pegasus/test
+/usr/share/Pegasus/test/Makefile
 /var/lib/Pegasus/testrepository
-/usr/share/Pegasus/test
+%defattr(0750,root,pegasus,0750)
+/usr/share/Pegasus/test/bin
+/usr/share/Pegasus/test/lib
+%endif
 
+%clean
+%if !%{NOCLEAN}
+[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf $RPM_BUILD_ROOT;
+[ "${RPM_BUILD_DIR}" != "/" ] && rm -rf ${RPM_BUILD_DIR}/%{name}-%{version};
 %endif
 
 %pre
-if [ $1 -gt 1 ]; then
-   if [ -d /var/lib/Pegasus/repository/root\#PG_Internal ]; then
-      #
-      # Save the current repository to prev_repository.
-      #
-	  if [ -d /var/lib/Pegasus/prev_repository ]; then
-	     /bin/mv /var/lib/Pegasus/prev_repository /var/lib/Pegasus/prev_repository_`date '+%Y-%m-%d-%s.%N'`.rpmsave;
-	  fi
-	  /bin/mv /var/lib/Pegasus/repository /var/lib/Pegasus/prev_repository
-   fi;
-elif [ $1 -eq 1 ]; then
+if [ $1 -eq 1 ]; then
 #  first install: create the 'pegasus' user and group:
-#  By default, ONLY the "pegasus" user will be allowed to connect to cimserver over network
-   /usr/sbin/groupadd -g 65 -f -r pegasus >/dev/null 2>&1 || :;
-   /usr/sbin/useradd -u 66 -r -n -M -g pegasus -s /sbin/nologin -d /var/lib/Pegasus \
+   /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 [ -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;
+	fi;
+	mv /var/lib/Pegasus/repository /var/lib/Pegasus/prev_repository;
+   fi
 fi
+:;
 
 %post
+ldconfig;
+chkconfig --add tog-pegasus;
 if [ $1 -eq 1 ]; then
-   /sbin/ldconfig
-%if %{AUTOSTART}
-   /sbin/chkconfig --add tog-pegasus
-%endif
-   echo `date` >/var/log/Pegasus/install.log 2>&1
-elif [ $1 -gt 0 ]; then
-   /sbin/service tog-pegasus condrestart
-:;
+   echo `date` >  /var/lib/Pegasus/log/install.log 2>&1
+elif [ $1 -gt 1 ]; then	
+   echo `date` >>  /var/lib/Pegasus/log/install.log 2>&1 || :;
+   if [ -d /var/lib/Pegasus/prev_repository ]; then
+   #  The user's old repository was moved to /var/lib/Pegasus/prev_repository, which 
+   #  now must be upgraded to the new repository in /var/lib/Pegasus/repository:
+	/usr/sbin/repupgrade /var/lib/Pegasus/prev_repository /var/lib/Pegasus/repository \
+			     2>> /var/lib/Pegasus/log/install.log || :;
+        mv /var/lib/Pegasus/prev_repository /var/lib/Pegasus/prev_repository_`date '+%Y-%m-%d-%s.%N'`.rpmsave;
+   fi;
+   /sbin/service tog-pegasus condrestart >/dev/null 2>&1 || :;
 fi
+:;
 
 %preun
 if [ $1 -eq 0 ]; then
-   service tog-pegasus stop >/dev/null 2>&1
-   /sbin/chkconfig --del tog-pegasus;
+   /sbin/service tog-pegasus stop >/dev/null 2>&1 || :;
+   /sbin/chkconfig --del tog-pegasus >/dev/null 2>&1 || :;
 fi
+:;
 
 %postun
-if [ $1 -eq 0 ]; then
-#   /usr/sbin/userdel pegasus >/dev/null 2>&1 || :; 
-#   /usr/sbin/groudel pegasus >/dev/null 2>&1 || :;
+ldconfig
+
+%preun devel
+if [ $1 -eq 0 ] ; then
+   make --directory /usr/share/Pegasus/samples -s clean >/dev/null 2>&1 || :;
+fi
 :;
+
+%if %{PEGASUS_BUILD_TEST_RPM}
+
+%preun test
+if [ $1 -eq 0 ]; then
+    make --directory /usr/share/Pegasus/test -s unsetupTEST >/dev/null 2>&1 || :;
+    if [ -d /var/lib/Pegasus/testrepository ]; then
+   	mv /var/lib/Pegasus/testrepository_`date '+%Y-%m-%d-%s.%N'`.rpmsave;
+    fi;
 fi;
+:;
 
-%clean
-rm -rf $RPM_BUILD_ROOT;
-#rm -rf ${RPM_BUILD_DIR}/%{srcname}-%{version};
+%endif
 
 %changelog
+* Thu Apr 06 2006 Jason Vas Dias <jvdias at redhat.com> - 2:2.5.1-1
+- Upgrade to version 2.5.1 (including new upstream .spec file).
+
 * Tue Mar  7 2006 Bill Nottingham <notting at redhat.com> - 2:2.5-9
 - use an assigned uid/gid, do not loop over user ids looking for a free one
 




More information about the fedora-cvs-commits mailing list