%global debug_package %{nil} Name: tomviz Version: 3.0.0 Release: 4%{?dist} Summary: 3D visualization and analysis of tomography data License: BSD-3-Clause URL: https://tomviz.org/ Source0: https://github.com/OpenChemistry/tomviz/archive/refs/tags/%{version}.tar.gz#/tomviz-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: gcc BuildRequires: cmake BuildRequires: ninja-build BuildRequires: chrpath BuildRequires: desktop-file-utils # ParaView-based GUI (its SDK pulls Qt6 + the Qt6 help module) BuildRequires: paraview-devel BuildRequires: qt6-qtbase-devel BuildRequires: qt6-qt5compat-devel BuildRequires: qt6-qttools-devel BuildRequires: qt6-qtsvg-devel BuildRequires: InsightToolkit5-devel BuildRequires: vtk-devel # 3.0.0 adds find_package(Viskores QUIET) -- optional, but our VTK is built # with VTK_MODULE_ENABLE_VTK_AcceleratorsVTKmFilters=YES, so provide it. BuildRequires: viskores-devel # Not used by tomviz itself, but paraview-config.cmake -> # ParaView-vtk-module-find-packages.cmake does find_package(Protobuf 3.4 REQUIRED), # so anything consuming paraview-devel must be able to find it. BuildRequires: protobuf-devel BuildRequires: tbb-devel BuildRequires: python3-devel BuildRequires: pybind11-devel # ParaView installs its libraries into %%{_libdir}/paraview/, a private directory, # and correctly excludes it from Provides (paraview.spec: __provides_exclude_from). # tomviz links those libraries, so rpm auto-generates Requires for sonames that # nothing can ever provide, and the package becomes uninstallable: # # nothing provides libpqCore.so.1()(64bit) needed by tomviz # ... and 8 more (libpq{ApplicationComponents,Components,Python,Widgets}, # libvtk{PVVTKExtensionsCore,RemotingCore,RemotingServerManager,RemotingViews}) # # Filter exactly those families and no more. Deliberately NOT the broad # ^lib(...|vtk).* pattern paraview.spec uses on itself: tomviz genuinely links # real VTK, and its libvtk*.so.1 Requires are what prove it was rebuilt against # the VTK in this repo. Requires: paraview below is what actually pulls the # private libraries in. %global __requires_exclude ^lib(pq|vtkPV|vtkRemoting).*$ Requires: paraview Requires: python3-vtk Requires: python3-numpy Requires: python3-scipy Requires: python3-h5py # Pin the exact VTK ABI this package was built against. VTK freezes its soname at # libvtk*.so.1 across all of 9.x, so rpm cannot tell 9.5 from 9.6 from 9.7: a consumer # built against one installs cleanly against another and fails at LOAD with undefined # symbols. A >= floor does not help -- 9.7.0 satisfies >= 9.6.2 -- so this is an exact # match. %%vtk_abi comes from vtk-devel's macros.vtk, so it re-pins on every rebuild. # # The missing-macro check lives in %%build, deliberately, NOT at parse time. A # parse-time %%error cannot distinguish "COPR is generating the SRPM" from "this is a # real buildroot": rpkg srpm parses the spec with no buildroot and therefore no # vtk-devel, so a parse-time guard killed every SCM build of every guarded package # before any chroot existed (python-simpleitk 10980296 failed in 0 minutes with # "can't parse specfile"). Expanding to UNSET keeps the SRPM parse alive, and the # %%build test still fails loudly in a buildroot lacking vtk-devel, so no RPM carrying # the placeholder can ever be produced. Requires: vtk(abi) = %{?vtk_abi}%{!?vtk_abi:UNSET} %description Tomviz is a cross-platform, open-source application (SCI/Kitware/OpenChemistry) for the processing, visualization and analysis of 3D tomographic data, widely used in materials science and electron microscopy. It provides a ParaView-based pipeline GUI with a Python operator framework for reconstruction, segmentation and quantification of volumetric datasets. %prep %autosetup -n tomviz-%{version} # Unbundle pybind11 (git submodule, absent from the release archive) -> use # Fedora's pybind11-devel, which provides pybind11_add_module(). sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/thirdparty/pybind11)|find_package(pybind11 CONFIG REQUIRED)|' CMakeLists.txt %build # vtk_abi comes from vtk-devel's macros.vtk. Absent means BuildRequires: vtk-devel is # missing, and the Requires above would ship as the vacuous "vtk(abi) = UNSET". test -n "%{?vtk_abi}" || { echo "ERROR: vtk_abi undefined - add 'BuildRequires: vtk-devel'" >&2; exit 1; } cmake -S . -B cbuild -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DParaView_DIR=%{_libdir}/cmake/paraview \ `# InsightToolkit5-devel installs /usr/lib/cmake/ITK-5.4, not %%{_libdir}.` \ -DITK_DIR=%{_prefix}/lib/cmake/ITK-5.4 \ -DCMAKE_PREFIX_PATH=%{_prefix} %cmake_build -C cbuild 2>/dev/null || cmake --build cbuild %{?_smp_mflags} %install DESTDIR=%{buildroot} cmake --install cbuild # tomviz links ParaView's private libdir; keep that on the RPATH, drop the leak. chrpath -r '%{_libdir}/paraview' %{buildroot}%{_bindir}/tomviz 2>/dev/null || : # Static convenience lib is not needed at runtime. rm -f %{buildroot}%{_libdir}/libtomviz.a # Desktop entry + icon (upstream does not install XDG files on Linux). install -D -m 0644 tomviz/icons/tomviz.png \ %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/tomviz.png cat > %{name}.desktop < - 3.0.0-4 - Point ITK_DIR at %%{_prefix}/lib/cmake/ITK-5.4, where InsightToolkit5-devel installs ITKConfig.cmake. The old %%{_libdir} path has never existed, so find_package searched and, on any host that also has InsightToolkit6-devel (every ITK6 dashboard node), resolved ITK 6.0. COPR only worked because its buildroot has no ITK6. Reported on COORDINATION by fedora-skullcandy-display. * Sun Sep 13 2026 Morgan Hough - 3.0.0-3 - Rebuild to ship the vtk(abi) pin already in the spec. Published RPMs predate it: x86_64 is still 2.3.1-1 and aarch64 3.0.0-2 carries only a "vtk >= 9.6.2" floor. Bumped because the same NVR would not supersede -2. * Tue Sep 08 2026 Morgan Hough - 3.0.0-2 - Fix an uninstallable package. ParaView keeps its libraries in a private %%{_libdir}/paraview/ and excludes them from Provides, but tomviz links them, so rpm generated 9 Requires that nothing provides. Filter just those families (libpq, libvtkPV, libvtkRemoting) and keep the real libvtk*.so.1 Requires, which are the evidence tomviz was rebuilt against this repo's VTK. * Fri Aug 28 2026 Morgan Hough - 3.0.0-1 - Update to 3.0.0. - Drop protobuf-compiler: 3.0.0 no longer references protobuf in its own build system (0 hits across all its CMake files). protobuf-devel is KEPT: ParaView's installed config runs find_package(Protobuf 3.4 REQUIRED) from ParaView-vtk-module-find-packages.cmake, so every consumer of paraview-devel needs it findable. Dropping it failed the build inside paraview-config.cmake, not in tomviz. - Add viskores-devel for the new find_package(Viskores). It is QUIET rather than REQUIRED, so the build would succeed without it and silently lose the accelerator path; our VTK enables AcceleratorsVTKmFilters, so provide it. - The pybind11 unbundling sed in %%prep still applies unchanged: 3.0.0 keeps add_subdirectory(${PROJECT_SOURCE_DIR}/thirdparty/pybind11) at CMakeLists.txt line 167, and the release tarball still ships that directory empty. - Tests remain off by default (ENABLE_TESTING defaults OFF), so the new find_package(GTest REQUIRED) under tests/cxx is not reached. * Sun Aug 23 2026 Morgan Hough - 2.3.1-2 - Rebuild against VTK 9.7.0. VTK here installs unversioned sonames (libvtk*.so.1), so 9.7 replaces 9.6 in place and every consumer must be rebuilt or it fails at runtime with undefined symbols. * Sun Jun 21 2026 Morgan Hough - 2.3.1-1 - Initial package: Tomviz 2.3.1, the ParaView-based 3D tomography visualization and analysis GUI (materials science / electron microscopy). Net-new to Fedora; built against the system ParaView/ITK/VTK/Qt6, pybind11 unbundled.