diff --git a/.cvsignore b/.cvsignore index e69de29..6ad112e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1,2 @@ +xrootd-20100315-1007.src.tgz +xrootd-manpages.tar.gz diff --git a/import.log b/import.log new file mode 100644 index 0000000..cd3dc63 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +xrootd-20100315-2_fc12:HEAD:xrootd-20100315-2.fc12.src.rpm:1277088488 diff --git a/olbd.init b/olbd.init new file mode 100644 index 0000000..f893878 --- /dev/null +++ b/olbd.init @@ -0,0 +1,85 @@ +#! /bin/sh +# +# olbdd Start/Stop the OLBD daemon +# +# chkconfig: - 20 80 +# description: The olbd daemon runs the XRD control network. +# +# processname: olbd +# pidfile: /var/run/olbd.pid +# config: + +OLBD=/usr/bin/olbd + +# Source function library. +. /etc/init.d/functions + +# Get config. +. /etc/sysconfig/network + +# Get olbd config +[ -f /etc/sysconfig/olbd ] && . /etc/sysconfig/olbd + +# Configure the environment +[ ! -z "$OLBDENVCONFIG" ] && [ -f "$OLBDENVCONFIG" ] && . $OLBDENVCONFIG + +# Check that networking is up. +if [ ${NETWORKING} = "no" ] +then + exit 0 +fi + +[ -x $OLBD ] || exit 0 + +RETVAL=0 +prog="olbd" + +start() { + echo -n $"Starting $prog: " + # Options are specified in /etc/sysconfig/olbd . + # $OLBDUSER *must* be the name of an existing non-privileged user. + daemon $OLBD -b -l $OLBDLOG -R $OLBDUSER -c $OLBDCF $OLBDDEBUG + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/olbd + return $RETVAL +} + +stop() { + [ ! -f /var/lock/subsys/olbd ] && return 0 || true + echo -n $"Stopping $prog: " + killproc olbd + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/olbd + return $RETVAL +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status olbd + RETVAL=$? + ;; + restart|reload) + stop + start + ;; + condrestart) + if [ -f /var/lock/subsys/olbd ]; then + stop + start + fi + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" + exit 1 +esac + +exit $RETVAL diff --git a/olbd.sysconfig b/olbd.sysconfig new file mode 100644 index 0000000..4330d45 --- /dev/null +++ b/olbd.sysconfig @@ -0,0 +1,3 @@ +OLBDLOG=/var/log/xrootd/olbd.log +OLBDUSER=xrootd +OLBDCF=/etc/xrootd/olbd.cf diff --git a/sources b/sources index e69de29..8ca50c6 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +099fc80474b8df5a36bf52bea7276f8b xrootd-20100315-1007.src.tgz +76b4eef20618c2c75eb6c25cb428f1cd xrootd-manpages.tar.gz diff --git a/xrootd-dso.patch b/xrootd-dso.patch new file mode 100644 index 0000000..8f92d0d --- /dev/null +++ b/xrootd-dso.patch @@ -0,0 +1,300 @@ +diff -ur xrootd.orig/src/Xrd/Makefile.am xrootd/src/Xrd/Makefile.am +--- xrootd.orig/src/Xrd/Makefile.am 2008-05-26 15:36:50.000000000 +0200 ++++ xrootd/src/Xrd/Makefile.am 2010-06-08 17:02:29.595843411 +0200 +@@ -41,3 +41,6 @@ + XrdScheduler.cc XrdScheduler.hh XrdJob.hh \ + XrdStats.cc XrdStats.hh \ + XrdTrace.hh ++libXrd_la_LIBADD = ../XrdNet/libXrdNet.la \ ++ ../XrdSys/libXrdSys.la \ ++ ../XrdOuc/libXrdOuc.la +diff -ur xrootd.orig/src/Xrd/XrdProtocol.cc xrootd/src/Xrd/XrdProtocol.cc +--- xrootd.orig/src/Xrd/XrdProtocol.cc 2009-03-09 02:58:08.000000000 +0100 ++++ xrootd/src/Xrd/XrdProtocol.cc 2010-06-08 17:02:29.596842140 +0200 +@@ -17,6 +17,7 @@ + #include + #include + ++#include "XrdSys/XrdSysError.hh" + #include "Xrd/XrdProtocol.hh" + + /******************************************************************************/ +@@ -55,3 +56,24 @@ + WANPort = rhs.WANPort; + WANWSize = rhs.WANWSize; + } ++ ++// Dummy implementations to allow creation of shared library. ++// These should not be used. ++ ++extern "C" ++ ++{ ++XrdProtocol *XrdgetProtocol(const char *pname, char *parms, ++ XrdProtocol_Config *pi) ++{ ++ pi->eDest->Say("XrdgetProtocol - this version should not be used."); ++ return NULL; ++} ++ ++int XrdgetProtocolPort(const char *pname, char *parms, XrdProtocol_Config *pi) ++{ ++ pi->eDest->Say("XrdgetProtocolPort - this version should not be used."); ++ return 0; ++} ++ ++} +diff -ur xrootd.orig/src/XrdAcc/Makefile.am xrootd/src/XrdAcc/Makefile.am +--- xrootd.orig/src/XrdAcc/Makefile.am 2007-08-02 17:34:58.000000000 +0200 ++++ xrootd/src/XrdAcc/Makefile.am 2010-06-08 17:02:29.596842140 +0200 +@@ -29,6 +29,8 @@ + XrdAccCapability.cc XrdAccCapability.hh \ + XrdAccConfig.cc XrdAccConfig.hh XrdAccAuthDB.hh \ + XrdAccGroups.cc XrdAccGroups.hh XrdAccPrivs.hh ++libXrdAcc_la_LIBADD = ../XrdSys/libXrdSys.la \ ++ ../XrdOuc/libXrdOuc.la + + XrdAccTest_SOURCES = XrdAccTest.cc XrdAccAuthorize.hh + XrdAccTest_LDADD = libXrdAcc.la \ +diff -ur xrootd.orig/src/XrdCms/Makefile.am xrootd/src/XrdCms/Makefile.am +--- xrootd.orig/src/XrdCms/Makefile.am 2009-11-19 04:28:11.000000000 +0100 ++++ xrootd/src/XrdCms/Makefile.am 2010-06-08 17:11:51.802591088 +0200 +@@ -62,6 +62,7 @@ + + + libXrdCms_la_LIBADD = libXrdCmsConv.la \ ++ ../Xrd/libXrd.la \ + ../XrdNet/libXrdNet.la \ + ../XrdOuc/libXrdOuc.la \ + ../XrdOdc/libXrdOdc.la \ +diff -ur xrootd.orig/src/XrdCms/XrdCmsClientMan.cc xrootd/src/XrdCms/XrdCmsClientMan.cc +--- xrootd.orig/src/XrdCms/XrdCmsClientMan.cc 2010-01-16 02:38:03.000000000 +0100 ++++ xrootd/src/XrdCms/XrdCmsClientMan.cc 2010-06-08 17:02:29.597589231 +0200 +@@ -35,7 +35,7 @@ + /* G l o b a l s */ + /******************************************************************************/ + +-extern XrdInet *XrdXrootdNetwork; ++ XrdInet *XrdXrootdNetwork = 0; + + XrdNetBufferQ XrdCmsClientMan::BuffQ(2048,64); + +diff -ur xrootd.orig/src/XrdCms/XrdCmsConfig.cc xrootd/src/XrdCms/XrdCmsConfig.cc +--- xrootd.orig/src/XrdCms/XrdCmsConfig.cc 2010-02-18 23:45:17.000000000 +0100 ++++ xrootd/src/XrdCms/XrdCmsConfig.cc 2010-06-08 17:02:29.598589287 +0200 +@@ -135,11 +135,11 @@ + // of the following symbol being non-zero. On the server side, we have no + // such symbol and need to provide one initialized to zero. + // +- XrdSecProtocol *(*XrdXrootdSecGetProtocol) ++extern XrdSecProtocol *(*XrdXrootdSecGetProtocol) + (const char *hostname, + const struct sockaddr &netaddr, + const XrdSecParameters &parms, +- XrdOucErrInfo *einfo)=0; ++ XrdOucErrInfo *einfo); + + /******************************************************************************/ + /* E x t e r n a l T h r e a d I n t e r f a c e s */ +diff -ur xrootd.orig/src/XrdCms/XrdCmsSecurity.cc xrootd/src/XrdCms/XrdCmsSecurity.cc +--- xrootd.orig/src/XrdCms/XrdCmsSecurity.cc 2008-06-10 04:00:42.000000000 +0200 ++++ xrootd/src/XrdCms/XrdCmsSecurity.cc 2010-06-08 17:02:29.599589203 +0200 +@@ -48,11 +48,11 @@ + /* G l o b a l S y m b o l s */ + /******************************************************************************/ + +-extern XrdSecProtocol *(*XrdXrootdSecGetProtocol) ++XrdSecProtocol *(*XrdXrootdSecGetProtocol) + (const char *hostname, + const struct sockaddr &netaddr, + const XrdSecParameters &parms, +- XrdOucErrInfo *einfo); ++ XrdOucErrInfo *einfo) = 0; + + /******************************************************************************/ + /* S t a t i c S y m b o l s */ +diff -ur xrootd.orig/src/XrdCrypto/Makefile.am xrootd/src/XrdCrypto/Makefile.am +--- xrootd.orig/src/XrdCrypto/Makefile.am 2008-10-12 12:25:41.000000000 +0200 ++++ xrootd/src/XrdCrypto/Makefile.am 2010-06-08 17:02:29.599589203 +0200 +@@ -70,7 +70,10 @@ + XrdCryptoLite.hh \ + XrdCryptoLite.cc \ + XrdCryptoLite_bf32.cc +-libXrdCrytoLite_la_CXXFLAGS = $(SSLCXXFLAGS) ++libXrdCryptoLite_la_CXXFLAGS = $(SSLCXXFLAGS) ++libXrdCryptoLite_la_LIBADD = ../XrdSys/libXrdSys.la \ ++ ../XrdOuc/libXrdOuc.la \ ++ $(OPENSSL_LIBDIR) -lcrypto + + + libXrdCryptossl_la_SOURCES = \ +@@ -84,7 +87,8 @@ + XrdCryptosslX509Req.cc \ + XrdCryptosslgsiAux.cc \ + XrdCryptosslgsiX509Chain.cc +-libXrdCryptossl_la_LIBADD = ../XrdSut/libXrdSut.la \ ++libXrdCryptossl_la_LIBADD = libXrdCrypto.la \ ++ ../XrdSut/libXrdSut.la \ + $(OPENSSL_LIBDIR) -lssl -lcrypto + libXrdCryptossl_la_CXXFLAGS = $(SSLCXXFLAGS) + +diff -ur xrootd.orig/src/XrdMon/Makefile.am xrootd/src/XrdMon/Makefile.am +--- xrootd.orig/src/XrdMon/Makefile.am 2008-11-27 10:46:33.000000000 +0100 ++++ xrootd/src/XrdMon/Makefile.am 2010-06-08 17:02:29.600589049 +0200 +@@ -10,7 +10,7 @@ + + # global settings + AM_CPPFLAGS = -I$(top_srcdir)/src +-AM_LDFLAGS=-static ++AM_LDFLAGS = -static + + ############################################################################# + ## extra directory definitions for install tree +diff -ur xrootd.orig/src/XrdNet/Makefile.am xrootd/src/XrdNet/Makefile.am +--- xrootd.orig/src/XrdNet/Makefile.am 2007-11-16 02:07:38.000000000 +0100 ++++ xrootd/src/XrdNet/Makefile.am 2010-06-08 17:02:29.600589049 +0200 +@@ -29,7 +29,9 @@ + XrdNetSecurity.cc XrdNetSecurity.hh \ + XrdNetSocket.cc XrdNetSocket.hh \ + XrdNetWork.cc XrdNetWork.hh +-libXrdNet_la_LIBADD = $(LIBSOCKET) $(LIBNSL) ++libXrdNet_la_LIBADD = ../XrdSys/libXrdSys.la \ ++ ../XrdOuc/libXrdOuc.la \ ++ $(LIBSOCKET) $(LIBNSL) + #REFAC libXrdNet_la_CXXFLAGS = -prefer-pic + #REFAC libXrdNet_la_LDFLAGS = -static + +diff -ur xrootd.orig/src/XrdOdc/Makefile.am xrootd/src/XrdOdc/Makefile.am +--- xrootd.orig/src/XrdOdc/Makefile.am 2007-06-07 12:44:41.000000000 +0200 ++++ xrootd/src/XrdOdc/Makefile.am 2010-06-08 17:02:29.600589049 +0200 +@@ -28,6 +28,8 @@ + XrdOdcManager.cc XrdOdcManager.hh \ + XrdOdcMsg.cc XrdOdcMsg.hh XrdOdcTrace.hh \ + XrdOdcResp.cc XrdOdcResp.hh ++libXrdOdc_la_LIBADD = ../XrdNet/libXrdNet.la \ ++ ../XrdSys/libXrdSys.la + + ## XrdOdcTest_SOURCES = XrdOdcTest.cc + ## XrdOdcTest_LDADD = libXrdOdc.la \ +diff -ur xrootd.orig/src/XrdOss/Makefile.am xrootd/src/XrdOss/Makefile.am +--- xrootd.orig/src/XrdOss/Makefile.am 2009-05-22 03:04:24.000000000 +0200 ++++ xrootd/src/XrdOss/Makefile.am 2010-06-08 17:02:29.601589314 +0200 +@@ -41,4 +41,7 @@ + XrdOssSpace.cc XrdOssSpace.hh \ + XrdOssStat.cc \ + XrdOssUnlink.cc +-libXrdOss_la_LIBADD = $(LIBRT) ++libXrdOss_la_LIBADD = ../XrdNet/libXrdNet.la \ ++ ../XrdSys/libXrdSys.la \ ++ ../XrdOuc/libXrdOuc.la \ ++ $(LIBRT) +diff -ur xrootd.orig/src/XrdOuc/Makefile.am xrootd/src/XrdOuc/Makefile.am +--- xrootd.orig/src/XrdOuc/Makefile.am 2009-08-19 15:51:46.000000000 +0200 ++++ xrootd/src/XrdOuc/Makefile.am 2010-06-08 17:02:29.601589314 +0200 +@@ -50,7 +50,8 @@ + XrdOucCRC.cc XrdOucCRC.hh \ + XrdOucHash.icc + +-libXrdOuc_la_LIBADD = $(LIBPTHREAD) $(SEM_LIBRT) $(LIBNSL) ++libXrdOuc_la_LIBADD = ../XrdSys/libXrdSys.la \ ++ $(LIBPTHREAD) $(SEM_LIBRT) $(LIBNSL) + #REFAC libXrdOuc_la_CXXFLAGS = -prefer-pic + #REFAC libXrdOuc_la_LDFLAGS = -static + +diff -ur xrootd.orig/src/XrdPss/Makefile.am xrootd/src/XrdPss/Makefile.am +--- xrootd.orig/src/XrdPss/Makefile.am 2007-06-01 12:29:53.000000000 +0200 ++++ xrootd/src/XrdPss/Makefile.am 2010-06-08 17:02:29.602588812 +0200 +@@ -20,7 +20,8 @@ + XrdPssAio.cc \ + XrdPssConfig.cc + +-libXrdProxy_la_LIBADD = ../XrdClient/libXrdClient.la \ ++libXrdProxy_la_LIBADD = ../XrdPosix/libXrdPosix.la \ ++ ../XrdClient/libXrdClient.la \ + ../XrdNet/libXrdNet.la \ + ../XrdOuc/libXrdOuc.la \ + ../XrdSys/libXrdSys.la +diff -ur xrootd.orig/src/XrdRootd/Makefile.am xrootd/src/XrdRootd/Makefile.am +--- xrootd.orig/src/XrdRootd/Makefile.am 2005-10-06 17:30:22.000000000 +0200 ++++ xrootd/src/XrdRootd/Makefile.am 2010-06-08 17:02:29.602588812 +0200 +@@ -13,4 +13,5 @@ + INCLUDES = -I$(top_srcdir)/src + + libXrdRootd_la_SOURCES = XrdRootdProtocol.cc XrdRootdProtocol.hh +-libXrdRootd_la_LIBADD = ../XrdOuc/libXrdOuc.la ++libXrdRootd_la_LIBADD = ../Xrd/libXrd.la \ ++ ../XrdOuc/libXrdOuc.la +diff -ur xrootd.orig/src/XrdSec/Makefile.am xrootd/src/XrdSec/Makefile.am +--- xrootd.orig/src/XrdSec/Makefile.am 2010-01-12 16:04:06.000000000 +0100 ++++ xrootd/src/XrdSec/Makefile.am 2010-06-08 17:02:29.603588588 +0200 +@@ -25,6 +25,9 @@ + XrdSecTLayer.cc XrdSecTLayer.hh \ + XrdSecTrace.hh + libXrdSec_la_LDFLAGS = -module ++libXrdSec_la_LIBADD = ../XrdSys/libXrdSys.la \ ++ ../XrdOuc/libXrdOuc.la \ ++ ../XrdNet/libXrdNet.la + + # Note: the next option leads to problems at least on Darwin + #libXrdSec_la_LIBTOOLFLAGS = --tag=disable-static +diff -ur xrootd.orig/src/XrdSut/Makefile.am xrootd/src/XrdSut/Makefile.am +--- xrootd.orig/src/XrdSut/Makefile.am 2007-02-26 10:40:00.000000000 +0100 ++++ xrootd/src/XrdSut/Makefile.am 2010-06-08 17:02:29.603588588 +0200 +@@ -27,3 +27,5 @@ + XrdSutPFile.cc XrdSutPFile.hh\ + XrdSutPFEntry.cc XrdSutPFEntry.hh \ + XrdSutRndm.cc XrdSutRndm.hh ++libXrdSut_la_LIBADD = ../XrdSys/libXrdSys.la \ ++ ../XrdOuc/libXrdOuc.la +diff -ur xrootd.orig/src/XrdSys/Makefile.am xrootd/src/XrdSys/Makefile.am +--- xrootd.orig/src/XrdSys/Makefile.am 2008-06-13 15:19:39.000000000 +0200 ++++ xrootd/src/XrdSys/Makefile.am 2010-06-08 17:05:49.355590040 +0200 +@@ -32,7 +32,7 @@ + XrdSysTimer.cc XrdSysTimer.hh \ + XrdSysXSLock.cc XrdSysXSLock.hh + +-libXrdSys_la_LIBADD = $(LIBPTHREAD) $(SEM_LIBRT) $(LIBNSL) ++libXrdSys_la_LIBADD = -ldl $(LIBPTHREAD) $(SEM_LIBRT) $(LIBNSL) + libXrdSys_la_CXXFLAGS = -prefer-pic + + EXTRA_DIST = XrdWin32.cc XrdWin32.hh +diff -ur xrootd.orig/src/XrdXrootd/Makefile.am xrootd/src/XrdXrootd/Makefile.am +--- xrootd.orig/src/XrdXrootd/Makefile.am 2007-08-02 17:35:34.000000000 +0200 ++++ xrootd/src/XrdXrootd/Makefile.am 2010-06-08 17:02:29.603588588 +0200 +@@ -40,6 +40,7 @@ + ../Xrd/libXrd.la \ + ../XrdNet/libXrdNet.la \ + ../XrdOuc/libXrdOuc.la \ ++ ../XrdCms/libXrdCms.la \ + ../XrdSfs/libXrdSfs.la \ + ../XrdSys/libXrdSys.la + xrootd_LDFLAGS = -static -export-dynamic +diff -ur xrootd.orig/src/XrdXrootd/XrdXrootdConfig.cc xrootd/src/XrdXrootd/XrdXrootdConfig.cc +--- xrootd.orig/src/XrdXrootd/XrdXrootdConfig.cc 2010-02-19 04:36:35.000000000 +0100 ++++ xrootd/src/XrdXrootd/XrdXrootdConfig.cc 2010-06-08 17:02:29.605589188 +0200 +@@ -90,7 +90,7 @@ + + const char *XrdXrootdInstance; + +- XrdInet *XrdXrootdNetwork; ++extern XrdInet *XrdXrootdNetwork; + + int XrdXrootdPort; + +diff -ur xrootd.orig/src/XrdXrootd/XrdXrootdLoadLib.cc xrootd/src/XrdXrootd/XrdXrootdLoadLib.cc +--- xrootd.orig/src/XrdXrootd/XrdXrootdLoadLib.cc 2009-07-31 05:47:51.000000000 +0200 ++++ xrootd/src/XrdXrootd/XrdXrootdLoadLib.cc 2010-06-08 17:33:03.242590414 +0200 +@@ -37,10 +37,11 @@ + /* G l o b a l S y m b o l s */ + /******************************************************************************/ + +-XrdSecProtocol *(*XrdXrootdSecGetProtocol)(const char *hostname, ++extern XrdSecProtocol *(*XrdXrootdSecGetProtocol) ++ (const char *hostname, + const struct sockaddr &netaddr, + const XrdSecParameters &parms, +- XrdOucErrInfo *einfo) = 0; ++ XrdOucErrInfo *einfo); + + /******************************************************************************/ + /* x r o o t d _ l o a d F i l e s y s t e m */ diff --git a/xrootd-jni.patch b/xrootd-jni.patch new file mode 100644 index 0000000..6d04557 --- /dev/null +++ b/xrootd-jni.patch @@ -0,0 +1,25 @@ +diff -ur xrootd.orig/src/XrdClient/XrdClientAdminJNI.cc xrootd/src/XrdClient/XrdClientAdminJNI.cc +--- xrootd.orig/src/XrdClient/XrdClientAdminJNI.cc 2009-10-14 20:03:07.000000000 +0200 ++++ xrootd/src/XrdClient/XrdClientAdminJNI.cc 2010-06-07 16:17:38.726589110 +0200 +@@ -36,7 +36,7 @@ + + // Now we get the filename passed as parameter. + kXR_char *filename = (kXR_char *)env->GetStringUTFChars(pathfile, 0); +- XrdClientUrlInfo finalloc; ++ XrdClientLocate_Info finalloc; + + // Hence we locate that file + // the answer is in finalloc +@@ -49,8 +49,10 @@ + + delete xrda; + +- if (r) +- hostname = env->NewStringUTF(finalloc.Host.c_str()); ++ if (r) { ++ XrdClientUrlInfo url((const char *)finalloc.Location); ++ hostname = env->NewStringUTF(url.Host.c_str()); ++ } + + return (jobject)(new jboolean(r)); + } diff --git a/xrootd-perl-java.patch b/xrootd-perl-java.patch new file mode 100644 index 0000000..f40a435 --- /dev/null +++ b/xrootd-perl-java.patch @@ -0,0 +1,43 @@ +diff -ur xrootd.orig/src/XrdClient/Makefile.am xrootd/src/XrdClient/Makefile.am +--- xrootd.orig/src/XrdClient/Makefile.am 2009-11-19 04:25:11.000000000 +0100 ++++ xrootd/src/XrdClient/Makefile.am 2010-06-08 07:31:33.633596571 +0200 +@@ -28,7 +28,7 @@ + endif + + if ENABLE_PERLINT +- BUILDPERL = libXrdClientAdmin.la ++ BUILDPERL = XrdClientAdmin.la + endif + lib_LTLIBRARIES = libXrdClient.la $(BUILDPERL) $(BUILDJAVA) + +@@ -123,7 +123,9 @@ + + if ENABLE_JAVAINT + libXrdClientAdminJNI_la_SOURCES = XrdClientAdminJNI.cc +-libXrdClientAdminJNI_la_LIBADD = $(clientlibs) ++libXrdClientAdminJNI_la_LIBADD = $(clientlibs) ++libXrdClientAdminJNI_la_LDFLAGS = -module -avoid-version ++ + all-local: XrdClientAdminJNI.class + XrdClientAdminJNI.class: XrdClientAdminJNI.java + $(JAVAC) -d ./ $(srcdir)/XrdClientAdminJNI.java +@@ -165,12 +167,14 @@ + + if ENABLE_PERLINT + +-libXrdClientAdmin_la_SOURCES = XrdClientAdmin_c.cc \ +- XrdClientAdmin_c_wrap.cc +-libXrdClientAdmin_la_LIBADD = $(clientlibs) ++XrdClientAdmin_la_SOURCES = XrdClientAdmin_c.cc \ ++ XrdClientAdmin_c_wrap.cc ++PERLLIB = $(shell perl -MConfig -e 'print $$Config{archlibexp}, "/CORE";') ++XrdClientAdmin_la_LIBADD = $(clientlibs) -L$(PERLLIB) -lperl ++XrdClientAdmin_la_LDFLAGS = -module -avoid-version + +-libXrdClientAdmin_la_CXXFLAGS = $(PERL_CCOPTS) +-install-exec-local: libXrdClientAdmin.la XrdClientAdmin.pm ++XrdClientAdmin_la_CXXFLAGS = $(PERL_CCOPTS) ++install-exec-local: XrdClientAdmin.la XrdClientAdmin.pm + $(INSTALL) -m 644 XrdClientAdmin.pm $(DESTDIR)/$(libdir)/XrdClientAdmin.pm + endif + diff --git a/xrootd.init b/xrootd.init new file mode 100644 index 0000000..8926044 --- /dev/null +++ b/xrootd.init @@ -0,0 +1,86 @@ +#! /bin/sh +# +# xrootd Start/Stop the XROOTD daemon +# +# chkconfig: - 20 80 +# description: The xrootd daemon is used to as file server and starter of +# the PROOF worker processes. +# +# processname: xrootd +# pidfile: /var/run/xrootd.pid +# config: + +XROOTD=/usr/bin/xrootd + +# Source function library. +. /etc/init.d/functions + +# Get config. +. /etc/sysconfig/network + +# Get xrootd config +[ -f /etc/sysconfig/xrootd ] && . /etc/sysconfig/xrootd + +# Configure the environment (optional) +[ ! -z "$XRDENVCONFIG" ] && [ -f "$XRDENVCONFIG" ] && . $XRDENVCONFIG + +# Check that networking is up. +if [ ${NETWORKING} = "no" ] +then + exit 0 +fi + +[ -x $XROOTD ] || exit 0 + +RETVAL=0 +prog="xrootd" + +start() { + echo -n $"Starting $prog: " + # Options are specified in /etc/sysconfig/xrootd . + # $XRDUSER *must* be the name of an existing non-privileged user. + daemon $XROOTD -b -l $XRDLOG -R $XRDUSER -c $XRDCF $XRDDEBUG + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/xrootd + return $RETVAL +} + +stop() { + [ ! -f /var/lock/subsys/xrootd ] && return 0 || true + echo -n $"Stopping $prog: " + killproc xrootd + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/xrootd + return $RETVAL +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status xrootd + RETVAL=$? + ;; + restart|reload) + stop + start + ;; + condrestart) + if [ -f /var/lock/subsys/xrootd ]; then + stop + start + fi + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" + exit 1 +esac + +exit $RETVAL diff --git a/xrootd.logrotate b/xrootd.logrotate new file mode 100644 index 0000000..6b15b63 --- /dev/null +++ b/xrootd.logrotate @@ -0,0 +1,7 @@ +/var/log/xrootd/*.log { + missingok + notifempty + daily + rotate 30 + compress +} diff --git a/xrootd.spec b/xrootd.spec new file mode 100644 index 0000000..d7b6fed --- /dev/null +++ b/xrootd.spec @@ -0,0 +1,351 @@ +%{!?perl_vendorarch: %global perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)} + +%{?perl_default_filter} + +Name: xrootd +Version: 20100315 +Release: 2%{?dist} +Summary: Extended ROOT file server + +Group: System Environment/Daemons +# Sources are BSD, man pages are LGPLv2+ +License: BSD and LGPLv2+ +URL: http://xrootd.slac.stanford.edu/ +Source0: http://xrootd.slac.stanford.edu/download/%{version}-1007/%{name}-%{version}-1007.src.tgz +# These man pages are extracted from the man/man1 directory in +# the root source archive: +# ftp://root.cern.ch/root/root_v5.26.00b.source.tar.gz +Source1: xrootd-manpages.tar.gz +Source2: %{name}.init +Source3: %{name}.sysconfig +Source4: olbd.init +Source5: olbd.sysconfig +Source6: %{name}.logrotate +Patch0: %{name}-jni.patch +Patch1: %{name}-perl-java.patch +Patch2: %{name}-dso.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: krb5-devel +BuildRequires: openssl-devel +BuildRequires: perl(ExtUtils::Embed) +BuildRequires: java-devel +BuildRequires: jpackage-utils +BuildRequires: swig +BuildRequires: readline-devel +BuildRequires: doxygen +BuildRequires: graphviz +%if "%{?rhel}" == "5" +BuildRequires: graphviz-gd +%endif + +Requires: %{name}-libs = %{version}-%{release} + +Requires(pre): shadow-utils +Requires(post): chkconfig +Requires(preun): chkconfig +Requires(preun): initscripts +Requires(postun): initscripts + +%description +The Extended root file server consists of a file server called xrootd +and a clustering server called olbd. + +The server names are historical. The xrootd server was developed for +the root analysis framework to serve root files. However, the server +is agnostic to filetypes and provides POSIX-like access to any type +of file. The olbd server was originally developed to cluster and load +balance Objectivity/DB AMS database servers. Because the olbd was +designed to work independently of the data server, it was easily +usable with xrootd. + +%package libs +Summary: Libraries used by xrootd servers and clients +Group: System Environment/Libraries + +%description libs +This package contains the libraries used by the xrootd servers and +clients. + +%package devel +Summary: Development files for xrootd +Group: Development/Libraries +Requires: %{name}-libs = %{version}-%{release} + +%description devel +This package contains header files and development libraries for xrootd. + +%package client +Summary: Xrootd command line client tools +Group: Applications/Internet +Requires: %{name}-libs = %{version}-%{release} + +%description client +This package contains the command line tools used to communicate with +xrootd servers. + +%package client-admin-perl +Summary: Xrootd client administration Perl module +Group: Development/Libraries +Requires: %{name}-libs = %{version}-%{release} +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +%description client-admin-perl +This package contains a swig generated xrootd client administration +Perl module. + +%package client-admin-java +Summary: Xrootd client administration Java library +Group: Development/Libraries +Requires: %{name}-libs = %{version}-%{release} +Requires: java + +%description client-admin-java +This package contains JNI bindings for doing xrootd client administration +in Java. + +%package doc +Summary: Developer documentation for the xrootd libraries +Group: Documentation +%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6 +BuildArch: noarch +%endif + +%description doc +This package contains the API documentation of the xrootd libraries. + +%prep +%setup -q -n %{name} +%setup -D -T -q -n %{name} -a 1 +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + +# Move XrdNetDNS.cc from XrdNet to XrdOuc in order to break circular +# library dependencies +mv src/XrdNet/XrdNetDNS.cc src/XrdOuc +sed 's/XrdNetDNS.cc//' -i src/XrdNet/Makefile.am +sed 's!libXrdOuc_la_SOURCES =!& XrdNetDNS.cc!' -i src/XrdOuc/Makefile.am + +# Turn off static linking +find . -name Makefile.am -exec sed -e 's/ -static//g' -i {} ';' + +# Remove windows pthreads (not used, and has different license - GPL) +rm -rf pthreads-win32 + +# Remove bundled gridsite library (not used anyway) +rm -rf src/XrdSecssl/libsslGridSite + +./bootstrap.sh + +%build +%configure --enable-gsi --enable-mon --enable-doc \ +%if %{?fedora}%{!?fedora:0} <= 11 && %{?rhel}%{!?rhel:0} <= 5 + --enable-krb4 \ +%else + --disable-krb4 \ +%endif + --enable-krb5 --with-krb5-incdir=/usr/include \ + --enable-javaint --with-java-home=/usr/lib/jvm/java --disable-static +make %{?_smp_mflags} + +pushd src/XrdClient + +sed 's!loadLibrary("\(.*\)")!load("%{_libdir}/%{name}/lib\1.so")!' \ + -i XrdClientAdminJNI.java +javac XrdClientAdminJNI.java +jar cvf XrdClientAdminJNI.jar XrdClientAdminJNI.class + +popd + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT + +# Names to generic +mv $RPM_BUILD_ROOT%{_bindir}/testclient $RPM_BUILD_ROOT%{_bindir}/xrdtestclient +mv $RPM_BUILD_ROOT%{_bindir}/testserver $RPM_BUILD_ROOT%{_bindir}/xrdtestserver + +# Remove libtool archives +rm $RPM_BUILD_ROOT%{_libdir}/*.la + +# Remove some junk +rm -rf $RPM_BUILD_ROOT%{_sysconfdir} +rm -rf $RPM_BUILD_ROOT%{_bindir}/xrootdutils + +# Perl module +mkdir -p $RPM_BUILD_ROOT%{perl_vendorarch}/auto/XrdClientAdmin +mv $RPM_BUILD_ROOT/%{_libdir}/XrdClientAdmin.pm \ + $RPM_BUILD_ROOT%{perl_vendorarch} +mv $RPM_BUILD_ROOT/%{_libdir}/XrdClientAdmin.so \ + $RPM_BUILD_ROOT%{perl_vendorarch}/auto/XrdClientAdmin + +# Java JNI +mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name} +mv $RPM_BUILD_ROOT/%{_libdir}/libXrdClientAdminJNI.so \ + $RPM_BUILD_ROOT%{_libdir}/%{name} +install -m 644 src/XrdClient/XrdClientAdminJNI.jar \ + $RPM_BUILD_ROOT%{_libdir}/%{name} + +# Service start-up scripts et al. +mkdir -p $RPM_BUILD_ROOT%{_initrddir} +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name} +install -p %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/%{name} +install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name} +echo '# Put your xrootd configuration here' \ + > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.cf +install -p %{SOURCE4} $RPM_BUILD_ROOT%{_initrddir}/olbd +install -p -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/olbd +echo '# Put your olbd configuration here' \ + > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/olbd.cf +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name} +mkdir $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d +install -p -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name} + +# Man pages +mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 +sed -e '/^\.UR/d' -e '/^\.UE/d' -i xrootd-manpages/* +install -p -m 644 xrootd-manpages/* $RPM_BUILD_ROOT%{_mandir}/man1 + +# Documentation +mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} +cp -pr doxydoc/html $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} + +%clean +rm -rf $RPM_BUILD_ROOT + +%post libs -p /sbin/ldconfig + +%postun libs -p /sbin/ldconfig + +%pre +getent group %{name} >/dev/null || groupadd -r %{name} +getent passwd %{name} >/dev/null || useradd -r -g %{name} \ + -d %{_sysconfdir}/%{name} -s /sbin/nologin -c "xrootd Server Account" %{name} +exit 0 + +%post +if [ $1 = 1 ]; then + /sbin/chkconfig --add %{name} + /sbin/chkconfig --add olbd +fi + +%preun +if [ $1 = 0 ]; then + /sbin/service %{name} stop >/dev/null 2>&1 || : + /sbin/service olbd stop >/dev/null 2>&1 || : + /sbin/chkconfig --del %{name} + /sbin/chkconfig --del olbd +fi + +%postun +if [ $1 -ge 1 ]; then + /sbin/service %{name} condrestart >/dev/null 2>&1 || : + /sbin/service olbd condrestart >/dev/null 2>&1 || : +fi + +%files +%defattr(-,root,root,-) +%{_bindir}/cmsd +%{_bindir}/olbd +%{_bindir}/%{name} +%{_bindir}/XrdCnsd +%{_mandir}/man1/cmsd.1* +%{_mandir}/man1/olbd.1* +%{_mandir}/man1/%{name}.1* +%{_initrddir}/* +%config(noreplace) %{_sysconfdir}/sysconfig/* +%config(noreplace) %{_sysconfdir}/%{name} +%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%attr(-,xrootd,xrootd) %{_localstatedir}/log/%{name} + +%files libs +%defattr(-,root,root,-) +%{_libdir}/libXrd*.so.* +# Some of the libraries are used as plugins - need the .so symlink at runtime +# Some of these are also used as normal shared libraries +%{_libdir}/libXrdAcc.so +%{_libdir}/libXrdBwm.so +%{_libdir}/libXrdCrypto.so +%{_libdir}/libXrdCryptoLite.so +%{_libdir}/libXrdCryptossl.so +%{_libdir}/libXrdOfs.so +%{_libdir}/libXrdProxy.so +%{_libdir}/libXrdRootd.so +%{_libdir}/libXrdSec.so +%{_libdir}/libXrdSecgsi.so +%{_libdir}/libXrdSecgsiGMAPLADP.so +%if %{?fedora}%{!?fedora:0} <= 11 && %{?rhel}%{!?rhel:0} <= 5 +%{_libdir}/libXrdSeckrb4.so +%endif +%{_libdir}/libXrdSeckrb5.so +%{_libdir}/libXrdSecpwd.so +%{_libdir}/libXrdSecsss.so +%{_libdir}/libXrdSecunix.so + +%files devel +%defattr(-,root,root,-) +%{_includedir}/%{name} +# These libraries are not used as plugins +%{_libdir}/libXrd.so +%{_libdir}/libXrdClient.so +%{_libdir}/libXrdCms.so +%{_libdir}/libXrdNet.so +%{_libdir}/libXrdOdc.so +%{_libdir}/libXrdOss.so +%{_libdir}/libXrdOuc.so +%{_libdir}/libXrdPosix.so +%{_libdir}/libXrdSut.so +%{_libdir}/libXrdSys.so + +%files client +%defattr(-,root,root,-) +%{_bindir}/TestXrdClient* +%{_bindir}/XrdAccTest +%{_bindir}/cns_ssi +%{_bindir}/frm_* +%{_bindir}/mpxstats +%{_bindir}/wait41 +%{_bindir}/xprep +%{_bindir}/xrd +%{_bindir}/xrdadler32 +%{_bindir}/xrdcp +%{_bindir}/xrdgsiproxy +%{_bindir}/xrdmonAdmin +%{_bindir}/xrdmonCollector +%{_bindir}/xrdpwdadmin +%{_bindir}/xrdsssadmin +%{_bindir}/xrdstagetool +%{_bindir}/xrdtestclient +%{_bindir}/xrdtestserver +%{_mandir}/man1/xprep.1* +%{_mandir}/man1/xrd.1* +%{_mandir}/man1/xrdcp.1* +%{_mandir}/man1/xrdgsiproxy.1* +%{_mandir}/man1/xrdpwdadmin.1* +%{_mandir}/man1/xrdstagetool.1* + +%files client-admin-perl +%defattr(-,root,root,-) +%{perl_vendorarch}/XrdClientAdmin.pm +%{perl_vendorarch}/auto/XrdClientAdmin + +%files client-admin-java +%defattr(-,root,root,-) +%{_libdir}/%{name} + +%files doc +%defattr(-,root,root,-) +%doc %{_docdir}/%{name}-%{version} + +%changelog +* Mon Jun 14 2010 Mattias Ellert - 20100315-2 +- Add LGPLv2+ to License tag due to man pages +- Better package description + +* Wed Jun 09 2010 Mattias Ellert - 20100315-1 +- Initial packaging diff --git a/xrootd.sysconfig b/xrootd.sysconfig new file mode 100644 index 0000000..40ccaf4 --- /dev/null +++ b/xrootd.sysconfig @@ -0,0 +1,3 @@ +XRDLOG=/var/log/xrootd/xrootd.log +XRDUSER=xrootd +XRDCF=/etc/xrootd/xrootd.cf