From d2abe55ac035c63f0c2ee774c2b146c827cf9a33c4724ccaac3c367d842a9b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 13:31:58 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main hdf5 revision 2b2c4d975fc4e3ab2e2093b936dc59fd --- .gitattributes | 23 + ...ing-on-disk-attribute-data-size-2459.patch | 66 + ...types-may-not-have-members-of-size-0.patch | 51 + Disable-phdf5-tests.patch | 36 + ...e-but-the-link-information-is-parsed.patch | 26 + ...tent_dims-does-not-exceed-array-size.patch | 33 + ...more-resilient-to-out-of-bounds-read.patch | 85 ++ ...eds-to-have-same-size-as-enum-itself.patch | 35 + ...more-resilient-to-out-of-bounds-read.patch | 76 + Hot-fix-for-CVE-2020-10812.patch | 43 + ...-external-links-has-at-least-3-bytes.patch | 34 + PPC64LE-Fix-long-double-handling.patch | 92 ++ ...requested-elements-are-within-bounds.patch | 258 ++++ Remove-duplicate-code.patch | 28 + ...-of-chunked-storage-in-data-layout-2.patch | 48 + ...-accumulated-metadata-when-comparing.patch | 96 ++ ...o-block-NULL-the-corresponding-entry.patch | 31 + _constraints | 10 + _multibuild | 9 + hdf5-1.12.2.tar.bz2 | 3 + hdf5-1.8.10-tests-arm.patch | 12 + hdf5-1.8.11-abort_unknown_host_config.patch | 26 + hdf5-LD_LIBRARY_PATH.patch | 22 + hdf5-Remove-timestamps-from-binaries.patch | 39 + hdf5-mpi.patch | 30 + hdf5-wrappers.patch | 109 ++ hdf5.changes | 1302 +++++++++++++++++ hdf5.spec | 945 ++++++++++++ so_versions | 6 + update_so_version.sh | 64 + 30 files changed, 3638 insertions(+) create mode 100644 .gitattributes create mode 100644 Check-for-overflow-when-calculating-on-disk-attribute-data-size-2459.patch create mode 100644 Compound-datatypes-may-not-have-members-of-size-0.patch create mode 100644 Disable-phdf5-tests.patch create mode 100644 Fix-error-message-not-the-name-but-the-link-information-is-parsed.patch create mode 100644 H5IMget_image_info-H5Sget_simple_extent_dims-does-not-exceed-array-size.patch create mode 100644 H5O__pline_decode-Make-more-resilient-to-out-of-bounds-read.patch create mode 100644 H5O_dtype_decode_helper-Parent-of-enum-needs-to-have-same-size-as-enum-itself.patch create mode 100644 H5O_fsinfo_decode-Make-more-resilient-to-out-of-bounds-read.patch create mode 100644 Hot-fix-for-CVE-2020-10812.patch create mode 100644 Make-sure-info-block-for-external-links-has-at-least-3-bytes.patch create mode 100644 PPC64LE-Fix-long-double-handling.patch create mode 100644 Pass-compact-chunk-size-info-to-ensure-requested-elements-are-within-bounds.patch create mode 100644 Remove-duplicate-code.patch create mode 100644 Report-error-if-dimensions-of-chunked-storage-in-data-layout-2.patch create mode 100644 Validate-location-offset-of-the-accumulated-metadata-when-comparing.patch create mode 100644 When-evicting-driver-info-block-NULL-the-corresponding-entry.patch create mode 100644 _constraints create mode 100644 _multibuild create mode 100644 hdf5-1.12.2.tar.bz2 create mode 100644 hdf5-1.8.10-tests-arm.patch create mode 100644 hdf5-1.8.11-abort_unknown_host_config.patch create mode 100644 hdf5-LD_LIBRARY_PATH.patch create mode 100644 hdf5-Remove-timestamps-from-binaries.patch create mode 100644 hdf5-mpi.patch create mode 100644 hdf5-wrappers.patch create mode 100644 hdf5.changes create mode 100644 hdf5.spec create mode 100644 so_versions create mode 100644 update_so_version.sh diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/Check-for-overflow-when-calculating-on-disk-attribute-data-size-2459.patch b/Check-for-overflow-when-calculating-on-disk-attribute-data-size-2459.patch new file mode 100644 index 0000000..caeb187 --- /dev/null +++ b/Check-for-overflow-when-calculating-on-disk-attribute-data-size-2459.patch @@ -0,0 +1,66 @@ +From: Egbert Eich +Date: Sat Feb 11 13:54:17 2023 +0100 +Subject: Check for overflow when calculating on-disk attribute data size (#2459) +Patch-mainline: Not yet +Git-repo: https://github.com/HDFGroup/hdf5 +Git-commit: 0d026daa13a81be72495872f651c036fdc84ae5e +References: + +A bogus hdf5 file may contain dataspace messages with sizes +which lead to the on-disk data sizes to exceed what is addressable. +When calculating the size, make sure, the multiplication does not +overflow. +The test case was crafted in a way that the overflow caused the +size to be 0. + +This fixes CVE-2021-37501 / Bug #2458. + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + src/H5Oattr.c | 3 +++ + src/H5private.h | 18 ++++++++++++++++++ + 2 files changed, 21 insertions(+) +diff --git a/src/H5Oattr.c b/src/H5Oattr.c +index 4dee7aa187..3ef0b99aa4 100644 +--- a/src/H5Oattr.c ++++ b/src/H5Oattr.c +@@ -235,6 +235,9 @@ H5O_attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, un + + /* Compute the size of the data */ + H5_CHECKED_ASSIGN(attr->shared->data_size, size_t, ds_size * (hsize_t)dt_size, hsize_t); ++ H5_CHECK_MUL_OVERFLOW(attr->shared->data_size, ds_size, dt_size, ++ HGOTO_ERROR(H5E_RESOURCE, H5E_OVERFLOW, NULL, ++ "data size exceeds addressable range")) + + /* Go get the data */ + if (attr->shared->data_size) { +diff --git a/src/H5private.h b/src/H5private.h +index 931d7b9046..a115aee1a4 100644 +--- a/src/H5private.h ++++ b/src/H5private.h +@@ -1605,6 +1605,24 @@ H5_DLL int HDvasprintf(char **bufp, const char *fmt, va_list _ap); + #define H5_CHECK_OVERFLOW(var, vartype, casttype) + #endif /* NDEBUG */ + ++/* ++ * A macro for checking whether a multiplication has overflown ++ * r is assumed to be the result of a prior multiplication of a and b ++ */ ++#define H5_CHECK_MUL_OVERFLOW(r, a, b, err) \ ++ { \ ++ bool mul_overflow = false; \ ++ if (r != 0) { \ ++ if (r / a != b) \ ++ mul_overflow = true; \ ++ } else { \ ++ if (a != 0 && b != 0) \ ++ mul_overflow = true; \ ++ } \ ++ if (mul_overflow) \ ++ err \ ++ } ++ + /* + * A macro for detecting over/under-flow when assigning between types + */ diff --git a/Compound-datatypes-may-not-have-members-of-size-0.patch b/Compound-datatypes-may-not-have-members-of-size-0.patch new file mode 100644 index 0000000..12156d1 --- /dev/null +++ b/Compound-datatypes-may-not-have-members-of-size-0.patch @@ -0,0 +1,51 @@ +From: Egbert Eich +Date: Wed Oct 5 15:47:54 2022 +0200 +Subject: Compound datatypes may not have members of size 0 +Patch-mainline: Not yet +Git-repo: ssh://eich@192.168.122.1:/home/eich/sources/HPC/hdf5 +Git-commit: 88ea94d38fdfecba173dbea18502a5f82a46601b +References: + +A member size of 0 may lead to an FPE later on as reported in +CVE-2021-46244. To avoid this, check for this as soon as the +member is decoded. +This should probably be done in H5O_dtype_decode_helper() already, +however it is not clear whether all sizes are expected to be != 0. +This fixes CVE-2021-46244. + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + src/H5Odtype.c | 6 ++++++ + src/H5T.c | 2 ++ + 2 files changed, 8 insertions(+) +diff --git a/src/H5Odtype.c b/src/H5Odtype.c +index 9af79f4e9a..d35fc65322 100644 +--- a/src/H5Odtype.c ++++ b/src/H5Odtype.c +@@ -333,6 +333,12 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t + H5MM_xfree(dt->shared->u.compnd.memb); + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode member type") + } /* end if */ ++ if (temp_type->shared->size == 0) { ++ for (j = 0; j <= i; j++) ++ H5MM_xfree(dt->shared->u.compnd.memb[j].name); ++ H5MM_xfree(dt->shared->u.compnd.memb); ++ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "invalid field size in member type") ++ } + + /* Upgrade the version if we can and it is necessary */ + if (can_upgrade && temp_type->shared->version > version) { +diff --git a/src/H5T.c b/src/H5T.c +index 3bb220ac26..04b96c5676 100644 +--- a/src/H5T.c ++++ b/src/H5T.c +@@ -3591,6 +3591,8 @@ H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo + if (new_dt->shared->u.compnd.memb[i].type->shared->size != + old_dt->shared->u.compnd.memb[old_match].type->shared->size) { + /* Adjust the size of the member */ ++ if (old_dt->shared->u.compnd.memb[old_match].size == 0) ++ HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid field size in datatype") + new_dt->shared->u.compnd.memb[i].size = + (old_dt->shared->u.compnd.memb[old_match].size * tmp->shared->size) / + old_dt->shared->u.compnd.memb[old_match].type->shared->size; diff --git a/Disable-phdf5-tests.patch b/Disable-phdf5-tests.patch new file mode 100644 index 0000000..9415959 --- /dev/null +++ b/Disable-phdf5-tests.patch @@ -0,0 +1,36 @@ +From: Egbert Eich +Date: Sat Nov 17 20:11:13 2018 +0100 +Subject: Disable phdf5 tests +Patch-mainline: never +Git-commit: 16d758d17d9c49ab9e34d510675929b9ccc8be5a +References: + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- +Index: hdf5-1.12.2/testpar/CMakeTests.cmake +=================================================================== +--- hdf5-1.12.2.orig/testpar/CMakeTests.cmake ++++ hdf5-1.12.2/testpar/CMakeTests.cmake +@@ -43,7 +43,7 @@ foreach (skiptest ${SKIP_tests}) + set (SKIP_testphdf5 "${SKIP_testphdf5};-x;${skiptest}") + endforeach () + +-add_test (NAME MPI_TEST_testphdf5 COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS} ${SKIP_testphdf5}) ++##add_test (NAME MPI_TEST_testphdf5 COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS} ${SKIP_testphdf5}) + set_tests_properties (MPI_TEST_testphdf5 PROPERTIES + FIXTURES_REQUIRED par_clear_testphdf5 + ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_PAR_BINARY_DIR}" +Index: hdf5-1.12.2/testpar/Makefile.am +=================================================================== +--- hdf5-1.12.2.orig/testpar/Makefile.am ++++ hdf5-1.12.2/testpar/Makefile.am +@@ -30,7 +30,7 @@ check_SCRIPTS = $(TEST_SCRIPT_PARA) + + # Test programs. These are our main targets. + # +-TEST_PROG_PARA=t_mpi t_bigio testphdf5 t_cache t_cache_image t_pread t_pshutdown t_prestart t_init_term t_shapesame t_filters_parallel t_2Gio ++TEST_PROG_PARA=t_mpi t_bigio t_cache t_cache_image t_pread t_pshutdown t_prestart t_init_term t_shapesame t_filters_parallel t_2Gio + + # t_pflush1 and t_pflush2 are used by testpflush.sh + check_PROGRAMS = $(TEST_PROG_PARA) t_pflush1 t_pflush2 diff --git a/Fix-error-message-not-the-name-but-the-link-information-is-parsed.patch b/Fix-error-message-not-the-name-but-the-link-information-is-parsed.patch new file mode 100644 index 0000000..98b5728 --- /dev/null +++ b/Fix-error-message-not-the-name-but-the-link-information-is-parsed.patch @@ -0,0 +1,26 @@ +From: Egbert Eich +Date: Sun Oct 9 08:08:24 2022 +0200 +Subject: Fix error message: not the name but the link information is parsed +Patch-mainline: Not yet +Git-repo: ssh://eich@192.168.122.1:/home/eich/sources/HPC/hdf5 +Git-commit: 7b0b8bc5703ace47aec51d7f60c1149cd3e383b1 +References: + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + src/H5Olink.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/src/H5Olink.c b/src/H5Olink.c +index 51c44a36b0..ee2a413dc1 100644 +--- a/src/H5Olink.c ++++ b/src/H5Olink.c +@@ -245,7 +245,7 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE + /* Make sure that length doesn't exceed buffer size, which could + occur when the file is corrupted */ + if (p + len > p_end) +- HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "name length causes read past end of buffer") ++ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "link information length causes read past end of buffer") + + if (NULL == (lnk->u.ud.udata = H5MM_malloc((size_t)len))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") diff --git a/H5IMget_image_info-H5Sget_simple_extent_dims-does-not-exceed-array-size.patch b/H5IMget_image_info-H5Sget_simple_extent_dims-does-not-exceed-array-size.patch new file mode 100644 index 0000000..ebfde53 --- /dev/null +++ b/H5IMget_image_info-H5Sget_simple_extent_dims-does-not-exceed-array-size.patch @@ -0,0 +1,33 @@ +From: Egbert Eich +Date: Tue Sep 27 10:29:56 2022 +0200 +Subject: H5IMget_image_info: H5Sget_simple_extent_dims() does not exceed array size +Patch-mainline: Not yet +Git-repo: ssh://eich@192.168.122.1:/home/eich/sources/HPC/hdf5 +Git-commit: c1baab0937c8956a15efc41240f68d573c7b7324 +References: + +Malformed hdf5 files may provide more dimensions than the array dim[] is +able to hold. Check number of elements first by calling +H5Sget_simple_extent_dims() with NULL for both 'dims' and 'maxdims' arguments. +This will cause the function to return only the number of dimensions. + +This fixes CVE-2018-17439 + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + hl/src/H5IM.c | 2 ++ + 1 file changed, 2 insertions(+) +diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c +index ff10d573c7..e37c696e25 100644 +--- a/hl/src/H5IM.c ++++ b/hl/src/H5IM.c +@@ -283,6 +283,8 @@ H5IMget_image_info(hid_t loc_id, const char *dset_name, hsize_t *width, hsize_t + if ((sid = H5Dget_space(did)) < 0) + goto out; + ++ if (H5Sget_simple_extent_dims(sid, NULL, NULL) > IMAGE24_RANK) ++ goto out; + /* Get dimensions */ + if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0) + goto out; diff --git a/H5O__pline_decode-Make-more-resilient-to-out-of-bounds-read.patch b/H5O__pline_decode-Make-more-resilient-to-out-of-bounds-read.patch new file mode 100644 index 0000000..2ab5ccd --- /dev/null +++ b/H5O__pline_decode-Make-more-resilient-to-out-of-bounds-read.patch @@ -0,0 +1,85 @@ +From: Egbert Eich +Date: Tue Oct 4 23:09:01 2022 +0200 +Subject: H5O__pline_decode() Make more resilient to out-of-bounds read +Patch-mainline: Not yet +Git-repo: ssh://eich@192.168.122.1:/home/eich/sources/HPC/hdf5 +Git-commit: 35b798ca7542ce45ef016859b8e70d57b7f89cfe +References: + +Malformed hdf5 files may have trunkated content which does not match +the expected size. This function attempts to decode these it will read +past the end of the allocated space which may lead to a crash. Make sure +each element is within bounds before reading. + +This fixes CVE-2019-8396. + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + src/H5Opline.c | 17 +++++++++++++++-- + src/H5private.h | 3 +++ + 2 files changed, 18 insertions(+), 2 deletions(-) +diff --git a/src/H5Opline.c b/src/H5Opline.c +index ffc4557ffc..a532aa4512 100644 +--- a/src/H5Opline.c ++++ b/src/H5Opline.c +@@ -110,6 +110,14 @@ H5FL_DEFINE(H5O_pline_t); + * + *------------------------------------------------------------------------- + */ ++static char err[] = "ran off the end of the buffer: current p = %p, p_end = %p"; ++ ++#define VERIFY_LIMIT(p,s,l) \ ++ if (p + s - 1 > l) { \ ++ HCOMMON_ERROR(H5E_RESOURCE, H5E_NOSPACE, err, p + s, l); \ ++ HGOTO_DONE(NULL) \ ++ }; ++ + static void * + H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, + unsigned H5_ATTR_UNUSED *ioflags, size_t p_size, const uint8_t *p) +@@ -159,6 +167,7 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign + /* Decode filters */ + for (i = 0, filter = &pline->filter[0]; i < pline->nused; i++, filter++) { + /* Filter ID */ ++ VERIFY_LIMIT(p, 6, p_end) /* 6 bytes minimum */ + UINT16DECODE(p, filter->id); + + /* Length of filter name */ +@@ -168,6 +177,7 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign + UINT16DECODE(p, name_length); + if (pline->version == H5O_PLINE_VERSION_1 && name_length % 8) + HGOTO_ERROR(H5E_PLINE, H5E_CANTLOAD, NULL, "filter name length is not a multiple of eight") ++ VERIFY_LIMIT(p, 4, p_end) /* with name_length 4 bytes to go */ + } /* end if */ + + /* Filter flags */ +@@ -179,9 +189,12 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign + /* Filter name, if there is one */ + if (name_length) { + size_t actual_name_length; /* Actual length of name */ +- ++ size_t len = (size_t)(p_end - p + 1); + /* Determine actual name length (without padding, but with null terminator) */ +- actual_name_length = HDstrlen((const char *)p) + 1; ++ actual_name_length = HDstrnlen((const char *)p, len); ++ if (actual_name_length == len) ++ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "filter name not null terminated") ++ actual_name_length += 1; /* include \0 byte */ + HDassert(actual_name_length <= name_length); + + /* Allocate space for the filter name, or use the internal buffer */ +diff --git a/src/H5private.h b/src/H5private.h +index bc00f120d2..3285c36441 100644 +--- a/src/H5private.h ++++ b/src/H5private.h +@@ -1485,6 +1485,9 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation); + #ifndef HDstrlen + #define HDstrlen(S) strlen(S) + #endif ++#ifndef HDstrnlen ++#define HDstrnlen(S,L) strnlen(S,L) ++#endif + #ifndef HDstrncat + #define HDstrncat(X, Y, Z) strncat(X, Y, Z) + #endif diff --git a/H5O_dtype_decode_helper-Parent-of-enum-needs-to-have-same-size-as-enum-itself.patch b/H5O_dtype_decode_helper-Parent-of-enum-needs-to-have-same-size-as-enum-itself.patch new file mode 100644 index 0000000..4cef941 --- /dev/null +++ b/H5O_dtype_decode_helper-Parent-of-enum-needs-to-have-same-size-as-enum-itself.patch @@ -0,0 +1,35 @@ +From: Egbert Eich +Date: Wed Sep 28 14:54:58 2022 +0200 +Subject: H5O_dtype_decode_helper: Parent of enum needs to have same size as enum itself +Patch-mainline: Not yet +Git-repo: ssh://eich@192.168.122.1:/home/eich/sources/HPC/hdf5 +Git-commit: d39a27113ef75058f236b0606a74b4af5767c4e7 +References: + +The size of the enumeration values is determined by the size of the parent. +Functions accessing the enumeration values use the size of the enumartion +to determine the size of each element and how much data to copy. Thus the +size of the enumeration and its parent need to match. +Check here to avoid unpleasant surprises later. + +This fixes CVE-2018-14031. + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + src/H5Odtype.c | 3 +++ + 1 file changed, 3 insertions(+) +diff --git a/src/H5Odtype.c b/src/H5Odtype.c +index 9af79f4e9a..dc2b904362 100644 +--- a/src/H5Odtype.c ++++ b/src/H5Odtype.c +@@ -472,6 +472,9 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t + if (H5O__dtype_decode_helper(ioflags, pp, dt->shared->parent) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode parent datatype") + ++ if (dt->shared->parent->shared->size != dt->shared->size) ++ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "ENUM size does not match parent") ++ + /* Check if the parent of this enum has a version greater than the + * enum itself. */ + H5O_DTYPE_CHECK_VERSION(dt, version, dt->shared->parent->shared->version, ioflags, "enum", FAIL) diff --git a/H5O_fsinfo_decode-Make-more-resilient-to-out-of-bounds-read.patch b/H5O_fsinfo_decode-Make-more-resilient-to-out-of-bounds-read.patch new file mode 100644 index 0000000..70849d2 --- /dev/null +++ b/H5O_fsinfo_decode-Make-more-resilient-to-out-of-bounds-read.patch @@ -0,0 +1,76 @@ +From: Egbert Eich +Date: Wed Oct 5 07:17:24 2022 +0200 +Subject: H5O_fsinfo_decode() Make more resilient to out-of-bounds read +Patch-mainline: Not yet +Git-repo: ssh://eich@192.168.122.1:/home/eich/sources/HPC/hdf5 +Git-commit: 8aee14b3a19858a08e3fabdef6ff925b47d4ce2c +References: + +Malformed hdf5 files may have trunkated content which does not match +the expected size. This function attempts to decode these it will read +past the end of the allocated space which may lead to a crash. Make sure +each element is within bounds before reading. + +This fixes CVE-2021-45830. + +Signed-off-by: Egbert Eich +Additions +Signed-off-by: Egbert Eich +--- + src/H5Ofsinfo.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) +diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c +index 9f6514a291..15cbb5ae7b 100644 +--- a/src/H5Ofsinfo.c ++++ b/src/H5Ofsinfo.c +@@ -88,6 +88,13 @@ H5FL_DEFINE_STATIC(H5O_fsinfo_t); + * + *------------------------------------------------------------------------- + */ ++static char err[] = "ran off end of input buffer while decoding"; ++#define VERIFY_LIMIT(p,s,l) \ ++ if (p + s - 1 > l) { \ ++ HCOMMON_ERROR(H5E_RESOURCE, H5E_NOSPACE, err); \ ++ HGOTO_DONE(NULL) \ ++ } ++ + static void * + H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, + unsigned H5_ATTR_UNUSED *ioflags, size_t p_size, const uint8_t *p) +@@ -112,6 +119,7 @@ H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU + fsinfo->fs_addr[ptype - 1] = HADDR_UNDEF; + + /* Version of message */ ++ VERIFY_LIMIT(p,1,p_end) + vers = *p++; + + if (vers == H5O_FSINFO_VERSION_0) { +@@ -125,6 +133,7 @@ H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU + fsinfo->pgend_meta_thres = H5F_FILE_SPACE_PGEND_META_THRES; + fsinfo->eoa_pre_fsm_fsalloc = HADDR_UNDEF; + ++ VERIFY_LIMIT(p, 1 + H5F_SIZEOF_SIZE(f), p_end); + strategy = (H5F_file_space_type_t)*p++; /* File space strategy */ + H5F_DECODE_LENGTH(f, p, threshold); /* Free-space section threshold */ + +@@ -170,6 +179,7 @@ H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU + HDassert(vers >= H5O_FSINFO_VERSION_1); + + fsinfo->version = vers; ++ VERIFY_LIMIT(p, 1 + 1 + 2 * H5F_SIZEOF_SIZE(f) + 2 + H5F_SIZEOF_ADDR(f), p_end); + fsinfo->strategy = (H5F_fspace_strategy_t)*p++; /* File space strategy */ + fsinfo->persist = *p++; /* Free-space persist or not */ + H5F_DECODE_LENGTH(f, p, fsinfo->threshold); /* Free-space section threshold */ +@@ -181,9 +191,11 @@ H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU + + /* Decode addresses of free space managers, if persisting */ + if (fsinfo->persist) +- for (ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; ptype++) ++ for (ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; ptype++) { ++ VERIFY_LIMIT(p, H5F_SIZEOF_SIZE(f), p_end); + H5F_addr_decode(f, &p, &(fsinfo->fs_addr[ptype - 1])); + ++ } + fsinfo->mapped = FALSE; + } + diff --git a/Hot-fix-for-CVE-2020-10812.patch b/Hot-fix-for-CVE-2020-10812.patch new file mode 100644 index 0000000..dc75465 --- /dev/null +++ b/Hot-fix-for-CVE-2020-10812.patch @@ -0,0 +1,43 @@ +From: Egbert Eich +Date: Wed Oct 5 09:44:02 2022 +0200 +Subject: Hot fix for CVE-2020-10812 +Patch-mainline: Not yet +Git-repo: ssh://eich@192.168.122.1:/home/eich/sources/HPC/hdf5 +Git-commit: 2465fc41d208d57eb0d7d025286a81664148fbaf +References: + +CVE-2020-10812 unveils a more fundamental design flaw in H5F__dest(): +this function returns FAIL if one of multiple operations fail (in this +case H5AC_prep_for_file_close()) while it still proceeds to prepare the +close operation, free the 'shared' member in struct H5F_t and ulimately +deallocate the structure itself. +When H5F__dest() signals back FAIL to the caller, the caller itself +(H5F_try_close() in this case) will fail. This failure is signalled +up the stack, thus the file will not be considered closed and another +attempt will be made to close it - latest in the exit handler. +The next attempt to close will however need the already deallocated +H5F_t structure and the H5T_shared_t structure in its 'shared' member, +however. +This fix papers over the failure of H5AC_prep_for_file_close() by not +changing the return status of H5F__dest() to fail. There are numerous +other opportunities where this will happen. +This may call for a more fundamental solution. + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + src/H5Fint.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/src/H5Fint.c b/src/H5Fint.c +index 9b5613972f..01faf33495 100644 +--- a/src/H5Fint.c ++++ b/src/H5Fint.c +@@ -1413,7 +1413,7 @@ H5F__dest(H5F_t *f, hbool_t flush) + */ + if (H5AC_prep_for_file_close(f) < 0) + /* Push error, but keep going */ +- HDONE_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "metadata cache prep for close failed") ++ HDONE_ERROR(H5E_FILE, H5E_CANTFLUSH, ret_value, "metadata cache prep for close failed") + + /* Flush at this point since the file will be closed (phase 2). + * Only try to flush the file if it was opened with write access, and if diff --git a/Make-sure-info-block-for-external-links-has-at-least-3-bytes.patch b/Make-sure-info-block-for-external-links-has-at-least-3-bytes.patch new file mode 100644 index 0000000..ed21de6 --- /dev/null +++ b/Make-sure-info-block-for-external-links-has-at-least-3-bytes.patch @@ -0,0 +1,34 @@ +From: Egbert Eich +Date: Sun Oct 9 08:07:23 2022 +0200 +Subject: Make sure info block for external links has at least 3 bytes +Patch-mainline: Not yet +Git-repo: ssh://eich@192.168.122.1:/home/eich/sources/HPC/hdf5 +Git-commit: 082bfe392b04b1137da9eabd1ecac76c212ab385 +References: + +According to the specification, the information block for external links +contains 1 byte of version/flag information and two 0 terminated strings +for the object linked to and the full path. +Although not very useful, the minimum string length for each would be one +byte. + +This fixes CVE-2018-16438. + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + src/H5Olink.c | 2 ++ + 1 file changed, 2 insertions(+) +diff --git a/src/H5Olink.c b/src/H5Olink.c +index 51c44a36b0..074744b022 100644 +--- a/src/H5Olink.c ++++ b/src/H5Olink.c +@@ -241,6 +241,8 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE + /* A UD link. Get the user-supplied data */ + UINT16DECODE(p, len) + lnk->u.ud.size = len; ++ if (lnk->type == H5L_TYPE_EXTERNAL && len < 3) ++ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "external link information lenght < 3") + if (len > 0) { + /* Make sure that length doesn't exceed buffer size, which could + occur when the file is corrupted */ diff --git a/PPC64LE-Fix-long-double-handling.patch b/PPC64LE-Fix-long-double-handling.patch new file mode 100644 index 0000000..ea16232 --- /dev/null +++ b/PPC64LE-Fix-long-double-handling.patch @@ -0,0 +1,92 @@ +From: Egbert Eich +Date: Tue Nov 7 14:16:53 2017 +0100 +Subject: [PATCH]PPC64LE: Fix long double handling +Git-commit: ad6559a71b7ba3cacb4b56d4747db63f28a12f55 +References: +Signed-off-by: Egbert Eich + +Signed-off-by: Egbert Eich +--- + hdf5-1.10.1/config/cmake/ConversionTests.c | 16 ++++++++++++++++ + hdf5-1.10.1/test/dt_arith.c | 26 ++++++++++++++++++++++++-- + 2 files changed, 40 insertions(+), 2 deletions(-) + +Index: hdf5-1.12.2/config/cmake/ConversionTests.c +=================================================================== +--- hdf5-1.12.2.orig/config/cmake/ConversionTests.c ++++ hdf5-1.12.2/config/cmake/ConversionTests.c +@@ -34,6 +34,14 @@ int HDF_NO_UBSAN main(void) + unsigned char s2[8]; + int ret = 1; + ++#if defined __powerpc64__ && defined _LITTLE_ENDIAN ++ /* Don't bother checking on ppc64le, we know it'll work, and ++ that what hdf5 calls 'special algorithm' simply is ++ IBM ldouble 128 (i.e. two seperately scaled doubles). ++ The check below assumes big endian. */ ++ ret = 0; ++#endif ++ + if(sizeof(long double) == 16 && sizeof(long) == 8) { + /*make sure the long double type has 16 bytes in size and + * 11 bits of exponent. If it is, +@@ -157,6 +165,14 @@ int HDF_NO_UBSAN main(void) + unsigned char s[16]; + int ret = 0; + ++#if defined __powerpc64__ && defined _LITTLE_ENDIAN ++ /* Don't bother checking on ppc64le, we know it'll work, and ++ that what hdf5 calls 'special algorithm' simply is ++ IBM ldouble 128 (i.e. two seperately scaled doubles). ++ The check below assumes big endian. */ ++ ret = 0; ++#endif ++ + if(sizeof(long double) == 16) { + /*make sure the long double type is the same as the failing type + *which has 16 bytes in size and 11 bits of exponent. If it is, +Index: hdf5-1.12.2/test/dt_arith.c +=================================================================== +--- hdf5-1.12.2.orig/test/dt_arith.c ++++ hdf5-1.12.2/test/dt_arith.c +@@ -3036,7 +3036,19 @@ test_conv_flt_1(const char *name, int ru + #if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE + } + else if (src_type == FLT_LDOUBLE) { +- INIT_FP_SPECIAL(src_size, src_nbits, sendian, LDBL_MANT_DIG, dst_size, buf, saved, nelmts); ++ size_t mant_dig = LDBL_MANT_DIG; ++ if (mant_dig >= src_nbits) { ++ /* This happens for IBM long double in little endian. ++ The macro LDBL_MANT_DIG says 106 mantissa bits, but the ++ HDF5 detection code actually represents it as a normal 64bit ++ double (52 bit mantissa) with the upper double being ++ unspec bits (which is sort of okay as the testsuite ++ wouldn't deal with that format correctly anyway). So ++ override the mantissa size. */ ++ mant_dig = 52; ++ } ++ INIT_FP_SPECIAL(src_size, src_nbits, sendian, mant_dig, dst_size, ++ buf, saved, nelmts); + #endif + } + else +@@ -3736,7 +3748,18 @@ test_conv_int_fp(const char *name, int r + nelmts); + } + else { +- INIT_FP_SPECIAL(src_size, src_nbits, sendian, LDBL_MANT_DIG, dst_size, buf, saved, nelmts); ++ size_t mant_dig = LDBL_MANT_DIG; ++ if (mant_dig >= src_nbits) { ++ /* This happens for IBM long double in little endian. ++ The macro LDBL_MANT_DIG says 106 mantissa bits, but the ++ HDF5 detection code actually represents it as a normal 64bit ++ double (52 bit mantissa) with the upper double being ++ unspec bits (which is sort of okay as the testsuite ++ wouldn't deal with that format correctly anyway). So ++ override the mantissa size. */ ++ mant_dig = 52; ++ } ++ INIT_FP_SPECIAL(src_size, src_nbits, sendian, mant_dig, dst_size, buf, saved, nelmts); + } + #endif + } diff --git a/Pass-compact-chunk-size-info-to-ensure-requested-elements-are-within-bounds.patch b/Pass-compact-chunk-size-info-to-ensure-requested-elements-are-within-bounds.patch new file mode 100644 index 0000000..fe85f12 --- /dev/null +++ b/Pass-compact-chunk-size-info-to-ensure-requested-elements-are-within-bounds.patch @@ -0,0 +1,258 @@ +From: Egbert Eich +Date: Sat Oct 1 15:13:52 2022 +0200 +Subject: Pass compact chunk size info to ensure requested elements are within bounds +Patch-mainline: Not yet +Git-repo: ssh://eich@192.168.122.1:/home/eich/sources/HPC/hdf5 +Git-commit: 18300944261a9fa8f0087f99d9176f3757b1ec38 +References: + +To avoid reading/writing elements out of bounds of a compact chunk, pass +size info and check whether all elements are within the size before attempting +to read/write these elements. Such accesses can occur when accessing malformed +hdf5 files. + +This fixes CVE-2018-11205 + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + src/H5Dchunk.c | 34 +++++++++++++++++++++++++++------- + src/H5Dcompact.c | 5 +++++ + src/H5Dpkg.h | 1 + + 3 files changed, 33 insertions(+), 7 deletions(-) +diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c +index e6bf26ce89..94ad392cb7 100644 +--- a/src/H5Dchunk.c ++++ b/src/H5Dchunk.c +@@ -128,6 +128,7 @@ typedef struct H5D_rdcc_ent_t { + H5F_block_t chunk_block; /*offset/length of chunk in file */ + hsize_t chunk_idx; /*index of chunk in dataset */ + uint8_t * chunk; /*the unfiltered chunk data */ ++ size_t size; /*size of chunk */ + unsigned idx; /*index in hash table */ + struct H5D_rdcc_ent_t *next; /*next item in doubly-linked list */ + struct H5D_rdcc_ent_t *prev; /*previous item in doubly-linked list */ +@@ -303,7 +304,7 @@ static unsigned H5D__chunk_hash_val(const H5D_shared_t *shared, const hsize_t *s + static herr_t H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset); + static herr_t H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t flush); + static void * H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t relax, +- hbool_t prev_unfilt_chunk); ++ hbool_t prev_unfilt_chunk, size_t *ret_size); + static herr_t H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_chunk_ud_t *udata, hbool_t dirty, + void *chunk, uint32_t naccessed); + static herr_t H5D__chunk_cache_prune(const H5D_t *dset, size_t size); +@@ -2480,6 +2481,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_ + uint32_t src_accessed_bytes = 0; /* Total accessed size in a chunk */ + hbool_t skip_missing_chunks = FALSE; /* Whether to skip missing chunks */ + herr_t ret_value = SUCCEED; /*return value */ ++ size_t chunk_size = 0; + + FUNC_ENTER_STATIC + +@@ -2565,11 +2567,12 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_ + src_accessed_bytes = chunk_info->chunk_points * (uint32_t)type_info->src_type_size; + + /* Lock the chunk into the cache */ +- if (NULL == (chunk = H5D__chunk_lock(io_info, &udata, FALSE, FALSE))) ++ if (NULL == (chunk = H5D__chunk_lock(io_info, &udata, FALSE, FALSE, &chunk_size))) + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk") + + /* Set up the storage buffer information for this chunk */ + cpt_store.compact.buf = chunk; ++ cpt_store.compact.size = chunk_size; + + /* Point I/O info at contiguous I/O info for this chunk */ + chk_io_info = &cpt_io_info; +@@ -2629,6 +2632,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize + hbool_t cpt_dirty; /* Temporary placeholder for compact storage "dirty" flag */ + uint32_t dst_accessed_bytes = 0; /* Total accessed size in a chunk */ + herr_t ret_value = SUCCEED; /* Return value */ ++ size_t chunk_size; + + FUNC_ENTER_STATIC + +@@ -2699,11 +2703,12 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize + entire_chunk = FALSE; + + /* Lock the chunk into the cache */ +- if (NULL == (chunk = H5D__chunk_lock(io_info, &udata, entire_chunk, FALSE))) ++ if (NULL == (chunk = H5D__chunk_lock(io_info, &udata, entire_chunk, FALSE, &chunk_size))) + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk") + + /* Set up the storage buffer information for this chunk */ + cpt_store.compact.buf = chunk; ++ cpt_store.compact.size = chunk_size; + + /* Point I/O info at main I/O info for this chunk */ + chk_io_info = &cpt_io_info; +@@ -3714,7 +3719,7 @@ done: + *------------------------------------------------------------------------- + */ + static void * +-H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t relax, hbool_t prev_unfilt_chunk) ++H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t relax, hbool_t prev_unfilt_chunk, size_t *ret_size) + { + const H5D_t * dset = io_info->dset; /* Local pointer to the dataset info */ + const H5O_pline_t *pline = +@@ -3731,6 +3736,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t rel + hbool_t disable_filters = FALSE; /* Whether to disable filters (when adding to cache) */ + void * chunk = NULL; /*the file chunk */ + void * ret_value = NULL; /* Return value */ ++ size_t chunk_size_ret = 0; + + FUNC_ENTER_STATIC + +@@ -3796,6 +3802,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t rel + ent->chunk = (uint8_t *)H5D__chunk_mem_xfree(ent->chunk, old_pline); + ent->chunk = (uint8_t *)chunk; + chunk = NULL; ++ ent->size = chunk_size; + + /* Mark the chunk as having filters disabled as well as "newly + * disabled" so it is inserted on flush */ +@@ -3823,6 +3830,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t rel + ent->chunk = (uint8_t *)H5D__chunk_mem_xfree(ent->chunk, old_pline); + ent->chunk = (uint8_t *)chunk; + chunk = NULL; ++ ent->size = chunk_size; + + /* Mark the chunk as having filters enabled */ + ent->edge_chunk_state &= ~(H5D_RDCC_DISABLE_FILTERS | H5D_RDCC_NEWLY_DISABLED_FILTERS); +@@ -3902,6 +3910,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t rel + /* In the case that some dataset functions look through this data, + * clear it to all 0s. */ + HDmemset(chunk, 0, chunk_size); ++ chunk_size_ret = chunk_size; + } /* end if */ + else { + /* +@@ -3924,6 +3933,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t rel + my_chunk_alloc, chunk) < 0) + HGOTO_ERROR(H5E_IO, H5E_READERROR, NULL, "unable to read raw data chunk") + ++ chunk_size_ret = my_chunk_alloc; + if (old_pline && old_pline->nused) { + H5Z_EDC_t err_detect; /* Error detection info */ + H5Z_cb_t filter_cb; /* I/O filter callback function */ +@@ -3937,6 +3947,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t rel + if (H5Z_pipeline(old_pline, H5Z_FLAG_REVERSE, &(udata->filter_mask), err_detect, + filter_cb, &my_chunk_alloc, &buf_alloc, &chunk) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTFILTER, NULL, "data pipeline read failed") ++ chunk_size_ret = buf_alloc; + + /* Reallocate chunk if necessary */ + if (udata->new_unfilt_chunk) { +@@ -3947,6 +3958,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t rel + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, + "memory allocation failed for raw data chunk") + } /* end if */ ++ chunk_size_ret = my_chunk_alloc; + H5MM_memcpy(chunk, tmp_chunk, chunk_size); + (void)H5D__chunk_mem_xfree(tmp_chunk, old_pline); + } /* end if */ +@@ -3967,6 +3979,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t rel + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, + "memory allocation failed for raw data chunk") + ++ chunk_size_ret = chunk_size; + if (H5P_is_fill_value_defined(fill, &fill_status) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't tell if fill value defined") + +@@ -4032,6 +4045,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t rel + H5_CHECKED_ASSIGN(ent->rd_count, uint32_t, chunk_size, size_t); + H5_CHECKED_ASSIGN(ent->wr_count, uint32_t, chunk_size, size_t); + ent->chunk = (uint8_t *)chunk; ++ ent->size = chunk_size_ret; + + /* Add it to the cache */ + HDassert(NULL == rdcc->slot[udata->idx_hint]); +@@ -4065,6 +4079,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t rel + HDassert(!ent->locked); + ent->locked = TRUE; + chunk = ent->chunk; ++ chunk_size_ret = ent->size; + } /* end if */ + else + /* +@@ -4076,6 +4091,8 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t rel + + /* Set return value */ + ret_value = chunk; ++ if (ret_size != NULL) ++ *ret_size = chunk_size_ret; + + done: + /* Release the fill buffer info, if it's been initialized */ +@@ -4084,8 +4101,11 @@ done: + + /* Release the chunk allocated, on error */ + if (!ret_value) +- if (chunk) ++ if (chunk) { + chunk = H5D__chunk_mem_xfree(chunk, pline); ++ if (ret_size != NULL) ++ *ret_size = 0; ++ } + + FUNC_LEAVE_NOAPI(ret_value) + } /* end H5D__chunk_lock() */ +@@ -4884,7 +4904,7 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[]) + if (H5F_addr_defined(chk_udata.chunk_block.offset) || (UINT_MAX != chk_udata.idx_hint)) { + /* Lock the chunk into cache. H5D__chunk_lock will take care of + * updating the chunk to no longer be an edge chunk. */ +- if (NULL == (chunk = (void *)H5D__chunk_lock(&chk_io_info, &chk_udata, FALSE, TRUE))) ++ if (NULL == (chunk = (void *)H5D__chunk_lock(&chk_io_info, &chk_udata, FALSE, TRUE, NULL))) + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to lock raw data chunk") + + /* Unlock the chunk */ +@@ -5274,7 +5294,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk) + HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to select hyperslab") + + /* Lock the chunk into the cache, to get a pointer to the chunk buffer */ +- if (NULL == (chunk = (void *)H5D__chunk_lock(io_info, &chk_udata, FALSE, FALSE))) ++ if (NULL == (chunk = (void *)H5D__chunk_lock(io_info, &chk_udata, FALSE, FALSE, NULL))) + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to lock raw data chunk") + + /* Fill the selection in the memory buffer */ +diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c +index b78693660d..21c37e8a08 100644 +--- a/src/H5Dcompact.c ++++ b/src/H5Dcompact.c +@@ -245,6 +245,7 @@ H5D__compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR + FUNC_ENTER_STATIC_NOERR + + io_info->store->compact.buf = io_info->dset->shared->layout.storage.u.compact.buf; ++ io_info->store->compact.size = io_info->dset->shared->layout.storage.u.compact.size; + io_info->store->compact.dirty = &io_info->dset->shared->layout.storage.u.compact.dirty; + + FUNC_LEAVE_NOAPI(SUCCEED) +@@ -278,6 +279,8 @@ H5D__compact_readvv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t * + FUNC_ENTER_STATIC + + HDassert(io_info); ++ if (io_info->store->compact.size < *(dset_offset_arr + dset_max_nseq - 1) + *(dset_size_arr + dset_max_nseq - 1)) ++ HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "source size less than requested data") + + /* Use the vectorized memory copy routine to do actual work */ + if ((ret_value = H5VM_memcpyvv(io_info->u.rbuf, mem_max_nseq, mem_curr_seq, mem_size_arr, mem_offset_arr, +@@ -320,6 +323,8 @@ H5D__compact_writevv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t + FUNC_ENTER_STATIC + + HDassert(io_info); ++ if (io_info->store->compact.size < *(dset_offset_arr + dset_max_nseq - 1) + *(dset_size_arr + dset_max_nseq - 1)) ++ HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "source size less than requested data") + + /* Use the vectorized memory copy routine to do actual work */ + if ((ret_value = H5VM_memcpyvv(io_info->store->compact.buf, dset_max_nseq, dset_curr_seq, dset_size_arr, +diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h +index 64692c5d1d..8a4acd62e3 100644 +--- a/src/H5Dpkg.h ++++ b/src/H5Dpkg.h +@@ -196,6 +196,7 @@ typedef struct { + typedef struct { + void * buf; /* Buffer for compact dataset */ + hbool_t *dirty; /* Pointer to dirty flag to mark */ ++ size_t size; /* Buffer size for compact dataset */ + } H5D_compact_storage_t; + + typedef union H5D_storage_t { diff --git a/Remove-duplicate-code.patch b/Remove-duplicate-code.patch new file mode 100644 index 0000000..04f5f17 --- /dev/null +++ b/Remove-duplicate-code.patch @@ -0,0 +1,28 @@ +From: Egbert Eich +Date: Sat Feb 11 18:08:15 2023 +0100 +Subject: Remove duplicate code +Patch-mainline: Not yet +Git-repo: https://github.com/HDFGroup/hdf5 +Git-commit: 539bca81e2b5713b1c6c5723d742377fb92c1ac1 +References: + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + src/H5Oattr.c | 4 ---- + 1 file changed, 4 deletions(-) +diff --git a/src/H5Oattr.c b/src/H5Oattr.c +index 3ef0b99aa4..19d3abfb4c 100644 +--- a/src/H5Oattr.c ++++ b/src/H5Oattr.c +@@ -222,10 +222,6 @@ H5O_attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, un + else + p += attr->shared->ds_size; + +- /* Get the datatype's size */ +- if (0 == (dt_size = H5T_get_size(attr->shared->dt))) +- HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "unable to get datatype size") +- + /* Get the datatype & dataspace sizes */ + if (0 == (dt_size = H5T_get_size(attr->shared->dt))) + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "unable to get datatype size") diff --git a/Report-error-if-dimensions-of-chunked-storage-in-data-layout-2.patch b/Report-error-if-dimensions-of-chunked-storage-in-data-layout-2.patch new file mode 100644 index 0000000..f3902a1 --- /dev/null +++ b/Report-error-if-dimensions-of-chunked-storage-in-data-layout-2.patch @@ -0,0 +1,48 @@ +From: Egbert Eich +Date: Wed Sep 28 19:11:16 2022 +0200 +Subject: Report error if dimensions of chunked storage in data layout < 2 +Patch-mainline: Not yet +Git-repo: ssh://eich@192.168.122.1:/home/eich/sources/HPC/hdf5 +Git-commit: 34b621424504265cff3c33cf634a70efb52db180 +References: + +For Data Layout Messages version 1 & 2 the specification state +that the value stored in the data field is 1 greater than the +number of dimensions in the dataspace. For version 3 this is +not explicitly stated but the implementation suggests it to be +the case. +Thus the set value needs to be at least 2. For dimensionality +< 2 an out-of-bounds access occurs as in CVE-2021-45833. + +This fixes CVE-2021-45833. + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + src/H5Olayout.c | 7 +++++++ + 1 file changed, 7 insertions(+) +diff --git a/src/H5Olayout.c b/src/H5Olayout.c +index c939e72744..9fa9e36e8c 100644 +--- a/src/H5Olayout.c ++++ b/src/H5Olayout.c +@@ -168,6 +168,10 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU + p += ndims * 4; /* Skip over dimension sizes (32-bit quantities) */ + } /* end if */ + else { ++ if (ndims < 2) ++ HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, ++ "bad dimensions for chunked storage") ++ + mesg->u.chunk.ndims = ndims; + for (u = 0; u < ndims; u++) + UINT32DECODE(p, mesg->u.chunk.dim[u]); +@@ -241,6 +245,9 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU + mesg->u.chunk.ndims = *p++; + if (mesg->u.chunk.ndims > H5O_LAYOUT_NDIMS) + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "dimensionality is too large") ++ if (mesg->u.chunk.ndims < 2) ++ HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, ++ "bad dimensions for chunked storage") + + /* B-tree address */ + H5F_addr_decode(f, &p, &(mesg->storage.u.chunk.idx_addr)); diff --git a/Validate-location-offset-of-the-accumulated-metadata-when-comparing.patch b/Validate-location-offset-of-the-accumulated-metadata-when-comparing.patch new file mode 100644 index 0000000..7833974 --- /dev/null +++ b/Validate-location-offset-of-the-accumulated-metadata-when-comparing.patch @@ -0,0 +1,96 @@ +From: Egbert Eich +Date: Mon Oct 10 08:43:44 2022 +0200 +Subject: Validate location (offset) of the accumulated metadata when comparing +Patch-mainline: Not yet +Git-repo: ssh://eich@192.168.122.1:/home/eich/sources/HPC/hdf5 +Git-commit: 2cf9918ae66f023a2b6d44eb591ee2ac479a6e53 +References: + +Initially, the accumulated metadata location is initialized to HADDR_UNDEF +- the highest available address. Bogus input files may provide a location +or size matching this value. Comparing this address against such bogus +values may provide false positives. This make sure, the value has been +initilized or fail the comparison early and let other parts of the +code deal with the bogus address/size. +Note: To avoid unnecessary checks, we have assumed that if the 'dirty' +member in the same structure is true the location is valid. + +This fixes CVE-2018-13867. + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + src/H5Faccum.c | 19 +++++++++++++------ + 1 file changed, 13 insertions(+), 6 deletions(-) +diff --git a/src/H5Faccum.c b/src/H5Faccum.c +index aed5812e63..73bd4b811e 100644 +--- a/src/H5Faccum.c ++++ b/src/H5Faccum.c +@@ -48,6 +48,7 @@ + #define H5F_ACCUM_THROTTLE 8 + #define H5F_ACCUM_THRESHOLD 2048 + #define H5F_ACCUM_MAX_SIZE (1024 * 1024) /* Max. accum. buf size (max. I/Os will be 1/2 this size) */ ++#define H5F_LOC_VALID(x) (x != HADDR_UNDEF) + + /******************/ + /* Local Typedefs */ +@@ -126,8 +127,9 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si + HDassert(!accum->buf || (accum->alloc_size >= accum->size)); + + /* Current read adjoins or overlaps with metadata accumulator */ +- if (H5F_addr_overlap(addr, size, accum->loc, accum->size) || ((addr + size) == accum->loc) || +- (accum->loc + accum->size) == addr) { ++ if (H5F_LOC_VALID(accum->loc) && ++ (H5F_addr_overlap(addr, size, accum->loc, accum->size) || ((addr + size) == accum->loc) || ++ (accum->loc + accum->size) == addr)) { + size_t amount_before; /* Amount to read before current accumulator */ + haddr_t new_addr; /* New address of the accumulator buffer */ + size_t new_size; /* New size of the accumulator buffer */ +@@ -439,7 +441,8 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s + /* Check if there is already metadata in the accumulator */ + if (accum->size > 0) { + /* Check if the new metadata adjoins the beginning of the current accumulator */ +- if ((addr + size) == accum->loc) { ++ if (H5F_LOC_VALID(accum->loc) ++ && (addr + size) == accum->loc) { + /* Check if we need to adjust accumulator size */ + if (H5F__accum_adjust(accum, file, H5F_ACCUM_PREPEND, size) < 0) + HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator") +@@ -464,7 +467,8 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s + accum->dirty_off = 0; + } /* end if */ + /* Check if the new metadata adjoins the end of the current accumulator */ +- else if (addr == (accum->loc + accum->size)) { ++ else if (H5F_LOC_VALID(accum->loc) && ++ addr == (accum->loc + accum->size)) { + /* Check if we need to adjust accumulator size */ + if (H5F__accum_adjust(accum, file, H5F_ACCUM_APPEND, size) < 0) + HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator") +@@ -485,7 +489,8 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s + accum->size += size; + } /* end if */ + /* Check if the piece of metadata being written overlaps the metadata accumulator */ +- else if (H5F_addr_overlap(addr, size, accum->loc, accum->size)) { ++ else if (H5F_LOC_VALID(accum->loc) && ++ H5F_addr_overlap(addr, size, accum->loc, accum->size)) { + size_t add_size; /* New size of the accumulator buffer */ + + /* Check if the new metadata is entirely within the current accumulator */ +@@ -745,7 +750,8 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s + /* (Note that this could be improved by updating the accumulator + * with [some of] the information just read in. -QAK) + */ +- if (H5F_addr_overlap(addr, size, accum->loc, accum->size)) { ++ if (H5F_LOC_VALID(accum->loc) && ++ H5F_addr_overlap(addr, size, accum->loc, accum->size)) { + /* Check for write starting before beginning of accumulator */ + if (H5F_addr_le(addr, accum->loc)) { + /* Check for write ending within accumulator */ +@@ -868,6 +874,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr + + /* Adjust the metadata accumulator to remove the freed block, if it overlaps */ + if ((f_sh->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && ++ H5F_LOC_VALID(accum->loc) && + H5F_addr_overlap(addr, size, accum->loc, accum->size)) { + size_t overlap_size; /* Size of overlap with accumulator */ + diff --git a/When-evicting-driver-info-block-NULL-the-corresponding-entry.patch b/When-evicting-driver-info-block-NULL-the-corresponding-entry.patch new file mode 100644 index 0000000..d9f85a7 --- /dev/null +++ b/When-evicting-driver-info-block-NULL-the-corresponding-entry.patch @@ -0,0 +1,31 @@ +From: Egbert Eich +Date: Thu Sep 29 13:47:30 2022 +0200 +Subject: When evicting driver info block, NULL the corresponding entry +Patch-mainline: Not yet +Git-repo: ssh://eich@192.168.122.1:/home/eich/sources/HPC/hdf5 +Git-commit: 6d5496f17ed5aa65cbb0498e0bf70b0d599dc336 +References: + +This prevents it from another attempt to unpin it in H5F__dest() which may +happen due to malformed hdf5 files which leads to a segfault. + +This fixes CVE-2021-46242 + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + src/H5Fsuper.c | 2 ++ + 1 file changed, 2 insertions(+) +diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c +index 60b045ae29..1283790c57 100644 +--- a/src/H5Fsuper.c ++++ b/src/H5Fsuper.c +@@ -1044,6 +1044,8 @@ done: + /* Evict the driver info block from the cache */ + if (sblock && H5AC_expunge_entry(f, H5AC_DRVRINFO, sblock->driver_addr, H5AC__NO_FLAGS_SET) < 0) + HDONE_ERROR(H5E_FILE, H5E_CANTEXPUNGE, FAIL, "unable to expunge driver info block") ++ ++ f->shared->drvinfo = NULL; + } /* end if */ + + /* Unpin & discard superblock */ diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..7df0b36 --- /dev/null +++ b/_constraints @@ -0,0 +1,10 @@ + + + + 4000 + + + 6 + + + diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..3b183b7 --- /dev/null +++ b/_multibuild @@ -0,0 +1,9 @@ + + serial + openmpi4 + mvapich2 + gnu-openmpi4-hpc + gnu-mvapich2-hpc + gnu-mpich-hpc + gnu-hpc + diff --git a/hdf5-1.12.2.tar.bz2 b/hdf5-1.12.2.tar.bz2 new file mode 100644 index 0000000..01706b2 --- /dev/null +++ b/hdf5-1.12.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a88bbe36213a2cea0c8397201a459643e7155c9dc91e062675b3fb07ee38afe +size 10494264 diff --git a/hdf5-1.8.10-tests-arm.patch b/hdf5-1.8.10-tests-arm.patch new file mode 100644 index 0000000..2ea2897 --- /dev/null +++ b/hdf5-1.8.10-tests-arm.patch @@ -0,0 +1,12 @@ +Index: hdf5-1.12.2/test/testhdf5.c +=================================================================== +--- hdf5-1.12.2.orig/test/testhdf5.c ++++ hdf5-1.12.2/test/testhdf5.c +@@ -53,7 +53,6 @@ main(int argc, char *argv[]) + AddTest("coords", test_coords, cleanup_coords, "Dataspace coordinates", NULL); + AddTest("sohm", test_sohm, cleanup_sohm, "Shared Object Header Messages", NULL); + AddTest("attr", test_attr, cleanup_attr, "Attributes", NULL); +- AddTest("select", test_select, cleanup_select, "Selections", NULL); + AddTest("time", test_time, cleanup_time, "Time Datatypes", NULL); + AddTest("ref_deprec", test_reference_deprec, cleanup_reference_deprec, "Deprecated References", NULL); + AddTest("ref", test_reference, cleanup_reference, "References", NULL); diff --git a/hdf5-1.8.11-abort_unknown_host_config.patch b/hdf5-1.8.11-abort_unknown_host_config.patch new file mode 100644 index 0000000..96dd068 --- /dev/null +++ b/hdf5-1.8.11-abort_unknown_host_config.patch @@ -0,0 +1,26 @@ +Index: configure +=================================================================== +--- configure.orig ++++ configure +@@ -4343,6 +4343,8 @@ done + if test "X$host_config" != "Xnone"; then + CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`" + . $host_config ++else ++ as_fn_error $? "no usable host config found" "$LINENO" 5 + fi + + ## Source any special site-specific file +Index: configure.ac +=================================================================== +--- configure.ac.orig ++++ configure.ac +@@ -330,6 +330,8 @@ done + if test "X$host_config" != "Xnone"; then + CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`" + . $host_config ++else ++ AC_MSG_ERROR([no usable host config found]) + fi + + ## Source any special site-specific file diff --git a/hdf5-LD_LIBRARY_PATH.patch b/hdf5-LD_LIBRARY_PATH.patch new file mode 100644 index 0000000..83f6dbb --- /dev/null +++ b/hdf5-LD_LIBRARY_PATH.patch @@ -0,0 +1,22 @@ +Index: hdf5-1.12.2/src/Makefile.in +=================================================================== +--- hdf5-1.12.2.orig/src/Makefile.in ++++ hdf5-1.12.2/src/Makefile.in +@@ -1998,8 +1998,6 @@ help: + # Remove the generated .c file if errors occur unless HDF5_Make_Ignore + # is set to ignore the error. + H5Tinit.c: H5detect$(EXEEXT) +- LD_LIBRARY_PATH="$$LD_LIBRARY_PATH`echo $(LDFLAGS) | \ +- sed -e 's/-L/:/g' -e 's/ //g'`" \ + $(RUNSERIAL) ./H5detect$(EXEEXT) $@ || \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + ($(RM) $@ ; exit 1) +@@ -2010,8 +2008,6 @@ H5Tinit.c: H5detect$(EXEEXT) + # Remove the generated .c file if errors occur unless HDF5_Make_Ignore + # is set to ignore the error. + H5lib_settings.c: H5make_libsettings$(EXEEXT) libhdf5.settings +- LD_LIBRARY_PATH="$$LD_LIBRARY_PATH`echo $(LDFLAGS) | \ +- sed -e 's/-L/:/g' -e 's/ //g'`" \ + $(RUNSERIAL) ./H5make_libsettings$(EXEEXT) $@ || \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + ($(RM) $@ ; exit 1) diff --git a/hdf5-Remove-timestamps-from-binaries.patch b/hdf5-Remove-timestamps-from-binaries.patch new file mode 100644 index 0000000..d20f840 --- /dev/null +++ b/hdf5-Remove-timestamps-from-binaries.patch @@ -0,0 +1,39 @@ +From: Egbert Eich +Date: Sat Nov 17 18:15:13 2018 +0100 +Subject: hdf5: Remove timestamps from binaries +Patch-mainline: never +Git-commit: 3b88045491c0b43f385edce47e3aae07660cd9f3 +References: + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + src/H5detect.c | 15 --------------- + 1 file changed, 15 deletions(-) +Index: hdf5-1.12.2/src/H5detect.c +=================================================================== +--- hdf5-1.12.2.orig/src/H5detect.c ++++ hdf5-1.12.2/src/H5detect.c +@@ -1224,22 +1224,6 @@ bit.\n"; + fprintf(rawoutstream, "/* Generated automatically by H5detect -- do not edit */\n\n\n"); + HDfputs(FileHeader, rawoutstream); /*the copyright notice--see top of this file */ + +- fprintf(rawoutstream, " *\n * Created:\t\t%s %2d, %4d\n", month_name[tm->tm_mon], tm->tm_mday, +- 1900 + tm->tm_year); +- if (pwd || real_name[0] || host_name[0]) { +- fprintf(rawoutstream, " *\t\t\t"); +- if (real_name[0]) +- fprintf(rawoutstream, "%s <", real_name); +-#ifdef H5_HAVE_GETPWUID +- if (pwd) +- HDfputs(pwd->pw_name, rawoutstream); +-#endif +- if (host_name[0]) +- fprintf(rawoutstream, "@%s", host_name); +- if (real_name[0]) +- fprintf(rawoutstream, ">"); +- HDfputc('\n', rawoutstream); +- } + fprintf(rawoutstream, " *\n * Purpose:\t\t"); + for (s = purpose; *s; s++) { + HDfputc(*s, rawoutstream); diff --git a/hdf5-mpi.patch b/hdf5-mpi.patch new file mode 100644 index 0000000..2d0faf4 --- /dev/null +++ b/hdf5-mpi.patch @@ -0,0 +1,30 @@ +diff -up hdf5-1.8.16/testpar/t_pflush1.c.mpi hdf5-1.8.16/testpar/t_pflush1.c +--- hdf5-1.8.16/testpar/t_pflush1.c.mpi 2015-10-23 23:13:44.000000000 -0600 ++++ hdf5-1.8.16/testpar/t_pflush1.c 2016-03-20 21:46:42.089409776 -0600 +@@ -171,6 +171,7 @@ main(int argc, char* argv[]) + * because MPI_File_close wants to modify the file-handle variable. + */ + ++#if 0 + /* close file1 */ + if(H5Fget_vfd_handle(file1, fapl, (void **)&mpifh_p) < 0) { + printf("H5Fget_vfd_handle for file1 failed\n"); +@@ -189,14 +190,17 @@ main(int argc, char* argv[]) + printf("MPI_File_close for file2 failed\n"); + goto error; + } /* end if */ ++#endif + + fflush(stdout); + fflush(stderr); ++ MPI_Finalize(); + HD_exit(0); + + error: + fflush(stdout); + fflush(stderr); ++ MPI_Finalize(); + HD_exit(1); + } + + diff --git a/hdf5-wrappers.patch b/hdf5-wrappers.patch new file mode 100644 index 0000000..d199bb1 --- /dev/null +++ b/hdf5-wrappers.patch @@ -0,0 +1,109 @@ +diff -Naur hdf5-1.10.8.orig/bin/h5cc.in hdf5-1.10.8/bin/h5cc.in +--- hdf5-1.10.8.orig/bin/h5cc.in 2022-04-07 18:23:46.000000000 -0600 ++++ hdf5-1.10.8/bin/h5cc.in 2022-04-07 18:24:04.000000000 -0600 +@@ -89,10 +89,10 @@ + # paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in + # from the hdf5 build. The order of the flags is intended to give precedence + # to the user's flags. +-H5BLD_CFLAGS="@AM_CFLAGS@ @CFLAGS@" ++H5BLD_CFLAGS= + H5BLD_CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@" +-H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@" +-H5BLD_LIBS="@LIBS@" ++H5BLD_LDFLAGS= ++H5BLD_LIBS= + + CC="${HDF5_CC:-$CCBASE}" + CLINKER="${HDF5_CLINKER:-$CLINKERBASE}" +@@ -105,7 +105,8 @@ + # available library is shared, it will be used by default. The user can + # override either default, although choosing an unavailable library will result + # in link errors. +-STATIC_AVAILABLE="@enable_static@" ++# openSUSE prefers shared libraries ++STATIC_AVAILABLE=no + if test "${STATIC_AVAILABLE}" = "yes"; then + USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}" + else +@@ -385,7 +386,7 @@ + # paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in + # from the hdf5 build. The order of the flags is intended to give precedence + # to the user's flags. +- $SHOW $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args $shared_link ++ $SHOW $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args + status=$? + fi + +diff -Naur hdf5-1.10.8.orig/c++/src/h5c++.in hdf5-1.10.8/c++/src/h5c++.in +--- hdf5-1.10.8.orig/c++/src/h5c++.in 2022-04-07 18:23:45.000000000 -0600 ++++ hdf5-1.10.8/c++/src/h5c++.in 2022-04-07 18:24:04.000000000 -0600 +@@ -87,10 +87,10 @@ + # paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in + # from the hdf5 build. The order of the flags is intended to give precedence + # to the user's flags. +-H5BLD_CXXFLAGS="@AM_CXXFLAGS@ @CXXFLAGS@" ++H5BLD_CXXFLAGS= + H5BLD_CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@" +-H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@" +-H5BLD_LIBS="@LIBS@" ++H5BLD_LDFLAGS= ++H5BLD_LIBS= + + CXX="${HDF5_CXX:-$CXXBASE}" + CXXLINKER="${HDF5_CXXLINKER:-$CXXLINKERBASE}" +@@ -103,7 +103,8 @@ + # available library is shared, it will be used by default. The user can + # override either default, although choosing an unavailable library will result + # in link errors. +-STATIC_AVAILABLE="@enable_static@" ++# openSUSE prefers shared libraries ++STATIC_AVAILABLE=no + if test "${STATIC_AVAILABLE}" = "yes"; then + USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}" + else +@@ -385,7 +386,7 @@ + # from the hdf5 build. The order of the flags is intended to give precedence + # to the user's flags. + +- $SHOW $CXXLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args $shared_link ++ $SHOW $CXXLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args + + status=$? + fi +diff -Naur hdf5-1.10.8.orig/fortran/src/h5fc.in hdf5-1.10.8/fortran/src/h5fc.in +--- hdf5-1.10.8.orig/fortran/src/h5fc.in 2022-04-07 18:23:46.000000000 -0600 ++++ hdf5-1.10.8/fortran/src/h5fc.in 2022-04-07 18:24:04.000000000 -0600 +@@ -83,11 +83,11 @@ + # libraries in $link_args, followed by any external library paths and libraries + # from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build. + # The order of the flags is intended to give precedence to the user's flags. +-H5BLD_FCFLAGS="@AM_FCFLAGS@ @FCFLAGS@" ++H5BLD_FCFLAGS= + F9XMODFLAG="@F9XMODFLAG@" + F9XSUFFIXFLAG="@F9XSUFFIXFLAG@" +-H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@" +-H5BLD_LIBS="@LIBS@" ++H5BLD_LDFLAGS= ++H5BLD_LIBS= + + FC="${HDF5_FC:-$FCBASE}" + FLINKER="${HDF5_FLINKER:-$FLINKERBASE}" +@@ -99,7 +99,8 @@ + # available library is shared, it will be used by default. The user can + # override either default, although choosing an unavailable library will result + # in link errors. +-STATIC_AVAILABLE="@enable_static@" ++# openSUSE prefers shared libraries ++STATIC_AVAILABLE=no + if test "${STATIC_AVAILABLE}" = "yes"; then + USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}" + else +@@ -363,7 +364,7 @@ + # libraries in $link_args, followed by any external library paths and libraries + # from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build. + # The order of the flags is intended to give precedence to the user's flags. +- $SHOW $FLINKER $FCFLAGS $H5BLD_FCFLAGS $F9XSUFFIXFLAG $LDFLAGS $fmodules $link_objs $LIBS $link_args $shared_link ++ $SHOW $FLINKER $FCFLAGS $H5BLD_FCFLAGS $F9XSUFFIXFLAG $LDFLAGS $fmodules $link_objs $LIBS $link_args + status=$? + fi + diff --git a/hdf5.changes b/hdf5.changes new file mode 100644 index 0000000..9d08b80 --- /dev/null +++ b/hdf5.changes @@ -0,0 +1,1302 @@ +------------------------------------------------------------------- +Mon Oct 23 11:45:45 UTC 2023 - Nicolas Morey + +- Drop support for obsolete openmpi[123] +- Prepare support for openmpi5 + +------------------------------------------------------------------- +Mon Feb 13 09:18:05 UTC 2023 - Egbert Eich + +- Fix CVE-2021-37501 - overflow in calculation of data buffer due to bogus + input file (bsc#1207973). + https://github.com/HDFGroup/hdf5/issues/2458 + https://github.com/HDFGroup/hdf5/pull/2459 + Check-for-overflow-when-calculating-on-disk-attribute-data-size-2459.patch + Remove-duplicate-code.patch + +------------------------------------------------------------------- +Tue Nov 15 04:52:12 UTC 2022 - Atri Bhattacharya + +- Add to specfile missing patch: + Fix-error-message-not-the-name-but-the-link-information-is-parsed.patch + +------------------------------------------------------------------- +Sat Oct 15 13:29:22 UTC 2022 - Egbert Eich + +- Fix CVEs: + * CVE-2021-46244 (bsc#1195215) + Compound-datatypes-may-not-have-members-of-size-0.patch + * CVE-2018-13867 (bsc#1101906) + Validate-location-offset-of-the-accumulated-metadata-when-comparing.patch + * CVE-2018-16438 (bsc#1107069) + Make-sure-info-block-for-external-links-has-at-least-3-bytes.patch + * CVE-2020-10812 (bsc#1167400) + Hot-fix-for-CVE-2020-10812.patch + * CVE-2021-45830 (bsc#1194375) + H5O_fsinfo_decode-Make-more-resilient-to-out-of-bounds-read.patch + * CVE-2019-8396 (bsc#1125882) + H5O__pline_decode-Make-more-resilient-to-out-of-bounds-read.patch + * CVE-2018-11205 (bsc#1093663) + Pass-compact-chunk-size-info-to-ensure-requested-elements-are-within-bounds.patch + * CVE-2021-46242 (bsc#1195212) + When-evicting-driver-info-block-NULL-the-corresponding-entry.patch + * CVE-2021-45833 (bsc#1194366) + Report-error-if-dimensions-of-chunked-storage-in-data-layout-2.patch + * CVE-2018-14031 (bsc#1101475) + H5O_dtype_decode_helper-Parent-of-enum-needs-to-have-same-size-as-enum-itself.patch + * CVE-2018-17439 (bsc#1111598) + H5IMget_image_info-H5Sget_simple_extent_dims-does-not-exceed-array-size.patch +- Fix an error message: + Fix-error-message-not-the-name-but-the-link-information-is-parsed.patch + +------------------------------------------------------------------- +Wed Sep 21 01:09:47 UTC 2022 - Stefan BrĂ¼ns + +- Remove timestamp/buildhost/kernel version from libhdf5.settings (boo#1209548). + +------------------------------------------------------------------- +Wed Jul 27 23:42:38 UTC 2022 - Atri Bhattacharya + +- Update to version 1.12.2: + See . +- Minor re-base of existing patches to apply cleanly: + * hdf5-LD_LIBRARY_PATH.patch + * hdf5-1.8.11-abort_unknown_host_config.patch + * hdf5-Remove-timestamps-from-binaries.patch + * hdf5-mpi.patch + * Disable-phdf5-tests.patch +- Drop upstreamed patch: + hdf5-1.10.8-pr1494-fix-release-check-version.patch. + +------------------------------------------------------------------- +Wed May 4 06:39:53 UTC 2022 - Egbert Eich + +- Security Fix: + Add configure option --disable-hltools to disable GIF tools as + recommended in the 1.10.8 release: + CVE-2018-17433 (bsc#1109565), + CVE-2018-17436 (bsc#1109568), + CVE-2020-10809 (bsc#1167404). + +------------------------------------------------------------------- +Thu Apr 7 23:51:05 UTC 2022 - Christoph Junghans + +- add hdf5-wrappers.patch from Fedora, so strip flags from + wrappers and prefer shared linking +- add missing zlib-devel devel dep + +------------------------------------------------------------------- +Thu Mar 31 08:25:44 UTC 2022 - Ben Greiner + +- Add hdf5-1.10.8-pr1494-fix-release-check-version.patch + * boo#1179521, boo#1196682, gh#HDFGroup/hdf5#1494 + * Avoids package crashes due to an overeager version check. + Packages depending on the shared libraries are not being + rebuilt in Factory after a patchlevel version bump of hdf5 + without SONAME changes. + +------------------------------------------------------------------- +Wed Feb 16 11:18:17 UTC 2022 - Atri Bhattacharya + +- Update to version 1.10.8: + * Added new option to control the build of High-Level tools + * Adds C++ Autotools configuration file for Intel + * Adds C++ Autotools configuration file for PGI + * Updates PGI C options + * CMake will now run the shell script tests in test/ by default + * Removed unused HDF5_ENABLE_HSIZET option from CMake + * CMake no longer builds the C++ library by default + * Removal of pre-VS2015 work-arounds + * Add CMake variable HDF5_LIB_INFIX + * Added a configure-time option to control certain compiler + warnings + * CMake option to build the HDF filter plugins project as an + external project + * Added a configure-time option to consider certain compiler + warnings + * Autotools and CMake target added to produce doxygen generated + documentation + * CMake option to build the HDF filter plugins project as an + external project + * Added CMake option to format source files + * Change how the release part of version, in major.minor.release + is checked + * H5Gcreate1() now rejects size_hint parameters larger than + UINT32_MAX + * H5Pset_fapl_log() no longer crashes when passed an invalid + fapl ID + * Fixes a segfault when H5Pset_mdc_log_options() is called + multiple times + * File locking now works on Windows + * H5Epush_ret() now requires a trailing semicolon + * Improved performance of H5Sget_select_elem_pointlist + * H5Fget_name_f fixed to handle correctly trailing whitespaces + and newly allocated buffers. + * Added new H5S functions. + * Refactored the perform tools and removed dependencies on test + library. + * h5repack added help text for user-defined filters. + * Doxygen documentation is available when configured and + generated. + * Fixed CVE-2018-17432 (bsc#1109564) + * Fixed a segmentation fault + * Detection of simple data transform function "x" + * Fixed CVE-2020-10810 - an invalid read and memory leak when + parsing (bsc#1167401) + * Fixed CVE-2018-14460 (bsc#1102175) + * Fixed CVE-2018-11206 (bsc#1093657) + (same issue as CVE-2018-14032 (bsc#1101474)) + * Fixed CVE-2018-14033 (bsc#1101471) + (same issue as CVE-2020-10811 (bsc#1167405)) + * Remove underscores on header file guards + * H5FArray.java class: + - Convert the entire byte array into a 1-d array of the + desired type, rather than performing 1 conversion per row; + - Use the Java Arrays method copyOfRange to grab the section + of the array from (1) that is desired to be inserted into + the destination array. + * Corrected path searched by CMake find_package command + * Corrected pkg-config compile script + * Fixed CMake C++ compiler flags + * Autotools clang debug optimization level change + * Better support for libaec (open-source Szip library) in CMake + * Refactor CMake configure for Fortran + * Remove arbitrary warning flag groups from CMake builds + * Reclassify CMake messages, to allow new modes and --log-level + option + * Fixes Autotools determination of the stat struct having an + st_blocks field + * Changed how h5dump and h5ls identify long double. + * Fixed tools argument parsing. + * Updated doxygen comments with changes for release +- Minor rebase of patches to apply cleanly. + +------------------------------------------------------------------- +Fri Jan 29 22:05:44 UTC 2021 - Egbert Eich + +- Fix update_so_version.sh, write so versions to file being included. + +------------------------------------------------------------------- +Fri Nov 6 10:41:02 UTC 2020 - Ana Guerrero Lopez + +- Update to version 1.10.7 + * Add metadata cache optimization to reduce skip list usage. + * Add BEST_EFFORT value to HDF5_USE_FILE_LOCKING environment variable. + * Add H5Pset/get_file_locking() API calls. + * Add Mirror VFD. + Use TCP/IP sockets to perform write-only (W/O) file I/O on a remote + machine. Must be used in conjunction with the Splitter VFD. + * Add Splitter VFD. + Maintain separate R/W and W/O channels for "concurrent" file writes + to two files using a single HDF5 file handle. + * Fixed an assertion failure in the parallel library when collectively + filling chunks. + * Fortran/C++ libs: Add wrappers for H5Pset/get_file_locking() API calls. + h5pget_file_locking_f() + h5pset_file_locking_f() + * Added new Fortran parameters: + H5F_LIBVER_ERROR_F + H5F_LIBVER_NBOUNDS_F + H5F_LIBVER_V18_F + H5F_LIBVER_V110_F + * Add new Fortran API: h5pget_libver_bounds_f. + * h5repack added options to control how external links are handled. + * The tools library was updated by standardizing the error stack process. + * The H5DSis_scale function was updated to return "not a dimension scale" (0) + instead of failing (-1), when CLASS or DIMENSION_SCALE attributes are + not written according to Dimension Scales Specification. + * Bug Fixes: + + Fix bug and simplify collective metadata write operation when some ranks + have no entries to contribute. This fixes parallel regression test + failures with IBM SpectrumScale MPI on the Summit system at ORNL. + + Fixed use-of-uninitialized-value error. + Appropriate initialization of local structs was added to remove the + use-of-uninitialized-value errors reported by MemorySanitizer. + + Creation of dataset with optional filter. + A fix is applied to allow the creation of a dataset in such + situation, as specified in the user documentation. + + Explicitly declared dlopen to use RTLD_LOCAL. + + H5Sset_extent_none() sets the dataspace class to H5S_NO_CLASS which + causes asserts/errors when passed to other dataspace API calls. + + Fixed the segmentation fault when reading attributes with multiple threads + The problem was fixed by setting the file pointer to the current opened + file pointer when the attribute was accessed. Similar patch up was done + before when reading dataset with variable length string datatype. + + Don't allocate an empty (0-dimensioned) chunked dataset's chunk + index, until the dataset's dimensions are increased. + + Fortan: Corrected INTERFACE INTENT(IN) to INTENT(OUT) for buf_size in + h5fget_file_image_f. + + h5diff fixed a command line parsing error. + + h5diff added a command line option to ignore attributes. + + h5diff added another level to the verbose argument to print filenames. + + h5repack was fixed to repack the reference attributes properly. + * For details check: + https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.7/src/hdf5-1.10.7-RELEASE.txt +- version 1.10.6 + * Added S3 and HDFS Virtual File Drivers (VFDs) to HDF5. + Instructions to enable them when configuring HDF5 on Linux and Mac + may be found at. + https://portal.hdfgroup.org/display/HDF5/Virtual+File+Drivers+-+S3+and+HDFS. + * Added new wrappers for H5Pset/get_create_intermediate_group() + LinkCreatPropList::setCreateIntermediateGroup() + LinkCreatPropList::getCreateIntermediateGroup() + * h5repack was fixed to repack datasets with external storage + to other types of storage. + * Bug Fixes: + + Improved performance when creating a large number of small datasets by + retrieving default property values from the API context instead of doing + skip list searches. More work is required to achieve parity with HDF5 1.8. + + Fixed user-created data access properties not existing in the property list + returned by H5Dget_access_plist. Thanks to Steven Varga for submitting a + reproducer and a patch. + + Inappropriate linking with deprecated MPI C++ libraries. + HDF5 does not define *_SKIP_MPICXX in the public headers, so applications + can inadvertently wind up linking to the deprecated MPI C++ wrappers. + MPICH_SKIP_MPICXX and OMPI_SKIP_MPICXX have both been defined in H5public.h + so this should no longer be an issue. HDF5 makes no use of the deprecated + MPI C++ wrappers. + + fcntl(2)-based file locking incorrectly passed the lock argument struct + instead of a pointer to the struct, causing errors on systems where + flock(2) is not available. + This bug affects HDF5 1.10.0 through 1.10.5. + fcntl(2)-based file locking now correctly passes the struct pointer. + + Fixed a bug caused by a bad tag value when condensing object header + messages. + + Fixed an issue when creating a file with non-default file space info + together with library high bound setting to H5F_LIBVER_V18. + This was fixed by setting and checking the proper version in the file + space info message based on the library low and high bounds when creating + and opening the HDF5 file. + + Fixed an issue where copying a version 1.8 dataset between files using + H5Ocopy fails due to an incompatible fill version. + + Fixed a bug that would cause an error or cause fill values to be + incorrectly read from a chunked dataset using the "single chunk" index if + + Fixed a bug that could cause an error or cause fill values to be + incorrectly read from a dataset that was written to using H5Dwrite_chunk + if the dataset was not closed after writing. + + Fixed memory leak in scale offset filter. + * For details check: + https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.6/src/hdf5-1.10.6-RELEASE.txt +- Security bugs fixed: + * CVE-2018-13870: heap-based buffer over-read in the function + H5O_link_decode in H5Olink.c (bsc#1101493) + * CVE-2018-13869: memcpy parameter overlap in the function + H5O_link_decode in H5Olink.c (bsc#1101495) + * CVE-2018-17438: A SIGFPE signal is raised in the function + H5D__select_io() of H5Dselect.c in the HDF HDF5 through 1.10.3 + (bsc#1109570) + library during an attempted parse of a crafted HDF file, + because of incorrect protection against division + (bsc#1109570) + * CVE-2018-17435: A heap-based buffer over-read in H5O_attr_decode() + in H5Oattr.c in the HDF HDF5 through 1.10.3 library allows + attackers to cause a denial of service via a crafted HDF5 file. + (bsc#1109567) +- Refresh patches + +------------------------------------------------------------------- +Thu Jul 23 16:33:58 UTC 2020 - Egbert Eich + +- Add build support for gcc10 to HPC build (bsc#1174439). + +------------------------------------------------------------------- +Mon Jul 20 14:48:42 UTC 2020 - Egbert Eich + +- Add missing openmpi4 flavors. +- Enable build of non-HPC flavors for all non-HPC builds. + +------------------------------------------------------------------- +Wed Jun 24 07:32:58 UTC 2020 - Alin M Elena + +- add openmpi4 packages to build and disable build for leap + +------------------------------------------------------------------- +Fri Apr 17 14:54:44 UTC 2020 - Egbert Eich + +- Fix .so number in baselibs.conf for libhdf5_fortran libs (boo#1169793). + +------------------------------------------------------------------- +Thu Apr 2 07:49:26 UTC 2020 - Egbert Eich + +- Fix library link flags on pkg-config file for HPC builds (boo#1134298). + +------------------------------------------------------------------- +Mon Jan 20 00:47:04 UTC 2020 - Stefan BrĂ¼ns + +- Remove bogus undefines of suffix and mpi_flavor. suffix is the + name of an RPM built-in (like expand or echo), and since RPM 4.15 + trying to alter a built-in is an error. Fixes built of serial + flavor on Tumbleweed. See https://rpm.org/user_doc/macros.html + +------------------------------------------------------------------- +Tue Dec 10 16:30:03 UTC 2019 - Stefan BrĂ¼ns + +- Add compat provides for renamed hdf5-openmpi{,-devel} package, + see https://en.opensuse.org/openSUSE:Package_dependencies +- Fix openmpi1 package naming for SLE/Leap <= 15.1 + +------------------------------------------------------------------- +Thu Nov 28 18:13:10 UTC 2019 - Egbert Eich + +- Add HPC support for gcc8 and gcc9 (jsc#SLE-7766 & jsc#SLE-8604). + +------------------------------------------------------------------- +Thu Nov 28 15:54:19 UTC 2019 - Egbert Eich + +- Disable openmpi1 builds for SLE/Leap > 15.1. +- Enable openmpi3 builds for Leap and SLE > 15.1 (jsc#SLE-7773). + +------------------------------------------------------------------- +Thu Oct 24 06:37:26 UTC 2019 - Nicolas Morey-Chaisemartin + +- openmpi has been renamed into openmpi1 + +------------------------------------------------------------------- +Tue Sep 10 07:54:05 UTC 2019 - Ana Guerrero Lopez + +- Use -ffat-lto-objects to provide a proper static library. + +------------------------------------------------------------------- +Tue Sep 3 10:17:31 UTC 2019 - Ana Guerrero Lopez + +- Re-list hdf5-mpi.patch in the spec file for the sake of a avoiding + a script rejecting the package automatically. + +------------------------------------------------------------------- +Fri Aug 23 09:58:01 UTC 2019 - Ana Guerrero Lopez + +- Update to version 1.10.5: (jsc#SLE-8501) + * https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.5/src/hdf5-1.10.5-RELEASE.txt +- Security bugs fixed: + * CVE-2018-17233: A SIGFPE signal is raised in the function + H5D__create_chunk_file_map_hyper. (bsc#1109166) + * CVE-2018-17234: Memory leak in the H5O__chunk_deserialize() + function in H5Ocache.c (bsc#1109167) + * CVE-2018-17434: A SIGFPE signal is raised in function apply_filters() + of h5repack_filters.c (bsc#1109566) + * CVE-2018-17437: Memory leak in the H5O_dtype_decode_helper() function + in H5Odtype.c. (bsc#1109569) + * CVE-2018-17237: A SIGFPE signal is raised in the function + H5D__chunk_set_info_real (bsc#1109168) (commit 4e31361d). +- Bump fortran library soname, sonum_F from 100 to 102. +- Adjust library installation path, use %hpc_prefix/lib64 in x86_64 + and %hpc_libdir in all other cases +- Patches refreshed: + * hdf5-LD_LIBRARY_PATH.patch + * hdf5-1.8.11-abort_unknown_host_config.patch + * PPC64LE-Fix-long-double-handling.patch + * hdf5-Remove-timestamps-from-binaries.patch + * Disable-phdf5-tests.patch +- Patch disabled, upstream have changed the file that was being patched, + while it could be ported, it's unknown if this patch is still needed. + * hdf5-mpi.patch +- Patch removed, merged upstream + * 0001-Fix-return-value-in-test_libver_bounds_open.patch + +------------------------------------------------------------------- +Thu Jul 4 11:45:55 UTC 2019 - Egbert Eich + +- Since build machine size issues do not seem to go way, make + the %check stage optional: enable with '--with check'. + +------------------------------------------------------------------- +Thu Apr 25 08:51:47 UTC 2019 - Christian Goll + +- set higher constraints for succesfull mpich tests (boo#1133222) + +------------------------------------------------------------------- +Mon Apr 1 12:41:23 UTC 2019 - normand@linux.vnet.ibm.com + +- Add _constraints to avoid transient build error ppc64le + +------------------------------------------------------------------- +Sat Mar 9 15:04:06 UTC 2019 - Stefan BrĂ¼ns + +- Update URL: and Source: to use https://. + +------------------------------------------------------------------- +Fri Mar 1 12:19:33 UTC 2019 - Egbert Eich + +- Like on PPC ignore transient 'make check' failures on aarch64. + +------------------------------------------------------------------- +Fri Mar 1 09:37:54 UTC 2019 - Egbert Eich + +- Remove ringdisabled magic as hdf5 is no longer a ring package. + This should resolve a number of problems in the review channels + for Factory with packages requiring hdf5 libs. + +------------------------------------------------------------------- +Wed Feb 13 10:37:28 UTC 2019 - Egbert Eich + +- Consolidate use of openmpi1, openmpi2, openmpi3 for non-HPC builds. + +------------------------------------------------------------------- +Fri Jan 25 19:14:31 UTC 2019 - eich@suse.com + +- Remove dependency to the hdf5-devel-data file for HPC: + Currently, there are no macro files for HPC - these files + will have to be handled differently. +- Re-disable all non-HPC builds for SLE. + +------------------------------------------------------------------- +Mon Jan 14 08:56:39 UTC 2019 - eich@suse.com + +- Reenable 'serial' build for SLE: this build creates hdf5-devel-data. + +------------------------------------------------------------------- +Thu Jan 3 11:39:58 UTC 2019 - eich@suse.com + +- Do not build non-HPC on SLE: This helps to save some build + cycles. + +------------------------------------------------------------------- +Wed Dec 19 19:54:05 UTC 2018 - Todd R + +- Use upstream-recommended %{_rpmconfigdir}/macros.d directory + for the rpm macros. + +------------------------------------------------------------------- +Wed Dec 12 15:28:48 UTC 2018 - Todd R + +- Also build for regular openmpi2 and openmpi3 + +------------------------------------------------------------------- +Thu Nov 22 18:15:55 UTC 2018 - Stefan BrĂ¼ns + +- Build HDF5 C++ bindings also for the MPI variants, there is no reason + not to do it. +- Enable sz2 support also for MPI variants. + +------------------------------------------------------------------- +Mon Nov 19 08:52:43 UTC 2018 - eich@suse.com + +- Replace git-archive generated by downloaded tar-ball. + +------------------------------------------------------------------- +Sat Nov 17 17:21:00 UTC 2018 - eich@suse.com + +- Update to 1.10.4: + https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.4/src/hdf5-1.10.4-RELEASE.txt + * Update Disable-phdf5-tests.patch + * Replace and update hdf5-buildcompare.patch by + hdf5-Remove-timestamps-from-binaries.patch + +------------------------------------------------------------------- +Fri Nov 16 23:09:01 UTC 2018 - eich@suse.com + +- Remove lib*_cpp and lib*_hl_cpp dependencies for MPI for the time + being. + +------------------------------------------------------------------- +Sun Nov 11 12:15:14 UTC 2018 - eich@suse.com + +- Create main master package, fix dependencies. + +------------------------------------------------------------------- +Fri Sep 21 14:50:12 UTC 2018 - Stefan BrĂ¼ns + +- Update to 1.10.3: + https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.3/src/hdf5-1.10.3-RELEASE.txt +- Update to 1.10.2: + https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.2/src/hdf5-1.10.2-RELEASE.txt +- Bump soversions (101 -> 103) for libhdf5 and libhdf5_cpp +- Drop Fix-warnings-for-missing-returns.patch, fixed upstream +- Add 0001-Fix-return-value-in-test_libver_bounds_open.patch +- Rebase patches (tab / space conversion): + * PPC64LE-Fix-long-double-handling.patch + * hdf5-buildcompare.patch + * hdf5-mpi.patch +- Rebase Disable-phdf5-tests.patch +- Security bugs fixed: + * CVE-2017-17505: NULL pointer dereference in the function + H5O_pline_decode allowing for DoS via crafted file (bsc#1072087) + * CVE-2017-17506: Out of bounds read in the function + H5Opline_pline_decode (bsc#1072090) + * CVE-2017-17508: divide-by-zero vulnerability in function + H5T_set_loc (bsc#1072108) + * CVE-2017-17509: out of bounds write vulnerability in function + H5G__ent_decode_vec (bsc#1072111) + * CVE-2018-11202: NULL pointer dereference in H5S_hyper_make_spans + in H5Shyper.c allows a remote denial of service attack (bsc#1093641) + * CVE-2018-11203: division by zero in H5D__btree_decode_key in H5Dbtree.c + It could allow a remote denial of service attack (bsc#1093649) + * CVE-2018-11204: A NULL pointer dereference was discovered in + H5O__chunk_deserialize in H5Ocache.c (bsc#1093655) + * CVE-2018-11206: A out of bounds read was discovered + in H5O_fill_new_decode and H5O_fill_old_decode in H5Ofill.c + (bsc#1093657) + * CVE-2018-11207: division by zero was discovered in H5D__chunk_init + in H5Dchunk.c (bsc#1093653) + +------------------------------------------------------------------- +Tue Jun 19 06:15:06 UTC 2018 - eich@suse.com + +- Handle license file using %license where applicable. +- Package example package also for HPC build and create + a master file for it. + +------------------------------------------------------------------- +Fri Apr 27 14:20:25 UTC 2018 - eich@suse.com + +- Fix HPC library master packages dependency: make it require + the correct flavor (bsc#1091237). + +------------------------------------------------------------------- +Sat Apr 7 22:31:05 UTC 2018 - eich@suse.com + +- Only build one examples package for all flavors, do not + include dependencies as these would be flavor specific + (bsc#1088547). + +------------------------------------------------------------------- +Sat Mar 31 23:53:50 UTC 2018 - stefan.bruens@rwth-aachen.de + +- Fix some typos, one trivial, two mispelled macros + +------------------------------------------------------------------- +Sat Feb 10 23:04:47 UTC 2018 - jengelh@inai.de + +- Trim description for size and drop most of the marketing blurb. + Fix RPM groups. + +------------------------------------------------------------------- +Sat Feb 10 17:40:10 UTC 2018 - eich@suse.com + +- Make module files package arch dependent: it + contains arch-dependent paths (boo#1080442). + +------------------------------------------------------------------- +Sat Feb 10 07:31:46 UTC 2018 - eich@suse.com + +- Prepend PKG_CONFIG_PATH in modules file (boo#1080426). + +------------------------------------------------------------------- +Fri Feb 9 20:10:17 UTC 2018 - eich@suse.com + +- Add support for openmpi2 for HPC (FATE#325089). + +------------------------------------------------------------------- +Fri Feb 9 13:48:43 UTC 2018 - cgoll@suse.com + +- Fix summary in module files (bnc#1080259) + +------------------------------------------------------------------- +Thu Feb 8 11:37:06 UTC 2018 - eich@suse.com + +- Disable %check stage for mpich builds on s390(x) (bsc#1080022). + +------------------------------------------------------------------- +Fri Jan 12 15:38:59 UTC 2018 - eich@suse.com + +- Disable the openmpi3 flavor in some products. + +------------------------------------------------------------------- +Fri Jan 5 18:34:20 UTC 2018 - eich@suse.com + +- Switch from gcc6 to gcc7 as additional compiler flavor for HPC on SLES. +- Add support for mpich and openmpi3 for HPC. + +------------------------------------------------------------------- +Thu Nov 9 15:02:35 UTC 2017 - normand@linux.vnet.ibm.com + +- temporarily disable make check for PowerPC boo#1058563 + +------------------------------------------------------------------- +Tue Nov 7 13:23:40 UTC 2017 - eich@suse.com + +- Update to 1.10.1: + https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.1/src/hdf5-1.10.1-RELEASE.txt +- Fix-warnings-for-missing-returns.patch: + replace: hdf5-non_void_return.patch +- PPC64LE-Fix-long-double-handling.patch: + replace: hdf5-ldouble-ppc64le.patch +- Disable-phdf5-tests.patch: + replace: hdf5_disable_testphdf5.patch +- Disabling validation tests for the MPI variant for now as they + seem to cause issues in OBS. + +------------------------------------------------------------------- +Thu Oct 26 15:51:18 UTC 2017 - eich@suse.com + +- Fix name: baselib.conf -> baselibs.conf + +------------------------------------------------------------------- +Sun Oct 22 08:46:29 UTC 2017 - eich@suse.com + +- Remove openssl-devel and krb5-devel from the BuildRequires. + +------------------------------------------------------------------- +Tue Oct 17 14:07:15 UTC 2017 - eich@suse.com + +- Add magic to limit the number of flavors built in the OBS ring + to non-HPC and mvapich2 builds. +- Fix %libname() for non-HPC builds. +- Fix some summaries and a Requires: of devel-static. + +------------------------------------------------------------------- +Fri Sep 8 14:35:32 UTC 2017 - eich@suse.com + +- Convert package to multibuild. +- Add HPC build using environment modules + (FATE#321717, FATE#321710). + +------------------------------------------------------------------- +Tue Aug 29 12:03:27 UTC 2017 - hpj@urpla.net + +- fix compiler flag substitution + +------------------------------------------------------------------- +Mon Jul 3 12:53:05 UTC 2017 - badshah400@gmail.com + +- Add libsz2-devel to list of Requires for -devel packages, this + is required for compilation against hdf5 when szlib support is + enabled. +- Minor specfile cleanups using spec-cleaner. + +------------------------------------------------------------------- +Fri Jun 16 21:13:30 UTC 2017 - junghans@votca.org + +- Enabled szlib support through libaec's szlib API + +------------------------------------------------------------------- +Wed Oct 5 19:03:35 UTC 2016 - toddrme2178@gmail.com + +- Fix baselibs.conf so numbers. + Fixes bnc#1002569 + +------------------------------------------------------------------- +Tue Sep 6 08:51:09 UTC 2016 - normand@linux.vnet.ibm.com + +- new hdf5_disable_testphdf5.patch to disable only testphdf5 + for all arches and not all mpi tests for ppc64le + tempo patch as long as boo#997252 not solved + +------------------------------------------------------------------- +Mon Sep 5 11:00:59 UTC 2016 - normand@linux.vnet.ibm.com + +- temporarily disable mpi test for ppc64le + +------------------------------------------------------------------- +Tue Jul 26 15:50:22 UTC 2016 - adrian@suse.de + +- update to 1.10.0-patch1 + https://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0-patch1/src/hdf5-1.10.0-patch1-RELEASE.txt + +------------------------------------------------------------------- +Mon May 23 21:29:44 UTC 2016 - toddrme2178@gmail.com + +- update to 1.8.17, changes documented here: + https://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.17/src/hdf5-1.8.17-RELEASE.txt + +------------------------------------------------------------------- +Fri Apr 15 11:26:40 UTC 2016 - normand@linux.vnet.ibm.com + +- add hdf5-mpi.patch same as fedora commit id + 78ddcff82b10fd80eafb7b2dc5e4ce2bb9ecbe3c + should avoid transient hung of t_pflush1 test + +------------------------------------------------------------------- +Fri Mar 18 14:26:42 UTC 2016 - toddrme2178@gmail.com + +- Split libraries into C, C++, and Fortran versions to comply with + openSUSE library packaging policies. + Fixes BNC#971602 +- Make Fortran builds required. +- Manually set so numbers. The autodetected ones weren't matching + the real ones. + +------------------------------------------------------------------- +Mon Mar 7 14:35:44 UTC 2016 - olaf@aepfle.de + +- Remove timestamps from binaries + hdf5-buildcompare.patch + +------------------------------------------------------------------- +Thu Jan 28 00:08:01 UTC 2016 - sweet_f_a@gmx.de + +- update to 1.8.16, changes documented here: + https://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.16/src/hdf5-1.8.16-RELEASE.txt +- rebase hdf5-ldouble-ppc64le.patch +- remove hdf5-cpp-compilation-errors.patch +- prepare independent so versions and add TODO + +------------------------------------------------------------------- +Fri Aug 21 09:45:05 UTC 2015 - toddrme2178@gmail.com + +- Currently the regular, openmpi, and mpivachi2 versions of the + library packages all provide the exact same libraries. So any + package built against the -devel package will end up with an + "unresolvable" build error because there are multiple versions + of the library it can use. To avoid this, I have added generic + provides for the library package so packages can depend on the + version they really need, avoiding these build issues. + +------------------------------------------------------------------- +Thu Aug 13 07:42:07 UTC 2015 - badshah400@gmail.com + +- Add hdf5-cpp-compilation-errors.patch: Reverts a change from + v1.8.15 to H5api_adpt.h that caused compilation errors for C++ + HDF5 applications; patch taken from upstream svn. + +------------------------------------------------------------------- +Mon Jul 27 11:11:12 UTC 2015 - toddrme2178@gmail.com + +- Update subpackage groups +- Make subpackage summaries and descriptions more consistent +- Provide rpm macros for version identification +- Spec file cleanups + +------------------------------------------------------------------- +Mon Jul 27 10:06:49 UTC 2015 - toddrme2178@gmail.com + +- Use explicit library requirements to avoid ambiguities. + Without this, packages that depend on hdf5 won't know which + library to use. + +------------------------------------------------------------------- +Thu Jul 23 11:30:56 UTC 2015 - toddrme2178@gmail.com + +- Fix baselibs.conf + +------------------------------------------------------------------- +Wed Jul 22 11:23:14 UTC 2015 - toddrme2178@gmail.com + +- update to 1.8.15 + * New Features + + Library + - Added Memory Allocation Functions that Use the Library's Allocator + - H5Pset_istore_k and H5Pset_sym_k added validation of "ik" to not + exceed the max v1 btree entries (2 bytes) to these two routines. + - Added Functions to Control the Value of H5PL_no_plugin_g without + Using an Environment Variable + + Parallel Library + - Attached an attribute destroy callback to MPI_COMM_SELF that + shuts down the HDF5 library when MPI_COMM_SELF is destroyed, + in other words, on MPI_Finalize. This should fix several issues + that users see when they forget to close HDF5 objects before + + Fortran API + - Added Global Variables. These new global variables are equivalent to + the C definitions without the '_F': + o H5G_UDLINK_F + o H5G_SAME_LOC_F + o H5O_TYPE_UNKNOWN_F + o H5O_TYPE_GROUP_F + o H5O_TYPE_DATASET_F + o H5O_NAMED_DATATYPE_F + o H5O_TYPE_NTYPES_F + + C++ API + - New Wrappers for C Functions H5P[s/g]et_libver_bounds + - New Wrappers to Get the Object Header's Version + - New DataType Constructor + + Support for New Platforms, Languages, and Compilers + - Support for Linux 3.10.0-123.20.1.el7 added (LK - 2015/04/01) + * Bug Fixes since HDF5-1.8.14 + + Library + - Addition of Error Tracing Functionality to Several C API Calls + - H5Rdereference Now Checks for HADDR_UNDEF or Uninitialized References + - Fixed Bugs in H5Sextent_copy + + Parallel Library + - Fixed a Potential Memory Error + - Parallel Test Problem Fixed + - MPE Support + + Tools + - h5repack crashed on enumerated 8-bit type. + - h52gif crashed non-8bit images. + - perform/benchpar.c retired. + - Source perform/ directory moved to tools/perform. + + Fortran API + - Fortran Fails with --enable-fortran2003 and Intel 15.x Compilers + - h5tenum_insert_f Does Not Work with Default 8 Byte Integers + (xlf compiler) + - Some Fortran APIs Never Returned the Error State + - Fixed h5pget_class_f + + C++ API + - Combined Two H5File::getObjCount Overloaded Methods + The following two methods + o ssize_t getObjCount(unsigned types) const; + o ssize_t getObjCount() const; + were combined into one: + o ssize_t getObjCount(unsigned types = H5F_OBJ_ALL) const; + - Many Warnings Were Removed + - Functionality Deprecation + The following two constructors of classes AbstractDs, IdComponent, + H5Location, and H5Object are no longer appropriate after the data member + "id" had been moved from IdComponent to the sub-classes in previous + releases. + o (const hid_t h5_id); + o (const & original); + The copy constructors were no-op and removed in 1.8.15. The other + constructors will be removed from 1.10 release, and then from 1.8.17 + if their removal does not cause any problems. + + High-Level APIs: + - Suppress Warnings from Flex/Bison-generated Code + - Changed hdf5_hl.h to Include the HDF5 Main Library "hdf5.h" + - H5PTcreate_fl Does Not Convert to Memory Datatype + - Fix for H5LT Attribute Functions + + Fortran High-Level APIs: + - Internal Library Fix for Missing Argument Declaration +- Build in thread-safe mode to allow parallel reads + * These are only unsupported to avoid confusing casual users. + The fotran and C++ libraries don't support thread-safe mode, + while the C library does. So you have to explicitly allow + building the thread-safe C library and the non-thread-safe C++ + and fortran libraries in order to make sure only people who + have done their research do so. Since users are going to be + accessing this through other programs, this doesn't matter. +- Build fortran 2003 libraries +- Rebase hdf5-non_void_return.patch +- Remove irrelevant hdf5-configure-long-double.patch + +------------------------------------------------------------------- +Mon May 11 13:37:50 UTC 2015 - dmueller@suse.com + +- update hdf5-non_void_return.patch for GCC 5.x + +------------------------------------------------------------------- +Tue Jan 13 11:07:12 CET 2015 - pth@suse.de + +- Tag baselibs.conf as source. + +------------------------------------------------------------------- +Fri Jan 9 12:45:39 UTC 2015 - sweet_f_a@gmx.de + +- fix typos in ChangeLog + +------------------------------------------------------------------- +Wed Nov 19 10:52:32 UTC 2014 - pgajdos@suse.com + +- updated to 1.8.14: + * bugfix release, see RELEASE.txt + +------------------------------------------------------------------- +Mon Jun 23 11:57:36 UTC 2014 - pgajdos@suse.com + +- updated to 1.8.13: + - Added an H5free_memory API call. This should be used to free memory + that has been allocated by HDF5 API calls. H5Tget_member_name and + H5Pget_class_name are two examples. The main motivation for this call + is Windows, where it is common for application code and the HDF5 Library + to be using different C run-time libraries (CRT). Using the new call + ensures that the same CRT handles both the allocation and free. This + new function can also be useful in any case where the library uses a + different memory manager than the application, such as when a debug + memory manager is in use or when the HDF5 Library is wrapped for use + in a managed language like Python or Java. Fixes HDFFV-7710, 8519, + and 8851. (DER - 2014/04/11) + - The Core VFD (aka Memory VFD) can now be configured to track dirty + regions in the file and only write out the changed regions on + flush/close. Additionally, a "page aggregation" size can be set that + will aggregate small writes into larger writes. For example, setting + a 1 MiB page aggregation size will logically partition the the + in-memory file into 1 MiB pages that will be written out in their + entirety if even a single byte is dirtied. The feature is controlled + via the new H5Pset/get_core_write_tracking() API call. A new + "core_paged" target has been added to the check-vfd target in + test/Makefile.am that exercises the feature over all HDF5 VFD-aware + tests. (DER - 2014/04/12) + - see http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.13-RELEASE.txt + for more +- modified patches: + * hdf5-LD_LIBRARY_PATH.patch +------------------------------------------------------------------- +Sun Jan 5 03:59:20 UTC 2014 - matz@suse.de + +- Detect IBM long double specialness on ppc64le and don't segfault + int the testsuite when checking that type. + Added patches: + * hdf5-ldouble-ppc64le.patch + +------------------------------------------------------------------- +Tue Nov 26 14:27:16 UTC 2013 - pgajdos@suse.com + +- update to 1.8.12: + - Added a configuration option to change the default plugin path. + The configure option is --with-default-plugindir=location. + The cmake option is -DH5_DEFAULT_PLUGINDIR:PATH=location. + HDFFV-8513. (ADB 2013/09/04) + - Renamed FFLAGS to FCFLAGS in configure. (ADB 2013/08/13) + - CMake can now package a compressed examples file, the default for + Windows binaries from HDF Group. (ADB - 2013/07/22) + - h5repack: Added the ability to use plugin filters to read and write + files. The option uses the filter number. HDFFV-8345 + (ADB - 2013/09/04). + - h5dump: Added the option -N --any_path, which searches the file for + paths that match the search path. HDFFV-7989 (ADB - 2013/08/12). + - h5dump: Added the optional arg 0 to -A, which excludes attributes + from display. HDFFV-8134 (ADB - 2013/08/01). + - Added tutorial examples to C++/examples. They can be installed by + "make install-examples" and, in the installed directory, they can be + executed by running the script file run-c++-ex.sh. (BMR - 2013/09/28) + - A new class, H5::H5Location, is added to represent the location concept + in the C library. It is a base class to H5::H5File and H5::H5Ojbect, + whose member functions are moved into H5::H5Location. H5::H5File can + now inherent those functions. As a result, an H5::H5File object can have + an attribute. (BMR - 2013/09/27) + - Added wrappers for H5Rget_obj_type2 to retrieve the type of the object + that an object reference points to. (BMR - 2013/09/27) + H5O_type_t H5Location::getRefObjType(void *ref, H5R_type_t ref_type) + - Added wrappers for H5Aexist to check whether an attribute exists given + a name. (BMR - 2013/09/27) + bool H5::H5Location::attrExists(const char* name) + bool H5::H5Location::attrExists(const H5std_string& name) + - Added a number of overloaded functions for convenience. (BMR - 2013/09/27) + - bugfixes + - see http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.12-RELEASE.txt + for more + +------------------------------------------------------------------- +Tue Sep 24 07:04:42 UTC 2013 - schwab@suse.de + +- hdf5-configure-long-double.patch: fix configure check for unsigned long + long to long double conversion to not fail spuriously for 128bit long + double +- Increase testsuite timeout for qemu user space build + +------------------------------------------------------------------- +Fri Sep 13 12:18:27 UTC 2013 - pgajdos@suse.com + +- build with -O0 also for gcc 4.8 + +------------------------------------------------------------------- +Fri Jun 14 00:09:30 UTC 2013 - sweet_f_a@gmx.de + +- increase hdf5_libver to 8 + +------------------------------------------------------------------- +Wed Jun 12 11:22:35 UTC 2013 - sweet_f_a@gmx.de + +- use host config "linux-gnu" for arm (linux-gnueabi) to get useful + H5_CFLAGS too +- add hdf5-1.8.11-abort_unknown_host_config.patch, to get noticed + if hdf5 doesn' t know our host +- minimize hdf5-non_void_return.patch, false positives doesn't make + problems anymore since now we have always -Wmissing-noreturn +- make verbose +- gcc 4.6.x needs -O0 on some systems + +------------------------------------------------------------------- +Tue Jun 11 13:45:26 UTC 2013 - sweet_f_a@gmx.de + +- Update to 1.8.11, changes documented here: + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html +- remove hdf5-fix_printf.patch, fixed by upstream +- use default CFLAGS (-O2) again if possible + +------------------------------------------------------------------- +Fri Apr 12 19:25:06 UTC 2013 - sweet_f_a@gmx.de + +- Update to 1.8.10-patch1: + * official important bug fixes for 1.8.10 + * see RELEASE.txt "Bug Fixes since HDF5-1.8.10" + +------------------------------------------------------------------- +Sun Nov 18 12:31:34 UTC 2012 - sweet_f_a@gmx.de + +- Update to 1.8.10, changes documented here: + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html +- remove hdf5-ph5diff.patch (fixed by upstream) +- add hdf5-fix_printf.patch + +------------------------------------------------------------------- +Fri Nov 16 16:23:18 UTC 2012 - sweet_f_a@gmx.de + +- cosmetics, enable parallel build for suse only +- fix build for old findutils + +------------------------------------------------------------------- +Mon Nov 5 12:31:22 UTC 2012 - coolo@suse.com + +- fixing baselibs.conf + +------------------------------------------------------------------- +Wed Sep 26 13:17:45 UTC 2012 - sweet_f_a@gmx.de + +- make sure to install the examples from non-parallel build + +------------------------------------------------------------------- +Mon Sep 24 12:29:04 UTC 2012 - sweet_f_a@gmx.de + +- don't use deprecated macro makeinstall +- enable test suite for parallel builds +- always build out of tree instead of copying sources + +------------------------------------------------------------------- +Fri Sep 7 17:24:21 UTC 2012 - scorot@free.fr + +- parallel versions for openmpi and mvapich2 +- add baselibs.conf + +------------------------------------------------------------------- +Wed Jun 20 09:39:44 UTC 2012 - sweet_f_a@gmx.de + + - minor rpm portability build fixes + - remove unused source file h5comp + - enable all tests on ppc again (remove hdf5-1.8.8-tstlite.patch) + - build fixes for arm + * avoid some false positives "no-return-in-nonvoid-function" + * disable some tests on arm only (hdf5-1.8.9-tests-arm.patch) + +------------------------------------------------------------------- +Mon May 28 15:05:43 UTC 2012 - ocefpaf@gmail.com + +- Update to 1.8.9 +* Changes documented here: + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +------------------------------------------------------------------- +Mon Mar 12 11:57:39 UTC 2012 - sweet_f_a@gmx.de + +- install libhdf5.settings (bnc#751747) +- move executables h5cc and h5c++ to the devel package + +------------------------------------------------------------------- +Sun Feb 19 04:46:42 UTC 2012 - ocefpaf@gmail.com + +- Removed "Fixup headers and scripts for multiarch". + +------------------------------------------------------------------- +Wed Nov 30 09:02:37 UTC 2011 - jengelh@medozas.de + +- Remove redundant/unwanted tags/section (cf. specfile guidelines) +- Use %_smp_mflags for parallel building +- Accurate rpmgroup selection for shared library packages + +------------------------------------------------------------------- +Tue Nov 29 20:05:19 UTC 2011 - ocefpaf@gmail.com + +- un-commented --with-pthread and --with-ssl. + +------------------------------------------------------------------- +Mon Nov 28 14:34:24 UTC 2011 - ocefpaf@gmail.com + +- Update to 1.8.8 + * Add patch to avoid setting LD_LIBRARY_PATH + * Add patch hdf5-non_void_return.patch + * Fixed non_void_return (thanks to Boris Manojlovic). + * Drop tstlite patch + * drop ppc64 longdouble patch, not required anymore + * Catch up with some Fedora modifications + - Add rpm macro %%{_hdf5_version} for convenience + * No Fortran modules for opensuse < 11.4 (Do not pass make check) + + New Features + ============ + + Configuration + ------------- + - Added the --enable-fortran2003 flag to enable Fortran2003 support + in the HDF5 Fortran library. The flag should be used along with the + --enable-fortran flag and takes affect only when the Fortran compiler + is Fortran2003 compliant. (EIP - 2011/11/14) + - Added checks for clock_gettime and mach/mach_time.h to both configure and + CMake. This will support the move from gettimeofday to clock_gettime's + monotonic timer in the profiling code in a future release. + (DER - 2011/10/12) + + Library + ------- + - The Windows VFD code has been removed with the exception of the functions + which set it (H5Pset_fapl_windows, for example). Setting the Windows + VFD now really sets the SEC2 VFD. The WINDOWS_MAX_BUF and + WINDOWS_USE_STDIO configuration options and #defines have also been + removed. NOTE: Since the Windows VFD was a clone of the SEC2 VFD, this + change should be transparent to users. + (DER - 2011/10/12 - HDFFV-7740, HDFFV-7744) + - H5Tcreate now supports the string type (fixed-length and variable- + length). (SLU - 2011/05/20) + + Parallel Library + ---------------- + - Added new H5Pget_mpio_actual_chunk_opt_mode and + H5Pget_mpio_actual_io_mode API routines for querying whether/how + a collective I/O operation completed. (QAK - 2011/10/12) + + Tools + ----- + - None + + High-Level APIs + --------------- + - Added the following Fortran wrappers for the Dimension Scale APIs: + h5dsset_scale_f + h5dsattach_scale_f + h5dsdetach_scale_f + h5dsis_attached_f + h5dsis_scale_f + h5dsset_label_f + h5dsget_label_f + h5dsget_scale_name_f + h5dsget_num_scales_f + (EIP for SB - 2011/10/13 - HDFFV-3797) + + Fortran API + ----------- + - The HDF5 Fortran library was enhanced to support the Fortran 2003 standard. + The following features are available when the HDF5 library is configured + using the --enable-fortran and --enable-fortran2003 configure flags AND + if the Fortran compiler is Fortran 2003 compliant: + + - Subroutines overloaded with the C_PTR derived type: + h5pget_f + h5pget_fill_value_f + h5pinsert_f + h5pregister_f + h5pset_f + h5pset_fill_value_f + h5rcreate_f + h5rderefrence_f + h5rget_name_f + h5rget_obj_type_f + - Subroutines overloaded with the C_PTR derived type + and simplified signatures: + h5aread_f + h5awrite_f + h5dread_f + h5dwrite_f + - New subroutines + h5dvlen_reclaim_f + h5literate_by_name_f + h5literate_f + h5ovisit_f + h5tconvert_f + h5pset_nbit_f + h5pset_scaleoffset_f + - Subroutines with additional optional parameters: + h5pcreate_class_f + (EIP - 2011/10/14) + + C++ API + ------- + - None + +------------------------------------------------------------------- +Thu Jun 2 20:39:35 UTC 2011 - ocefpaf@yahoo.com.br + +- uncomment make check + +------------------------------------------------------------------- +Tue May 24 14:37:23 UTC 2011 - pgajdos@novell.com + +- updated to 1.8.7 + +------------------------------------------------------------------- +Fri Apr 29 16:11:29 CEST 2011 - pth@suse.de + +- undrop package. +- Do type-punning using unions to be able to compile without + -fno-strict-aliasing. +- Don't use macros in patch names. +- Use _cv_ in variables to be cached by configure. + +------------------------------------------------------------------- +Thu May 7 19:40:59 CEST 2009 - pgajdos@suse.cz + +- fixed build with new gcc, see [bnc#501751] + +------------------------------------------------------------------- +Mon Mar 2 17:00:47 CET 2009 - crrodriguez@suse.de + +- save 9MB removing static libraries + +------------------------------------------------------------------- +Tue Jan 13 11:41:28 CET 2009 - pgajdos@suse.cz + +- updated to 1.8.2: + - Upgraded libtool to version 2.2.6a. (MAM - 2008/10/15). + - Added two new public routines: H5Pget_elink_fapl() and + H5Pset_elink_fapl(). (see bug #1247) (VC - 2008/10/13) + - Improved free space tracking in file to be faster. (QAK - 2008/10/06) + - Added 'mounted' field to H5G_info_t struct. (QAK - 2008/07/15) + - h5repack: added new options -u and -b to add a userblock to an HDF5 + file during the repack. (PVN - 2008/08/26) + - h5repack: added options -t and -a to call H5Pset_alignment while + creating a repacked file. (PVN - 2008/08/29) + - h5ls: added capability to traverse through external links when the -r + (recursive) flag is given. (NAF - 2008/09/16) + - h5ls: added -E option to enable traversal of external links. + h5ls will not traverse external links without this flag being set. + (NAF - 2008/10/06) + - h5dump: when -b flag is used without a keyword after it, binary + output defaults to NATIVE. MEMORY keyword was deprecated + and replaced by NATIVE keyword. (PVN - 2008/10/30) + - h5diff: returns 1 when file graphs differ by any object. + Error return code was changed to 2 from -1. (PVN - 2008/10/30) + - h5import: TEXTFPE (scientific format) was deprecated. Use TEXTFP + instead (PVN - 2008/10/30) + - Added optional parameter 'mounted' to H5Gget_info_f, + H5Gget_info_by_idx_f, H5Gget_info_by_name_f (MSB - 2008/09/24) + - Added H5Tget_native_type_f (MSB - 2008/09/30) + - These member functions were added as wrapper for H5Rdereference to + replace the incorrect IdComponent::dereference(). + void H5Object::dereference(H5Object& obj, void* ref, + H5R_type_t ref_type=H5R_OBJECT) + void H5Object::dereference(H5File& h5file, void* ref, + H5R_type_t ref_type=H5R_OBJECT) + void H5Object::dereference(Attribute& obj, void* ref, + H5R_type_t ref_type=H5R_OBJECT) + In addition, these constructors were added to create the associated + objects by way of dereference: + DataSet(H5Object& obj, void* ref, H5R_type_t ref_type=H5R_OBJECT) + DataSet(H5File& file, void* ref, H5R_type_t ref_type=H5R_OBJECT) + DataSet(Attribute& attr, void* ref, H5R_type_t ref_type=H5R_OBJECT) + Group(H5Object& obj, void* ref, H5R_type_t ref_type=H5R_OBJECT) + Group(H5File& obj, void* ref, H5R_type_t ref_type=H5R_OBJECT) + Group(Attribute& attr, void* ref, H5R_type_t ref_type=H5R_OBJECT) + DataType(H5Object& obj, void* ref, H5R_type_t ref_type=H5R_OBJECT) + DataType(H5File& file, void* ref, H5R_type_t ref_type=H5R_OBJECT) + DataType(Attribute& attr, void* ref, H5R_type_t ref_type=H5R_OBJECT) + (BMR - 2008/10/29) +- removed destdir.patch + + +------------------------------------------------------------------- +Mon Jan 12 11:13:33 CET 2009 - pgajdos@suse.cz + +- fortran modules builds from now [bnc#457593] + +------------------------------------------------------------------- +Tue Nov 11 11:49:54 CET 2008 - pgajdos@suse.cz + +- fixing build of fortran interface moved to the future + +------------------------------------------------------------------- +Wed Jul 2 10:45:51 CEST 2008 - pgajdos@suse.cz + +- updated to 1.8.1 [bnc#401626] + * Enhanced group object management + * Enhanced attribute management and more efficient meta data handling + * Expanded datatype features + * Creation order tracking and indexing + * Improved meta data caching and cache control + * UTF-8 encoding + * New I/O filters: n-bit and scale+offset compression + * New link (H5L) and object (H5O) interfaces and features + * External and user-defined links + * New high-level APIs: + HDF5 Packet Table (H5PT) and HDF5 Dimension Scale (H5DS) + * C++ and Fortran interfaces for older high-level APIs: + H5Lite (H5LT), H5Image (H5IM), and H5Table (H5TB) + * New and improved tools +- removed doc package (doc/html no longer provided with package) +- octave builds againist 1.6 compatibility stuff + +------------------------------------------------------------------- +Wed May 7 13:12:11 CEST 2008 - pgajdos@suse.cz + +- repaired no-return-in-nonvoid-function + (noreturn.patch) + +------------------------------------------------------------------- +Mon Apr 28 11:43:08 CEST 2008 - pgajdos@suse.cz + +- repaired build for + * ia64 (%ifarch in hdf5.spec) + * s390, s390x (s390.patch) + +------------------------------------------------------------------- +Tue Mar 25 11:11:13 CET 2008 - pgajdos@suse.cz + +- package moved from BS, project science +- needed by octave 3.0 + diff --git a/hdf5.spec b/hdf5.spec new file mode 100644 index 0000000..bd27207 --- /dev/null +++ b/hdf5.spec @@ -0,0 +1,945 @@ +# +# spec file +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} + +%if 0%{?sle_version} >= 150200 +%define DisOMPI1 ExclusiveArch: do_not_build +%endif +%if !0%{?is_opensuse} && 0%{?sle_version:1} && 0%{?sle_version} < 150200 +%define DisOMPI3 ExclusiveArch: do_not_build +%endif + +%if 0%{?sle_version:1} && 0%{?sle_version} < 150300 +%define DisOMPI4 ExclusiveArch: do_not_build +%endif + +# Disable until resource issue is resolved. +%bcond_with check + +%define use_sz2 0 + +%define short_ver 1.12 +%define vers %{short_ver}.2 +%define _vers %( echo %{vers} | tr '.' '_' ) +%define src_ver %{version} +%define pname hdf5 +%global _lto_cflags %{_lto_cflags} -ffat-lto-objects + +%if "%{flavor}" == "" +ExclusiveArch: do_not_build + %define package_name %pname +%endif + +%if "%{flavor}" == "serial" +%bcond_with hpc +%endif + +%if "%{flavor}" == "openmpi4" +%{?DisOMPI4} +%global mpi_flavor openmpi +%define mpi_vers 4 +%bcond_with hpc +%endif + +%if "%{flavor}" == "openmpi5" +%{?DisOMPI5} +%global mpi_flavor openmpi +%define mpi_vers 5 +%bcond_with hpc +%endif + +%if "%{flavor}" == "mvapich2" +%global mpi_flavor %{flavor} +%bcond_with hpc +%endif + +%if "%{flavor}" == "gnu-hpc" +%bcond_without hpc +%global compiler_family gnu +%undefine c_f_ver +%endif + +%if "%{flavor}" == "gnu-openmpi4-hpc" +%{?DisOMPI4} +%bcond_without hpc +%define compiler_family gnu +%undefine c_f_ver +%global mpi_flavor openmpi +%define mpi_vers 4 +%endif + +%if "%{flavor}" == "gnu-openmpi5-hpc" +%{?DisOMPI5} +%bcond_without hpc +%define compiler_family gnu +%undefine c_f_ver +%global mpi_flavor openmpi +%define mpi_vers 5 +%endif + +%if "%{flavor}" == "gnu-mvapich2-hpc" +%bcond_without hpc +%define compiler_family gnu +%undefine c_f_ver +%global mpi_flavor mvapich2 +%endif + +%if "%{flavor}" == "gnu-mpich-hpc" +%bcond_without hpc +%define compiler_family gnu +%undefine c_f_ver +%global mpi_flavor mpich +%endif + +%if "%{flavor}" == "gnu7-hpc" +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 7 +%undefine mpi_flavor +%endif + +%if "%{flavor}" == "gnu7-openmpi4-hpc" +%{?DisOMPI4} +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 7 +%global mpi_flavor openmpi +%define mpi_vers 4 +%endif + +%if "%{flavor}" == "gnu7-openmpi5-hpc" +%{?DisOMPI5} +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 7 +%global mpi_flavor openmpi +%define mpi_vers 5 +%endif + +%if "%{flavor}" == "gnu7-mvapich2-hpc" +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 7 +%global mpi_flavor mvapich2 +%endif + +%if "%{flavor}" == "gnu7-mpich-hpc" +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 7 +%global mpi_flavor mpich +%endif + +%if "%{flavor}" == "gnu8-hpc" +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 8 +%undefine mpi_flavor +%endif + +%if "%{flavor}" == "gnu8-openmpi4-hpc" +%{?DisOMPI4} +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 8 +%global mpi_flavor openmpi +%define mpi_vers 4 +%endif + +%if "%{flavor}" == "gnu8-openmpi5-hpc" +%{?DisOMPI5} +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 8 +%global mpi_flavor openmpi +%define mpi_vers 5 +%endif + +%if "%{flavor}" == "gnu8-mvapich2-hpc" +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 8 +%global mpi_flavor mvapich2 +%endif + +%if "%{flavor}" == "gnu8-mpich-hpc" +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 8 +%global mpi_flavor mpich +%endif + +%if "%{flavor}" == "gnu9-hpc" +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 9 +%undefine mpi_flavor +%endif + +%if "%{flavor}" == "gnu9-openmpi4-hpc" +%{?DisOMPI4} +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 9 +%global mpi_flavor openmpi +%define mpi_vers 4 +%endif + +%if "%{flavor}" == "gnu9-openmpi5-hpc" +%{?DisOMPI5} +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 9 +%global mpi_flavor openmpi +%define mpi_vers 5 +%endif + +%if "%{flavor}" == "gnu9-mvapich2-hpc" +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 9 +%global mpi_flavor mvapich2 +%endif + +%if "%{flavor}" == "gnu9-mpich-hpc" +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 9 +%global mpi_flavor mpich +%endif + +%if "%{flavor}" == "gnu10-hpc" +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 10 +%undefine mpi_flavor +%endif + +%if "%{flavor}" == "gnu10-openmpi4-hpc" +%{?DisOMPI4} +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 10 +%global mpi_flavor openmpi +%define mpi_vers 4 +%endif + +%if "%{flavor}" == "gnu10-openmpi5-hpc" +%{?DisOMPI5} +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 10 +%global mpi_flavor openmpi +%define mpi_vers 5 +%endif + +%if "%{flavor}" == "gnu10-mvapich2-hpc" +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 10 +%global mpi_flavor mvapich2 +%endif + +%if "%{flavor}" == "gnu10-mpich-hpc" +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 10 +%global mpi_flavor mpich +%endif + +%{?mpi_flavor:%{bcond_without mpi}}%{!?mpi_flavor:%{bcond_with mpi}} +%{?with_hpc:%{!?compiler_family:%global compiler_family gnu}} +%{?with_mpi:%{!?mpi_flavor:error "No MPI family specified!"}} + +# For compatibility package names +%define mpi_ext %{?mpi_vers} + +%if %{with hpc} +%{hpc_init -c %compiler_family %{?with_mpi:-m %mpi_flavor} %{?c_f_ver:-v %{c_f_ver}} %{?mpi_vers:-V %{mpi_vers}} %{?ext:-e %{ext}}} +%{?with_mpi:%global hpc_module_pname p%{pname}} + %define my_prefix %hpc_prefix + %define my_bindir %hpc_bindir + %ifarch x86_64 + %define my_libdir %hpc_prefix/lib64 + %else + %define my_libdir %hpc_libdir + %endif + %define my_incdir %hpc_includedir + %define package_name %{hpc_package_name %_vers} + %define libname(l:s:) lib%{pname}%{-l*}%{hpc_package_name_tail %{?_vers}} + %define vname %{pname}_%{_vers}-hpc +%else + %if %{without mpi} + %define my_prefix %_prefix + %define my_bindir %_bindir + %define my_libdir %_libdir + %define my_incdir %_includedir + %else + %define my_prefix %{_libdir}/mpi/gcc/%{mpi_flavor}%{?mpi_ext} + %define my_suffix -%{mpi_flavor}%{?mpi_ext} + %define my_bindir %{my_prefix}/bin + %define my_libdir %{my_prefix}/%{_lib}/ + %define my_incdir %{my_prefix}/include/ + %endif + %if 0%{!?package_name:1} + %define package_name %pname%{?my_suffix} + %endif + %define libname(l:s:) lib%{pname}%{!-l:%{-s:-}}%{-l*}%{-s*}%{?my_suffix} + %define vname %{pname} +%endif + +# Run 'sh ./update_so_version.sh' when updating hdf5! +%include %{_sourcedir}/so_versions + +Name: %{package_name} +Version: %vers +Release: 0 +Summary: Command-line programs for the HDF5 scientific data format +License: BSD-3-Clause +Group: Productivity/Scientific/Other +URL: https://www.hdfgroup.org/HDF5/ +Source0: https://www.hdfgroup.org/ftp/HDF5/releases/%{pname}-%{short_ver}/%{pname}-%{src_ver}/src/%{pname}-%{src_ver}.tar.bz2 +Source100: so_versions +Source1000: update_so_version.sh +Patch0: hdf5-LD_LIBRARY_PATH.patch +# not really needed but we want to get noticed if hdf5 doesn' t know our host +Patch2: hdf5-1.8.11-abort_unknown_host_config.patch +%ifarch %arm +Patch4: hdf5-1.8.10-tests-arm.patch +%endif +Patch5: PPC64LE-Fix-long-double-handling.patch +Patch6: hdf5-Remove-timestamps-from-binaries.patch +# Could be ported but it's unknown if it's still needed +Patch7: hdf5-mpi.patch +Patch8: Disable-phdf5-tests.patch +Patch9: Fix-error-message-not-the-name-but-the-link-information-is-parsed.patch +# Imported from Fedora, strip flags from h5cc wrapper +Patch10: hdf5-wrappers.patch +Patch101: H5O_fsinfo_decode-Make-more-resilient-to-out-of-bounds-read.patch +Patch102: H5O__pline_decode-Make-more-resilient-to-out-of-bounds-read.patch +Patch103: H5O_dtype_decode_helper-Parent-of-enum-needs-to-have-same-size-as-enum-itself.patch +Patch104: Report-error-if-dimensions-of-chunked-storage-in-data-layout-2.patch +Patch105: When-evicting-driver-info-block-NULL-the-corresponding-entry.patch +Patch106: Pass-compact-chunk-size-info-to-ensure-requested-elements-are-within-bounds.patch +Patch107: Validate-location-offset-of-the-accumulated-metadata-when-comparing.patch +Patch108: Make-sure-info-block-for-external-links-has-at-least-3-bytes.patch +Patch109: Hot-fix-for-CVE-2020-10812.patch +Patch110: Compound-datatypes-may-not-have-members-of-size-0.patch +Patch111: H5IMget_image_info-H5Sget_simple_extent_dims-does-not-exceed-array-size.patch +Patch112: Check-for-overflow-when-calculating-on-disk-attribute-data-size-2459.patch +Patch113: Remove-duplicate-code.patch + +BuildRequires: fdupes +%if 0%{?use_sz2} +BuildRequires: libsz2-devel +%endif +BuildRequires: zlib-devel +%if %{without hpc} +BuildRequires: gcc-c++ +BuildRequires: gcc-fortran + %if %{with mpi} +BuildRequires: %{mpi_flavor}%{?mpi_ext}-devel + %else +Requires: lib%{pname}_cpp%{sonum_CXX} = %{version} +Requires: lib%{pname}_hl_cpp%{sonum_HL_CXX} = %{version} + %endif +Requires: lib%{pname}-%{sonum} = %{version} +Requires: lib%{pname}_fortran%{sonum_F} = %{version} +Requires: lib%{pname}_hl%{sonum_HL} = %{version} +Requires: lib%{pname}hl_fortran%{sonum_HL_F} = %{version} +%else # hpc +%hpc_requires +Requires: %{libname -l _fortran} +%if %{without mpi} +Requires: %{libname -l _cpp} +Requires: %{libname -l _hl_cpp} +%endif +Requires: %{libname -l _hl} +Requires: %{libname -l hl_fortran} +Requires: %{libname} +BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel +BuildRequires: lua-lmod +BuildRequires: suse-hpc >= 0.2 + %if %{with mpi} +BuildRequires: %{mpi_flavor}%{?mpi_vers}-%{compiler_family}%{?c_f_ver}-hpc-macros-devel + %endif +%endif # ?hpc +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +HDF5 is a data model, library, and file format for storing and +managing data. It supports an unlimited variety of datatypes. + +This package contains the %{flavor} version utility functions for working +with HDF5 files. + +%{?with_hpc:%{hpc_master_package}} + +%package -n %{libname -s %{sonum}} +Summary: Shared libraries for the HDF5 scientific data format +# To avoid unresolvable errors due to multiple providers of the library +Group: System/Libraries +Provides: %{libname} = %{version} +Obsoletes: %{libname} < %{version} +%{?with_hpc:Requires: %{name}-module = %version} + +%description -n %{libname -s %{sonum}} +HDF5 is a data model, library, and file format for storing and +managing data. It supports an unlimited variety of datatypes. + +This package contains the %{flavor} version of the HDF5 runtime libraries. + +%{?with_hpc:%{hpc_master_package -l -n lib%{pname}%{hpc_package_name_tail}}} + +%package -n %{libname -l _hl -s %{sonum_HL}} +Summary: High-level shared libraries for the HDF5 scientific data format +# To avoid unresolvable errors due to multiple providers of the library +Group: System/Libraries +Provides: %{libname -l _hl} = %{version} +Obsoletes: %{libname -l _hl} < %{version} +%{?with_hpc:Requires: %{name}-module = %version} + +%description -n %{libname -l _hl -s %{sonum_HL}} +HDF5 is a data model, library, and file format for storing and +managing data. It supports an unlimited variety of datatypes. + +This package contains the %{flavor} version of the high-level HDF5 +runtime libraries. + +%{?with_hpc:%{hpc_master_package -l -n lib%{pname}_hl%{hpc_package_name_tail} -N %{pname}_hl}} + +%package -n %{libname -l _cpp -s %{sonum_CXX}} +Summary: Shared libraries for the HDF5 scientific data format +# To avoid unresolvable errors due to multiple providers of the library +Group: System/Libraries +Provides: %{libname -l _cpp} = %{version} +Obsoletes: %{libname -l _cpp} < %{version} +%{?with_hpc:Requires: %{name}-module = %version} + +%description -n %{libname -l _cpp -s %{sonum_CXX}} +HDF5 is a data model, library, and file format for storing and +managing data. It supports an unlimited variety of datatypes. + +This package contains the HDF5 runtime libraries. + +%{?with_hpc:%{hpc_master_package -l -n lib%{pname}_cpp%{hpc_package_name_tail} -N %{pname}_cpp}} + +%package -n %{libname -l _hl_cpp -s %{sonum_HL_CXX}} +Summary: High-level shared libraries for the HDF5 scientific data format +# To avoid unresolvable errors due to multiple providers of the library +Group: System/Libraries +Provides: %{libname -l _hl_cpp} = %{version} +Obsoletes: %{libname -l _hl_cpp} < %{version} +%{?with_hpc:Requires: %{name}-module = %version} + +%description -n %{libname -l _hl_cpp -s %{sonum_HL_CXX}} +HDF5 is a data model, library, and file format for storing and +managing data. It supports an unlimited variety of datatypes. + +This package contains the the high-level HDF5 runtime libraries. + +%{?with_hpc:%{hpc_master_package -l -n lib%{pname}_hl_cpp%{hpc_package_name_tail} -N %{pname}_hl_cpp}} + +%package -n %{libname -l _fortran -s %{sonum_F}} +Summary: Shared libraries for the HDF5 scientific data format +# To avoid unresolvable errors due to multiple providers of the library +Group: System/Libraries +Provides: %{libname -l _fortran} = %{version} +Obsoletes: %{libname -l _fortran} < %{version} +%{?with_hpc:Requires: %{name}-module = %version} + +%description -n %{libname -l _fortran -s %{sonum_F}} +HDF5 is a data model, library, and file format for storing and +managing data. It supports an unlimited variety of datatypes. + +This package contains the %{flavor} version of the HDF5 runtime libraries. + +%{?with_hpc:%{hpc_master_package -l -n lib%{pname}_fortran%{hpc_package_name_tail} -N %{pname}_fortran}} + +%package -n %{libname -l hl_fortran -s %{sonum_HL_F}} +Summary: High-level shared libraries for the HDF5 scientific data format +# To avoid unresolvable errors due to multiple providers of the library +Group: System/Libraries +Provides: %{libname -l hl_fortran} = %{version} +Obsoletes: %{libname -l hl_fortran} < %{version} +%{?with_hpc:Requires: %{name}-module = %version} + +%description -n %{libname -l hl_fortran -s %{sonum_HL_F}} +HDF5 is a data model, library, and file format for storing and +managing data. It supports an unlimited variety of datatypes. + +This package contains the %{flavor} version of the high-level HDF5 +runtime libraries. + +%{?with_hpc:%{hpc_master_package -l -n lib%{pname}_hl_fortran%{hpc_package_name_tail} -N %{pname}hl_fortran}} + +%package -n %{pname}-devel-data +Summary: Development data files for %{name} +Group: Development/Libraries/Other + +%description -n %{pname}-devel-data +HDF5 is a data model, library, and file format for storing and +managing data. It supports an unlimited variety of datatypes. + +This package contains generic files needed to create projects that use +any version of HDF5. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries/Parallel +Requires: %{libname -l _cpp -s %{sonum_CXX}} = %{version} +Requires: %{libname -l _hl_cpp -s %{sonum_HL_CXX}} = %{version} +Requires: %{name} = %{version} +%{!?with_hpc:Requires: %{pname}-devel-data = %{version}} +Requires: zlib-devel +%if 0%{?use_sz2} +Requires: libsz2-devel +%endif +Requires: %{libname -s %{sonum}} = %{version} +# Required by Fortran programs? +Requires: %{libname -l _fortran -s %{sonum_F}} = %{version} +Requires: %{libname -l _hl -s %{sonum_HL}} = %{version} +Requires: %{libname -l hl_fortran -s %{sonum_HL_F}} = %{version} +%{?with_hpc:%hpc_requires_devel} + +%description devel +HDF5 is a data model, library, and file format for storing and +managing data. It supports an unlimited variety of datatypes. + +This package contains all files needed to create projects that use +the %{flavor} version of HDF5. + +%{?with_hpc:%{hpc_master_package devel}} + +%package devel-static +Summary: Static development files for %{name} +Group: Development/Libraries/Parallel +Requires: %{name}-devel = %{version} + +%description devel-static +HDF5 is a data model, library, and file format for storing and +managing data. It supports an unlimited variety of datatypes. + +This package provides the static libraries for the %{flavor} version of HDF5. + +%package -n %{vname}-examples +Summary: Examples for %{name} +Group: Documentation/Other + +%description -n %{vname}-examples +HDF5 is a data model, library, and file format for storing and +managing data. It supports an unlimited variety of datatypes. + +This package provides examples of HDF5 library use. + +%{?!with_mpi:%{?with_hpc:%{hpc_master_package -n %{pname}-hpc-examples -M %{vname}-examples}}} + +%if %{with hpc} +%package module +Summary: Module files for %{name} +Group: Development/Libraries/Parallel +Provides: %{name}-module = %version +Requires: lua-lmod + +%description module +HDF5 is a data model, library, and file format for storing and +managing data. It supports an unlimited variety of datatypes. + +This package contains the environment module needed for the HDF5 +library packages. +%endif + +%prep +%{?with_hpc: %hpc_debug} +%setup -q -n %{pname}-%{version} +%patch0 -p1 -b .LD_LIBRARY_PATH +%patch2 -p0 -b .abort_unknown_host_config +%ifarch %arm +%patch4 -p0 -b .tests-arm +%endif +%patch5 -p1 +%patch6 -p1 +# %%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch101 -p1 +%patch102 -p1 +%patch103 -p1 +%patch104 -p1 +%patch105 -p1 +%patch106 -p1 +%patch107 -p1 +%patch108 -p1 +%patch109 -p1 +%patch110 -p1 +%patch111 -p1 +%patch112 -p1 +%patch113 -p1 + +%if %{without hpc} +# baselibs looks different for different flavors - generate it on the fly +cat > %{_sourcedir}/baselibs.conf < + requires "libhdf5-%{sonum}%{?my_suffix}- = " + requires "libhdf5_hl%{sonum_HL}%{?my_suffix}- = " + requires "libhdf5_fortran%{sonum_F}%{?my_suffix}- = " + requires "libhdf5hl_fortran%{sonum_HL_F}%{?my_suffix}- = " + requires "libhdf5_cpp%{sonum_CXX}%{?my_suffix}- = " + requires "libhdf5_hl_cpp%{sonum_HL_CXX}%{?my_suffix}- = " +EOF +%endif + +%build + +%{?with_hpc:%hpc_setup} +%{?with_hpc:%hpc_debug} + +export CC=gcc +export CXX=g++ +export F9X=gfortran +export CFLAGS="%{optflags}" +%ifarch %arm +# we want to have useful H5_CFLAGS on arm too +test -e config/linux-gnueabi || cp config/linux-gnu config/linux-gnueabi +%endif + +# NOTE: --enable-unsupported is required when --enable-fortran +# and/or --enable-cxx is enabled along with --enable-threadsafe. +# Building with thise combination results in thread-safe C +# libraries and non-thread-safe fotran and/or C++ libraries. So +# you have to explicitly allow building the thread-safe C +# library and the non-thread-safe C++ and fortran libraries in +# order to make sure people don't assume that their fotran or +# C++ code is thread-safe. Since our users are going to be +# accessing this through other programs, this doesn't matter. + +%if %{without hpc} + %if %{with mpi} +export CC="%{my_bindir}/mpicc" +export CXX="%{my_bindir}/mpicxx" +export FC="%{my_bindir}/mpif90" +export F77="%{my_bindir}/mpif77" +export LD_LIBRARY_PATH="%{my_libdir}" + %endif +%configure \ + %if %{with mpi} + --prefix=%{my_prefix} \ + --exec-prefix=%{_prefix} \ + --bindir=%{my_bindir} \ + --libdir=%{my_libdir} \ + --includedir=%{my_incdir} \ + --datadir=%{_datadir} \ + %endif + --docdir=%{_docdir}/%{name} \ +%else # hpc +%global _hpc_exec_prefix %hpc_exec_prefix +%global hpc_exec_prefix %_prefix + %if %{with mpi} +export CC=mpicc +export CXX=mpicxx +export F77=mpif77 +export FC=mpif90 +export MPICC=mpicc +export MPIFC=mpifc +export MPICXX=mpicxx + %endif +%hpc_configure \ +%define hpc_exec_prefix %{expand:%_hpc_exec_prefix} +%endif # ?hpc + --disable-hltools \ + --disable-dependency-tracking \ + --enable-fortran \ + --enable-unsupported \ + --enable-hl \ + --enable-shared \ + --enable-threadsafe \ + --enable-build-mode=production \ +%if %{with mpi} + --enable-parallel \ +%endif + --enable-cxx \ +%if 0%{?use_sz2} + --with-szlib \ +%endif + --with-pthread \ + %{nil} + +# Remove timestamp/buildhost/kernel version +export SDE_DATE=$(date -d @${SOURCE_DATE_EPOCH} -u) +export UNAME_M_O=$(uname -m -o) +sed -i -e "s/\(Configured on: \).*/\1 $SDE_DATE/" \ + -e "s#\(Uname information: \).*#\1 $UNAME_M_O#" \ + -e "s/\(Configured by: \).*/\1 abuild@OBS/" \ + src/libhdf5.settings + +make V=1 %{?_smp_mflags} + +%install +%{?with_hpc:%hpc_setup} +%{?with_hpc:%hpc_debug} + +make install DESTDIR=%{buildroot} +find %{buildroot} -type f -name "*.la" -delete -print + +%if %{without mpi} + +%if %{with hpc} +# copy to versioned subdir +install -m 755 -d %{buildroot}%{_prefix}/share/%{version} +install -m 755 -d %{buildroot}%{_prefix}/share/hdf5_examples +mv %{buildroot}%{_prefix}/lib/hpc/*/hdf5/*/share/hdf5_examples/* \ + %{buildroot}%{_prefix}/share/%{version}/ +mv %{buildroot}%{_prefix}/share/%{version} \ + %{buildroot}%{_prefix}/share/hdf5_examples +%else +# rpm macro for version checking +mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/ +cat > %{buildroot}%{_rpmconfigdir}/macros.d/macros.hdf5 < 120200 || 0%{?suse_version} > 1320 +%define mylicense %license +%else +%define mylicense %doc +%endif + +%if %{without mpi} +%files -n %{vname}-examples +%{?with_hpc:%dir %{_prefix}/share/hdf5_examples} +%{_prefix}/share/hdf5_examples%{?with_hpc:/%{version}} + +%if %{without hpc} +%files -n %{pname}-devel-data +%{_rpmconfigdir}/macros.d/macros.hdf5 +%endif +%endif # ?mpi + +%files -n %{name} +%{?with_hpc:%dir %my_bindir} +%{my_bindir}/h5clear +%{my_bindir}/h5copy +%{my_bindir}/h5debug +%{my_bindir}/h5diff +%{my_bindir}/h5dump +%{my_bindir}/h5format_convert +%{my_bindir}/h5import +%{my_bindir}/h5jam +%{my_bindir}/h5ls +%{my_bindir}/h5mkgrp +%if %{with mpi} +%{my_bindir}/ph5diff +%{my_bindir}/h5perf +%{my_bindir}/perf +%endif +%{my_bindir}/h5perf_serial +%{my_bindir}/h5redeploy +%{my_bindir}/h5repack +%{my_bindir}/h5repart +%{my_bindir}/h5stat +%{my_bindir}/h5unjam + +%files -n %{libname -s %{sonum}} +%doc ACKNOWLEDGMENTS README.md +%mylicense COPYING +## +%if %{without mpi} +%doc release_docs/HISTORY-1_10_0-1_12_0.txt +%doc release_docs/RELEASE.txt +%endif +%defattr(0755,root,root) +%{?with_hpc:%hpc_dirs} +%{my_libdir}/libhdf5.so.%{sonum} +%{my_libdir}/libhdf5.so.%{sonum}.* + +%files -n %{libname -l _hl -s %{sonum_HL}} +%mylicense COPYING +%defattr(0755,root,root) +%{?with_hpc:%hpc_dirs} +%{my_libdir}/libhdf5_hl.so.%{sonum_HL} +%{my_libdir}/libhdf5_hl.so.%{sonum_HL}.* + +%files -n %{libname -l _cpp -s %{sonum_CXX}} +%mylicense COPYING +%defattr(0755,root,root) +%{?with_hpc:%hpc_dirs} +%{my_libdir}/libhdf5_cpp.so.%{sonum_CXX} +%{my_libdir}/libhdf5_cpp.so.%{sonum_CXX}.* + +%files -n %{libname -l _hl_cpp -s %{sonum_HL_CXX}} +%mylicense COPYING +%defattr(0755,root,root) +%{?with_hpc:%hpc_dirs} +%{my_libdir}/libhdf5_hl_cpp.so.%{sonum_HL_CXX} +%{my_libdir}/libhdf5_hl_cpp.so.%{sonum_HL_CXX}.* + +%files -n %{libname -l _fortran -s %{sonum_F}} +%mylicense COPYING +%defattr(0755,root,root) +%{?with_hpc:%hpc_dirs} +%{my_libdir}/libhdf5_fortran.so.%{sonum_F} +%{my_libdir}/libhdf5_fortran.so.%{sonum_F}.* + +%files -n %{libname -l hl_fortran -s %{sonum_HL_F}} +%mylicense COPYING +%defattr(0755,root,root) +%{?with_hpc:%hpc_dirs} +%{my_libdir}/libhdf5hl_fortran.so.%{sonum_HL_F} +%{my_libdir}/libhdf5hl_fortran.so.%{sonum_HL_F}.* + +%if %{with hpc} +%files module +%hpc_modules_files +%endif + +%files devel +## +%{?with_hpc:%dir %{my_incdir}} +%doc release_docs/HISTORY-1_10_0-1_12_0.txt +%doc release_docs/RELEASE.txt +%doc ACKNOWLEDGMENTS README.md +%{?with_hpc:%{hpc_pkgconfig_file -n hdf5}} +%{?with_hpc:%{hpc_pkgconfig_file -N -n hdf5_hl}} +%{?with_hpc:%{hpc_pkgconfig_file -N -n hdf5_fortran}} +%{?with_hpc:%{hpc_pkgconfig_file -N -n hdf5_hl_fortran}} +%{?with_hpc:%{hpc_pkgconfig_file -N -n hdf5_cpp}} +%{?with_hpc:%{hpc_pkgconfig_file -N -n hdf5_hl_cpp}} +%{my_bindir}/h5c++ +%if %{without mpi} +%{my_bindir}/h5cc +%{my_bindir}/h5fc +%else +%{my_bindir}/h5pcc +%{my_bindir}/h5pfc +%endif +%{my_incdir}/*.h +%{my_libdir}/*.so +%{my_libdir}/*.settings +%{my_incdir}/*.mod + +%files devel-static +%{my_libdir}/*.a + +%changelog diff --git a/so_versions b/so_versions new file mode 100644 index 0000000..2145e0b --- /dev/null +++ b/so_versions @@ -0,0 +1,6 @@ +%define sonum 200 +%define sonum_CXX 200 +%define sonum_F 200 +%define sonum_HL 200 +%define sonum_HL_CXX 200 +%define sonum_HL_F 200 diff --git a/update_so_version.sh b/update_so_version.sh new file mode 100644 index 0000000..3148129 --- /dev/null +++ b/update_so_version.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +exit_error() +{ + echo "$0: $@" >&2 + exit 1 +} + +cleanup() +{ + rm -f ${spectmp} + rm -f ${shtmp} +} + +## We are going to parse these variables from tarball: +# LT_VERS_INTERFACE +# LT_CXX_VERS_INTERFACE +# LT_F_VERS_INTERFACE +# LT_HL_VERS_INTERFACE +# LT_HL_CXX_VERS_INTERFACE +# LT_HL_F_VERS_INTERFACE + +cleanup + +spectmp=$(mktemp hdf-XXXX.spec) +shtmp=$(mktemp lt-XXXX.sh) +outtmp=$(mktemp so-XXXX) +sed -e "s/@BUILD_FLAVOR@/standard/" hdf5.spec > ${spectmp} +VER="$(rpmspec --define "_sourcedir $(pwd)" -P ${spectmp} | grep -m1 "^Version:")" || \ + exit_error "can't grep version" +read x VER <<<$VER + +SRC="$(rpmspec --define "_sourcedir $(pwd)" -P ${spectmp} | grep -m1 "^Source0:")" || \ + exit_error "can't grep source" +read x SRC <<<$SRC +SRC=$(basename "$SRC" | sed "s/%{version}/$VER/") + +test -f "$SRC" || exit_error "tarball '$SRC' does not exist" + +tar --wildcards -x -O -f "$SRC" "*/config/lt_vers.am" \ + | tr -d ' \t' \ + | grep -E "^LT_.*INTERFACE=|^LT_.*AGE=" \ + > ${shtmp} \ + || exit_error "can't grep interface versions" + +source ./${shtmp} || exit_error "can't source ${shtmp}" + +for infix in "" _CXX _F _HL _HL_CXX _HL_F; do + current="LT${infix}_VERS_INTERFACE" + age="LT${infix}_VERS_AGE" + currv=$(eval "echo \$$current") + agev=$(eval "echo \$$age") + if [ -n "$currv" -a -n "$agev" ]; then + echo %define sonum${infix} $((currv - agev)) >> ${outtmp} + else + rm -f ${outtmp} + cleanup + exit 1 + fi +done + +[ -e ${outtmp} ] && mv ${outtmp} so_versions + +cleanup