mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
Change h5repack low library bound to H5F_LIBVER_V18 (#6352)
This commit is contained in:
@@ -26,7 +26,7 @@ For releases prior to version 2.0.0, please see the release.txt file and for mor
|
||||
|
||||
> [!IMPORTANT]
|
||||
>
|
||||
> - The format of the GitHub tag for HDF5 releases has been changed to Major.Minor.Patch, consistent with the versioning policy change to follow the Semantic Versioning Specification described in this [Wiki page](https://github.com/HDFGroup/hdf5/wiki/HDF5-Version-Numbers-and-Branch-Strategy). The previous tag format hdf5_Major_Minor_Patch that was created in addition for the 2.0.0 and 2.1.0 releases will not be continued.
|
||||
> - The format of the GitHub tag for HDF5 releases has been changed to Major.Minor.Patch, consistent with the versioning policy change to follow the Semantic Versioning Specification described in this [Wiki page](https://github.com/HDFGroup/hdf5/wiki/HDF5-Version-Numbers-and-Branch-Strategy). The previous tag format hdf5_Major_Minor_Patch that was created in addition for the 2.0.0 and 2.1.0 releases will not be continued.
|
||||
> - An RPM package is not provided for this release of HDF5 as an issue with the package was found during testing. The HDF Group is investigating alternative packaging methods for future releases.
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ For releases prior to version 2.0.0, please see the release.txt file and for mor
|
||||
- Java dependency JAR paths are now configurable CMake cache variables, allowing system-provided JARs to be used in place of the bundled copies.
|
||||
|
||||
|
||||
## Acknowledgements:
|
||||
## Acknowledgements:
|
||||
|
||||
We would like to thank the many HDF5 community members who contributed to this release of HDF5.
|
||||
|
||||
@@ -123,6 +123,10 @@ We would like to thank the many HDF5 community members who contributed to this r
|
||||
|
||||
## Tools
|
||||
|
||||
### Default low and high library version bounds in `h5repack` now use the HDF5 library's default
|
||||
|
||||
The `h5repack` tool now obtains its default low and high library version bounds from the HDF5 library's default (`H5P_FILE_ACCESS_DEFAULT`). To revert to the previous behavior, apply the `--low=0` command option.
|
||||
|
||||
### Added `h5sign` tool for signing plugins with RSA digital signatures
|
||||
|
||||
The `h5sign` command-line tool signs HDF5 plugin shared libraries by appending an RSA signature and a 14-byte footer. It supports SHA-256, SHA-384, SHA-512, and their PSS variants, and accepts passphrase-protected private keys. Use `-f` / `--force` to strip an existing signature before re-signing. The tool is built automatically when `HDF5_REQUIRE_SIGNED_PLUGINS` is enabled.
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
* help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include "H5private.h"
|
||||
#include "h5repack.h"
|
||||
#include "H5private.h"
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* File: h5repack.c
|
||||
@@ -70,18 +70,20 @@ h5repack_init(pack_opt_t *options, int verbose, bool latest)
|
||||
int k, n;
|
||||
|
||||
memset(options, 0, sizeof(pack_opt_t));
|
||||
options->min_comp = 0;
|
||||
options->verbose = verbose;
|
||||
options->latest = latest;
|
||||
options->layout_g = H5D_LAYOUT_ERROR;
|
||||
options->low_bound = H5F_LIBVER_EARLIEST;
|
||||
options->high_bound = H5F_LIBVER_LATEST;
|
||||
options->fin_fapl = H5P_DEFAULT;
|
||||
options->fout_fapl = H5P_DEFAULT;
|
||||
options->fin_vol = false;
|
||||
options->fin_vfd = false;
|
||||
options->fout_vol = false;
|
||||
options->fout_vfd = false;
|
||||
options->min_comp = 0;
|
||||
options->verbose = verbose;
|
||||
options->latest = latest;
|
||||
options->layout_g = H5D_LAYOUT_ERROR;
|
||||
if (H5Pget_libver_bounds(H5P_FILE_ACCESS_DEFAULT, &options->low_bound, &options->high_bound) < 0) {
|
||||
error_msg("H5Pget_libver_bounds(H5P_FILE_ACCESS_DEFAULT) failed\n");
|
||||
return -1;
|
||||
}
|
||||
options->fin_fapl = H5P_DEFAULT;
|
||||
options->fout_fapl = H5P_DEFAULT;
|
||||
options->fin_vol = false;
|
||||
options->fin_vfd = false;
|
||||
options->fout_vol = false;
|
||||
options->fout_vfd = false;
|
||||
|
||||
for (n = 0; n < H5_REPACK_MAX_NFILTERS; n++) {
|
||||
options->filter_g[n].filtn = -1;
|
||||
|
||||
@@ -68,10 +68,10 @@
|
||||
* <strong>\--low</strong> and <strong>\--high</strong>
|
||||
* \li <strong>\--low=BOUND</strong> The low bound for library release versions to use
|
||||
* when creating objects in the file
|
||||
* (default is #H5F_LIBVER_EARLIEST)
|
||||
* (default is the HDF5 library's default low bound)
|
||||
* \li <strong>\--high=BOUND</strong> The high bound for library release versions to use
|
||||
* when creating objects in the file
|
||||
* (default is #H5F_LIBVER_LATEST)
|
||||
* (default is the HDF5 library's default high bound)
|
||||
* \li <strong>\--merge</strong> Follow external soft link recursively and merge data
|
||||
* \li <strong>\--prune</strong> Do not follow external soft links and remove link
|
||||
* \li <strong>\--merge \--prune</strong> Follow external link, merge data and remove dangling link
|
||||
|
||||
@@ -91,14 +91,14 @@ static H5FD_onion_fapl_info_t onion_fa_in_g = {
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: usage
|
||||
*
|
||||
* Purpose: print usage
|
||||
* Purpose: Print detailed usage information with explanations for various option values.
|
||||
*
|
||||
* Return: void
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
usage(const char *prog)
|
||||
usage(const char *prog, const pack_opt_t *options)
|
||||
{
|
||||
FLUSHSTREAM(rawoutstream);
|
||||
PRINTSTREAM(rawoutstream, "usage: %s [OPTIONS] file1 file2\n", prog);
|
||||
@@ -160,11 +160,11 @@ usage(const char *prog)
|
||||
PRINTVALSTREAM(rawoutstream,
|
||||
" --low=BOUND The low bound for library release versions to use\n");
|
||||
PRINTVALSTREAM(rawoutstream, " when creating objects in the file\n");
|
||||
PRINTVALSTREAM(rawoutstream, " (default is H5F_LIBVER_EARLIEST)\n");
|
||||
PRINTSTREAM(rawoutstream, " (default is %d)\n", (int)options->low_bound);
|
||||
PRINTVALSTREAM(rawoutstream,
|
||||
" --high=BOUND The high bound for library release versions to use\n");
|
||||
PRINTVALSTREAM(rawoutstream, " when creating objects in the file\n");
|
||||
PRINTVALSTREAM(rawoutstream, " (default is H5F_LIBVER_LATEST)\n");
|
||||
PRINTSTREAM(rawoutstream, " (default is %d)\n", (int)options->high_bound);
|
||||
PRINTVALSTREAM(rawoutstream,
|
||||
" --merge Follow external soft link recursively and merge data\n");
|
||||
PRINTVALSTREAM(rawoutstream,
|
||||
@@ -558,7 +558,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
usage(h5tools_getprogname());
|
||||
usage(h5tools_getprogname(), options);
|
||||
h5tools_setstatus(EXIT_SUCCESS);
|
||||
ret_value = 1;
|
||||
goto done;
|
||||
@@ -872,21 +872,21 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
|
||||
|
||||
if (!strcmp(infile, outfile)) {
|
||||
error_msg("file names cannot be the same\n");
|
||||
usage(h5tools_getprogname());
|
||||
usage(h5tools_getprogname(), options);
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
ret_value = -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
error_msg("file names missing\n");
|
||||
usage(h5tools_getprogname());
|
||||
usage(h5tools_getprogname(), options);
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
ret_value = -1;
|
||||
}
|
||||
}
|
||||
else if (has_i != 1 || has_o != 1) {
|
||||
error_msg("filenames must be either both -i -o or both positional\n");
|
||||
usage(h5tools_getprogname());
|
||||
usage(h5tools_getprogname(), options);
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
ret_value = -1;
|
||||
}
|
||||
@@ -898,7 +898,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
|
||||
onion_fa_in_g.revision_num = strtoull(in_vfd_info.info, NULL, 10);
|
||||
if (errno == ERANGE) {
|
||||
printf("Invalid onion revision specified for the input file\n");
|
||||
usage(h5tools_getprogname());
|
||||
usage(h5tools_getprogname(), options);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ Free-space section bins:
|
||||
File space management strategy: H5F_FSPACE_STRATEGY_AGGR
|
||||
File space page size: 512 bytes
|
||||
Summary of file space information:
|
||||
File metadata: 1272 bytes
|
||||
File metadata: 1619 bytes
|
||||
Raw data: 400 bytes
|
||||
Amount/Percent of tracked free space: 0 bytes/0.0%
|
||||
Unaccounted space: 776 bytes
|
||||
Total space: 2448 bytes
|
||||
Unaccounted space: 967 bytes
|
||||
Total space: 2986 bytes
|
||||
|
||||
@@ -8,8 +8,8 @@ Free-space section bins:
|
||||
File space management strategy: H5F_FSPACE_STRATEGY_AGGR
|
||||
File space page size: 4096 bytes
|
||||
Summary of file space information:
|
||||
File metadata: 1272 bytes
|
||||
File metadata: 1619 bytes
|
||||
Raw data: 400 bytes
|
||||
Amount/Percent of tracked free space: 0 bytes/0.0%
|
||||
Unaccounted space: 776 bytes
|
||||
Total space: 2448 bytes
|
||||
Unaccounted space: 967 bytes
|
||||
Total space: 2986 bytes
|
||||
|
||||
@@ -9,8 +9,8 @@ Free-space section bins:
|
||||
File space management strategy: H5F_FSPACE_STRATEGY_PAGE
|
||||
File space page size: 4096 bytes
|
||||
Summary of file space information:
|
||||
File metadata: 1602 bytes
|
||||
File metadata: 1949 bytes
|
||||
Raw data: 400 bytes
|
||||
Amount/Percent of tracked free space: 6190 bytes/75.6%
|
||||
Amount/Percent of tracked free space: 5843 bytes/71.3%
|
||||
Unaccounted space: 0 bytes
|
||||
Total space: 8192 bytes
|
||||
|
||||
@@ -8,8 +8,8 @@ Free-space section bins:
|
||||
File space management strategy: H5F_FSPACE_STRATEGY_NONE
|
||||
File space page size: 4096 bytes
|
||||
Summary of file space information:
|
||||
File metadata: 1272 bytes
|
||||
File metadata: 1619 bytes
|
||||
Raw data: 400 bytes
|
||||
Amount/Percent of tracked free space: 0 bytes/0.0%
|
||||
Unaccounted space: 0 bytes
|
||||
Total space: 1672 bytes
|
||||
Total space: 2019 bytes
|
||||
|
||||
@@ -9,8 +9,8 @@ Free-space section bins:
|
||||
File space management strategy: H5F_FSPACE_STRATEGY_FSM_AGGR
|
||||
File space page size: 4096 bytes
|
||||
Summary of file space information:
|
||||
File metadata: 1485 bytes
|
||||
File metadata: 1832 bytes
|
||||
Raw data: 400 bytes
|
||||
Amount/Percent of tracked free space: 563 bytes/23.0%
|
||||
Amount/Percent of tracked free space: 216 bytes/8.8%
|
||||
Unaccounted space: 0 bytes
|
||||
Total space: 2448 bytes
|
||||
|
||||
@@ -8,8 +8,8 @@ Free-space section bins:
|
||||
File space management strategy: H5F_FSPACE_STRATEGY_PAGE
|
||||
File space page size: 2048 bytes
|
||||
Summary of file space information:
|
||||
File metadata: 1272 bytes
|
||||
File metadata: 1619 bytes
|
||||
Raw data: 400 bytes
|
||||
Amount/Percent of tracked free space: 0 bytes/0.0%
|
||||
Unaccounted space: 2424 bytes
|
||||
Unaccounted space: 2077 bytes
|
||||
Total space: 4096 bytes
|
||||
|
||||
@@ -40,10 +40,10 @@ usage: h5repack [OPTIONS] file1 file2
|
||||
--low and --high
|
||||
--low=BOUND The low bound for library release versions to use
|
||||
when creating objects in the file
|
||||
(default is H5F_LIBVER_EARLIEST)
|
||||
(default is 1)
|
||||
--high=BOUND The high bound for library release versions to use
|
||||
when creating objects in the file
|
||||
(default is H5F_LIBVER_LATEST)
|
||||
(default is 5)
|
||||
--merge Follow external soft link recursively and merge data
|
||||
--prune Do not follow external soft links and remove link
|
||||
--merge --prune Follow external link, merge data and remove dangling link
|
||||
|
||||
@@ -63,7 +63,7 @@ GROUP "/" {
|
||||
STORAGE_LAYOUT {
|
||||
CONTIGUOUS
|
||||
SIZE 3200
|
||||
OFFSET 13696
|
||||
OFFSET 11648
|
||||
}
|
||||
FILTERS {
|
||||
NONE
|
||||
@@ -118,7 +118,7 @@ GROUP "/" {
|
||||
STORAGE_LAYOUT {
|
||||
CONTIGUOUS
|
||||
SIZE 3200
|
||||
OFFSET 26184
|
||||
OFFSET 26480
|
||||
}
|
||||
FILTERS {
|
||||
NONE
|
||||
|
||||
Reference in New Issue
Block a user