-*Please refer to the release_docs/INSTALL file for installation/usage instructions.*
+---
+
+## What is HDF5?
This repository contains a high-performance library's source code and a file format
specification that implements the HDF5ยฎ data model. The model has been adopted across
@@ -33,115 +19,157 @@ in science, engineering, and research communities worldwide.
The HDF Group is the developer, maintainer, and steward of HDF5 software. Find more
information about The HDF Group, the HDF5 Community, and other HDF5 software projects,
-tools, and services at [The HDF Group's website](https://www.hdfgroup.org/).
+tools, and services at [The HDF Group's website](https://www.hdfgroup.org/).
+
+## Quick Start
+
+- **New to HDF5?** Start with the [INSTALL](release_docs/INSTALL) guide for compilation and installation instructions.
+
+- **Ready to build?** See [INSTALL_CMake.txt](release_docs/INSTALL_CMake.txt) for CMake-based builds.
+
+- **Running on HPC?** Check out [README_HPC.md](release_docs/README_HPC.md) for parallel HDF5 configuration.
+
+## Table of Contents
+
+- [What is HDF5?](#what-is-hdf5)
+- [Quick Start](#quick-start)
+- [Documentation](#documentation)
+- [Help and Support](#help-and-support)
+- [Forum and News](#forum-and-news)
+- [Release Schedule](#release-schedule)
+- [Downloads and Source Code](#downloads-and-source-code)
+- [Java Maven Artifacts](#java-maven-artifacts)
+- [Contributing](#contributing)
+- [How to Cite HDF5](#how-to-cite-hdf5)
+- [Build Status](#build-status)
+
+## Documentation
-DOCUMENTATION
--------------
Documentation for all HDF software is available at:
-
- https://support.hdfgroup.org/documentation/index.html
-
-The latest documentation for the HDF5 library can be found at:
-
- https://support.hdfgroup.org/documentation/hdf5/latest
+- **All HDF Documentation**: https://support.hdfgroup.org/documentation/index.html
+- **Latest HDF5 Library**: https://support.hdfgroup.org/documentation/hdf5/latest
See the [CHANGELOG.md][u1] file in the [release_docs/][u4] directory for information specific
to the features and updates included in this release of the library.
-Several more files are located within the [release_docs/][u4] directory with specific
-details for several common platforms and configurations.
-- INSTALL - Start Here. General instructions for compiling and installing the library or using an installed library
-- INSTALL_CMAKE - instructions for building with CMake (Kitware.com)
-- README_HPC.md - instructions for building and configuring Parallel HDF5 on HPC systems
-- INSTALL_Windows and INSTALL_Cygwin - MS Windows installations.
-- USING_HDF5_CMake - Build and Install HDF5 Applications with CMake
-- USING_CMake_Examples - Build and Test HDF5 Examples with CMake
+### Platform-Specific Guides
+Several files in the [release_docs/][u4] directory provide platform-specific details:
+| File | Description |
+|------|-------------|
+| [INSTALL](release_docs/INSTALL) | General compilation and installation instructions (start here) |
+| [INSTALL_CMake.txt](release_docs/INSTALL_CMake.txt) | Building with CMake |
+| [README_HPC.md](release_docs/README_HPC.md) | Building and configuring Parallel HDF5 on HPC systems |
+| [INSTALL_Windows.txt](release_docs/INSTALL_Windows.txt) | Windows installation |
+| [INSTALL_Cygwin.txt](release_docs/INSTALL_Cygwin.txt) | Cygwin installation |
+| [USING_HDF5_CMake.txt](release_docs/USING_HDF5_CMake.txt) | Building HDF5 applications with CMake |
+| [USING_CMake_Examples.txt](release_docs/USING_CMake_Examples.txt) | Building and testing HDF5 examples with CMake |
-HELP AND SUPPORT
-----------------
-The HDF Group staffs a free Help Desk accessible at [https://help.hdfgroup.org](https://help.hdfgroup.org) and also monitors the [Forum](https://forum.hdfgroup.org). Our free support service is community-based and handled as time allows. Weโll do our best to respond to your question as soon as possible, but please note that response times may vary depending on the complexity of the issue and staff availability.
+## Help and Support
+
+The HDF Group staffs a free Help Desk accessible at https://help.hdfgroup.org and also monitors the [Forum](https://forum.hdfgroup.org). Our free support service is community-based and handled as time allows. We'll do our best to respond to your question as soon as possible, but please note that response times may vary depending on the complexity of the issue and staff availability.
If you're interested in guaranteed response and resolution times, a dedicated technical account manager, and more benefits (all while supporting the open-source work of The HDF Group), please check out [Priority Support](https://www.hdfgroup.org/solutions/priority-support/).
+## Forum and News
-
-FORUM and NEWS
---------------
The [HDF Forum](https://forum.hdfgroup.org) is provided for public announcements, technical questions, and discussions
of interest to the general HDF5 Community.
- - News and Announcements
- https://forum.hdfgroup.org/c/news-and-announcements-from-the-hdf-group
-
- - HDF5 Topics
- https://forum.hdfgroup.org/c/hdf5
+- [News and Announcements](https://forum.hdfgroup.org/c/news-and-announcements-from-the-hdf-group)
+- [HDF5 Topics](https://forum.hdfgroup.org/c/hdf5)
These forums are provided as an open and public service for searching and reading.
Posting requires completing a simple registration and allows one to join in the
-conversation. Please read the [instructions](https://forum.hdfgroup.org/t/quickstart-guide-welcome-to-the-new-hdf-forum
-) for more information on how to get started.
+conversation. Please read the [quickstart guide](https://forum.hdfgroup.org/t/quickstart-guide-welcome-to-the-new-hdf-forum) for more information on how to get started.
-RELEASE SCHEDULE
-----------------
+## Release Schedule
-![HDF5 release schedule][u2]
+![HDF5 release schedule][u2]
HDF5 does not follow a regular release schedule. Instead, updates are based on the
introduction of new features and the resolution of bugs. However, we aim to have at
least one annual release for each maintenance branch.
-| Release | New Features |
-| ------- | ------------ |
-| 2.0.0 | Drop Autotools support, drop the HDF5 <--> GIF tools, add complex number support, update library defaults (cache sizes, etc.) |
-| FUTURE | Multi-threaded HDF5, crashproofing / metadata journaling, Full (VFD) SWMR, encryption, digital signatures, sparse datasets, improved storage for variable-length datatypes, better Unicode support (especially on Windows) |
-
### Release Progress
-[](https://github.com/orgs/HDFGroup/projects/39/views/24)
+[](https://github.com/orgs/HDFGroup/projects/39)
-The badge above shows the current progress of release-blocking issues with colors that reflect completion status:
+[](https://github.com/orgs/HDFGroup/projects/39)
-- **๐ข Green (90%+)**: Readying for Deployment - most blockers completed
-- **๐ก Yellow (60-89%)**: Nearing Completion - on track for release
-- **๐ Orange (40-59%)**: In Development - attention needed
-- **๐ด Red (<40%)**: Initial Phase - significant blockers remain
+The badges above show the current progress of **release-blocking** and **must-do** issues with colors that reflect completion status:
-Click the badge to view the detailed project board with current release-blocking issues.
+- ๐ข **Green (90%+)**: Readying for Deployment - most issues completed
+- ๐ก **Yellow (60-89%)**: Nearing Completion - on track for release
+- ๐ **Orange (40-59%)**: In Development - attention needed
+- ๐ด **Red (<40%)**: Initial Phase - significant issues remain
-SNAPSHOTS, PREVIOUS RELEASES AND SOURCE CODE
---------------------------------------------
-Periodically development code snapshots are provided at the following URL:
+Click the badges to view the detailed project board with current release items.
- https://github.com/HDFGroup/hdf5/releases/tag/snapshot
+## Downloads and Source Code
-Source packages for current and previous releases are located at:
+### Snapshots and Releases
- [Latest HDF5 release](https://github.com/HDFGroup/hdf5/releases)
- [Previous releases](https://support.hdfgroup.org/archive/support/ftp/HDF5/releases/index.html)
+- **Development Snapshots**: https://github.com/HDFGroup/hdf5/releases/tag/snapshot
+- **Latest Release**: https://github.com/HDFGroup/hdf5/releases
+- **Previous Releases**: https://support.hdfgroup.org/archive/support/ftp/HDF5/releases/index.html
+- **Development Code**: https://github.com/HDFGroup/hdf5.git
-Maven artifacts for Java bindings and examples are available at:
+### HPC Testing Results
- GitHub Packages:
- https://maven.pkg.github.com/HDFGroup/hdf5
+[View HPC configure/build/test results on CDash](https://my.cdash.org/index.php?project=HDF5)
- Maven Central (coming soon):
- https://central.sonatype.com/artifact/org.hdfgroup/hdf5-java
+## Java Maven Artifacts
-Java Examples Maven Integration:
- - **org.hdfgroup:hdf5-java** - HDF5 Java bindings with platform-specific JARs (linux-x86_64, windows-x86_64, macos-x86_64, macos-aarch64)
- - **org.hdfgroup:hdf5-java-examples** - Complete collection of Java examples (platform-independent)
- - Cross-platform CI/CD testing and deployment
- - Comprehensive Maven integration with automated testing
- - See HDF5Examples/JAVA/README-MAVEN.md for complete usage instructions
+HDF5 Java bindings and examples are available as Maven artifacts. For detailed usage instructions including dependency configuration, repository setup, and platform-specific builds, see [HDF5Examples/JAVA/README-MAVEN.md](HDF5Examples/JAVA/README-MAVEN.md).
-Development code is available at our Github location:
+## Contributing
- https://github.com/HDFGroup/hdf5.git
+We welcome contributions to HDF5! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.
+
+### How to Contribute
+
+1. **Report Issues**: Use our [GitHub Issues](https://github.com/HDFGroup/hdf5/issues) to report bugs or request features
+2. **Submit Pull Requests**: Fork the repository, make your changes, and submit a PR
+3. **Join Discussions**: Participate in the [HDF Forum](https://forum.hdfgroup.org)
+
+For detailed contribution guidelines, please contact us through the [Help Desk](https://help.hdfgroup.org).
+
+## How to Cite HDF5
+
+If you use HDF5 in your research, please cite it. This repository includes a [`CITATION.cff`](CITATION.cff) file containing standard citation metadata.
+
+**Quick DOI:** [10.5281/zenodo.17808614](https://doi.org/10.5281/zenodo.17808614)
+
+## Build Status
+
+
+Click to expand detailed build status
+
+### Continuous Integration
+
+[](https://github.com/HDFGroup/hdf5/actions/workflows/daily-schedule.yml?query=branch%3Adevelop)
+[](https://github.com/HDFGroup/hdf5/actions/workflows/cve.yml?query=branch%3Adevelop)
+[](https://oss-fuzz-build-logs.storage.googleapis.com/index.html#hdf5)
+[](https://github.com/HDFGroup/hdf5/actions/workflows/linkchecker.yml)
+
+### Integration Testing
+
+[](https://github.com/HDFGroup/hdf5/actions/workflows/hdfeos5.yml?query=branch%3Adevelop)
+[](https://github.com/HDFGroup/hdf5/actions/workflows/netcdf.yml?query=branch%3Adevelop)
+[](https://github.com/HDFGroup/hdf5/actions/workflows/h5py.yml?query=branch%3Adevelop)
+
+### VOL and VFD Testing
+
+[](https://github.com/HDFGroup/hdf5/actions/workflows/vol.yml?query=branch%3Adevelop)
+[](https://github.com/HDFGroup/hdf5/actions/workflows/vfd.yml?query=branch%3Adevelop)
+
+
+
+---
[u1]: https://github.com/HDFGroup/hdf5/blob/develop/release_docs/CHANGELOG.md
[u2]: https://github.com/HDFGroup/hdf5/blob/develop/release_docs/img/release-schedule.png
[u3]: https://github.com/HDFGroup/hdf5/blob/develop/doxygen/img/HDF5.png
[u4]: https://github.com/HDFGroup/hdf5/blob/develop/release_docs
-
diff --git a/bin/README.md b/bin/README.md
index a32eccc8309..842e1c4b126 100644
--- a/bin/README.md
+++ b/bin/README.md
@@ -9,7 +9,6 @@
|`genparser`|Creates the flex/bison-based parser files in the high-level library|
|`h5cc.in`|Input file from which h5cc is created|
|`h5redeploy.in`|Input file from which h5redeploy is created|
-|`h5vers`|Updates the library version number|
|`make_err`|Generates the H5E header files|
|`make_vers`|Generates H5version.h|
|`make_overflow`|Generates H5overflow.h|
diff --git a/bin/h5vers b/bin/h5vers
deleted file mode 100755
index 4ad2d193a63..00000000000
--- a/bin/h5vers
+++ /dev/null
@@ -1,538 +0,0 @@
-#! /bin/sh
-perl -x -S $0 "$@"
-exit
-
-#! perl
-require 5.003;
-use strict;
-
-# Copyright by The HDF Group.
-# All rights reserved.
-#
-# This file is part of HDF5. The full HDF5 copyright notice, including
-# terms governing use, modification, and redistribution, is contained in
-# the LICENSE file, which can be found at the root of the source code
-# distribution tree, or in https://www.hdfgroup.org/licenses.
-# If you do not have access to either file, you may request a copy from
-# help@hdfgroup.org.
-#
-
-### Purpose
-# Increments the hdf5 version number by changing the value of
-# constants in the src/H5public.h file. The new version number is
-# printed on the standard output. An alternate source file name can be
-# specified as an argument. In any case, the original file is saved
-# by appending a tilde `~' to the name.
-
-### Usage:
-# h5vers [OPTIONS] [FILE]
-
-# Without options this program only displays the current version and
-# doesn't modify any files or create backups. The default is to print
-# the version number like X.Y.Z-A where X is the major version number,
-# Y is the minor version number, Z is the release number, and A is
-# a short annotation string (the `-' is printed only if A is not empty).
-# If the `-v' switch is given the version will be printed like:
-#
-# version X.Y release Z (A)
-#
-# The space and parentheses around A are only printed if A is not empty.
-#
-# The `-s VERSION' switch will set the version as specified. If the
-# string contains a dotted triple then it will be used as the version
-# number, otherwise up to three numbers will be read from the end of
-# the string and used as the major version, minor version, and release
-# number. If any numbers are missing then zero is assumed. This
-# allows versions to be specified like `-s "version 2.1 release 8"' or
-# `-s hdf5-2.1.8.tar.bz2'. If the new version is less than the old
-# version then a warning message is generated on standard error. The
-# annotation string, A, is set only if it appears immediately after the
-# third number, separated by a dash (e.g., `1.2.3-pre1') or in parentheses
-# (e.g., `version 1.2 release 3 (pre1)').
-#
-# The `-i [major|minor|release|annot|last]' option increments the major
-# number, minor number, release number, or annotation string. The `last'
-# switch increments the annotation string if present, otherwise the
-# release number. If the release number is incremented then the annotation
-# string is cleared. If the minor number is incremented then the release
-# number is set to zero and the annotation string is cleared; if the major
-# number is incremented then the minor and release numbers are set to zero
-# and the annotation string is cleared.
-#
-# If a file is specified then that file is used instead of
-# ./H5public.h or ./src/H5public.h.
-#
-# If the version number is changed (either `-s' or `-i' was used on
-# the command line) then the version line of the README.md and CHANGELOG.md files
-# one directory above the H5public.h file is also modified so it looks
-# something like: This is hdf5-2.0.1-1 currently under development.
-# Version changes are also reflected in the Windows-maintained H5pubconf.h
-# file.
-#
-# Whenever the version changes, this script will increment the revision
-# field in HDF5's libtool shared library version in config/lt_vers.am,
-# which is included in src/Makefile.am. Incrementing the revision field
-# indicates that the source code has changed since the last version
-# (which it probably has).
-##############################################################################
-
-sub getvers {
- local ($_) = @_;
- my (@vers);
-
- ($vers[0]) = /^\#\s*define\s+H5_VERS_MAJOR\s+(\d+)/m;
- ($vers[1]) = /^\#\s*define\s+H5_VERS_MINOR\s+(\d+)/m;
- ($vers[2]) = /^\#\s*define\s+H5_VERS_RELEASE\s+(\d+)/m;
- ($vers[3]) = /^\#\s*define\s+H5_VERS_SUBRELEASE\s+\"([^\"]*)\"/m;
- return @vers;
-}
-
-sub setvers {
- my ($contents, @vers) = @_;
- $_[0] =~ s/^(\#\s*define\s+H5_VERS_MAJOR\s+)\d+/$1$vers[0]/m;
- $_[0] =~ s/^(\#\s*define\s+H5_VERS_MINOR\s+)\d+/$1$vers[1]/m;
- $_[0] =~ s/^(\#\s*define\s+H5_VERS_RELEASE\s+)\d+/$1$vers[2]/m;
- $_[0] =~ s/^(\#\s*define\s+H5_VERS_SUBRELEASE\s+\")[^\"]*/$1$vers[3]/m;
- $_[0] =~ s/^(\#\s*define\s+H5_VERS_STR\s+\")[^\"]*/
- sprintf("%s%d.%d.%d%s%s", $1, @vers[0,1,2], $vers[3]?"-":"", $vers[3])/me;
- $_[0] =~ s/^(\#\s*define\s+H5_VERS_INFO\s+\")[^\"]*/
- sprintf("%sHDF5 library version: %d.%d.%d%s%s", $1, @vers[0,1,2],
- $vers[3]?"-":"", $vers[3])/me;
-}
-
-sub usage {
- my ($prog) = $0 =~ /([^\/]+)$/;
- print STDERR <;
-close FILE;
-my (@curver) = getvers $contents;
-
-# Determine the new version number.
-my @newver; #new version
-if ($set) {
- if ($set =~ /(\d+)\.(\d+)\.(\d+)(-([\da-zA-Z]\w*))?/) {
- @newver = ($1, $2, $3, $5);
- } elsif ($set =~ /(\d+)\D+(\d+)\D+(\d+)(\s*\(([a-zA-Z]\w*)\))?\D*$/) {
- @newver = ($1, $2, $3, $5);
- } elsif ($set =~ /(\d+)\D+(\d+)\D*$/) {
- @newver = ($1, $2, 0, "");
- } elsif ($set =~ /(\d+)\D*$/) {
- @newver = ($1, 0, 0, "");
- } else {
- die "illegal version number specified: $set\n";
- }
-} elsif ($inc) {
- $inc = $curver[3] eq "" ? 'release' : 'annot' if $inc eq 'last';
- if ($inc eq "major") {
- $newver[0] = $curver[0]+1;
- @newver[1,2,3] = (0,0,"");
- } elsif ($inc eq "minor") {
- $newver[0] = $curver[0];
- $newver[1] = $curver[1]+1;
- @newver[2,3] = (0,"");
- } elsif ($inc eq "release") {
- @newver[0,1] = @curver[0,1];
- $newver[2] = $curver[2]+1;
- $newver[3] = "";
- } elsif ($inc eq "annot") {
- @newver[0,1,2] = @curver[0,1,2];
- $newver[3] = $curver[3];
- $newver[3] =~ s/(\d+)\D*$/$1+1/e or
- die "Annotation \"".$newver[3]."\" cannot be incremented.\n";
- } else {
- die "unknown increment field: $inc\n";
- }
-} else {
- # Nothing to do but print result
- $README = "";
- $CHANGELOG = "";
- $LT_VERS = "";
- $HDF5CONFIGCMAKE = "";
- $HDF5EXCONFCMAKE = "";
- @newver = @curver;
-}
-
-# Note if the version increased or decreased
-my $version_increased="";
-# Print a warning if the version got smaller (don't check annot field)
-if ($newver[0]*1000000 + $newver[1]*1000 + $newver[2] <
- $curver[0]*1000000 + $curver[1]*1000 + $curver[2]) {
- printf STDERR "Warning: version decreased from %d.%d.%d to %d.%d.%d\n",
- @curver[0,1,2], @newver[0,1,2];
-}
-if ($newver[0]*1000000 + $newver[1]*1000 + $newver[2] >
- $curver[0]*1000000 + $curver[1]*1000 + $curver[2]) {
- $version_increased="true";
-}
-
-# Update the version number if it changed.
-if ($newver[0]!=$curver[0] ||
- $newver[1]!=$curver[1] ||
- $newver[2]!=$curver[2] ||
- $newver[3]ne$curver[3]) {
- setvers $contents, @newver or die "unable to set version\n";
- rename $file, "$file~" or die "unable to save backup file\n";
- open FILE, ">$file" or die "unable to open $file but backup saved!\n";
- print FILE $contents;
- close FILE;
-}
-
-# Update the libtool shared library version in src/Makefile.am if
-# the version number has increased.
-if ($LT_VERS && $version_increased) {
- open FILE, $LT_VERS or die "$LT_VERS: $!\n";
- my ($contentsy) = join "", ;
- close FILE;
-
- local($_) = $contentsy;
-
-# As of the HDF5 v1.8.16 release, h5vers should not increment
-# the LT_VERS numbers, so the next 6 lines are commented out.
-# A future version may copy the numbers to H5public.h, so this
-# section is retained for future reference.
-# my ($lt_revision) = /^LT_VERS_REVISION\s*=\s*(\d+)/m;
-# my $new_lt_revision = $lt_revision+1;
-# ($contentsy) =~ s/^(LT_VERS_REVISION\s*=\s*)\d+/$1$new_lt_revision/m;
-
-# open FILE, ">$LT_VERS" or die "$LT_VERS: $!\n";
-# print FILE $contentsy;
-# close FILE;
-}
-
-# Update the README.md file
-if ($README) {
- open FILE, $README or die "$README: $!\n";
- my @contents = ;
- close FILE;
- $contents[0] = sprintf("HDF5 version %d.%d.%d%s %s",
- @newver[0,1,2],
- $newver[3] eq "" ? "" : "-".$newver[3],
- "currently under development\n");
- open FILE, ">$README" or die "$README: $!\n";
- print FILE @contents;
- close FILE;
-}
-
-# Update the release_docs/CHANGELOG.md file
-if ($CHANGELOG) {
- open FILE, $CHANGELOG or die "$CHANGELOG: $!\n";
- my @contents = ;
- close FILE;
- $contents[0] = sprintf("HDF5 version %d.%d.%d%s %s",
- @newver[0,1,2],
- $newver[3] eq "" ? "" : "-".$newver[3],
- "currently under development\n");
-
- for (my $i = 0; $i < $#contents; ++$i) {
- if ($contents[$i] =~ /^# ๐ Executive Summary: HDF5 Version/) {
- $contents[$i] = sprintf("# ๐ Executive Summary: HDF5 Version %d.%d.%d\n", @newver[0,1,2]);
- last;
- }
- }
-
- open FILE, ">$CHANGELOG" or die "$CHANGELOG: $!\n";
- print FILE @contents;
- close FILE;
-}
-
-# Update the config/cmake/scripts/HDF5config.cmake file
-if ($HDF5CONFIGCMAKE) {
- my $data = read_file($HDF5CONFIGCMAKE);
-# my $sub_rel_ver_str = "";
- my $sub_rel_ver_str = (
- $newver[3] eq ""
- ? sprintf("\"%s\"", "")
- : sprintf("\"%s\"", "-".$newver[3])
- );
- my $version_string = sprintf("\"%d.%d.%d\"", @newver[0,1,2]);
-
- $data =~ s/set \(CTEST_SOURCE_VERSION .*\)/set \(CTEST_SOURCE_VERSION $version_string\)/;
- $data =~ s/set \(CTEST_SOURCE_VERSEXT .*\)/set \(CTEST_SOURCE_VERSEXT $sub_rel_ver_str\)/;
-
- write_file($HDF5CONFIGCMAKE, $data);
-}
-
-# Update the config/examples/HDF5AsSubdirMacros.cmake file
-if ($HDF5EXCONFCMAKE) {
- my $data = read_file($HDF5EXCONFCMAKE);
-# my $sub_rel_ver_str = "";
- my $sub_rel_ver_str = (
- $newver[3] eq ""
- ? sprintf("\"%s\"", "")
- : sprintf("\"%s\"", "-".$newver[3])
- );
- my $version_string = sprintf("\"%d.%d.%d\"", @newver[0,1,2]);
-
- $data =~ s/set \(HDF5_VERSION .*\)/set \(HDF5_VERSION $version_string\)/;
- $data =~ s/set \(HDF5_VERSEXT .*\)/set \(HDF5_VERSEXT $sub_rel_ver_str\)/;
-
- write_file($HDF5EXCONFCMAKE, $data);
-}
-
-# Update the java/hdf/hdf5lib/H5.java file
-if ($H5_JAVA) {
- my $data = read_file($H5_JAVA);
-# my $sub_rel_ver_str = "";
- my $sub_rel_ver_str = (
- $newver[3] eq ""
- ? sprintf("\"%s\"", "")
- : sprintf("\"%s\"", "-".$newver[3].", currently under development")
- );
- my $version_string1 = sprintf("%d.%d.%d", @newver[0,1,2]);
- my $version_string2 = sprintf("%d, %d, %d", @newver[0,1,2]);
-
- $data =~ s/\@version HDF5 .* /\@version HDF5 $version_string1 /;
- $data =~ s/ public final static int LIB_VERSION\[\] = \{\d*,.\d*,.\d*\};/ public final static int LIB_VERSION[] = \{$version_string2\};/;
-
- write_file($H5_JAVA, $data);
-}
-
-# Update the java/test/TestH5.java file
-if ($TESTH5_JAVA) {
- my $data = read_file($TESTH5_JAVA);
-# my $sub_rel_ver_str = "";
- my $sub_rel_ver_str = (
- $newver[3] eq ""
- ? sprintf("\"%s\"", "")
- : sprintf("\"%s\"", "-".$newver[3].", currently under development")
- );
- my $version_string1 = sprintf("%d, %d, %d", @newver[0,1,2]);
- my $version_string2 = sprintf("int majnum = %d, minnum = %d, relnum = %d", @newver[0,1,2]);
-
- $data =~ s/ int libversion\[\] = \{.*\};/ int libversion\[\] = \{$version_string1\};/;
- $data =~ s/ int majnum = \d*, minnum = \d*, relnum = \d*;/ $version_string2;/;
-
- write_file($TESTH5_JAVA, $data);
-}
-
-# Update the java/src-jni/hdf/hdf5lib/H5.java file
-if ($H5_JNI_JAVA) {
- my $data = read_file($H5_JNI_JAVA);
-# my $sub_rel_ver_str = "";
- my $sub_rel_ver_str = (
- $newver[3] eq ""
- ? sprintf("\"%s\"", "")
- : sprintf("\"%s\"", "-".$newver[3].", currently under development")
- );
- my $version_string1 = sprintf("%d.%d.%d", @newver[0,1,2]);
- my $version_string2 = sprintf("%d, %d, %d", @newver[0,1,2]);
-
- $data =~ s/\@version HDF5 .* /\@version HDF5 $version_string1 /;
- $data =~ s/ public final static int LIB_VERSION\[\] = \{\d*,.\d*,.\d*\};/ public final static int LIB_VERSION[] = \{$version_string2\};/;
-
- write_file($H5_JNI_JAVA, $data);
-}
-
-# Update the java/src-jni/test/TestH5.java file
-if ($TESTH5_JNI_JAVA) {
- my $data = read_file($TESTH5_JNI_JAVA);
-# my $sub_rel_ver_str = "";
- my $sub_rel_ver_str = (
- $newver[3] eq ""
- ? sprintf("\"%s\"", "")
- : sprintf("\"%s\"", "-".$newver[3].", currently under development")
- );
- my $version_string1 = sprintf("%d, %d, %d", @newver[0,1,2]);
- my $version_string2 = sprintf("int majnum = %d, minnum = %d, relnum = %d", @newver[0,1,2]);
-
- $data =~ s/ int libversion\[\] = \{.*\};/ int libversion\[\] = \{$version_string1\};/;
- $data =~ s/ int majnum = \d*, minnum = \d*, relnum = \d*;/ $version_string2;/;
-
- write_file($TESTH5_JNI_JAVA, $data);
-}
-
-# Update the tools/test/h5repack/expected/h5repack_layout.h5-plugin_version_test.ddl file
-if ($REPACK_LAYOUT_PLUGIN_VERSION) {
- my $data = read_file($REPACK_LAYOUT_PLUGIN_VERSION);
- my $version_string = sprintf("%d %d %d", @newver[0,1,2]);
-
- $data =~ s/ PARAMS \{ 9 \d* \d* \d* \}/ PARAMS \{ 9 $version_string \}/g;
-
- write_file($REPACK_LAYOUT_PLUGIN_VERSION, $data);
-}
-
-# helper function to read the file for updating
-# config/cmake/scripts/HDF5Config.cmake, and java files.
-# The version string in that file is not at the top, so the string replacement
-# is not for the first line, and reading/writing the entire file as one string
-# facilitates the substring replacement.
-#Presumably these will also work for resetting the version in HDF5config.cmake.
-sub read_file {
- my ($filename) = @_;
-
- open my $in, $filename or die "Could not open '$filename' for reading $!";
- local $/ = undef;
- my $all = <$in>;
- close $in;
-
- return $all;
-}
-
-# helper function to write the file for updating
-# config/cmake/scripts/HDF5config.cmake and java files.
-sub write_file {
- my ($filename, $content) = @_;
-
- open my $out, ">$filename" or die "Could not open '$filename' for writing $!";;
- print $out $content;
- close $out;
-
- return;
-}
-
-sub gen_h5pubconf {
- my ($name, $pubconf, @vers) = @_;
-
- my $namelc = lc($name);
- my $nameuc = uc($name);
-
- open FILE, $pubconf or die "$pubconf: $!\n";
- my @contents = ;
- close FILE;
-
- for (my $i = 0; $i < $#contents; ++$i) {
- if ($contents[$i] =~ /\#\s*define\s+H5_PACKAGE\s+/) {
- $contents[$i] = "\#define H5_PACKAGE \"$namelc\"\n";
- } elsif ($contents[$i] =~ /\#\s*define\s+H5_PACKAGE_NAME\s+/) {
- $contents[$i] = "\#define H5_PACKAGE_NAME \"$nameuc\"\n";
- } elsif ($contents[$i] =~ /\#\s*define\s+H5_PACKAGE_STRING\s+/) {
- $contents[$i] = sprintf("\#define H5_PACKAGE_STRING \"$nameuc %d.%d.%d%s\"\n",
- @vers[0,1,2],
- $newver[3] eq "" ? "" : "-".$newver[3]);
- } elsif ($contents[$i] =~ /\#\s*define\s+H5_PACKAGE_TARNAME\s+/) {
- $contents[$i] = "\#define H5_PACKAGE_TARNAME \"$namelc\"\n";
- } elsif ($contents[$i] =~ /\#\s*define\s+H5_PACKAGE_VERSION\s+/) {
- $contents[$i] = sprintf("\#define H5_PACKAGE_VERSION \"%d.%d.%d%s\"\n",
- @vers[0,1,2],
- $newver[3] eq "" ? "" : "-".$newver[3]);
- } elsif ($contents[$i] =~ /\#\s*define\s+H5_VERSION\s+/) {
- $contents[$i] = sprintf("\#define H5_VERSION \"%d.%d.%d%s\"\n",
- @vers[0,1,2],
- $newver[3] eq "" ? "" : "-".$newver[3]);
- }
- }
-
- open FILE, ">$pubconf" or die "$pubconf: $!\n";
- print FILE @contents;
- close FILE;
-}
-
-# Print the new version number
-if ($verbose) {
- printf("version %d.%d release %d%s\n", @newver[0,1,2],
- $newver[3] eq "" ? "" : " (".$newver[3].")");
-} else {
- printf("%d.%d.%d%s\n", @newver[0,1,2],
- $newver[3] eq "" ? "" : "-".$newver[3]);
-}
-
-exit 0;
-
-# Because the first line of this file looks like a Bourne shell script, we
-# must tell XEmacs explicitly that this is really a perl script.
-#
-# Local Variables:
-# mode:perl
-# End:
diff --git a/bin/release b/bin/release
index 4c05bf78651..d85993f747b 100755
--- a/bin/release
+++ b/bin/release
@@ -15,6 +15,102 @@
# Function definitions
#
+# Function to get version from H5public.h
+get_version()
+{
+ local major=$(grep '^#define H5_VERS_MAJOR' src/H5public.h | awk '{print $3}')
+ local minor=$(grep '^#define H5_VERS_MINOR' src/H5public.h | awk '{print $3}')
+ local release=$(grep '^#define H5_VERS_RELEASE' src/H5public.h | awk '{print $3}')
+ local subrelease=$(grep '^#define H5_VERS_SUBRELEASE' src/H5public.h | cut -d'"' -f2)
+
+ echo "${major}.${minor}.${release}${subrelease}"
+}
+
+# Function to set version in H5public.h
+# Usage: set_version "2.0.1-of20250116"
+set_version()
+{
+ if [ $# -ne 1 ]; then
+ echo "usage: set_version "
+ return 1
+ fi
+
+ new_vers=$1
+
+ # Validate version string format
+ if ! echo "$new_vers" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9._-]+)?$'; then
+ echo "Error: Invalid version format '$new_vers'. Expected format: major.minor.release[-subrelease]"
+ return 1
+ fi
+
+ # Parse version string (format: major.minor.release or major.minor.release-subrelease)
+ major=$(echo $new_vers | sed 's/^\([0-9]*\)\..*/\1/')
+ minor=$(echo $new_vers | sed 's/^[0-9]*\.\([0-9]*\)\..*/\1/')
+ release=$(echo $new_vers | sed 's/^[0-9]*\.[0-9]*\.\([0-9]*\).*/\1/')
+ # Note: subrelease includes the leading dash (e.g., "-snap0") to match H5_VERS_STR concatenation
+ subrelease=$(echo $new_vers | sed 's/^[0-9]*\.[0-9]*\.[0-9]*\(.*\)/\1/')
+
+ # If subrelease is same as new_vers, there was no subrelease part
+ if [ "$subrelease" = "$new_vers" ]; then
+ subrelease=""
+ fi
+
+ # Validate that all components were extracted
+ if [ -z "$major" ] || [ -z "$minor" ] || [ -z "$release" ]; then
+ echo "Error: Failed to parse version components from '$new_vers'"
+ echo " major=$major, minor=$minor, release=$release, subrelease=$subrelease"
+ return 1
+ fi
+
+ # Verify H5public.h exists and has the expected defines
+ if [ ! -f src/H5public.h ]; then
+ echo "Error: src/H5public.h not found"
+ return 1
+ fi
+
+ for def in H5_VERS_MAJOR H5_VERS_MINOR H5_VERS_RELEASE H5_VERS_SUBRELEASE; do
+ if ! grep -q "^#define $def" src/H5public.h; then
+ echo "Error: #define $def not found in src/H5public.h"
+ return 1
+ fi
+ done
+
+ # Update H5public.h
+ # Note: H5_VERS_STR and H5_VERS_INFO are automatically derived from the base version macros
+ sed -i.bak \
+ -e "s/^\(#define H5_VERS_MAJOR[[:space:]]*\)[0-9]*/\1$major/" \
+ -e "s/^\(#define H5_VERS_MINOR[[:space:]]*\)[0-9]*/\1$minor/" \
+ -e "s/^\(#define H5_VERS_RELEASE[[:space:]]*\)[0-9]*/\1$release/" \
+ -e "s/^\(#define H5_VERS_SUBRELEASE[[:space:]]*\)\".*\"/\1\"$subrelease\"/" \
+ src/H5public.h
+
+ if [ $? -ne 0 ]; then
+ echo "Error: sed command failed"
+ mv src/H5public.h.bak src/H5public.h 2>/dev/null
+ return 1
+ fi
+
+ # Verify the changes were applied correctly
+ new_major=$(grep '^#define H5_VERS_MAJOR' src/H5public.h | sed 's/^#define H5_VERS_MAJOR[[:space:]]*\([0-9]*\).*/\1/')
+ new_minor=$(grep '^#define H5_VERS_MINOR' src/H5public.h | sed 's/^#define H5_VERS_MINOR[[:space:]]*\([0-9]*\).*/\1/')
+ new_release=$(grep '^#define H5_VERS_RELEASE' src/H5public.h | sed 's/^#define H5_VERS_RELEASE[[:space:]]*\([0-9]*\).*/\1/')
+ new_subrelease=$(grep '^#define H5_VERS_SUBRELEASE' src/H5public.h | sed 's/^#define H5_VERS_SUBRELEASE[[:space:]]*"\(.*\)".*/\1/')
+
+ if [ "$new_major" != "$major" ] || [ "$new_minor" != "$minor" ] || \
+ [ "$new_release" != "$release" ] || [ "$new_subrelease" != "$subrelease" ]; then
+ echo "Error: Version update verification failed"
+ echo " Expected: major=$major, minor=$minor, release=$release, subrelease=$subrelease"
+ echo " Got: major=$new_major, minor=$new_minor, release=$new_release, subrelease=$new_subrelease"
+ mv src/H5public.h.bak src/H5public.h
+ return 1
+ fi
+
+ # Success - remove backup
+ rm -f src/H5public.h.bak
+ echo "Successfully updated version to $new_vers"
+ return 0
+}
+
# Print Usage page
USAGE()
{
@@ -139,7 +235,7 @@ tar2zip()
# Defaults
DEST=releases
-VERS=`perl bin/h5vers`
+VERS=$(get_version)
VERS_OLD=
test "$VERS" || exit 1
verbose=yes
@@ -156,7 +252,7 @@ RESTORE_VERSION()
echo restoring version information back to $VERS_OLD
rm -f config/lt_vers.am
cp $tmpdir/lt_vers.am config/lt_vers.am
- bin/h5vers -s $VERS_OLD
+ set_version $VERS_OLD
VERS_OLD=
fi
}
@@ -219,10 +315,9 @@ if [ X$pmode = Xyes ]; then
# "undo" changes to it.
cp config/lt_vers.am $tmpdir
# Set version information to m.n.r-of$today.
- # (h5vers does not correctly handle just m.n.r-$today.)
VERS=`echo $VERS | sed -e s/-.*//`-of$today
echo Private release of $VERS
- bin/h5vers -s $VERS
+ set_version $VERS
fi
if [ X$revmode = Xyes ]; then
@@ -236,12 +331,11 @@ if [ X$revmode = Xyes ]; then
fi
revision=`git rev-parse --short HEAD`
# Set version information to m.n.r-r$revision.
- # (h5vers does not correctly handle just m.n.r-$today.)
VERS=`echo $VERS | sed -e s/-.*//`-$revision
echo Private release of $VERS
HDF5_VERS=hdf5-$BRANCHNAME-$revision
echo file base of $HDF5_VERS
- bin/h5vers -s $VERS
+ set_version $VERS
# use a generic directory name for revision releases
HDF5_IN_VERS=hdfsrc
else
diff --git a/config/cmake/HDF5VersionParsing.cmake b/config/cmake/HDF5VersionParsing.cmake
new file mode 100644
index 00000000000..0356cd83c2b
--- /dev/null
+++ b/config/cmake/HDF5VersionParsing.cmake
@@ -0,0 +1,114 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the LICENSE file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+#
+# HDF5VersionParsing.cmake
+#
+# Provides a macro to parse version information from H5public.h
+# This ensures consistent version extraction across all CMake scripts.
+#
+
+#[=======================================================================[.rst:
+HDF5VersionParsing
+------------------
+
+Provides macros for extracting HDF5 version information from H5public.h
+
+parse_hdf5_version
+^^^^^^^^^^^^^^^^^^
+
+Parses version constants from H5public.h and sets variables in parent scope.
+
+.. code-block:: cmake
+
+ parse_hdf5_version(
+ MAJOR_VAR
+ MINOR_VAR
+ RELEASE_VAR
+ [SUBRELEASE_VAR ])
+
+Reads the specified H5public.h file and extracts version numbers from the
+H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE, and optionally H5_VERS_SUBRELEASE
+macros. The extracted values are set in the specified variables in the parent scope.
+
+Arguments:
+ - ````: Path to the H5public.h file to parse
+ - ``MAJOR_VAR``: Variable name to store H5_VERS_MAJOR value
+ - ``MINOR_VAR``: Variable name to store H5_VERS_MINOR value
+ - ``RELEASE_VAR``: Variable name to store H5_VERS_RELEASE value
+ - ``SUBRELEASE_VAR``: (Optional) Variable name to store H5_VERS_SUBRELEASE value
+
+Example:
+ .. code-block:: cmake
+
+ include(HDF5VersionParsing)
+ parse_hdf5_version("${CMAKE_SOURCE_DIR}/src/H5public.h"
+ MAJOR_VAR H5_VERS_MAJOR
+ MINOR_VAR H5_VERS_MINOR
+ RELEASE_VAR H5_VERS_RELEASE
+ SUBRELEASE_VAR H5_VERS_SUBRELEASE)
+ message(STATUS "HDF5 Version: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}")
+
+#]=======================================================================]
+
+macro(parse_hdf5_version H5PUBLIC_H_PATH)
+ # Parse arguments
+ set(options "")
+ set(oneValueArgs MAJOR_VAR MINOR_VAR RELEASE_VAR SUBRELEASE_VAR)
+ set(multiValueArgs "")
+ cmake_parse_arguments(PARSE_VER "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
+ # Validate required arguments
+ if(NOT PARSE_VER_MAJOR_VAR OR NOT PARSE_VER_MINOR_VAR OR NOT PARSE_VER_RELEASE_VAR)
+ message(FATAL_ERROR "parse_hdf5_version requires MAJOR_VAR, MINOR_VAR, and RELEASE_VAR arguments")
+ endif()
+
+ # Validate H5public.h exists
+ if(NOT EXISTS "${H5PUBLIC_H_PATH}")
+ message(FATAL_ERROR "H5public.h not found at: ${H5PUBLIC_H_PATH}")
+ endif()
+
+ # Read H5public.h
+ file(STRINGS "${H5PUBLIC_H_PATH}" _h5_vers_contents REGEX "^#define H5_VERS_(MAJOR|MINOR|RELEASE|SUBRELEASE)")
+
+ # Extract version numbers using regex
+ string(REGEX MATCH "H5_VERS_MAJOR[ \t]+([0-9]+)" _match "${_h5_vers_contents}")
+ if(NOT CMAKE_MATCH_1)
+ message(FATAL_ERROR "Failed to parse H5_VERS_MAJOR from ${H5PUBLIC_H_PATH}")
+ endif()
+ set(${PARSE_VER_MAJOR_VAR} ${CMAKE_MATCH_1} PARENT_SCOPE)
+
+ string(REGEX MATCH "H5_VERS_MINOR[ \t]+([0-9]+)" _match "${_h5_vers_contents}")
+ if(NOT CMAKE_MATCH_1)
+ message(FATAL_ERROR "Failed to parse H5_VERS_MINOR from ${H5PUBLIC_H_PATH}")
+ endif()
+ set(${PARSE_VER_MINOR_VAR} ${CMAKE_MATCH_1} PARENT_SCOPE)
+
+ string(REGEX MATCH "H5_VERS_RELEASE[ \t]+([0-9]+)" _match "${_h5_vers_contents}")
+ if(NOT CMAKE_MATCH_1)
+ message(FATAL_ERROR "Failed to parse H5_VERS_RELEASE from ${H5PUBLIC_H_PATH}")
+ endif()
+ set(${PARSE_VER_RELEASE_VAR} ${CMAKE_MATCH_1} PARENT_SCOPE)
+
+ # Extract subrelease if requested
+ if(PARSE_VER_SUBRELEASE_VAR)
+ string(REGEX MATCH "H5_VERS_SUBRELEASE[ \t]+\"([^\"]*)\"" _match "${_h5_vers_contents}")
+ if(NOT CMAKE_MATCH_1)
+ message(FATAL_ERROR "Failed to parse H5_VERS_SUBRELEASE from ${H5PUBLIC_H_PATH}")
+ endif()
+ set(${PARSE_VER_SUBRELEASE_VAR} ${CMAKE_MATCH_1} PARENT_SCOPE)
+ endif()
+
+ # Clean up temporary variables
+ unset(_h5_vers_contents)
+ unset(_match)
+endmacro()
diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake
index 5df69b3d361..30ec71818e4 100644
--- a/config/cmake/scripts/HDF5config.cmake
+++ b/config/cmake/scripts/HDF5config.cmake
@@ -38,8 +38,26 @@ cmake_minimum_required (VERSION 3.26)
# CTEST_SOURCE_NAME - source folder
##############################################################################
-set (CTEST_SOURCE_VERSION "2.0.1")
-set (CTEST_SOURCE_VERSEXT "")
+#-----------------------------------------------------------------------------
+# Version is extracted from H5public.h at configure time
+# If not set in parent scope, read it from H5public.h now
+#-----------------------------------------------------------------------------
+if (NOT DEFINED H5_VERS_MAJOR)
+ # Use shared version parsing module
+ include(${CTEST_SCRIPT_DIRECTORY}/../HDF5VersionParsing.cmake)
+ parse_hdf5_version("${CTEST_SCRIPT_DIRECTORY}/../src/H5public.h"
+ MAJOR_VAR H5_VERS_MAJOR
+ MINOR_VAR H5_VERS_MINOR
+ RELEASE_VAR H5_VERS_RELEASE
+ SUBRELEASE_VAR H5_VERS_SUBRELEASE)
+endif ()
+
+set (CTEST_SOURCE_VERSION "${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}")
+if (H5_VERS_SUBRELEASE)
+ set (CTEST_SOURCE_VERSEXT "-${H5_VERS_SUBRELEASE}")
+else ()
+ set (CTEST_SOURCE_VERSEXT "")
+endif ()
##############################################################################
# handle input parameters to script.
diff --git a/config/examples/HDF5AsSubdirMacros.cmake b/config/examples/HDF5AsSubdirMacros.cmake
index 62e46c547ac..d03d08773a4 100644
--- a/config/examples/HDF5AsSubdirMacros.cmake
+++ b/config/examples/HDF5AsSubdirMacros.cmake
@@ -17,9 +17,27 @@
# and build it. The HDF5 options should be set after the FetchContent_Declare command and before
# the add_subdirectory command..
macro (EXTERNAL_HDF5_LIBRARY compress_type)
- set (HDF5_VERSION "2.0.1")
- set (HDF5_VERSEXT "")
- set (HDF5_VERSION_MAJOR "2.0")
+ #-----------------------------------------------------------------------------
+ # Version is extracted from H5public.h
+ # If not set in parent scope, read it from H5public.h now
+ #-----------------------------------------------------------------------------
+ if (NOT DEFINED H5_VERS_MAJOR)
+ # Use shared version parsing module
+ include(${CMAKE_CURRENT_LIST_DIR}/../cmake/HDF5VersionParsing.cmake)
+ parse_hdf5_version("${CMAKE_CURRENT_LIST_DIR}/../../src/H5public.h"
+ MAJOR_VAR H5_VERS_MAJOR
+ MINOR_VAR H5_VERS_MINOR
+ RELEASE_VAR H5_VERS_RELEASE
+ SUBRELEASE_VAR H5_VERS_SUBRELEASE)
+ endif ()
+
+ set (HDF5_VERSION "${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}")
+ if (H5_VERS_SUBRELEASE)
+ set (HDF5_VERSEXT "-${H5_VERS_SUBRELEASE}")
+ else ()
+ set (HDF5_VERSEXT "")
+ endif ()
+ set (HDF5_VERSION_MAJOR "${H5_VERS_MAJOR}.${H5_VERS_MINOR}")
set (HDF5LIB_TGZ_NAME "hdf5.tar.gz" CACHE STRING "Use HDF5LIB from compressed file" FORCE)
set (HDF5LIB_TGZ_ORIGPATH "https://github.com/HDFGroup/hdf5/releases/download/snapshot" CACHE STRING "Use HDF5LIB from original location" FORCE)
set (HDF5LIB_USE_LOCALCONTENT ON CACHE BOOL "Use local file for HDF5LIB FetchContent" FORCE)
diff --git a/config/lt_vers.am b/config/lt_vers.am
index f2674c0fc90..0a05473dca7 100644
--- a/config/lt_vers.am
+++ b/config/lt_vers.am
@@ -27,9 +27,8 @@ LT_VERS_REVISION = 0
## version.
##
## 4. If the source changes but there are no API changes, increment
-## LT_VERS_REVISION. This will happen automatically when
-## bin/h5vers is run, but doing it manually shouldn't hurt
-## anything.
+## LT_VERS_REVISION. This should be done manually when updating the
+## version in src/H5public.h.
##
## Note that this versioning system doesn't attempt to handle
## the effects of the H5_V1_x_COMPAT flag.
diff --git a/doxygen/Doxyfile.in b/doxygen/Doxyfile.in
index 0551a1452c1..467663c4633 100644
--- a/doxygen/Doxyfile.in
+++ b/doxygen/Doxyfile.in
@@ -804,6 +804,7 @@ EXCLUDE_PATTERNS = */fortran/test/* \
*/hl/fortran/src/*.h \
*/HDF5Examples/FORTRAN/* \
*/sanitizer/* \
+ */README.md \
*/CONTRIBUTING.md \
*/CHANGELOG.md \
*/HISTORY-*.md
diff --git a/java/hdf/hdf5lib/CMakeLists.txt b/java/hdf/hdf5lib/CMakeLists.txt
index 76e0f7ddc44..87a2a2d7e0b 100644
--- a/java/hdf/hdf5lib/CMakeLists.txt
+++ b/java/hdf/hdf5lib/CMakeLists.txt
@@ -102,11 +102,24 @@ set (HDF5_JAVADOC_HDF_HDF5_STRUCTS_SOURCES
structs/package-info.java
)
+#-----------------------------------------------------------------------------
+# Generate H5Version.java with version information from H5public.h
+# This ensures the Java version constants match the C library version
+# Uses shared template from java/templates/
+#-----------------------------------------------------------------------------
+configure_file (
+ ${HDF5_SOURCE_DIR}/java/templates/H5Version.java.in
+ ${CMAKE_CURRENT_BINARY_DIR}/H5Version.java
+ @ONLY
+)
+
+# Use sources from both source and binary directories
set (HDF5_JAVA_HDF_HDF5_SOURCES
HDFArray.java
HDF5Constants.java
HDFNativeData.java
H5.java
+ ${CMAKE_CURRENT_BINARY_DIR}/H5Version.java
VLDataConverter.java
)
diff --git a/java/hdf/hdf5lib/H5.java b/java/hdf/hdf5lib/H5.java
index 317f8414bd6..233cfd67c87 100644
--- a/java/hdf/hdf5lib/H5.java
+++ b/java/hdf/hdf5lib/H5.java
@@ -296,9 +296,11 @@ public class H5 implements java.io.Serializable {
*
LIB_VERSION[1]: The minor version of the library.
*
LIB_VERSION[2]: The release number of the library.
*
- * Make sure to update the versions number when a different library is used.
+ * NOTE: This version is automatically synchronized with H5public.h via the auto-generated
+ * H5Version class. To update the version, edit src/H5public.h (H5_VERS_MAJOR,
+ * H5_VERS_MINOR, H5_VERS_RELEASE). Do NOT manually edit the version numbers.
*/
- public final static int LIB_VERSION[] = {2, 0, 1};
+ public final static int LIB_VERSION[] = {H5Version.MAJOR, H5Version.MINOR, H5Version.RELEASE};
private final static LinkedHashSet OPEN_IDS = new LinkedHashSet();
private static boolean isLibraryLoaded = false;
diff --git a/java/src-jni/hdf/hdf5lib/CMakeLists.txt b/java/src-jni/hdf/hdf5lib/CMakeLists.txt
index 33889754889..4aac46026f2 100644
--- a/java/src-jni/hdf/hdf5lib/CMakeLists.txt
+++ b/java/src-jni/hdf/hdf5lib/CMakeLists.txt
@@ -103,11 +103,24 @@ set (HDF5_JAVADOC_HDF_HDF5_STRUCTS_SOURCES
structs/package-info.java
)
+#-----------------------------------------------------------------------------
+# Generate H5Version.java with version information from H5public.h
+# This ensures the Java version constants match the C library version
+# Uses shared template from java/templates/
+#-----------------------------------------------------------------------------
+configure_file (
+ ${HDF5_SOURCE_DIR}/java/templates/H5Version.java.in
+ ${CMAKE_CURRENT_BINARY_DIR}/H5Version.java
+ @ONLY
+)
+
+# Use sources from both source and binary directories
set (HDF5_JAVA_HDF_HDF5_SOURCES
HDFArray.java
HDF5Constants.java
HDFNativeData.java
H5.java
+ ${CMAKE_CURRENT_BINARY_DIR}/H5Version.java
)
set (HDF5_JAVADOC_HDF_HDF5_SOURCES
diff --git a/java/src-jni/hdf/hdf5lib/H5.java b/java/src-jni/hdf/hdf5lib/H5.java
index d22f103ef8a..3a70628f12c 100644
--- a/java/src-jni/hdf/hdf5lib/H5.java
+++ b/java/src-jni/hdf/hdf5lib/H5.java
@@ -271,9 +271,11 @@ public class H5 implements java.io.Serializable {
*
LIB_VERSION[1]: The minor version of the library.
*
LIB_VERSION[2]: The release number of the library.
*
- * Make sure to update the versions number when a different library is used.
+ * NOTE: This version is automatically synchronized with H5public.h via the auto-generated
+ * H5Version class. To update the version, edit src/H5public.h (H5_VERS_MAJOR,
+ * H5_VERS_MINOR, H5_VERS_RELEASE). Do NOT manually edit the version numbers.
*/
- public final static int LIB_VERSION[] = {2, 0, 1};
+ public final static int LIB_VERSION[] = {H5Version.MAJOR, H5Version.MINOR, H5Version.RELEASE};
/**
* @ingroup JH5
diff --git a/java/templates/H5Version.java.in b/java/templates/H5Version.java.in
new file mode 100644
index 00000000000..8e9f174c471
--- /dev/null
+++ b/java/templates/H5Version.java.in
@@ -0,0 +1,42 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the LICENSE file, which can be found at the root of the source code *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+package hdf.hdf5lib;
+
+/**
+ * HDF5 library version information.
+ *
+ * This file is automatically generated from src/H5public.h by CMake.
+ * DO NOT EDIT THIS FILE DIRECTLY - it will be overwritten during the build.
+ *
+ * To update the version, edit src/H5public.h and modify:
+ * H5_VERS_MAJOR
+ * H5_VERS_MINOR
+ * H5_VERS_RELEASE
+ * H5_VERS_SUBRELEASE
+ */
+public class H5Version {
+ /** Major version number */
+ public static final int MAJOR = @H5_VERS_MAJOR@;
+
+ /** Minor version number */
+ public static final int MINOR = @H5_VERS_MINOR@;
+
+ /** Release number */
+ public static final int RELEASE = @H5_VERS_RELEASE@;
+
+ /** Subrelease string (e.g., "-snap0" or empty string for releases) */
+ public static final String SUBRELEASE = "@H5_VERS_SUBRELEASE@";
+
+ /** Full version string matching the native library version */
+ public static final String VERSION = "@H5_VERS_MAJOR@.@H5_VERS_MINOR@.@H5_VERS_RELEASE@@H5_VERS_SUBRELEASE@";
+}
diff --git a/release_docs/AutotoolsToCMakeOptions.md b/release_docs/AutotoolsToCMakeOptions.md
index 7b3f4130709..de694e88e61 100644
--- a/release_docs/AutotoolsToCMakeOptions.md
+++ b/release_docs/AutotoolsToCMakeOptions.md
@@ -1,4 +1,4 @@
-# CMake Installations
+# CMake Installations
CMake produces the following set of folders; bin, include, lib and share. The LICENSE and CHANGELOG.md file are placed in the share folder.
diff --git a/release_docs/CHANGELOG.md b/release_docs/CHANGELOG.md
index 9c65fe4ee46..9dca3397183 100644
--- a/release_docs/CHANGELOG.md
+++ b/release_docs/CHANGELOG.md
@@ -1,4 +1,4 @@
-HDF5 version 2.0.1 currently under development
+v2.1.0 --- January X , 2026
# ๐บ HDF5 Changelog
All notable changes to this project will be documented in this file. This document describes the differences between this release and the previous
@@ -21,7 +21,7 @@ For releases prior to version 2.0.0, please see the release.txt file and for mor
* [Platforms Tested](CHANGELOG.md#%EF%B8%8F-platforms-tested)
* [Known Problems](CHANGELOG.md#-known-problems)
-# ๐ Executive Summary: HDF5 Version 2.0.1
+# ๐ Executive Summary: HDF5 Version 2.1.0
## Performance Enhancements:
@@ -45,7 +45,7 @@ For releases prior to version 2.0.0, please see the release.txt file and for mor
## Acknowledgements:
-We would like to thank the many HDF5 community members who contributed to HDF5 2.0.
+We would like to thank the many HDF5 community members who contributed to this release of HDF5.
# โ ๏ธ Breaking Changes
@@ -62,12 +62,12 @@ We would like to thank the many HDF5 community members who contributed to HDF5 2
### Added predefined datatypes for FP6 data
- Predefined datatypes have been added for FP6 data in E2M3 and E3M2 formats (https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf).
+ Predefined datatypes have been added for FP6 data in [E2M3 and E3M2 formats](https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf).
The following new macros have been added:
- - H5T_FLOAT_F6E2M3
- - H5T_FLOAT_F6E3M2
+ - `H5T_FLOAT_F6E2M3`
+ - `H5T_FLOAT_F6E3M2`
These macros map to IDs of HDF5 datatypes representing a 6-bit floating-point datatype with 1 sign bit and either 2 exponent bits and 3 mantissa bits (E2M3 format) or 3 exponent bits and 2 mantissa bits (E3M2 format).
@@ -77,11 +77,11 @@ We would like to thank the many HDF5 community members who contributed to HDF5 2
### Added predefined datatype for FP4 data
- A predefined datatype has been added for FP4 data in E2M1 format (https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf).
+ A predefined datatype has been added for FP4 data in [E2M1 format](https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf).
The following new macro has been added:
- - H5T_FLOAT_F4E2M1
+ - `H5T_FLOAT_F4E2M1`
This macro maps to the ID of an HDF5 datatype representing a 4-bit floating-point datatype with 1 sign bit, 2 exponent bits and 1 mantissa bit.
diff --git a/release_docs/Cmake_logo.svg b/release_docs/Cmake_logo.svg
deleted file mode 100644
index 42b7be8e518..00000000000
--- a/release_docs/Cmake_logo.svg
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/release_docs/README_HPC.md b/release_docs/README_HPC.md
index 10de30201be..40b7b6913c4 100644
--- a/release_docs/README_HPC.md
+++ b/release_docs/README_HPC.md
@@ -79,7 +79,7 @@ For release or snapshot tar files, extract them to your working directory.
> **Note:** When using the ctest automated build method (Section 4), the source
> directory should be named `hdf5-`, where version uses format `1.xx.xx`
-> or `2.xx.xx`. Use `bin/h5vers` to determine the version string if needed.
+> or `2.xx.xx`. Check `H5_VERS_STR` in `src/H5public.h` to determine the version string if needed.
---
diff --git a/release_docs/RELEASE_PROCESS.md b/release_docs/RELEASE_PROCESS.md
index a263deffee2..49eeb6d92bc 100644
--- a/release_docs/RELEASE_PROCESS.md
+++ b/release_docs/RELEASE_PROCESS.md
@@ -86,15 +86,15 @@ For more information on the HDF5 versioning and backward and forward compatibili
- or create the new branch in GitHub GUI.
4. Check that required CMake files point to the specific versions of the third-party software (szip, zlib and plugins) that they depend on.
- Update as needed.
-5. Change the **support** branch to X.Y.{Z+1}-1 (\1) using the [bin/h5vers][u10] script:
+5. Change the **support** branch to X.Y.{Z+1} by editing [src/H5public.h][u11]:
- `$ git checkout hdf5_X_Y`
- - `$ bin/h5vers -s X.Y.{Z+1}-1;`
+ - Edit `src/H5public.h` to update version defines: `H5_VERS_MAJOR`, `H5_VERS_MINOR`, `H5_VERS_RELEASE`, `H5_VERS_SUBRELEASE`, `H5_VERS_STR`, and `H5_VERS_INFO`
- `$ git commit -m "Updated support branch version number to X.Y.{Z+1}-1"`
- `$ git push`
-6. Change the **release preparation branch**'s version number to X.Y.Z.1 using the [bin/h5vers][u10]/bin/h5vers script:
- - `$ git checkout hdf5_X_Y_Z;`
- - `$ bin/h5vers -s X.Y.Z.1;`
- - `$ git commit -m "Updated release preparation branch version number to X.Y.Z.1"`
+6. Change the **release preparation branch**'s version number to X.Y.Z by editing [src/H5public.h][u11]:
+ - `$ git checkout hdf5_X_Y_Z;`
+ - Edit `src/H5public.h` to update version defines: `H5_VERS_MAJOR`, `H5_VERS_MINOR`, `H5_VERS_RELEASE`, `H5_VERS_SUBRELEASE`, `H5_VERS_STR`, and `H5_VERS_INFO`
+ - `$ git commit -m "Updated release preparation branch version number to X.Y.Z"`
- `$ git push`
7. ** OBSOLETE CURRENTLY **
Update default configuration mode
@@ -178,8 +178,8 @@ For more information on the HDF5 versioning and backward and forward compatibili
3. Update Release Notes in **release** branch (Release Manager)
### 10. Package and Distribute Release (Release Manager)
-1. h5vers could run genparser, which can change the generated files if certain code files have been changed since the files generated by genparser were committed on the release branch. This should be checked by running `git status --ignored;`, then running genparser, then repeating `git status --ignored;`. If there are modified files from either git status command, they should be committed (or deleted if there are backup files or an autom4te.cache directory), and at least minimal testing should be done to see that the software is still good with the changes.
-2. Set version for release, removing the subrelease string, initially `$ bin/h5vers -s X.Y.Z;`. Any subsequent patch releases will need the subrelease number.
+1. Running genparser can change the generated files if certain code files have been changed since the files generated by genparser were committed on the release branch. This should be checked by running `git status --ignored;`, then running genparser, then repeating `git status --ignored;`. If there are modified files from either git status command, they should be committed (or deleted if there are backup files or an autom4te.cache directory), and at least minimal testing should be done to see that the software is still good with the changes.
+2. Set version for release by editing `src/H5public.h`, removing the subrelease string (set `H5_VERS_SUBRELEASE` to `""`). Update `H5_VERS_STR` to `"X.Y.Z"` and `H5_VERS_INFO` to `"HDF5 library version: X.Y.Z"`. Any subsequent patch releases will need the subrelease number.
3. Run `bin/release` (similar to 8.2) and commit all the changed files.
4. Select the actions tab and the release build workflow, then click the 'Run workflow' drop-down.
- Choose the release branch
@@ -224,8 +224,7 @@ For more information on the HDF5 versioning and backward and forward compatibili
[u7]: https://github.com/HDFGroup/hdf5/blob/develop/release_docs/INSTALL_CMake.txt
[u8]: https://github.com/HDFGroup/hdf5/blob/develop/.github/workflows/release.yml
[u9]: https://github.com/HDFGroup/hdf5/blob/develop/config/lt_vers.am
-[u10]: https://github.com/HDFGroup/hdf5/blob/develop/bin/h5vers
-[u11]: https://github.com/HDFGroup/hdf5/blob/develop/src/CMakeLists.txt
+[u11]: https://github.com/HDFGroup/hdf5/blob/develop/src/H5public.h
[u12]: https://github.com/HDFGroup/hdf5/blob/develop/configure.ac
[u13]: https://support.hdfgroup.org/documentation/hdf5/latest/api-compat-macros.html
[u14]: https://github.com/HDFGroup/hdf5/releases/tag/snapshot-1.14
diff --git a/release_docs/img/release-schedule.plantuml b/release_docs/img/release-schedule.plantuml
index 17c1c009a2a..d930f85362f 100644
--- a/release_docs/img/release-schedule.plantuml
+++ b/release_docs/img/release-schedule.plantuml
@@ -10,37 +10,36 @@ projectscale monthly
Project starts 2023-01-01
[1.8] starts 2023-01-01 and lasts 5 weeks
-[1.8.23] happens 2023-01-31
+[1.8.23 (EOL)] happens 2023-01-31
[1.8] is colored in #F76969
[1.10] starts 2023-01-01 and lasts 39 weeks
[1.10.10] happens 2023-03-31
-[1.10.11] happens 2023-09-30
-[1.10.11] displays on same row as [1.10.10]
+[1.10.11 (EOL)] happens 2023-09-30
+[1.10.11 (EOL)] displays on same row as [1.10.10]
[1.10] is colored in #F6DD60
[1.12] starts 2023-01-01 and lasts 48 weeks
-[1.12.3] happens 2023-11-30
+[1.12.3 (EOL)] happens 2023-11-30
[1.12] is colored in #88CCEE
[1.14] starts at 2023-01-01 and lasts 110 weeks
[1.14.1] happens at 2023-04-30
[1.14.2] happens at 2023-08-31
[1.14.3] happens at 2023-10-31
-[1.14.4.2] happens at 2024-04-15
-[1.14.4.3] happens at 2024-05-22
[1.14.5] happens at 2024-09-30
-[1.14.6] happens at 2025-01-30
+[1.14.6 (EOL)] happens at 2025-01-30
[1.14.1] displays on same row as [1.14.1]
[1.14.2] displays on same row as [1.14.1]
[1.14.3] displays on same row as [1.14.1]
-[1.14.4.2] displays on same row as [1.14.1]
-[1.14.5] displays on same row as [1.14.1]
-[1.14.6] displays on same row as [1.14.1]
+[1.14.5] displays on same row as [1.14.1]
+[1.14.6 (EOL)] displays on same row as [1.14.1]
[1.14] is colored in #B187CF
-[2.0] starts at 2024-09-30 and lasts 64 weeks
+[2.0 Active] starts at 2024-09-30 and lasts 85 weeks
[2.0.0] happens at 2025-09-30
-[2.0] is colored in #02BFA0
+[2.1.0] happens at 2026-1-30
+[2.1.0] displays on same row as [2.0.0]
+[2.0 Active] is colored in #02BFA0
@endgantt
\ No newline at end of file
diff --git a/release_docs/img/release-schedule.png b/release_docs/img/release-schedule.png
index 3c7d5290aaa..a8740b1d063 100644
Binary files a/release_docs/img/release-schedule.png and b/release_docs/img/release-schedule.png differ
diff --git a/src/H5public.h b/src/H5public.h
index 9a28f69e11c..b392e7fb828 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -65,23 +65,40 @@
/**
* For minor interface/format changes
*/
-#define H5_VERS_MINOR 0
+#define H5_VERS_MINOR 1
/**
* For tweaks, bug-fixes, or development
*/
-#define H5_VERS_RELEASE 1
+#define H5_VERS_RELEASE 0
/**
* For pre-releases like \c snap0. Empty string for official releases.
*/
+/*
+ * IMPORTANT: This MUST be a string literal (quoted), not an unquoted value.
+ *
+ * Valid: #define H5_VERS_SUBRELEASE ""
+ * Valid: #define H5_VERS_SUBRELEASE "-snap0"
+ * Invalid: #define H5_VERS_SUBRELEASE -snap0
+ *
+ */
#define H5_VERS_SUBRELEASE ""
+
+/* Derived version strings - automatically generated from the above */
/**
- * Short version string
+ * Short version string - automatically derived from H5_VERS_MAJOR/MINOR/RELEASE/SUBRELEASE
+ *
+ * This macro uses C preprocessor string concatenation. The H5_VERS_MAJOR, H5_VERS_MINOR,
+ * and H5_VERS_RELEASE values are stringified and concatenated with dots, then concatenated
+ * with H5_VERS_SUBRELEASE (which must already be a string literal).
*/
-#define H5_VERS_STR "2.0.1"
+#define H5_VERS_STR_HELPER(major, minor, release) #major "." #minor "." #release
+#define H5_VERS_STR_CONCAT(major, minor, release, sub) H5_VERS_STR_HELPER(major, minor, release) sub
+#define H5_VERS_STR H5_VERS_STR_CONCAT(H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE, H5_VERS_SUBRELEASE)
+
/**
- * Full version string
+ * Full version string - automatically derived from H5_VERS_STR
*/
-#define H5_VERS_INFO "HDF5 library version: 2.0.1"
+#define H5_VERS_INFO "HDF5 library version: " H5_VERS_STR
#define H5check() H5check_version(H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE)