From 530201be85b58d04cd2ff023ea63eb88e2fa44b5 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Mon, 13 Feb 2012 14:46:44 +0100 Subject: [PATCH 1/3] Update to 5.30.06 --- root-cern-ppc.patch | 11 ----------- root-includelist | 10 ++++------ root.spec | 17 +++++++++-------- sources | 2 +- 4 files changed, 14 insertions(+), 26 deletions(-) delete mode 100644 root-cern-ppc.patch diff --git a/root-cern-ppc.patch b/root-cern-ppc.patch deleted file mode 100644 index dfba748..0000000 --- a/root-cern-ppc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- root-5.26.00d.orig/tutorials/tree/cernbuild.C 2010-08-29 10:20:56.069801363 +0200 -+++ root-5.26.00d/tutorials/tree/cernbuild.C 2010-08-29 15:52:51.000000000 +0200 -@@ -22,7 +22,7 @@ - TString dir = gSystem->UnixPathName(gInterpreter->GetCurrentMacroName()); - dir.ReplaceAll("cernbuild.C",""); - dir.ReplaceAll("/./","/"); -- FILE *fp = fopen(Form("%scernstaff.dat",dir.Data()),"r"); -+ FILE *fp = fopen((dir+"cernstaff.dat").Data(),"r"); - - TFile *hfile = 0; - if (get) { diff --git a/root-includelist b/root-includelist index 0eccf90..cd7842c 100644 --- a/root-includelist +++ b/root-includelist @@ -3,11 +3,9 @@ includelist: @list=includelist-`tr / - <<< $(MODULE)` ; \ rm -f $$list ; \ for h in $(filter-out %.cw %.pri, $(ALLHDRS)) ; do \ - if [ "$(MODULE)" = "cint/cint7" ] ; then \ - sed 's!^include!%{_includedir}/%{name}/cint7!' <<< $$h >> $$list ; \ - else \ - sed 's!^include!%{_includedir}/%{name}!' <<< $$h >> $$list ; \ - fi ; \ + sed 's!^include!%{_includedir}/%{name}!' <<< $$h >> $$list ; \ + done ; \ + if [ -r $$list ] ; then \ sort -u $$list > $$list.unique ; \ mv $$list.unique $$list ; \ - done + fi diff --git a/root.spec b/root.spec index fc31e45..07e8df1 100644 --- a/root.spec +++ b/root.spec @@ -18,7 +18,7 @@ %endif Name: root -Version: 5.30.04 +Version: 5.30.06 %global libversion %(cut -d. -f 1-2 <<< %{version}) Release: 1%{?dist} Summary: Numerical data analysis framework @@ -48,9 +48,7 @@ Patch1: %{name}-fontconfig.patch # Use system unuran: Patch2: %{name}-unuran.patch # Workaround for broken Form() on ppc -Patch3: %{name}-cern-ppc.patch -# Fixes for external xrootd -Patch4: %{name}-xrootd.patch +Patch3: %{name}-xrootd.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 @@ -107,6 +105,7 @@ BuildRequires: openssl-devel BuildRequires: globus-gss-assist-devel BuildRequires: globus-gsi-credential-devel BuildRequires: globus-proxy-utils +BuildRequires: libtool-ltdl-devel BuildRequires: desktop-file-utils BuildRequires: dcap-devel BuildRequires: dpm-devel @@ -299,7 +298,7 @@ provide a Python interface to ROOT, and a ROOT interface to Python. Summary: Ruby extension for ROOT Group: Applications/Engineering Provides: ruby(libRuby) = %{version} -requires: ruby(abi) = 1.8 +Requires: ruby(abi) = 1.8 %description ruby This package contains the Ruby extension for ROOT. The interface @@ -1018,13 +1017,12 @@ package to use root with GNU Emacs. %prep %setup -q -%if %(pkg-config --max-version 2.1.2 ftgl 2>/dev/null && echo 1 || echo 0) +if pkg-config --max-version 2.1.2 ftgl ; then %patch0 -p1 -%endif +fi %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -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 \ @@ -2286,6 +2284,9 @@ fi %{emacs_lispdir}/root/*.el %changelog +* Mon Feb 13 2012 Mattias Ellert - 5.30.06-1 +- Update to 5.30.06 + * Wed Nov 16 2011 Mattias Ellert - 5.30.04-1 - Update to 5.30.04 diff --git a/sources b/sources index 27231d4..b43c23e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9fe36a18b07119bdd02527fc5a2d2651 root-5.30.04.tar.gz +0a0e24e890f33b3606f8983fe8765a09 root-5.30.06.tar.gz From 782c9c4d89d741220736371ee648d471c80439a8 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sat, 17 Mar 2012 19:23:08 +0100 Subject: [PATCH 2/3] Rebuild for xrootd 3.1.1 --- root-html.C | 2 +- root-meta.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++ root-xrootd.patch | 3 ++- root.spec | 13 +++++++++++-- 4 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 root-meta.patch diff --git a/root-html.C b/root-html.C index 413a8d3..a481a24 100644 --- a/root-html.C +++ b/root-html.C @@ -10,9 +10,9 @@ gInterpreter->AddIncludePath("@PWD@/cint/cint/include"); gInterpreter->AddIncludePath("@PWD@/cint/cint/stl"); gInterpreter->AddIncludePath("@PWD@/cint/cint/lib"); + #include #include #include - #include #include gROOT->GetPluginManager()->LoadHandlersFromPluginDirs(""); gROOT->GetPluginManager()->AddHandler("TVirtualPS","image", diff --git a/root-meta.patch b/root-meta.patch new file mode 100644 index 0000000..6395e3a --- /dev/null +++ b/root-meta.patch @@ -0,0 +1,44 @@ +diff -ur root-5.32.00.orig/core/meta/src/TCint.cxx root-5.32.00/core/meta/src/TCint.cxx +--- root-5.32.00.orig/core/meta/src/TCint.cxx 2011-12-02 12:41:50.000000000 +0100 ++++ root-5.32.00/core/meta/src/TCint.cxx 2012-02-18 12:07:12.157520013 +0100 +@@ -320,23 +320,27 @@ + ProcessLine("#define ROOT_TError 0"); + ProcessLine("#define ROOT_TGenericClassInfo 0"); + +- TString include; +- // Add the root include directory to list searched by default ++ Int_t includes = gEnv->GetValue("Cint.Includes", 1); ++ if (includes > 0) { ++ TString include; ++ // Add the root include directory to list searched by default + #ifndef ROOTINCDIR +- include = gSystem->Getenv("ROOTSYS"); +- include.Append("/include"); ++ include = gSystem->Getenv("ROOTSYS"); ++ include.Append("/include"); + #else +- include = ROOTINCDIR; ++ include = ROOTINCDIR; + #endif +- TCint::AddIncludePath(include); ++ TCint::AddIncludePath(include); + +- // Allow the usage of ClassDef and ClassImp in interpreted macros +- // if RtypesCint.h can be found (think of static executable without include/) +- char* whichTypesCint = gSystem->Which(include, "RtypesCint.h"); +- if (whichTypesCint) { +- ProcessLine("#include "); +- delete[] whichTypesCint; +- } ++ // Allow the usage of ClassDef and ClassImp in interpreted macros ++ // if RtypesCint.h can be found (think of static executable without ++ // include/) ++ char* whichTypesCint = gSystem->Which(include, "RtypesCint.h"); ++ if (whichTypesCint) { ++ ProcessLine("#include "); ++ delete[] whichTypesCint; ++ } ++ } + + } + diff --git a/root-xrootd.patch b/root-xrootd.patch index 51d4ab4..dc00b6e 100644 --- a/root-xrootd.patch +++ b/root-xrootd.patch @@ -1,7 +1,7 @@ diff -ur root-5.30.04.orig/configure root-5.30.04/configure --- root-5.30.04.orig/configure 2011-11-08 14:28:55.000000000 +0100 +++ root-5.30.04/configure 2011-11-16 05:48:21.224144395 +0100 -@@ -4424,13 +4424,14 @@ +@@ -4424,13 +4424,15 @@ if test "x$externalxrd" = "xyes"; then buildxrd="no" # Check if bonjour is available for code potentially using it ... @@ -20,6 +20,7 @@ diff -ur root-5.30.04.orig/configure root-5.30.04/configure + ## bonjourcppflags= + ## fi + ##fi ++ bonjourcppflags= fi else buildxrd="no" diff --git a/root.spec b/root.spec index 07e8df1..35271e2 100644 --- a/root.spec +++ b/root.spec @@ -20,7 +20,7 @@ Name: root Version: 5.30.06 %global libversion %(cut -d. -f 1-2 <<< %{version}) -Release: 1%{?dist} +Release: 2%{?dist} Summary: Numerical data analysis framework Group: Applications/Engineering @@ -47,8 +47,11 @@ Patch0: %{name}-ftgl.patch Patch1: %{name}-fontconfig.patch # Use system unuran: Patch2: %{name}-unuran.patch -# Workaround for broken Form() on ppc +# Fixes for xrootd bonjour Patch3: %{name}-xrootd.patch +# Fix hardcoded include path +# https://savannah.cern.ch/bugs/index.php?91463 +Patch4: %{name}-meta.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 @@ -118,6 +121,7 @@ BuildRequires: graphviz-devel %if "%{?rhel}" == "5" BuildRequires: graphviz-gd %endif +BuildRequires: expat-devel %if %{?fedora}%{!?fedora:0} >= 11 || %{?rhel}%{!?rhel:0} >= 6 BuildRequires: font(liberationsans) BuildRequires: font(liberationserif) @@ -1023,6 +1027,7 @@ fi %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -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 \ @@ -1378,6 +1383,7 @@ echo %{_libdir}/%{name} > \ # Generate documentation echo Rint.Includes: 0 > .rootrc +echo Cint.Includes: 0 >> .rootrc echo Root.StacktraceScript: ${PWD}/etc/gdb-backtrace.sh >> .rootrc echo Gui.MimeTypeFile: ${PWD}/etc/root.mimes >> .rootrc sed "s!@PWD@!${PWD}!g" %{SOURCE2} > html.C @@ -2284,6 +2290,9 @@ fi %{emacs_lispdir}/root/*.el %changelog +* Sat Mar 17 2012 Mattias Ellert - 5.30.06-2 +- Rebuild for xrootd 3.1.1 + * Mon Feb 13 2012 Mattias Ellert - 5.30.06-1 - Update to 5.30.06 From 380269c3e75c333b9cdde00a5ced7e8cbf2deb5d Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Fri, 29 Jun 2012 06:51:04 +0200 Subject: [PATCH 3/3] Backport fixes for using aclic with versioned libraries - New sub-package: root-io-gfal --- root-aclic-versioned-libs.patch | 82 +++++++++++++++++++++++++++++++++ root.spec | 32 +++++++++++-- 2 files changed, 110 insertions(+), 4 deletions(-) create mode 100644 root-aclic-versioned-libs.patch diff --git a/root-aclic-versioned-libs.patch b/root-aclic-versioned-libs.patch new file mode 100644 index 0000000..935bf49 --- /dev/null +++ b/root-aclic-versioned-libs.patch @@ -0,0 +1,82 @@ +diff -ur root-5.30.06.orig/core/unix/src/TUnixSystem.cxx root-5.30.06/core/unix/src/TUnixSystem.cxx +--- root-5.30.06.orig/core/unix/src/TUnixSystem.cxx 2012-01-10 16:14:31.000000000 +0100 ++++ root-5.30.06/core/unix/src/TUnixSystem.cxx 2012-06-29 06:29:42.030017840 +0200 +@@ -440,6 +440,9 @@ + + TString lib = _dyld_get_image_name(i++); + ++ TRegexp sovers = "libCore\\.[0-9]+\\.*[0-9]*\\.so"; ++ TRegexp dyvers = "libCore\\.[0-9]+\\.*[0-9]*\\.dylib"; ++ + #ifndef ROOTPREFIX + #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR + // first loaded is the app so set ROOTSYS to app bundle +@@ -454,7 +457,8 @@ + } + } + #else +- if (lib.EndsWith("libCore.dylib") || lib.EndsWith("libCore.so")) { ++ if (lib.EndsWith("libCore.dylib") || lib.EndsWith("libCore.so") || ++ lib.Index(sovers) != kNPOS || lib.Index(dyvers) != kNPOS) { + char respath[kMAXPATHLEN]; + if (!realpath(lib, respath)) { + if (!gSystem->Getenv("ROOTSYS")) +@@ -476,9 +480,23 @@ + + // add all libs loaded before libSystem.B.dylib + if (!gotFirstSo && (lib.EndsWith(".dylib") || lib.EndsWith(".so"))) { +- if (linkedDylibs.Length()) +- linkedDylibs += " "; +- linkedDylibs += lib; ++ sovers = "\\.[0-9]+\\.*[0-9]*\\.so"; ++ Ssiz_t idx = lib.Index(sovers); ++ if (idx != kNPOS) { ++ lib.Remove(idx); ++ lib += ".so"; ++ } ++ dyvers = "\\.[0-9]+\\.*[0-9]*\\.dylib"; ++ idx = lib.Index(dyvers); ++ if (idx != kNPOS) { ++ lib.Remove(idx); ++ lib += ".dylib"; ++ } ++ if (!gSystem->AccessPathName(lib, kReadPermission)) { ++ if (linkedDylibs.Length()) ++ linkedDylibs += " "; ++ linkedDylibs += lib; ++ } + } + } + #endif +@@ -2838,9 +2856,11 @@ + delete [] exe; + exe = longerexe; + } ++ TRegexp sovers = "\\.so\\.[0-9]+"; + #else + const char *cLDD="ldd"; + const char *cSOEXT=".so"; ++ TRegexp sovers = "\\.so\\.[0-9]+"; + #endif + FILE *p = OpenPipe(TString::Format("%s %s", cLDD, exe), "r"); + TString ldd; +@@ -2858,10 +2878,15 @@ + } + if (solibName) { + TString solib = solibName->String(); +- if (solib.EndsWith(cSOEXT)) { +- if (!linkedLibs.IsNull()) +- linkedLibs += " "; +- linkedLibs += solib; ++ Ssiz_t idx = solib.Index(sovers); ++ if (solib.EndsWith(cSOEXT) || idx != kNPOS) { ++ if (idx != kNPOS) ++ solib.Remove(idx+3); ++ if (!AccessPathName(solib, kReadPermission)) { ++ if (!linkedLibs.IsNull()) ++ linkedLibs += " "; ++ linkedLibs += solib; ++ } + } + } + delete tok; diff --git a/root.spec b/root.spec index 35271e2..89f6964 100644 --- a/root.spec +++ b/root.spec @@ -20,7 +20,7 @@ Name: root Version: 5.30.06 %global libversion %(cut -d. -f 1-2 <<< %{version}) -Release: 2%{?dist} +Release: 3%{?dist} Summary: Numerical data analysis framework Group: Applications/Engineering @@ -52,6 +52,8 @@ Patch3: %{name}-xrootd.patch # Fix hardcoded include path # https://savannah.cern.ch/bugs/index.php?91463 Patch4: %{name}-meta.patch +# Backport fixes for using aclic with versioned libraries +Patch5: %{name}-aclic-versioned-libs.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 @@ -114,6 +116,8 @@ BuildRequires: dcap-devel BuildRequires: dpm-devel BuildRequires: xrootd-devel BuildRequires: cfitsio-devel +BuildRequires: gfal-devel +BuildRequires: srm-ifce-devel BuildRequires: emacs BuildRequires: emacs-el BuildRequires: gcc-gfortran @@ -557,6 +561,13 @@ Group: Applications/Engineering %description io-dcache This package contains the dCache extension for ROOT. +%package io-gfal +Summary: Grid File Access Library input/output library for ROOT +Group: Applications/Engineering + +%description io-gfal +This package contains the Grid File Access Library extension for ROOT. + %package io-rfio Summary: Remote File input/output library for ROOT Group: Applications/Engineering @@ -1028,6 +1039,7 @@ fi %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -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 \ @@ -1135,6 +1147,9 @@ unset QTINC --enable-fftw3 \ --enable-fitsio \ --enable-gdml \ + --enable-gfal \ + --with-gfal-incdir=%{_includedir} \ + --with-gfal-libdir=%{_libdir} \ --enable-genvector \ --enable-globus \ --enable-gsl-shared \ @@ -1171,8 +1186,8 @@ unset QTINC --enable-tmva \ --enable-unuran \ --enable-x11 \ - --enable-xml \ --enable-xft \ + --enable-xml \ --enable-xrootd \ --with-xrootd-incdir=%{_includedir}/xrootd \ --with-xrootd-libdir=%{_libdir} \ @@ -1188,7 +1203,6 @@ unset QTINC --disable-castor \ --disable-chirp \ --disable-cling \ - --disable-gfal \ --disable-glite \ --disable-hdfs \ --disable-monalisa \ @@ -1348,7 +1362,6 @@ pushd ${RPM_BUILD_ROOT}%{_datadir}/%{name}/plugins rm TAFS/P010_TAFS.C rm TDataProgressDialog/P010_TDataProgressDialog.C rm TFile/P030_TCastorFile.C -rm TFile/P050_TGFALFile.C rm TFile/P060_TChirpFile.C rm TFile/P070_TAlienFile.C rm TFile/P110_THDFSFile.C @@ -1582,6 +1595,8 @@ fi %postun io -p /sbin/ldconfig %post io-dcache -p /sbin/ldconfig %postun io-dcache -p /sbin/ldconfig +%post io-gfal -p /sbin/ldconfig +%postun io-gfal -p /sbin/ldconfig %post io-rfio -p /sbin/ldconfig %postun io-rfio -p /sbin/ldconfig %post io-sql -p /sbin/ldconfig @@ -2010,6 +2025,11 @@ fi %{_datadir}/%{name}/plugins/TFile/P040_TDCacheFile.C %{_datadir}/%{name}/plugins/TSystem/P020_TDCacheSystem.C +%files io-gfal -f includelist-io-gfal +%defattr(-,root,root,-) +%{_libdir}/%{name}/libGFAL.* +%{_datadir}/%{name}/plugins/TFile/P050_TGFALFile.C + %files io-rfio -f includelist-io-rfio %defattr(-,root,root,-) %{_libdir}/%{name}/libRFIO.* @@ -2290,6 +2310,10 @@ fi %{emacs_lispdir}/root/*.el %changelog +* Fri Jun 29 2012 Mattias Ellert - 5.30.06-3 +- Backport fixes for using aclic with versioned libraries +- New sub-package: root-io-gfal + * Sat Mar 17 2012 Mattias Ellert - 5.30.06-2 - Rebuild for xrootd 3.1.1