From 983943a8efce37e279f5ec57fe98c5caa49e7b63 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 16 Dec 2022 15:14:46 -0600 Subject: [PATCH 1/3] Disable hl tools by default #2313 --- configure.ac | 6 ++---- hl/CMakeLists.txt | 2 +- release_docs/INSTALL_CMake.txt | 2 +- release_docs/RELEASE.txt | 16 ++++++++++++---- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index bf55006e899..4730815d031 100644 --- a/configure.ac +++ b/configure.ac @@ -834,14 +834,12 @@ AC_LANG_POP(C++) AC_SUBST([HDF5_HL]) AC_SUBST([HDF5_HL_TOOLS]) -## The high-level library and high-level tools are enabled unless the build mode +## The high-level library are enabled unless the build mode ## is clean. if test "X-$BUILD_MODE" = "X-clean" ; then HDF5_HL=no - HDF5_HL_TOOLS=no else HDF5_HL=yes - HDF5_HL_TOOLS=yes fi ## high-level library directories (set when needed, blank until then) @@ -877,7 +875,7 @@ AC_MSG_CHECKING([if the high-level tools are enabled]) AC_ARG_ENABLE([hltools], [AS_HELP_STRING([--enable-hltools], [Enable the high-level tools. - [default=yes] + [default=no] ])], [HDF5_HL_TOOLS=$enableval]) diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt index 6c5ad70e31b..ed6521f5f24 100644 --- a/hl/CMakeLists.txt +++ b/hl/CMakeLists.txt @@ -21,7 +21,7 @@ if (HDF5_BUILD_TOOLS) #-- Option to build the High level Tools #----------------------------------------------------------------------------- if (EXISTS "${HDF5_HL_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_HL_SOURCE_DIR}/tools") - option (HDF5_BUILD_HL_TOOLS "Build HDF5 HL Tools" ON) + option (HDF5_BUILD_HL_TOOLS "Build HDF5 HL Tools" OFF) if (HDF5_BUILD_HL_TOOLS) add_subdirectory (tools) endif () diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 94b14d9ddad..1710e943870 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -740,7 +740,7 @@ HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF 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_TOOLS "Build HIGH Level HDF5 Tools" OFF ---------------- HDF5 Folder Build Options --------------------- Defaults relative to $ diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 71ff287bc0d..211e43786c8 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -282,6 +282,14 @@ Bug Fixes since HDF5-1.13.3 release Configuration ------------- + - Change the default for building the high-level tools + + The gif2hdf5, hdf2gif and h5watch 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. + + (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' @@ -564,7 +572,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 From 1b38b5de6d0924c69b2e7ea3f6c757d6b6ee7d06 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 16 Dec 2022 16:04:48 -0600 Subject: [PATCH 2/3] Only gif tools are deprecated --- configure.ac | 22 ++++++++++++++++++++-- hl/CMakeLists.txt | 2 +- hl/tools/CMakeLists.txt | 10 +++++++++- release_docs/INSTALL_CMake.txt | 3 ++- release_docs/RELEASE.txt | 8 +++++--- 5 files changed, 37 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 4730815d031..fb7cc82385a 100644 --- a/configure.ac +++ b/configure.ac @@ -833,13 +833,16 @@ 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 are enabled unless the build mode +## The high-level library and high-level tools are enabled unless the build mode ## is clean. if test "X-$BUILD_MODE" = "X-clean" ; then HDF5_HL=no + HDF5_HL_TOOLS=no else HDF5_HL=yes + HDF5_HL_TOOLS=yes fi ## high-level library directories (set when needed, blank until then) @@ -875,7 +878,7 @@ AC_MSG_CHECKING([if the high-level tools are enabled]) AC_ARG_ENABLE([hltools], [AS_HELP_STRING([--enable-hltools], [Enable the high-level tools. - [default=no] + [default=yes] ])], [HDF5_HL_TOOLS=$enableval]) @@ -886,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 diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt index ed6521f5f24..6c5ad70e31b 100644 --- a/hl/CMakeLists.txt +++ b/hl/CMakeLists.txt @@ -21,7 +21,7 @@ if (HDF5_BUILD_TOOLS) #-- Option to build the High level Tools #----------------------------------------------------------------------------- if (EXISTS "${HDF5_HL_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_HL_SOURCE_DIR}/tools") - option (HDF5_BUILD_HL_TOOLS "Build HDF5 HL Tools" OFF) + option (HDF5_BUILD_HL_TOOLS "Build HDF5 HL Tools" ON) if (HDF5_BUILD_HL_TOOLS) add_subdirectory (tools) endif () diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt index a209fbb7107..7df2b796a04 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/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 1710e943870..b17a7e58123 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -740,7 +740,8 @@ HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF 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" OFF +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 211e43786c8..930bc421a42 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -284,9 +284,11 @@ Bug Fixes since HDF5-1.13.3 release ------------- - Change the default for building the high-level tools - The gif2hdf5, hdf2gif and h5watch high-level tools are deprecated and will be removed + 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) @@ -574,5 +576,5 @@ The issues with the gif tool are: HDFFV-11048 CVE-2020-10809 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 + autotools: --enable-hlgiftools + cmake: HDF5_BUILD_HL_GIF_TOOLS=ON From 54a02f8407e54cf27e819e8a09f0558e56c09565 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 16 Dec 2022 16:29:35 -0600 Subject: [PATCH 3/3] Update autotools --- configure.ac | 1 + hl/tools/Makefile.am | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index fb7cc82385a..2a377f6fd7e 100644 --- a/configure.ac +++ b/configure.ac @@ -3923,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/Makefile.am b/hl/tools/Makefile.am index 6687f40f871..f3fe0d352ae 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