From 149b8e9769887c5b23400b526dc10463f88f2c3e Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Fri, 16 Dec 2022 21:56:07 -0600 Subject: Disable hl tools by default (#2313) * Disable hl tools by default * identify the tools * Only GIF tools are depecated * Add new option * Update autotools --- configure.ac | 17 +++++++++++++++++ hl/tools/CMakeLists.txt | 10 +++++++++- hl/tools/Makefile.am | 8 +++++++- release_docs/INSTALL_CMake.txt | 1 + release_docs/RELEASE.txt | 18 ++++++++++++++---- 5 files changed, 48 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index a7d1129..5f62140 100644 --- a/configure.ac +++ b/configure.ac @@ -833,6 +833,7 @@ AC_LANG_POP(C++) ## library is disabled. AC_SUBST([HDF5_HL]) AC_SUBST([HDF5_HL_TOOLS]) +AC_SUBST([HDF5_HL_GIF_TOOLS]) ## The high-level library and high-level tools are enabled unless the build mode ## is clean. @@ -888,6 +889,21 @@ else AC_MSG_RESULT([no]) fi +AC_MSG_CHECKING([if the high-level GIF tools are enabled]) +AC_ARG_ENABLE([hltools], + [AS_HELP_STRING([--enable-hlgiftools], + [Enable the high-level GIF tools. + [default=no] + ])], + [HDF5_HL_GIF_TOOLS=$enableval]) + +if test "X${HDF5_GIF_HL}" = "Xyes" -a "X-$HDF5_HL_TOOLS" = "X-yes" -a "X-$HDF5_HL_GIF_TOOLS" = "X-yes"; then + AC_MSG_RESULT([yes]) + HL_GIF_TOOLS="tools" +else + AC_MSG_RESULT([no]) +fi + ## ---------------------------------------------------------------------- ## Enable new references for dimension scales @@ -3907,6 +3923,7 @@ AM_CONDITIONAL([BUILD_TESTS_CONDITIONAL], [test "X$HDF5_TESTS" = "Xyes"]) AM_CONDITIONAL([BUILD_TESTS_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"]) AM_CONDITIONAL([BUILD_TOOLS_CONDITIONAL], [test "X$HDF5_TOOLS" = "Xyes"]) AM_CONDITIONAL([BUILD_TOOLS_HL_CONDITIONAL], [test "X$HDF5_HL_TOOLS" = "Xyes"]) +AM_CONDITIONAL([BUILD_TOOLS_HL_GIF_CONDITIONAL], [test "X$HDF5_HL_GIF_TOOLS" = "Xyes"]) AM_CONDITIONAL([BUILD_DOXYGEN_CONDITIONAL], [test "X$HDF5_DOXYGEN" = "Xyes"]) ## ---------------------------------------------------------------------- diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt index a209fbb..7df2b79 100644 --- a/hl/tools/CMakeLists.txt +++ b/hl/tools/CMakeLists.txt @@ -1,6 +1,14 @@ cmake_minimum_required (VERSION 3.18) project (HDF5_HL_TOOLS C) -add_subdirectory (gif2h5) + #----------------------------------------------------------------------------- + #-- Option to build the High level GIF Tools + #----------------------------------------------------------------------------- + if (EXISTS "${HDF5_HL_SOURCE_DIR}/gif2h5" AND IS_DIRECTORY "${HDF5_HL_SOURCE_DIR}/gif2h5") + option (HDF5_BUILD_HL_GIF_TOOLS "Build HDF5 HL GIF Tools" OFF) + if (HDF5_BUILD_HL_GIF_TOOLS) + add_subdirectory (gif2h5) + endif () + endif () add_subdirectory (h5watch) diff --git a/hl/tools/Makefile.am b/hl/tools/Makefile.am index 6687f40..f3fe0d3 100644 --- a/hl/tools/Makefile.am +++ b/hl/tools/Makefile.am @@ -18,7 +18,13 @@ include $(top_srcdir)/config/commence.am +if BUILD_TOOLS_HL_GIF_CONDITIONAL + TOOLS_GIF_DIR = gif2h5 +else + TOOLS_GIF_DIR = +endif + # All subdirectories -SUBDIRS=gif2h5 h5watch +SUBDIRS=$(TOOLS_DIR) h5watch include $(top_srcdir)/config/conclude.am diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 94b14d9..b17a7e5 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -741,6 +741,7 @@ HDF5_BUILD_JAVA "Build JAVA support" OFF HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" ON HDF5_BUILD_TOOLS "Build HDF5 Tools" ON HDF5_BUILD_HL_TOOLS "Build HIGH Level HDF5 Tools" ON +HDF5_BUILD_HL_GIF_TOOLS "Build HIGH Level HDF5 GIF Tools" OFF ---------------- HDF5 Folder Build Options --------------------- Defaults relative to $ diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index a1117a0..16c8a32 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -301,6 +301,16 @@ Bug Fixes since HDF5-1.13.3 release Configuration ------------- + - Change the default for building the high-level tools + + The gif2hdf5 and hdf2gif high-level tools are deprecated and will be removed + in a future release. The default build setting for them have been changed from enabled + to disabled. A user can enable the build of these tools if needed. + autotools: --enable-hlgiftools + cmake: HDF5_BUILD_HL_GIF_TOOLS=ON + + (ADB - 2022/12/16) + - Change the settings of the *pc files to use the correct format The pkg-config files generated by CMake uses incorrect syntax for the 'Requires' @@ -583,7 +593,7 @@ The issues with the gif tool are: HDFFV-10592 CVE-2018-17433 HDFFV-10593 CVE-2018-17436 HDFFV-11048 CVE-2020-10809 -These CVE issues have not yet been addressed and can be avoided by not building -the gif tool. Disable building the High-Level tools with these options: - autotools: --disable-hltools - cmake: HDF5_BUILD_HL_TOOLS=OFF +These CVE issues have not yet been addressed and are avoided by not building +the gif tool by default. Enable building the High-Level tools with these options: + autotools: --enable-hltools + cmake: HDF5_BUILD_HL_TOOLS=ON -- cgit v0.12