orion pushed to bes (master). "Build and obsolete/provide modules (bug #1213600) (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Apr 21 02:35:52 UTC 2015


>From 800b98d55a21d9574d3fc9cbc9ada4c441371631 Mon Sep 17 00:00:00 2001
From: Orion Poplawski <orion at cora.nwra.com>
Date: Mon, 20 Apr 2015 20:35:38 -0600
Subject: Build and obsolete/provide modules (bug #1213600)

- Disable modules failing tests
- Add patch to fix gdal detection, unused for now due to build failure
- Fix linking of xml_command
- Run autoreconf to fix rpaths

diff --git a/bes-gdal.patch b/bes-gdal.patch
new file mode 100644
index 0000000..75b32c2
--- /dev/null
+++ b/bes-gdal.patch
@@ -0,0 +1,173 @@
+diff -up bes-3.14.0/conf/ax_lib_gdal.m4.gdal bes-3.14.0/conf/ax_lib_gdal.m4
+--- bes-3.14.0/conf/ax_lib_gdal.m4.gdal	2014-11-17 21:13:18.000000000 -0700
++++ bes-3.14.0/conf/ax_lib_gdal.m4	2015-04-20 16:54:26.835852109 -0600
+@@ -47,22 +47,21 @@ AC_DEFUN([AX_LIB_GDAL],
+     dnl check if it is present in the system anyway
+     AC_ARG_WITH([gdal],
+         AC_HELP_STRING([--with-gdal=@<:@ARG@:>@],
+-            [Specify full path to gdal-config script (For example: /usr/local/gdal/bin/gdal-config)]),
++            [Specify full path to gdal-config script]),
+         [ac_gdal_config_path=$withval],
+         [gdal_config_system=check])
+-    
++
+     dnl if gdal-config is present in the system, fill the ac_gdal_config_path variable with it full path
+     AS_IF([test "x$gdal_config_system" = xcheck],
+           [AC_PATH_PROG([GDAL_CONFIG], [gdal-config])],
+-          [AC_PATH_PROG([GDAL_CONFIG], [gdal-config], [no], [`dirname $ac_gdal_config_path 2> /dev/null`])]
++          [AC_PATH_PROG([GDAL_CONFIG], [gdal-config],
++              [no], [`dirname $ac_gdal_config_path 2> /dev/null`])]
+     )
+-    
++
+     if test ! -x "$GDAL_CONFIG"; then
+-        AC_MSG_WARN([gdal-config does not exist or it is not an exectuable file])
+-        GDAL_CONFIG="no"
+-        found_gdal="no"
+-    else
+-	AC_MSG_NOTICE([Located gdal-config file])        
++        AC_MSG_ERROR([gdal-config does not exist or it is not an exectuable file])
++            GDAL_CONFIG="no"
++            found_gdal="no"
+     fi
+ 
+     GDAL_VERSION=""
+@@ -71,74 +70,81 @@ AC_DEFUN([AX_LIB_GDAL],
+     GDAL_DEP_LDFLAGS=""
+     GDAL_OGR_ENABLED=""
+ 
++
+     dnl
+     dnl Check GDAL library (libgdal)
+     dnl
+ 
+     if test "$GDAL_CONFIG" != "no"; then
++        AC_MSG_CHECKING([for GDAL library])
++
+         GDAL_VERSION="`$GDAL_CONFIG --version`"
++        GDAL_CFLAGS="`$GDAL_CONFIG --cflags`"
++        GDAL_LDFLAGS="`$GDAL_CONFIG --libs`"
++        GDAL_DEP_LDFLAGS="`$GDAL_CONFIG --dep-libs`"
++
++        AC_DEFINE([HAVE_GDAL], [1], [Define to 1 if GDAL library are available])
+ 
+-	dnl
+-	dnl Check if required version of GDAL is available
+-	dnl
+-
+-	gdal_version_req=ifelse([$1], [], [], [$1])
+-	if test "$found_gdal" = "yes" -a -n "$gdal_version_req"; then
+-
+-	    AC_MSG_CHECKING([if GDAL version is >= $gdal_version_req])
+-
+-	    dnl Decompose required version string of GDAL
+-	    dnl and calculate its number representation
+-	    gdal_version_req_major=`expr $gdal_version_req : '\([[0-9]]*\)'`
+-	    gdal_version_req_minor=`expr $gdal_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
+-	    gdal_version_req_micro=`expr $gdal_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
+-	    if test "x$gdal_version_req_micro" = "x"; then
+-		gdal_version_req_micro="0"
+-	    fi
+-
+-	    gdal_version_req_number=`expr $gdal_version_req_major \* 1000000 \
+-				       \+ $gdal_version_req_minor \* 1000 \
+-				       \+ $gdal_version_req_micro`
+-
+-	    dnl Decompose version string of installed GDAL
+-	    dnl and calculate its number representation
+-	    gdal_version_major=`expr $GDAL_VERSION : '\([[0-9]]*\)'`
+-	    gdal_version_minor=`expr $GDAL_VERSION : '[[0-9]]*\.\([[0-9]]*\)'`
+-	    gdal_version_micro=`expr $GDAL_VERSION : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
+-	    if test "x$gdal_version_micro" = "x"; then
+-		gdal_version_micro="0"
+-	    fi
+-
+-	    gdal_version_number=`expr $gdal_version_major \* 1000000 \
+-				       \+ $gdal_version_minor \* 1000 \
+-				       \+ $gdal_version_micro`
+-
+-	    gdal_version_check=`expr $gdal_version_number \>\= $gdal_version_req_number`
+-	    if test "$gdal_version_check" = "1"; then
+-		GDAL_CFLAGS="`$GDAL_CONFIG --cflags`"
+-		GDAL_LDFLAGS="`$GDAL_CONFIG --libs`"
+-		GDAL_DEP_LDFLAGS="`$GDAL_CONFIG --dep-libs`"
+-
+-		AC_DEFINE([HAVE_GDAL], [1], [Define to 1 if GDAL library are available])
+-
+-		found_gdal="yes"
+-
+-		AC_MSG_CHECKING([for OGR support in GDAL library])
+-
+-		GDAL_OGR_ENABLED="`$GDAL_CONFIG --ogr-enabled`"
+-		AC_DEFINE([HAVE_GDAL_OGR], [1], [Define to 1 if GDAL library includes OGR support])
+-
+-		AC_MSG_RESULT([$GDAL_OGR_ENABLED])
+-	    else
+-		found_gdal="no"
+-	    fi
+-	else
+-	    found_gdal="no"
+-	fi
++        found_gdal="yes"
+     else
+         found_gdal="no"
+     fi
+ 
++    AC_MSG_RESULT([$found_gdal])
++
++    if test "$found_gdal" = "yes"; then
++        AC_MSG_CHECKING([for OGR support in GDAL library])
++
++        GDAL_OGR_ENABLED="`$GDAL_CONFIG --ogr-enabled`"
++        AC_DEFINE([HAVE_GDAL_OGR], [1], [Define to 1 if GDAL library includes OGR support])
++
++        AC_MSG_RESULT([$GDAL_OGR_ENABLED])
++    fi
++
++    dnl
++    dnl Check if required version of GDAL is available
++    dnl
++
++    gdal_version_req=ifelse([$1], [], [], [$1])
++    if test "$found_gdal" = "yes" -a -n "$gdal_version_req"; then
++
++        AC_MSG_CHECKING([if GDAL version is >= $gdal_version_req])
++
++        dnl Decompose required version string of GDAL
++        dnl and calculate its number representation
++        gdal_version_req_major=`expr $gdal_version_req : '\([[0-9]]*\)'`
++        gdal_version_req_minor=`expr $gdal_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
++        gdal_version_req_micro=`expr $gdal_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
++        if test "x$gdal_version_req_micro" = "x"; then
++            gdal_version_req_micro="0"
++        fi
++
++        gdal_version_req_number=`expr $gdal_version_req_major \* 1000000 \
++                                   \+ $gdal_version_req_minor \* 1000 \
++                                   \+ $gdal_version_req_micro`
++
++        dnl Decompose version string of installed GDAL
++        dnl and calculate its number representation
++        gdal_version_major=`expr $GDAL_VERSION : '\([[0-9]]*\)'`
++        gdal_version_minor=`expr $GDAL_VERSION : '[[0-9]]*\.\([[0-9]]*\)'`
++        gdal_version_micro=`expr $GDAL_VERSION : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
++        if test "x$gdal_version_micro" = "x"; then
++            gdal_version_micro="0"
++        fi
++
++        gdal_version_number=`expr $gdal_version_major \* 1000000 \
++                                   \+ $gdal_version_minor \* 1000 \
++                                   \+ $gdal_version_micro`
++
++        gdal_version_check=`expr $gdal_version_number \>\= $gdal_version_req_number`
++        if test "$gdal_version_check" = "1"; then
++            AC_MSG_RESULT([yes])
++        else
++            AC_MSG_RESULT([no])
++	    AC_MSG_ERROR([GDAL $GDAL_VERSION found, but required version is $gdal_version_req])
++        fi
++    fi
++
+     AC_SUBST(GDAL_VERSION)
+     AC_SUBST(GDAL_CFLAGS)
+     AC_SUBST(GDAL_LDFLAGS)
diff --git a/bes-link.patch b/bes-link.patch
index ee110cd..ff648a1 100644
--- a/bes-link.patch
+++ b/bes-link.patch
@@ -1,12 +1,14 @@
-diff -up bes-3.14.0/dispatch/Makefile.in.link bes-3.14.0/dispatch/Makefile.in
---- bes-3.14.0/dispatch/Makefile.in.link	2015-04-06 23:55:22.000000000 -0600
-+++ bes-3.14.0/dispatch/Makefile.in	2015-04-16 14:43:31.971682223 -0600
-@@ -462,7 +462,7 @@ SUBDIRS = . unit-tests
- lib_LTLIBRARIES = libbes_dispatch.la 
- libbes_dispatch_la_SOURCES = $(SRCS) $(HDRS) 
- libbes_dispatch_la_LDFLAGS = -version-info $(LIBDISPATCH_VERSION)
--libbes_dispatch_la_LIBADD = $(XML2_LIBS) $(BES_ZLIB_LIBS) \
-+libbes_dispatch_la_LIBADD = $(BES_ZLIB_LIBS) \
- 	$(BES_BZ2_LIBS) $(BES_DL_LIBS) $(PTHREAD_LIBS)
+diff -up bes-3.14.0/xmlcommand/Makefile.am.link bes-3.14.0/xmlcommand/Makefile.am
+--- bes-3.14.0/xmlcommand/Makefile.am.link	2015-03-12 23:56:10.000000000 -0600
++++ bes-3.14.0/xmlcommand/Makefile.am	2015-04-20 18:15:00.160727296 -0600
+@@ -27,9 +27,7 @@ endif
  
+ libbes_xml_command_la_SOURCES = $(SRCS) $(HDRS)
+ libbes_xml_command_la_LDFLAGS = -version-info $(LIBXMLCOMMAND_VERSION)
+-libbes_xml_command_la_LIBADD = 
+-
+-# ../dispatch/libbes_dispatch.la $(XML2_LIBS)
++libbes_xml_command_la_LIBADD = ../dispatch/libbes_dispatch.la $(XML2_LIBS)
  
+ libdap_xml_module_la_SOURCES = $(DAP_SRCS) $(DAP_HDRS)
+ libdap_xml_module_la_LDFLAGS = -avoid-version -module
diff --git a/bes-modules.patch b/bes-modules.patch
index f3cddfa..214ac8e 100644
--- a/bes-modules.patch
+++ b/bes-modules.patch
@@ -1,15 +1,12 @@
-diff -up bes-3.14.0/modules/Makefile.in.modules bes-3.14.0/modules/Makefile.in
---- bes-3.14.0/modules/Makefile.in.modules	2015-04-06 23:55:23.000000000 -0600
-+++ bes-3.14.0/modules/Makefile.in	2015-04-19 21:41:16.184156619 -0600
-@@ -362,9 +362,9 @@ AUTOMAKE_OPTIONS = foreign check-news
+diff -up bes-3.14.0/modules/Makefile.am.modules bes-3.14.0/modules/Makefile.am
+--- bes-3.14.0/modules/Makefile.am.modules	2015-03-09 23:00:53.000000000 -0600
++++ bes-3.14.0/modules/Makefile.am	2015-04-20 16:42:33.348613434 -0600
+@@ -13,7 +13,7 @@ endif
+ # Why are these here? Because they have tests that depend on
+ # netcdf.
+ # FIXME Rewrite the tests to use the dapread handler. jhrg 12/12/14
+-SUBDIRS += fileout_json gateway_module w10n_handler
++SUBDIRS += fileout_json w10n_handler
  
- # Same deal as above, but this uses HDF4/5 too... jhrg 12/12/14
- SUBDIRS = csv_handler dap-server freeform_handler $(am__append_1) \
--	fileout_json gateway_module w10n_handler $(am__append_2) \
-+	$(am__append_2) \
- 	$(am__append_3) $(am__append_4) $(am__append_5) \
--	xml_data_handler $(am__append_6) $(am__append_7)
-+	$(am__append_6) $(am__append_7)
- all: all-recursive
- 
- .SUFFIXES:
+ if BUILD_GDAL
+ SUBDIRS += fileout_gdal gdal_handler
diff --git a/bes.spec b/bes.spec
index 5495f99..2129f73 100644
--- a/bes.spec
+++ b/bes.spec
@@ -6,7 +6,7 @@
 
 Name:           bes
 Version:        3.14.0
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Back-end server software framework for OPeNDAP
 
 Group:          System Environment/Libraries
@@ -15,13 +15,17 @@ URL:            http://www.opendap.org/BES_software
 Source0:        http://www.opendap.org/pub/source/bes-%{version}.tar.gz
 Source1:        bes.service
 Source2:        bes-tmpfiles.conf
-# Fix linking
+# Patch gdal detection
+Patch0:         bes-gdal.patch
+# Fix link
 Patch1:         bes-link.patch
 # Fix getopt()
 Patch2:         bes-getopt.patch
-# Do not build netcdf dependent modules
+# Disable modules with failing tests
 Patch3:         bes-modules.patch
 
+# For autoreconf
+BuildRequires:  libtool
 BuildRequires:  libdap-devel >= 3.14.0
 BuildRequires:  bzip2-devel
 BuildRequires:  libuuid-devel
@@ -32,6 +36,15 @@ BuildRequires:  openssl-devel
 BuildRequires:  pkgconfig
 BuildRequires:  doxygen graphviz
 BuildRequires:  systemd
+# For modules
+BuildRequires:  cfitsio-devel
+# swath2grid with gdal currently fails to build
+#BuildRequires:  gdal-devel
+BuildRequires:  hdf-devel
+BuildRequires:  hdf5-devel
+BuildRequires:  libicu-devel
+BuildRequires:  netcdf-devel
+
 Requires(pre): shadow-utils
 Requires(post): systemd
 Requires(preun): systemd
@@ -39,6 +52,16 @@ Requires(postun): systemd
 # Don't provide modules
 %global __provides_exclude_from ^%{_libdir}/bes/.*\\.so$
 
+# Obsolete the separate handlers
+Obsoletes:      dap-freeform_handler < 3.8.8-3
+Provides:       dap-freeform_handler = 3.8.8-3
+Obsoletes:      dap-hdf4_handler < 3.11.5-3
+Provides:       dap-hdf4_handler = 3.11.5-3
+Obsoletes:      dap-netcdf_handler < 3.10.4-3
+Provides:       dap-netcdf_handler = 3.10.4-3
+Obsoletes:      dap-server < 4.1.6-2
+Provides:       dap-server = 4.1.6-2
+
 %description
 BES is a high-performance back-end server software framework for 
 OPeNDAP that allows data providers more flexibility in providing end 
@@ -78,13 +101,18 @@ Documentation of OPeNDAP BES.
 
 %prep
 %setup -q
+# This fixes gdal detection, but forces gdal usage
+#patch0 -p1 -b .gdal
 %patch1 -p1 -b .link
 %patch2 -p1 -b .getopt
 %patch3 -p1 -b .modules
+# Fixes rpaths
+autoreconf --install
 chmod a-x dispatch/BESStreamResponseHandler*
 
 %build
-%configure --disable-static --disable-dependency-tracking LDFLAGS=-L%{_libdir}/libdap
+%configure --disable-static --disable-dependency-tracking \
+  CPPFLAGS=-I%{_includedir}/cfitsio LDFLAGS=-L%{_libdir}/libdap
 # This fails currently: --without-dap-modules
 make %{?_smp_mflags}
 
@@ -123,7 +151,7 @@ cp -p %SOURCE2 $RPM_BUILD_ROOT%{_tmpfilesdir}/bes.conf
 
 
 %check
-make check
+make check || cat modules/netcdf_handler/bes-testsuite/nc4_netcdf_handler_tests.log
 
 
 %pre
@@ -183,6 +211,13 @@ exit 0
 %doc COPYING __distribution_docs/api-html/
 
 %changelog
+* Mon Apr 20 2015 Orion Poplawski <orion at cora.nwra.com> - 3.14.0-3
+- Build and obsolete/provide modules (bug #1213600)
+- Disable modules failing tests
+- Add patch to fix gdal detection, unused for now due to build failure
+- Fix linking of xml_command
+- Run autoreconf to fix rpaths
+
 * Sun Apr 19 2015 Orion Poplawski <orion at cora.nwra.com> - 3.14.0-2
 - Filter modules from provides
 - Add patch to not build netcdf dependent modules
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/bes.git/commit/?h=master&id=800b98d55a21d9574d3fc9cbc9ada4c441371631


More information about the scm-commits mailing list