# Fedora 44+ ships OpenJPH 0.25+ with mem_outfile::get_used_size(), which the HTJ2K # filter shim (h5z-htj2k 0.1.1) calls; Fedora 43 has 0.22.0 without it (build 11194092, # f43: "has no member named 'get_used_size'"). There the vendored OpenJPH 0.31.0 is # compiled in instead. %if 0%{?fedora} >= 44 %bcond system_openjph 1 %else %bcond system_openjph 0 %endif Name: python-hdf5plugin Version: 7.1.0 Release: 2%{?dist} Summary: HDF5 Plugins for Windows, MacOS, and Linux # hdf5plugin itself, bitshuffle, the Blosc HDF5 filter and h5z-htj2k are MIT; zfp, # H5Z-ZFP, SZ, SZ3 and the Blosc2 and LZ4 HDF5 filters are BSD-3-Clause; SPERR, # H5Z-SPERR, FCIDECOMP and the Zstandard HDF5 filter are Apache-2.0; bzip2 is # bzip2-1.0.6. OpenJPH (BSD-2-Clause) is linked from Fedora where possible, and only # embedded on Fedora 43 (see the bcond above). %if %{with system_openjph} License: MIT AND BSD-3-Clause AND Apache-2.0 AND bzip2-1.0.6 %else License: MIT AND BSD-3-Clause AND Apache-2.0 AND bzip2-1.0.6 AND BSD-2-Clause %endif URL: https://github.com/silx-kit/hdf5plugin Source0: %pypi_source hdf5plugin BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-wheel BuildRequires: python3-pip BuildRequires: python3-cpuinfo BuildRequires: hdf5-devel BuildRequires: gcc # setup.py probes the C++ level with the compiler it finds; without g++ every probe # fails and the SZ3 (C++14), SPERR (C++20) and FCIDECOMP (C++14 via CharLS) plugins are # silently left out -- which is what 6.0.0-3 shipped (build 11106309: cpp11/14/20 False). BuildRequires: gcc-c++ # HDF5PLUGIN_SYSTEM_LIBRARIES resolves these through pkg-config (python3-pkgconfig). BuildRequires: python3-pkgconfig BuildRequires: pkgconfig(blosc) BuildRequires: pkgconfig(blosc2) BuildRequires: pkgconfig(charls) BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(snappy) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(libzstd) %if %{with system_openjph} BuildRequires: pkgconfig(openjph) %endif # %%check BuildRequires: python3-h5py BuildRequires: python3-numpy %description The hdf5plugin package provides HDF5 compression filters (plugins) for h5py and PyTables. %package -n python3-hdf5plugin Summary: %{summary} Requires: python3-h5py # Bundled components. Declared here, on the binary package: a Provides placed above # %%package attaches to the source-only main package and never reaches an RPM, which is # what 6.0.0-4 shipped. Upstream's setup.py can only substitute pkg-config'd libraries # (HDF5PLUGIN_SYSTEM_LIBRARIES in %%build). zfp-devel ships no .pc file and the bz2 lookup # asks for "bz2"/"libbz2" while Fedora installs bzip2.pc; SZ, SZ3, SPERR and the HDF5 # filter shims themselves (including h5z-htj2k, whose vendored OpenJPH is replaced by # Fedora's) have no Fedora package. Provides: bundled(bitshuffle) = 0.5.2 Provides: bundled(bzip2) = 1.0.8 Provides: bundled(zfp) = 1.0.1 Provides: bundled(H5Z-ZFP) = 1.1.1 Provides: bundled(SZ) = 2.1.12 Provides: bundled(SZ3) = 3.1.7 Provides: bundled(SPERR) = 0.8.5 Provides: bundled(H5Z-SPERR) = 0.2.3 Provides: bundled(fcidecomp) = 2.1.1 Provides: bundled(hdf5-blosc) Provides: bundled(hdf5-blosc2) Provides: bundled(HDF5Plugin-Zstandard) Provides: bundled(HDF5-lz4-filter) Provides: bundled(h5z-htj2k) = 0.1.1 %if %{without system_openjph} Provides: bundled(openjph) = 0.31.0 %endif %description -n python3-hdf5plugin The hdf5plugin package provides HDF5 compression filters (plugins) for h5py and PyTables. %prep %autosetup -n hdf5plugin-%{version} %build # HDF5PLUGIN_NATIVE=False: upstream compiles the bundled filter plugins for the # BUILD MACHINE's CPU, and ships the result to every user of the arch. # # setup.py:155 sets native_compile_args = ("-mcpu=native",) for ARM_8 (and # "-march=native" for X86_64 at :153). use_native defaults to has_native(), # which is simply "does the compiler accept the flag" -- always true -- so the # option is ON unless this variable says otherwise. # # Measured, not inferred. python3-hdf5plugin-6.0.0-2.fc44.aarch64 SIGILLs on # `import hdf5plugin`, on a Cortex-A76 (ARMv8.2, no PAC in /proc/cpuinfo # Features). Under gdb: # # Program received signal SIGILL, Illegal instruction. # 0x...3d4 in init_filter () from .../hdf5plugin/plugins/libh5bshuf.so # => 0x...3d4 : retaa # # retaa is ARMv8.3 Pointer Authentication. Critically it is NOT in the NOP hint # space -- paciasp/autiasp are, and execute harmlessly on older cores, which is # why Fedora's -mbranch-protection=standard is safe everywhere. retaa/braa/blraa # are real encodings and trap as undefined on any pre-8.3 CPU. # # objdump across the shipped objects, with libc as the control: # # object PAC-only (retaa/braa) hint-space (paciasp/autiasp) # libc.so.6 0 7588 # libh5bshuf.so 737 824 # libh5blosc.so 891 936 # libh5blosc2.so 1641 1709 # libh5sz.so 1513 2010 # libh5zstd.so 596 593 # libh5zfp.so 407 466 # libh5bzip2.so 94 124 # libh5lz4.so 94 147 # # All eight bundled plugins; zero in libhdf5, libz or h5py's own modules. libc # is the shape a correct baseline build has: PAC hints, no PAC-only encodings. # # This is invisible to every gate we have. The package builds green, its # metadata is consistent, and it passes a depsolve -- it only dies when # something imports it, on hardware older than the builder. ci/import-probe.sh # is what caught it. # # x86_64 has the SAME mechanism (-march=native at setup.py:153) and would ship # whatever ISA the builder happened to have. I have NOT measured an x86_64 # failure, so this disables only the host-keyed flag and deliberately leaves # HDF5PLUGIN_SSE2/SSSE3/AVX2 alone -- those are separate knobs I have not # tested, and blosc does some runtime dispatch. export HDF5PLUGIN_NATIVE=False # Link Fedora's libraries instead of the copies under lib/ (see the Provides comment for # what cannot be substituted). Names are setup.py's _CLIB_NAMES, resolved via pkg-config. export HDF5PLUGIN_SYSTEM_LIBRARIES=blosc,blosc2,charls,lz4,%{?with_system_openjph:openjph,}snappy,zlib,zstd # Make the C++ plugins mandatory rather than probe-dependent: a missing or broken C++ # toolchain must fail the build, not quietly drop SZ3, SPERR and FCIDECOMP again. export HDF5PLUGIN_CPP11=True HDF5PLUGIN_CPP14=True HDF5PLUGIN_CPP20=True %pyproject_wheel %install %pyproject_install %check # Every filter plugin must be present: the three C++ ones were silently missing before. for p in blosc blosc2 bshuf bzip2 fcidecomp htj2k lz4 sperr sz sz3 zfp zstd; do test -f %{buildroot}%{python3_sitearch}/hdf5plugin/plugins/libh5$p.so \ || { echo "ERROR: plugin libh5$p.so was not built" >&2; exit 1; } done # The system-library switch must have taken: these plugins link Fedora's libraries, not # an embedded copy (an embedded build has no NEEDED entry for them at all). objdump -p %{buildroot}%{python3_sitearch}/hdf5plugin/plugins/libh5blosc.so | grep -q 'NEEDED.*libblosc\.so' || { echo "ERROR: libh5blosc.so does not link system libblosc" >&2; exit 1; } objdump -p %{buildroot}%{python3_sitearch}/hdf5plugin/plugins/libh5blosc2.so | grep -q 'NEEDED.*libblosc2\.so' || { echo "ERROR: libh5blosc2.so does not link system libblosc2" >&2; exit 1; } objdump -p %{buildroot}%{python3_sitearch}/hdf5plugin/plugins/libh5zstd.so | grep -q 'NEEDED.*libzstd\.so' || { echo "ERROR: libh5zstd.so does not link system libzstd" >&2; exit 1; } objdump -p %{buildroot}%{python3_sitearch}/hdf5plugin/plugins/libh5lz4.so | grep -q 'NEEDED.*liblz4\.so' || { echo "ERROR: libh5lz4.so does not link system liblz4" >&2; exit 1; } %if %{with system_openjph} objdump -p %{buildroot}%{python3_sitearch}/hdf5plugin/plugins/libh5htj2k.so | grep -q 'NEEDED.*libopenjph\.so' || { echo "ERROR: libh5htj2k.so does not link system libopenjph" >&2; exit 1; } %endif # Upstream's suite: writes and reads back an h5py dataset through every plugin, checks # the filter registry and the Blosc2 codec/filter matrix. %py3_check_import hdf5plugin PYTHONPATH=%{buildroot}%{python3_sitearch} %{python3} -m hdf5plugin.test -v %files -n python3-hdf5plugin %license LICENSE %doc README.rst %{python3_sitearch}/hdf5plugin %{python3_sitearch}/hdf5plugin-%{version}.dist-info %changelog * Thu Oct 22 2026 Morgan Hough - 7.1.0-2 - Fedora 43 only: embed the vendored OpenJPH 0.31.0 (Provides: bundled(openjph), License gains BSD-2-Clause) because f43's libopenjph 0.22.0 predates mem_outfile::get_used_size() and the htj2k shim fails to compile against it (build 11194092). Fedora 44+ keep linking the system library. * Thu Oct 22 2026 Morgan Hough - 7.1.0-1 - Update to 7.1.0: new HTJ2K filter (h5z-htj2k 0.1.1, embedded shim, linked against Fedora's OpenJPH through pkg-config instead of the vendored copy), Blosc2 HDF5 filter 3.0.1, SPERR 0.8.5, Zstd negative compression levels, from_filter_options() and FilterBase.get_config(). Twelve plugins; %%check asserts htj2k and its system link. - Move the bundled() Provides into the python3-hdf5plugin subpackage: in 6.0.0-4 they sat above %%package and so attached to the never-built main package (the binary RPM carried none of them). - Remove the shadow hdf5plugin.spec (7.0.0, never built): it was reconstructed in July under the belief that this spec was lost, and declared the same Name. This is the one COPR builds. * Thu Oct 22 2026 Morgan Hough - 6.0.0-4 - Link Fedora's blosc, blosc2, CharLS, lz4, snappy, zlib and zstd (HDF5PLUGIN_SYSTEM_LIBRARIES through pkg-config) instead of the copies bundled under lib/; Provides: bundled() for what setup.py cannot substitute (bitshuffle, bzip2, zfp, H5Z-ZFP, SZ, SZ3, SPERR, H5Z-SPERR, fcidecomp and the four HDF5 filter shims). - BuildRequires gcc-c++ and force HDF5PLUGIN_CPP11/14/20=True: the C++ probes ran without a C++ compiler, so 6.0.0-3 silently shipped without the SZ3, SPERR and FCIDECOMP plugins (build 11106309 logged cpp11/14/20 False). Eight plugins become eleven. - %%check: assert all eleven plugins exist and that the blosc/blosc2/zstd/lz4 ones link the system libraries, then run upstream's hdf5plugin.test round-trip suite under h5py. - License: MIT AND BSD-3-Clause AND Apache-2.0 AND bzip2-1.0.6, reflecting the embedded components actually in the binary (was MIT alone). * Tue Sep 29 2026 Morgan Hough - 6.0.0-3 - Build with HDF5PLUGIN_NATIVE=False. 6.0.0-2 on aarch64 installs cleanly and then SIGILLs on `import hdf5plugin`: upstream compiles the bundled filter plugins with -mcpu=native, so the COPR builder's ISA is baked into what every aarch64 user gets. The faulting instruction is `retaa` in libh5bshuf.so's init_filter -- ARMv8.3 Pointer Authentication, which unlike paciasp/autiasp is NOT in the NOP hint space and traps on any pre-8.3 core. That includes Cortex-A76, so Raspberry Pi 5 and most non-server ARM hardware. All eight bundled plugins carry PAC-only encodings; libc, libhdf5, libz and h5py carry none. See the %%build comment for the measurements. - Found by ci/import-probe.sh, which is the only gate that could have: the package builds green, its metadata is consistent and it passes a depsolve. * Wed Jun 10 2026 Morgan Hough - 6.0.0-2 - Rebuild for rawhide's Python 3.15 transition (the -1 build required python(abi)=3.14, blocking rawhide consumers such as python-babelviscofdtd). Release bump so the py3.15 build cleanly supersedes the stale -1 in copr_base. * Sun Feb 01 2026 Morgan Hough - 6.0.0-1 - Initial package