From 9b8e18bd7cd13befc9acd8160d86601ee56364e5 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 16 Dec 2022 11:39:45 -0600 Subject: [PATCH 1/5] Disable hl tools by default --- 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 a7d11293b36..3d9d69fa528 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 a1117a0c9df..7c0bb22b574 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -301,6 +301,14 @@ Bug Fixes since HDF5-1.13.3 release Configuration ------------- + - Change the default for building the high-level tools + + The gif2hdf5 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' @@ -583,7 +591,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 51f35d3f7cf2f72ab9ce5d18db6c9d996aadda3f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 16 Dec 2022 15:02:08 -0600 Subject: [PATCH 2/5] identify the tools --- release_docs/RELEASE.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 7c0bb22b574..bcc758986c1 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -303,9 +303,9 @@ Bug Fixes since HDF5-1.13.3 release ------------- - Change the default for building the high-level tools - The gif2hdf5 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. + 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) From 3d9b15534cf40b46bfb7245c47668f8355d641ad Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 16 Dec 2022 16:01:48 -0600 Subject: [PATCH 3/5] Only GIF tools are depecated --- configure.ac | 22 ++++++++++++++++++++-- hl/CMakeLists.txt | 2 +- hl/tools/CMakeLists.txt | 10 +++++++++- release_docs/INSTALL_CMake.txt | 3 ++- release_docs/RELEASE.txt | 2 +- 5 files changed, 33 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 3d9d69fa528..366b41b5c69 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 bcc758986c1..49a14139079 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -303,7 +303,7 @@ 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. From f87405e2de87e68abe8feaaab5c1154ab8f892af Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 16 Dec 2022 16:04:09 -0600 Subject: [PATCH 4/5] Add new option --- release_docs/RELEASE.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 49a14139079..16c8a329c8b 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -306,6 +306,8 @@ Bug Fixes since HDF5-1.13.3 release 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) From bd80e49dd8607e5c0af8d644a6491a0c66226bf4 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 16 Dec 2022 16:29:27 -0600 Subject: [PATCH 5/5] 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 366b41b5c69..5f62140e95e 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