%global debug_package %{nil} Name: tomviz Version: 3.0.0 Release: 6%{?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: 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 \ `# tomviz links ParaView's PRIVATE libdir, which is not on the default` \ `# linker search path and has no ld.so.conf.d entry. Set the RUNPATH at` \ `# build time: the previous approach ran chrpath -r in %%install, but -r` \ `# can only REPLACE an existing tag and the binary has none, so it failed` \ `# every time -- silently, because stderr went to /dev/null and "|| :"` \ `# swallowed the status. The shipped binary therefore had no RUNPATH at` \ `# all and died with "libpqApplicationComponents.so.1: cannot open shared` \ `# object file". paraview's own /usr/bin/paraview carries` \ `# RUNPATH=$ORIGIN/../lib64/paraview, so this is the mechanism it expects.` \ -DCMAKE_INSTALL_RPATH=%{_libdir}/paraview \ -DCMAKE_PREFIX_PATH=%{_prefix} %cmake_build -C cbuild 2>/dev/null || cmake --build cbuild %{?_smp_mflags} %install DESTDIR=%{buildroot} cmake --install cbuild # The RUNPATH is set at build time now (see -DCMAKE_INSTALL_RPATH above) and # asserted in %%check. Nothing to do here. # 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-6 - tomviz did not start AT ALL. Installed from the COPR into a clean f44 chroot it exits 127: "libpqApplicationComponents.so.1: cannot open shared object file". The library is present the whole time, in ParaView's private %%{_libdir}/paraview, which is not on the default linker search path and has no ld.so.conf.d entry. - The cause was a fail-open in this spec, not a missing dependency. %%install ran "chrpath -r '%%{_libdir}/paraview' ... 2>/dev/null || :". chrpath -r can only REPLACE an existing RPATH/RUNPATH tag, and the binary has none, so it failed on every build -- invisibly, because stderr went to /dev/null and "|| :" discarded the status. readelf -d on the shipped binary confirms: no RUNPATH at all. paraview's own /usr/bin/paraview carries RUNPATH=$ORIGIN/../lib64/paraview, so the mechanism was right and only the way of applying it was wrong. - Set it at build time instead (-DCMAKE_INSTALL_RPATH) and ASSERT it in a new %%check rather than best-effort it. The old form could not fail loudly; the new one cannot fail quietly. chrpath is no longer needed and its BuildRequires is dropped. - Desktop integration (t2's audit): Exec= gains a field code and the entry declares MIME types, so it can be handed a file and a [Default Applications] entry is no longer silently ignored. - %%f, NOT %%F, and that is from the source rather than the handoff's table: tomviz/main.cxx:111 calls window.openFiles(argc, argv), and MainWindow::openFiles reads argv[argc - 1] -- exactly one file, the last one. %%F would not error on multiple paths, it would silently open only the last, which is worse than a visible failure. - MIME types are pruned, not transcribed from the file dialog. Of the formats LoadDataReaction offers, only some have types that exist: image/tiff, application/x-hdf (.h5), application/x-paraview (.vti), application/dicom. .emd, .mrc, .mhd/.mha, .tvsm and .tvh5 have none. Two are deliberately EXCLUDED because the system types are wrong matches: .raw resolves to image/x-panasonic-rw and .xmf to audio/x-xmf -- declaring those would make a tomography tool a handler for Panasonic photos and XMF audio. - Also excluded by judgement, not by fact: image/png, image/jpeg and inode/directory. tomviz genuinely opens all three (a directory loads as an image stack), but declaring them would put it in the "Open With" menu of every screenshot and every folder on the system. - NOT built in local mock first, which gate 0 otherwise requires. tomviz links ParaView, VTK, ITK and Qt6 and is the heavy C++ class that gate 0 explicitly carves out -- stating that out loud rather than letting it pass as a default. The RUNPATH fix is verified instead on the SERVED binary after the COPR build, with readelf, which is the artifact that actually matters. * Tue Sep 29 2026 Morgan Hough - 3.0.0-5 - Rebuild for viskores 1.2 on fedora-44-aarch64. No source change; soname only. tomviz 3.0.0-4 as SERVED on that one chroot requires libviskores_cont-1.1.so.1.1 while the viskores published there has been 1.2.0-1.fc44 since build 10989912, which provides libviskores_cont.so.1.2. 1.2 also dropped the "-1.1" infix from the library filenames, so the two spellings cannot alias and the package is uninstallable there. - Measured across all six chroots rather than assumed -- f44-aarch64 is the only one affected. f44/f45 x86_64, f45-aarch64 and rawhide-aarch64 all already require .so.1.2. (rawhide-x86_64 still serves tomviz 2.3.1-1.fc45, an fc45 build in the rawhide repo, which predates viskores entirely; that is a separate staleness and not this bump's business.) - Same cause and same single-chroot shape as vtk-mpi 9.7.0-2 earlier today: the f44-aarch64 build is green and simply predates viskores 1.2 on that chroot. Found by ci/check-installable.sh, not by any build failing. - Spec is shared (board: tomviz x86_64 is fedora-framework's, aarch64 is legion's); announcing on the board as that row requires. Release-only change, no content difference on any other chroot. * Tue Sep 15 2026 Morgan Hough - 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.