diff --git a/root-gfal-bits.patch b/root-gfal-bits.patch new file mode 100644 index 0000000..050e522 --- /dev/null +++ b/root-gfal-bits.patch @@ -0,0 +1,61 @@ +diff -ur root-5.28.00h.orig/config/Makefile.in root-5.28.00h/config/Makefile.in +--- root-5.28.00h.orig/config/Makefile.in 2011-11-24 17:12:55.000000000 +0100 ++++ root-5.28.00h/config/Makefile.in 2013-03-02 08:09:02.230002472 +0100 +@@ -154,6 +154,7 @@ + GFALLIBDIR := @gfallibdir@ + GFALCLILIB := @gfallib@ + GFALINCDIR := $(filter-out /usr/include, @gfalincdir@) ++SRMIFCEINCDIR := $(filter-out /usr/include, @srmifceincdir@) + + BUILDGLITE := @buildglite@ + GLITELIBDIR := @glitelibdir@ +diff -ur root-5.28.00h.orig/configure root-5.28.00h/configure +--- root-5.28.00h.orig/configure 2011-11-24 17:12:57.000000000 +0100 ++++ root-5.28.00h/configure 2013-03-02 08:10:33.684863607 +0100 +@@ -1426,6 +1426,7 @@ + gviz-incdir Graphviz support, location of gvc.h + gviz-libdir Graphviz support, location of libgvplugin_core + gfal-incdir GFAL support, location of gfal_api.h ++ srm-ifce-incdir GFAL support, location of gfal_srm_ifce_types.h + gfal-libdir GFAL support, location of libgfal + glew-incdir GLEW support, location of glew.h + glew-libdir GLEW support, location of libGLEW +@@ -1733,6 +1734,7 @@ + --with-gviz-libdir=*) gvizlibdir=$optarg ; enable_gviz="yes" ;; + --with-gfal-incdir=*) gfalincdir=$optarg ; enable_gfal="yes" ;; + --with-gfal-libdir=*) gfallibdir=$optarg ; enable_gfal="yes" ;; ++ --with-srm-ifce-incdir=*) srmifceincdir=$optarg;; + --with-glew-incdir=*) glewincdir=$optarg ; enable_builtin_glew=no;; + --with-glew-libdir=*) glewlibdir=$optarg ; enable_builtin_glew=no;; + --with-gsl-incdir=*) gslincdir=$optarg ; enable_gsl="yes" ;; +@@ -3199,6 +3201,12 @@ + gfallib=$found_lib + gfallibdir=$found_dir + ++ check_header "gfal_srm_ifce_types.h" "$srmifceincdir" \ ++ /opt/lcg/include /opt/srm-ifce/include /usr/local/lcg/include \ ++ /usr/local/srm-ifce/include ++ srmifceinc=$found_hdr ++ srmifceincdir=$found_dir ++ + if test "x$gfalincdir" = "x" || test "x$gfallib" = "x"; then + enable_gfal="no" + fi +@@ -6341,6 +6349,7 @@ + -e "s|@exceptions@|$enable_exceptions|" \ + -e "s|@explicitlink@|$enable_explicitlink|" \ + -e "s|@gfalincdir@|$gfalincdir|" \ ++ -e "s|@srmifceincdir@|$srmifceincdir|" \ + -e "s|@gfallib@|$gfallib|" \ + -e "s|@gfallibdir@|$gfallibdir|" \ + -e "s|@enable_xft@|$enable_xft|" \ +diff -ur root-5.28.00h.orig/io/gfal/Module.mk root-5.28.00h/io/gfal/Module.mk +--- root-5.28.00h.orig/io/gfal/Module.mk 2011-11-24 17:12:56.000000000 +0100 ++++ root-5.28.00h/io/gfal/Module.mk 2013-03-02 08:04:00.349761906 +0100 +@@ -70,3 +70,6 @@ + ##### extra rules ###### + $(GFALO) $(GFALDO): CXXFLAGS := $(filter-out -Wshadow,$(CXXFLAGS)) + $(GFALO): CXXFLAGS += $(GFALINCDIR:%=-I%) ++$(GFALO): CXXFLAGS += $(SRMIFCEINCDIR:%=-I%) ++$(GFALO): CXXFLAGS += $(shell pkg-config --cflags glib-2.0) ++$(GFALO): CXXFLAGS += -D_FILE_OFFSET_BITS=64 diff --git a/root-glibc.patch b/root-glibc.patch new file mode 100644 index 0000000..b2da159 --- /dev/null +++ b/root-glibc.patch @@ -0,0 +1,35 @@ +diff -ur root-5.34.00.orig/build/rmkdepend/main.c root-5.34.00/build/rmkdepend/main.c +--- root-5.34.00.orig/build/rmkdepend/main.c 2012-06-05 15:31:46.000000000 +0200 ++++ root-5.34.00/build/rmkdepend/main.c 2012-07-05 20:42:58.938953353 +0200 +@@ -60,7 +60,7 @@ + # endif + # elif defined(__CYGWIN__) + extern int fchmod(int, mode_t); +-#else ++# elif !defined(__GLIBC__) || __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 16) + extern int fchmod(int, int); + # endif + #endif +diff -ur root-5.34.00.orig/cint/tool/rmkdepend/main.c root-5.34.00/cint/tool/rmkdepend/main.c +--- root-5.34.00.orig/cint/tool/rmkdepend/main.c 2012-06-05 15:31:30.000000000 +0200 ++++ root-5.34.00/cint/tool/rmkdepend/main.c 2012-07-05 20:42:58.492949104 +0200 +@@ -58,7 +58,7 @@ + #if !defined(MAC_OS_X_VERSION_10_4) + extern int fchmod(); + #endif +-#else ++#elif !defined(__GLIBC__) || __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 16) + extern int fchmod(); + #endif + #endif +diff -ur root-5.34.00.orig/core/unix/src/TUnixSystem.cxx root-5.34.00/core/unix/src/TUnixSystem.cxx +--- root-5.34.00.orig/core/unix/src/TUnixSystem.cxx 2012-06-05 15:31:17.000000000 +0200 ++++ root-5.34.00/core/unix/src/TUnixSystem.cxx 2012-07-05 20:29:29.969242837 +0200 +@@ -98,6 +98,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/root-qt.patch b/root-qt.patch new file mode 100644 index 0000000..353b6fb --- /dev/null +++ b/root-qt.patch @@ -0,0 +1,25 @@ +diff -ur root-5.28.00h.orig/configure root-5.28.00h/configure +--- root-5.28.00h.orig/configure 2011-11-24 17:12:57.000000000 +0100 ++++ root-5.28.00h/configure 2013-03-02 12:52:21.823338782 +0100 +@@ -2955,21 +2955,6 @@ + check_library "libQt3Support Qt3Support Qt3Support$qt4suffix Qt3Support4" \ + "$enable_shared" "$found_raw_dir" "" + qtlib="$qtlib $found_lib" +- check_library "libQtOpenGL QtOpenGL QtOpenGL$qt4suffix QtOpenGL4" \ +- "$enable_shared" "$found_raw_dir" "" +- qtlib="$qtlib $found_lib" +- check_library "libQtSvg QtSvg QtSvg$qt4suffix QtSvg4" \ +- "$enable_shared" "$found_raw_dir" "" +- qtlib="$qtlib $found_lib" +- check_library "libQtXml QtXml QtXml$qt4suffix QtXml4" \ +- "$enable_shared" "$found_raw_dir" "" +- qtlib="$qtlib $found_lib" +- check_library "libQtWebKit QtWebKit QtWebKit$qt4suffix QtWebKit4" \ +- "$enable_shared" "$found_raw_dir" "" +- qtlib="$qtlib $found_lib" +- check_library "libQtNetwork QtNetwork QtNetwork$qt4suffix QtNetwork4" \ +- "$enable_shared" "$found_raw_dir" "" +- qtlib="$qtlib $found_lib" + else + qtinc= + qtmainincdir= diff --git a/root-xrootd.patch b/root-xrootd.patch index 9f7c113..06f423a 100644 --- a/root-xrootd.patch +++ b/root-xrootd.patch @@ -1,7 +1,166 @@ -diff -ur root-5.32.01.orig/configure root-5.32.01/configure ---- root-5.32.01.orig/configure 2012-02-29 16:46:41.000000000 +0100 -+++ root-5.32.01/configure 2012-03-17 14:14:02.822111495 +0100 -@@ -4486,10 +4486,14 @@ +diff -Nur root-5.32.04.orig/cmake/modules/FindXROOTD.cmake root-5.32.04/cmake/modules/FindXROOTD.cmake +--- root-5.32.04.orig/cmake/modules/FindXROOTD.cmake 2012-07-13 15:54:18.000000000 +0200 ++++ root-5.32.04/cmake/modules/FindXROOTD.cmake 2013-03-08 07:23:10.891952543 +0100 +@@ -28,32 +28,37 @@ + ) + + if (XROOTD_INCLUDE_DIR) +- file(STRINGS ${XROOTD_INCLUDE_DIR}/XrdVersion.hh xrdvers REGEX "^#define XrdVERSION") ++ file(STRINGS ${XROOTD_INCLUDE_DIR}/XrdVersion.hh xrdvers REGEX "^#define XrdVERSION ") + string(REGEX REPLACE "#define[ ]+XrdVERSION[ ]+" "" xrdvers ${xrdvers}) + string(REGEX REPLACE "[^v\\.]+" "" xrdversdots ${xrdvers}) + if (${xrdversdots} STREQUAL "v..") + # Regular version string; parse it out + string(REGEX MATCH "[0-9\\.]+" xrdvers ${xrdvers}) +- string(REGEX MATCH "[0-9]" xrdversmajor ${xrdvers}) +- string(REPLACE "${xrdversmajor}." "" xrdversminor ${xrdvers}) +- string(REGEX MATCH "[0-9]" xrdversminor ${xrdversminor}) +- string(REPLACE "${xrdversmajor}.${xrdversminor}." "" xrdverspatch ${xrdvers}) +- string(REGEX MATCH "[0-9]+" xrdverspatch ${xrdverspatch}) ++ string(REGEX REPLACE "^([^.]*)\\.(.*)\\.(.*)" "\\1" xrdversmajor ${xrdvers}) ++ string(REGEX REPLACE "^([^.]*)\\.(.*)\\.(.*)" "\\2" xrdversminor ${xrdvers}) ++ string(REGEX REPLACE "^([^.]*)\\.(.*)\\.(.*)" "\\3" xrdverspatch ${xrdvers}) + math(EXPR xrdversnum ${xrdversmajor}*100000000+${xrdversminor}*10000+${xrdverspatch}) + else () + # Old version string: we keep only the first numerics, i.e. the date + string(REGEX REPLACE "[v\"]" "" xrdvers ${xrdvers}) +- message(STATUS "Found Xrootd version ${xrdvers}") +- string(REGEX REPLACE "[^0-9-]+" " " xrdvers ${xrdvers}) + string(SUBSTRING ${xrdvers} 0 8 xrdversnum) + endif () ++ if ( ${xrdversnum} EQUAL 300030000 ) ++ SET(XROOTD_FOUND FALSE) ++ message(WARNING " >>> Cannot build with XRootD version 3.3.0: please install >=3.3.1 or <= 3.2.x") ++ else() ++ SET(XROOTD_FOUND TRUE) ++ endif () ++endif() ++ ++if(XROOTD_FOUND) + # This we used as a compiler macro variable + if(NOT XROOTD_FIND_QUIETLY ) +- message(STATUS "Found Xrootd version num: ${xrdvers}") ++ message(STATUS "Found Xrootd version num: ${xrdvers} (setting -DROOTXRDVERS=${xrdversnum})") + endif() + SET(XROOTD_CFLAGS "-DROOTXRDVERS=${xrdversnum}") + +- if ( ${xrdversnum} LESS 300010000 ) ++ if ( ${xrdversnum} LESS 300010000 AND ${xrdversnum} LESS 20111022) + SET(XROOTD_OLDPACK TRUE) + message(STATUS "Setting OLDPACK TRUE") + else() +@@ -72,14 +77,16 @@ + XrdOuc/XrdOucPthread.hh + XrdOuc/XrdOucSemWait.hh + XrdOuc/XrdOucTimer.hh ++ PATHS + ${XROOTD_INCLUDE_DIR} + ) + else() +- if ( ${xrdversnum} LESS 300010000 ) ++ if ( ${xrdversnum} LESS 300010000 AND ${xrdversnum} LESS 20111022) + # DNS stuff was under XrdNet + find_path(XROOTD_INCLUDE_DIR + NAMES + XrdNet/XrdNetDNS.hh ++ PATHS + ${XROOTD_INCLUDE_DIR} + ) + else () +@@ -87,6 +94,7 @@ + find_path(XROOTD_INCLUDE_DIR + NAMES + XrdSys/XrdSysDNS.hh ++ PATHS + ${XROOTD_INCLUDE_DIR} + ) + endif () +@@ -101,9 +109,20 @@ + XrdSys/XrdSysPthread.hh + XrdSys/XrdSysSemWait.hh + XrdSys/XrdSysTimer.hh ++ PATHS + ${XROOTD_INCLUDE_DIR} + ) + endif() ++ ++ if (XROOTD_INCLUDE_DIR) ++ # Check for additional headers in new directories ++ find_path(XROOTD_PRIVATE_INCLUDE_DIR ++ NAMES ++ XrdSys/XrdSysPriv.hh ++ PATHS ++ ${XROOTD_INCLUDE_DIR}/private ++ ) ++ endif() + endif() + if (XROOTD_INCLUDE_DIR) + SET(XROOTD_FOUND TRUE) +@@ -152,7 +171,7 @@ + if(XROOTD_LIBRARIES) + set(XROOTD_FOUND TRUE) + if(NOT XROOTD_FIND_QUIETLY ) +- message(STATUS " include_dir: ${XROOTD_INCLUDE_DIR}") ++ message(STATUS " include_dir: ${XROOTD_INCLUDE_DIR} ${XROOTD_PRIVATE_INCLUDE_DIR}") + message(STATUS " libraries: ${XROOTD_LIBRARIES}") + endif() + else () +@@ -160,7 +179,8 @@ + endif () + endif() + +-mark_as_advanced(XROOTD_INCLUDE_DIR ++mark_as_advanced(XROOTD_INCLUDE_DIR ++ XROOTD_PRIVATE_INCLUDE_DIR + XROOTD_XrdMain_LIBRARY + XROOTD_XrdUtils_LIBRARY + XROOTD_XrdClient_LIBRARY +diff -Nur root-5.32.04.orig/config/Makefile.in root-5.32.04/config/Makefile.in +--- root-5.32.04.orig/config/Makefile.in 2012-07-13 15:55:01.000000000 +0200 ++++ root-5.32.04/config/Makefile.in 2013-03-08 07:23:10.901952610 +0100 +@@ -251,6 +251,7 @@ + EXTRA_XRDFLAGS := @extraxrdflags@ + XRDVERSION := @xrdversion@ + HASXRDUTILS := @hasxrdutils@ ++XRDINCPRIVATE := @xrdincprivate@ + + SRPLIBDIR := @srplibdir@ + SRPLIB := @srplib@ +diff -Nur root-5.32.04.orig/configure root-5.32.04/configure +--- root-5.32.04.orig/configure 2012-07-13 15:55:07.000000000 +0200 ++++ root-5.32.04/configure 2013-03-08 07:23:10.895952570 +0100 +@@ -4473,9 +4473,16 @@ + fi + fi + fi +- echo "$xrdver" ++ # Protect against 3.3.0, first version with 'include/xrootd/private' ++ if [ $decver -eq 300030000 ] ; then ++ echo "Cannot build against version $xrdver (missing headers)" ++ enable_xrootd="no" ++ else ++ echo "$xrdver" ++ fi + fi + ++xrdincprivate="no" + if test "x$enable_xrootd" = "xyes" ; then + + extraxrdflags="-DROOTXRDVERS=$decver" +@@ -4514,14 +4521,27 @@ + done + + # ++ # Check also if 'include/private' exists: we need to signal this to the build modules ++ # for correct location of some headers available form the dlevel packages for version >= 3.3.x ++ if test "x$enable_xrootd" = "xyes"; then ++ if test -d "$xrdincdir/private"; then ++ xrdincprivate="yes" ++ fi ++ fi ++ ++ # + # Check if bonjour is available for code potentially using it ... if test "x$enable_xrootd" = "xyes"; then xrdlibdir="$tmpxrdlibdir" if test "x$enable_bonjour" = "xyes"; then @@ -20,3 +179,631 @@ diff -ur root-5.32.01.orig/configure root-5.32.01/configure fi fi fi +@@ -6667,6 +6687,7 @@ + -e "s|@xpmlibdir@|$xpmlibdir|" \ + -e "s|@xrdlibdir@|$xrdlibdir|" \ + -e "s|@xrdincdir@|$xrdincdir|" \ ++ -e "s|@xrdincprivate@|$xrdincprivate|" \ + -e "s|@xrdversion@|$decver|" \ + -e "s|@hasxrdutils@|$hasxrdutils|" \ + -e "s|@cfitsioincdir@|$cfitsioincdir|" \ +diff -Nur root-5.32.04.orig/net/netx/CMakeLists.txt root-5.32.04/net/netx/CMakeLists.txt +--- root-5.32.04.orig/net/netx/CMakeLists.txt 2012-07-13 15:54:54.000000000 +0200 ++++ root-5.32.04/net/netx/CMakeLists.txt 2013-03-08 07:23:10.901952610 +0100 +@@ -6,7 +6,7 @@ + ROOT_USE_PACKAGE(net/net) + ROOT_USE_PACKAGE(proof/proofd) + +-include_directories(${XROOTD_INCLUDE_DIR}) ++include_directories(${XROOTD_INCLUDE_DIR} ${XROOTD_PRIVATE_INCLUDE_DIR}) + add_definitions(${XROOTD_CFLAGS}) + #--------------------------------------------------------------------------- + +diff -Nur root-5.32.04.orig/net/netx/Module.mk root-5.32.04/net/netx/Module.mk +--- root-5.32.04.orig/net/netx/Module.mk 2012-07-13 15:54:54.000000000 +0200 ++++ root-5.32.04/net/netx/Module.mk 2013-03-08 07:23:10.900952603 +0100 +@@ -55,6 +55,9 @@ + ifneq ($(EXTRA_XRDFLAGS),) + NETXINCEXTRA += -I$(ROOT_SRCDIR)/proof/proofd/inc + endif ++ifeq ($(XRDINCPRIVATE),yes) ++NETXINCEXTRA += -I$(XRDINCDIR)/private ++endif + + # Xrootd client libs + ifeq ($(PLATFORM),win32) +diff -Nur root-5.32.04.orig/net/netx/src/TXNetFile.cxx root-5.32.04/net/netx/src/TXNetFile.cxx +--- root-5.32.04.orig/net/netx/src/TXNetFile.cxx 2012-07-13 15:54:54.000000000 +0200 ++++ root-5.32.04/net/netx/src/TXNetFile.cxx 2013-03-08 07:27:48.977933665 +0100 +@@ -56,6 +56,7 @@ + #include "TVirtualPerfStats.h" + + #include ++#include + #include + #include + #include +diff -Nur root-5.32.04.orig/proof/proofd/CMakeLists.txt root-5.32.04/proof/proofd/CMakeLists.txt +--- root-5.32.04.orig/proof/proofd/CMakeLists.txt 2012-07-13 15:54:19.000000000 +0200 ++++ root-5.32.04/proof/proofd/CMakeLists.txt 2013-03-08 07:23:10.899952597 +0100 +@@ -7,7 +7,7 @@ + ROOT_USE_PACKAGE(net/rpdutils) + ROOT_USE_PACKAGE(net/auth) + +-include_directories(${XROOTD_INCLUDE_DIR}) ++include_directories(${XROOTD_INCLUDE_DIR} ${XROOTD_PRIVATE_INCLUDE_DIR}) + add_definitions(${XROOTD_CFLAGS}) + + if(WIN32) +diff -Nur root-5.32.04.orig/proof/proofd/inc/XpdObject.h root-5.32.04/proof/proofd/inc/XpdObject.h +--- root-5.32.04.orig/proof/proofd/inc/XpdObject.h 1970-01-01 01:00:00.000000000 +0100 ++++ root-5.32.04/proof/proofd/inc/XpdObject.h 2013-03-08 07:23:10.898952590 +0100 +@@ -0,0 +1,100 @@ ++// @(#)root/proofd:$Id$ ++// Author: Gerardo Ganis Feb 2013 ++ ++/************************************************************************* ++ * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * ++ * All rights reserved. * ++ * * ++ * For the licensing terms see $ROOTSYS/LICENSE. * ++ * For the list of contributors see $ROOTSYS/README/CREDITS. * ++ *************************************************************************/ ++ ++////////////////////////////////////////////////////////////////////////// ++// // ++// XpdObject // ++// // ++// Authors: G. Ganis, CERN, 2013 // ++// // ++// Auxilliary class to stack protocols. // ++// Adapted version of XrdObject. // ++// // ++////////////////////////////////////////////////////////////////////////// ++ ++#ifndef ROOT_XpdObject ++#define ROOT_XpdObject ++ ++#include ++#include ++#include ++#include ++#include "Xrd/XrdJob.hh" ++#include "XrdOuc/XrdOucTrace.hh" ++#include "XrdSys/XrdSysPthread.hh" ++ ++class XpdObjectQ; ++class XrdProofdProtocol; ++class XrdScheduler; ++ ++class XpdObject { ++public: ++ friend class XpdObjectQ; ++ ++ // Item() supplies the item value associated with itself (used with Next()). ++ XrdProofdProtocol *objectItem() { return fItem; } ++ ++ // Next() supplies the next list node. ++ XpdObject *nextObject() { return fNext; } ++ ++ // Set the item pointer ++ void setItem(XrdProofdProtocol *ival) { fItem = ival; } ++ ++ XpdObject(XrdProofdProtocol *ival=0) { fNext = 0; fItem = ival; fQTime = 0; } ++ ~XpdObject() {} ++ ++private: ++ XpdObject *fNext; ++ XrdProofdProtocol *fItem; ++ time_t fQTime; // Only used for time-managed objects ++}; ++ ++/******************************************************************************/ ++/* x r d _ O b j e c t Q */ ++/******************************************************************************/ ++ ++// Note to properly cleanup this type of queue you must call Set() at least ++// once to cause the time element to be sceduled. ++ ++class XrdOucTrace; ++ ++class XpdObjectQ : public XrdJob { ++public: ++ ++ XrdProofdProtocol *Pop(); ++ void Push(XpdObject *Node); ++ void Set(int inQMax, time_t agemax=1800); ++ void Set(XrdScheduler *sp, XrdOucTrace *tp, int traceChk = 0) ++ {fSched = sp; fTrace = tp; fTraceON = traceChk;} ++ void DoIt(); ++ ++ XpdObjectQ(const char *id, const char *desc) : XrdJob(desc) ++ {fCurage = fCount = 0; fMaxage = 0; fTraceID = id; ++ fMaxinQ = 32; fMininQ = 16; fFirst = 0; } ++ ++ ~XpdObjectQ() {} ++ ++private: ++ ++ XrdSysMutex fQMutex; ++ XpdObject *fFirst; ++ int fCount; ++ int fCurage; ++ int fMininQ; ++ int fMaxinQ; ++ time_t fMaxage; ++ XrdOucTrace *fTrace; ++ XrdScheduler *fSched; ++ int fTraceON; ++ const char *fTraceID; ++}; ++ ++#endif +diff -Nur root-5.32.04.orig/proof/proofd/inc/XrdProofdProofServMgr.h root-5.32.04/proof/proofd/inc/XrdProofdProofServMgr.h +--- root-5.32.04.orig/proof/proofd/inc/XrdProofdProofServMgr.h 2012-07-13 15:54:19.000000000 +0200 ++++ root-5.32.04/proof/proofd/inc/XrdProofdProofServMgr.h 2013-03-08 07:21:22.170070457 +0100 +@@ -41,6 +41,9 @@ + #define PSMMAXCNTS 3 + #define PSMCNTOK(t) (t >= 0 && t < PSMMAXCNTS) + ++// Security handle ++typedef int (*XrdSecCredsSaver_t)(XrdSecCredentials *, const char *fn, const XrdProofUI &ui); ++ + // Aux structure for session set env inputs + typedef struct { + XrdProofdProofServ *fPS; +@@ -158,6 +161,8 @@ + std::list fActiveSessions; // List of active sessions (non-idle) + std::list *fRecoverClients; // List of client potentially recovering + ++ XrdSecCredsSaver_t fCredsSaver; // If defined, function to be used to save the credentials ++ + int DoDirectiveProofServMgr(char *, XrdOucStream *, bool); + int DoDirectivePutEnv(char *, XrdOucStream *, bool); + int DoDirectivePutRc(char *, XrdOucStream *, bool); +@@ -263,8 +268,6 @@ + + int SetProofServEnv(XrdProofdProtocol *p, void *in); + int SetProofServEnvOld(XrdProofdProtocol *p, void *in); +- +- int SaveAFSkey(XrdSecCredentials *c, const char *fn, XrdProofUI ui); + int SetUserEnvironment(XrdProofdProtocol *p); + + static int SetProofServEnv(XrdProofdManager *m, XrdROOT *r); +diff -Nur root-5.32.04.orig/proof/proofd/inc/XrdProofdProtocol.h root-5.32.04/proof/proofd/inc/XrdProofdProtocol.h +--- root-5.32.04.orig/proof/proofd/inc/XrdProofdProtocol.h 2012-07-13 15:54:19.000000000 +0200 ++++ root-5.32.04/proof/proofd/inc/XrdProofdProtocol.h 2013-03-08 07:23:10.898952590 +0100 +@@ -37,10 +37,10 @@ + #include "XpdSysPthread.h" + + #include "Xrd/XrdLink.hh" +-#include "Xrd/XrdObject.hh" + #include "Xrd/XrdProtocol.hh" + #include "XrdOuc/XrdOucString.hh" + #include "XrdSec/XrdSecInterface.hh" ++#include "XpdObject.h" + #include "XProofProtocol.h" + + class XrdBuffer; +@@ -130,7 +130,7 @@ + // + // Protocol variables + +- XrdObject fProtLink; ++ XpdObject fProtLink; + XrdBuffer *fArgp; + + XrdLink *fLink; +@@ -175,7 +175,7 @@ + // + static bool fgConfigDone; + static int fgCount; +- static XrdObjectQ fgProtStack; ++ static XpdObjectQ fgProtStack; + static XrdBuffManager *fgBPool; // Buffer manager + static int fgMaxBuffsz; // Maximum buffer size we can have + static XrdSysRecMutex fgBMutex; // Buffer management mutex +diff -Nur root-5.32.04.orig/proof/proofd/Module.mk root-5.32.04/proof/proofd/Module.mk +--- root-5.32.04.orig/proof/proofd/Module.mk 2012-07-13 15:54:19.000000000 +0200 ++++ root-5.32.04/proof/proofd/Module.mk 2013-03-08 07:23:10.899952597 +0100 +@@ -127,6 +127,10 @@ + ifeq ($(HASXRD),yes) + XPDINCEXTRA := $(XROOTDDIRI:%=-I%) + XPDINCEXTRA += $(PROOFDDIRI:%=-I%) ++ifeq ($(XRDINCPRIVATE),yes) ++XPDINCEXTRA += -I$(XRDINCDIR)/private ++endif ++ + + ifeq ($(HASXRDUTILS),no) + +diff -Nur root-5.32.04.orig/proof/proofd/src/XpdObject.cxx root-5.32.04/proof/proofd/src/XpdObject.cxx +--- root-5.32.04.orig/proof/proofd/src/XpdObject.cxx 1970-01-01 01:00:00.000000000 +0100 ++++ root-5.32.04/proof/proofd/src/XpdObject.cxx 2013-03-08 07:23:10.896952577 +0100 +@@ -0,0 +1,125 @@ ++// @(#)root/proofd:$Id$ ++// Author: Gerardo Ganis Feb 2013 ++ ++/************************************************************************* ++ * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * ++ * All rights reserved. * ++ * * ++ * For the licensing terms see $ROOTSYS/LICENSE. * ++ * For the list of contributors see $ROOTSYS/README/CREDITS. * ++ *************************************************************************/ ++ ++////////////////////////////////////////////////////////////////////////// ++// // ++// XpdObject // ++// // ++// Authors: G. Ganis, CERN, 2013 // ++// // ++// Auxilliary class to stack protocols. // ++// // ++////////////////////////////////////////////////////////////////////////// ++ ++#include "XpdObject.h" ++#include "XrdProofdAux.h" ++#include "XrdProofdProtocol.h" ++#include "Xrd/XrdScheduler.hh" ++#include "XrdOuc/XrdOucTrace.hh" ++ ++//_______________________________________________________________________ ++XrdProofdProtocol *XpdObjectQ::Pop() ++{ ++ // Pop up a protocol object ++ ++ XpdObject *node; ++ fQMutex.Lock(); ++ if ((node = fFirst)) { ++ fFirst = fFirst->fNext; ++ fCount--; ++ } ++ fQMutex.UnLock(); ++ if (node) return node->fItem; ++ return (XrdProofdProtocol *)0; ++} ++ ++//_______________________________________________________________________ ++void XpdObjectQ::Push(XpdObject *node) ++{ ++ // Push back a protocol ++ ++ node->fQTime = fCurage; ++ fQMutex.Lock(); ++ if (fCount >= fMaxinQ) { ++ delete node->fItem; ++ } else { ++ node->fNext = fFirst; ++ fFirst = node; ++ fCount++; ++ } ++ fQMutex.UnLock(); ++} ++ ++//_______________________________________________________________________ ++void XpdObjectQ::Set(int inQMax, time_t agemax) ++{ ++ // Lock the data area and set the values ++ ++ fQMutex.Lock(); ++ fMaxinQ = inQMax; fMaxage = agemax; ++ if (!(fMininQ = inQMax/2)) fMininQ = 1; ++ fQMutex.UnLock(); ++ ++ // Schedule ourselves using the new values ++ if (agemax > 0) ++ fSched->Schedule((XrdJob *)this, agemax + time(0)); ++} ++ ++//_______________________________________________________________________ ++void XpdObjectQ::DoIt() ++{ ++ // Process method ++ ++ XpdObject *pp, *p; ++ int oldcnt, agemax; ++ ++ // Lock the anchor and see if we met the threshold for deletion ++ // ++ fQMutex.Lock(); ++ agemax = fMaxage; ++ if ((oldcnt = fCount) > fMininQ) { ++ ++ // Prepare to scan down the queue. ++ if ((pp = fFirst)) { ++ p = pp->fNext; ++ } else { p = 0; } ++ ++ // Find the first object that's been idle for too long ++ while(p && (p->fQTime >= fCurage)) { pp = p; p = p->fNext;} ++ ++ // Now delete half of the idle objects. The object queue element must be ++ // part of the actual object being deleted for this to properly work. ++ if (pp) { ++ while (p) { ++ pp->fNext = p->fNext; ++ delete p->fItem; ++ fCount--; ++ p = ((pp = pp->fNext) ? pp->fNext : 0); ++ } ++ } ++ } ++ ++ // Increase the age and unlock the queue ++ fCurage++; ++ fQMutex.UnLock(); ++ ++ // Trace as needed ++ if (fTraceON && fTrace->Tracing(fTraceON)) ++ {fTrace->Beg(fTraceID); ++ cerr <End(); ++ } ++ ++ // Reschedule ourselves if we must do so ++ if (agemax > 0) ++ fSched->Schedule((XrdJob *)this, agemax+time(0)); ++} ++ +diff -Nur root-5.32.04.orig/proof/proofd/src/XrdProofConn.cxx root-5.32.04/proof/proofd/src/XrdProofConn.cxx +--- root-5.32.04.orig/proof/proofd/src/XrdProofConn.cxx 2012-07-13 15:54:19.000000000 +0200 ++++ root-5.32.04/proof/proofd/src/XrdProofConn.cxx 2013-03-08 07:23:10.896952577 +0100 +@@ -31,7 +31,6 @@ + + #include "XrdClient/XrdClientConnMgr.hh" + #include "XrdClient/XrdClientConst.hh" +-#include "XrdClient/XrdClientDebug.hh" + #include "XrdClient/XrdClientEnv.hh" + #include "XrdClient/XrdClientLogConnection.hh" + #include "XrdClient/XrdClientPhyConnection.hh" +@@ -40,6 +39,7 @@ + #include "XrdOuc/XrdOucErrInfo.hh" + #include "XrdOuc/XrdOucString.hh" + #include "XrdSec/XrdSecInterface.hh" ++#include "XrdSys/XrdSysLogger.hh" + #include "XrdSys/XrdSysPlatform.hh" + + // Dynamic libs +diff -Nur root-5.32.04.orig/proof/proofd/src/XrdProofdProofServMgr.cxx root-5.32.04/proof/proofd/src/XrdProofdProofServMgr.cxx +--- root-5.32.04.orig/proof/proofd/src/XrdProofdProofServMgr.cxx 2012-07-13 15:54:19.000000000 +0200 ++++ root-5.32.04/proof/proofd/src/XrdProofdProofServMgr.cxx 2013-03-08 07:21:22.173070483 +0100 +@@ -32,8 +32,7 @@ + #include "XrdOuc/XrdOucRash.hh" + #include "XrdOuc/XrdOucStream.hh" + #include "XrdSys/XrdSysPriv.hh" +-#include "XrdSut/XrdSutAux.hh" +- ++#include "XrdSys/XrdSysPlugin.hh" + #include "XrdProofdClient.h" + #include "XrdProofdClientMgr.h" + #include "XrdProofdManager.h" +@@ -286,6 +285,8 @@ + fCurrentSessions = 0; + + fSeqSessionN = 0; ++ ++ fCredsSaver = 0; + + // Defaults can be changed via 'proofservmgr' + fCheckFrequency = 30; +@@ -3067,26 +3068,20 @@ + putenv(ev); + TRACE(DBG, "XrdSecCREDS set"); + +- // If 'pwd', save AFS key, if any +- if (!strncmp(p->AuthProt()->Entity.prot, "pwd", 3)) { ++ if (fCredsSaver) { + XrdOucString credsdir = udir; + credsdir += "/.creds"; + // Make sure the directory exists + if (!XrdProofdAux::AssertDir(credsdir.c_str(), p->Client()->UI(), fMgr->ChangeOwn())) { +- if (SaveAFSkey(creds, credsdir.c_str(), p->Client()->UI()) == 0) { +- ev = new char[strlen("ROOTPROOFAFSCREDS=")+credsdir.length()+strlen("/.afs")+2]; +- sprintf(ev, "ROOTPROOFAFSCREDS=%s/.afs", credsdir.c_str()); +- putenv(ev); +- fprintf(fenv, "ROOTPROOFAFSCREDS has been set\n"); +- TRACE(DBG, ev); +- } else { +- TRACE(DBG, "problems in saving AFS key"); ++ if ((*fCredsSaver)(creds, credsdir.c_str(), p->Client()->UI()) != 0) { ++ TRACE(DBG, "problems in saving authentication creds under "<fOld); + TRACE(DBG, "XrdSecCREDS set"); + +- // If 'pwd', save AFS key, if any +- if (!strncmp(p->AuthProt()->Entity.prot, "pwd", 3)) { ++ if (fCredsSaver) { + XrdOucString credsdir = p->Client()->Sandbox()->Dir(); + credsdir += "/.creds"; + // Make sure the directory exists + if (!XrdProofdAux::AssertDir(credsdir.c_str(), p->Client()->UI(), fMgr->ChangeOwn())) { +- if (SaveAFSkey(creds, credsdir.c_str(), p->Client()->UI()) == 0) { +- ev = new char[strlen("ROOTPROOFAFSCREDS=")+credsdir.length()+strlen("/.afs")+2]; +- sprintf(ev, "ROOTPROOFAFSCREDS=%s/.afs", credsdir.c_str()); +- fprintf(fenv, "ROOTPROOFAFSCREDS has been set\n"); +- TRACE(DBG, ev); +- PutEnv(ev, in->fOld); +- } else { +- TRACE(DBG, "problems in saving AFS key"); ++ if ((*fCredsSaver)(creds, credsdir.c_str(), p->Client()->UI()) != 0) { ++ TRACE(DBG, "problems in saving authentication creds under "<size]; +- if (XrdSutFromHex(c->buffer, out, lout) != 0) { +- TRACE(XERR, "problems unparsing hex string"); +- delete [] out; +- return -1; +- } +- +- // Locate the key +- char *key = out + 5; +- if (strncmp(key, "afs:", 4)) { +- TRACE(DBG, "string does not contain an AFS key"); +- delete [] out; +- return 0; +- } +- key += 4; +- +- // Save to file, if not existing already +- XrdOucString fn = dir; +- fn += "/.afs"; +- +- int rc = 0; +- struct stat st; +- if (stat(fn.c_str(), &st) != 0 && errno == ENOENT) { +- +- // Open the file, truncating if already existing +- int fd = open(fn.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0600); +- if (fd <= 0) { +- TRACE(XERR, "problems creating file - errno: " << errno); +- delete [] out; +- return -1; +- } +- // Write out the key +- int lkey = lout - 9; +- if (XrdProofdAux::Write(fd, key, lkey) != lkey) { +- TRACE(XERR, "problems writing to file - errno: " << errno); +- rc = -1; +- } +- +- // Cleanup +- delete [] out; +- close(fd); +- } else { +- TRACE(XERR, "cannot stat existing file "< +- XrdProofdProtocol::fgProtStack("ProtStack", ++XpdObjectQ XrdProofdProtocol::fgProtStack("ProtStack", + "xproofd protocol anchor"); + XrdSysRecMutex XrdProofdProtocol::fgBMutex; // Buffer management mutex + XrdBuffManager *XrdProofdProtocol::fgBPool = 0; +@@ -542,8 +542,12 @@ + // Schedule protocol object cleanup; the maximum number of objects + // and the max age are taken from XrdXrootdProtocol: this may need + // some optimization in the future. ++#if 1 + fgProtStack.Set(pi->Sched, XrdProofdTrace, TRACE_MEM); + fgProtStack.Set((pi->ConnMax/3 ? pi->ConnMax/3 : 30), 60*60); ++#else ++ fgProtStack.Set(pi->Sched, 3600); ++#endif + + // Default tracing options: always trace logins and errors for all + // domains; if the '-d' option was specified on the command line then +@@ -790,6 +794,13 @@ + + // Push ourselves on the stack + fgProtStack.Push(&fProtLink); ++#if 0 ++ if(fgProtStack.Push(&fProtLink) != 0) { ++ XrdProofdProtocol *xp = fProtLink.objectItem(); ++ fProtLink.setItem(0); ++ delete xp; ++ } ++#endif + } + + //______________________________________________________________________________ +diff -Nur root-5.32.04.orig/proof/proofx/CMakeLists.txt root-5.32.04/proof/proofx/CMakeLists.txt +--- root-5.32.04.orig/proof/proofx/CMakeLists.txt 2012-07-13 15:54:19.000000000 +0200 ++++ root-5.32.04/proof/proofx/CMakeLists.txt 2013-03-08 07:23:10.900952603 +0100 +@@ -16,7 +16,7 @@ + file(GLOB sources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cxx) + endif() + +-include_directories(${XROOTD_INCLUDE_DIR}) ++include_directories(${XROOTD_INCLUDE_DIR} ${XROOTD_PRIVATE_INCLUDE_DIR}) + link_directories(${XROOTD_LIBRARY_DIR}) + add_definitions(${XROOTD_CFLAGS}) + +diff -Nur root-5.32.04.orig/proof/proofx/Module.mk root-5.32.04/proof/proofx/Module.mk +--- root-5.32.04.orig/proof/proofx/Module.mk 2012-07-13 15:54:19.000000000 +0200 ++++ root-5.32.04/proof/proofx/Module.mk 2013-03-08 07:23:10.899952597 +0100 +@@ -63,6 +63,9 @@ + PROOFXINCEXTRA := $(PROOFXDIRI:%=-I%) + PROOFXINCEXTRA += $(XROOTDDIRI:%=-I%) + PROOFXINCEXTRA += $(PROOFDDIRI:%=-I%) ++ifeq ($(XRDINCPRIVATE),yes) ++PROOFXINCEXTRA += -I$(XRDINCDIR)/private ++endif + + # Xrootd client libs + ifeq ($(PLATFORM),win32) diff --git a/root.spec b/root.spec index 15f7a21..bc39033 100644 --- a/root.spec +++ b/root.spec @@ -28,7 +28,7 @@ Name: root Version: 5.32.04 %global libversion %(cut -d. -f 1-2 <<< %{version}) -Release: 1%{?dist} +Release: 2%{?dist} Summary: Numerical data analysis framework Group: Applications/Engineering @@ -55,13 +55,19 @@ Patch0: %{name}-ftgl.patch Patch1: %{name}-fontconfig.patch # Use system unuran: Patch2: %{name}-unuran.patch -# Fixes for xrootd bonjour +# Fixes for new xrootd (backported from trunk): Patch3: %{name}-xrootd.patch -# Fix hardcoded include path +# Fix hardcoded include path: # https://savannah.cern.ch/bugs/index.php?91463 Patch4: %{name}-meta.patch -# Backport fixes for using aclic with versioned libraries +# Backport fixes for using aclic with versioned libraries: Patch5: %{name}-aclic-versioned-libs.patch +# Fixes for latest glibc headers: +Patch6: %{name}-glibc.patch +# Fixes for gfal (mostly backported from trunk): +Patch7: %{name}-gfal-bits.patch +# Remove unnecessary Qt linkage (backported from trunk): +Patch8: %{name}-qt.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # The build segfaults on ppc64 during an invocation of cint: # https://savannah.cern.ch/bugs/index.php?70542 @@ -108,9 +114,6 @@ BuildRequires: python26-devel %endif %if %{?fedora}%{!?fedora:0} >= 9 || %{?rhel}%{!?rhel:0} >= 6 BuildRequires: qt4-devel -%if %{?fedora}%{!?fedora:0} >= 14 -BuildRequires: qt4-webkit-devel -%endif %endif BuildRequires: ruby BuildRequires: ruby-devel @@ -122,7 +125,8 @@ BuildRequires: libtool-ltdl-devel BuildRequires: desktop-file-utils BuildRequires: dcap-devel BuildRequires: dpm-devel -BuildRequires: xrootd-devel +BuildRequires: xrootd-client-devel +BuildRequires: xrootd-private-devel BuildRequires: cfitsio-devel BuildRequires: gfal-devel BuildRequires: srm-ifce-devel @@ -1048,6 +1052,9 @@ fi %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 find . '(' -name '*.cxx' -o -name '*.cpp' -o -name '*.C' -o -name '*.c' -o \ -name '*.h' -o -name '*.hh' -o -name '*.hi' -o -name '*.py' -o \ @@ -1122,7 +1129,8 @@ sed s/c1/c1simp/g -i tutorials/hsimple.C %if "%{?rhel}" == "5" # Build PyROOT for python 2.6 cp -pr bindings/pyroot bindings/pyroot26 -sed 's/python /python26 /' -i bindings/pyroot26/Module.mk +sed -e 's/= pyroot/= pyroot26/' -e 's/python /python26 /' \ + -i bindings/pyroot26/Module.mk %endif %build @@ -1155,10 +1163,10 @@ unset QTINC --enable-fftw3 \ --enable-fitsio \ --enable-gdml \ + --enable-genvector \ --enable-gfal \ --with-gfal-incdir=%{_includedir} \ --with-gfal-libdir=%{_libdir} \ - --enable-genvector \ --enable-globus \ --enable-gsl-shared \ --enable-gviz \ @@ -2315,6 +2323,10 @@ fi %{emacs_lispdir}/root/*.el %changelog +* Fri Mar 08 2013 Mattias Ellert - 5.32.04-2 +- Rebuild for xrootd 3.3 +- Backport gfal fixes + * Wed Jul 18 2012 Mattias Ellert - 5.32.04-1 - Update to 5.32.04