Skip to content

Commit 06783b5

Browse files
Build HDF5 from source in wheels to avoid vulnerablity
CI workflow: remove system hdf5-devel install and instead download, configure and build HDF5 2.0.0 from source (cmake configure/build/install) due to distro security/maintenance concerns
1 parent d8496b8 commit 06783b5

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/github-actions.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,19 @@ jobs:
177177
yum search epel-release &&
178178
yum info epel-release &&
179179
yum install -y epel-release &&
180-
yum --enablerepo=epel install -y minizip1.2-devel hdf5-devel cmake3 &&
180+
yum --enablerepo=epel install -y minizip1.2-devel cmake3 &&
181+
# RedHat nor Debian maintain security patches for hdf5. We consequently build the latest HDF5 version.We now vuild FESAPI
182+
wget --no-verbose https://support.hdfgroup.org/releases/hdf5/v2_0/v2_0_0/downloads/hdf5-2.0.0.tar.gz &&
183+
tar -xzf hdf5-2.0.0.tar.gz &&
184+
cd hdf5-2.0.0 &&
185+
mkdir build &&
186+
cd build &&
187+
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DHDF5_BUILD_FORTRAN:BOOL=OFF -DHDF5_BUILD_JAVA:BOOL=OFF -DHDF5_ENABLE_PARALLEL:BOOL=OFF -DHDF5_BUILD_CPP_LIB:BOOL=OFF -DHDF5_BUILD_HL_LIB:BOOL=OFF -DHDF5_BUILD_EXAMPLES:BOOL=OFF -DHDF5_BUILD_GENERATORS:BOOL=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF -DHDF5_BUILD_UTILS:BOOL=OFF -DBUILD_TESTING:BOOL=OFF .. &&
188+
cmake --build . --config Release &&
189+
make -j4 &&
190+
make install &&
191+
# Now that all dependencies are installed, we can build FESAPI
192+
cd ../.. &&
181193
mkdir build &&
182194
cd build &&
183195
cmake3 -DCMAKE_BUILD_TYPE=Release -DWITH_PYTHON_WRAPPING=TRUE -DCMAKE_INSTALL_PREFIX:STRING=/fesapi-install {project} &&

example/example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5786,7 +5786,7 @@ void appendAContinuousProp(const string& filePath)
57865786
}
57875787

57885788
// filepath is defined in a macro to better check memory leak
5789-
#define filePath u8"../../testingPackageCpp22.epc"
5789+
#define filePath u8"../../testingPackageCpp.epc"
57905790
int main()
57915791
{
57925792
try {

0 commit comments

Comments
 (0)