#1 Some modifications
Closed 5 years ago by orion. Opened 5 years ago by sagitter.
rpms/ sagitter/paraview master  into  master

paraview-2474.patch 2474.patch
file renamed
file was moved with no change to the file
paraview-2647.patch 2647.patch
file renamed
file was moved with no change to the file
@@ -0,0 +1,10 @@ 

+ --- a/Applications/ParaView/CMakeLists.orig.txt	2018-06-15 21:09:45.000000000 +0200

+ +++ b/Applications/ParaView/CMakeLists.txt	2019-02-10 11:13:01.565109286 +0100

+ @@ -164,6 +164,6 @@

+    endforeach ()

+    install(

+      FILES       paraview.appdata.xml

+ -    DESTINATION share/appdata

+ +    DESTINATION share/metainfo

+      COMPONENT   runtime)

+  endif()

@@ -0,0 +1,11 @@ 

+ --- a/VTK/Utilities/Python/CMakeLists.orig.txt	2018-06-15 21:09:45.000000000 +0200

+ +++ b/VTK/Utilities/Python/CMakeLists.txt	2019-02-07 20:37:40.549877372 +0100

+ @@ -57,7 +57,7 @@

+      CACHE INTERNAL "Directory where python modules will be installed")

+  else()

+    set(VTK_INSTALL_PYTHON_MODULES_DIR

+ -    "${VTK_INSTALL_LIBRARY_DIR}/${VTK_PYTHON_SITE_PACKAGES_SUFFIX}"

+ +    "${LIB_INSTALL_DIR}/${VTK_PYTHON_SITE_PACKAGES_SUFFIX}/${MPI_NAME}"

+      CACHE INTERNAL "Directory where python modules will be installed")

+  endif()

+  

@@ -0,0 +1,11 @@ 

+ --- a/VTK/Utilities/Python/CMakeLists.orig.txt	2018-06-15 21:09:45.000000000 +0200

+ +++ b/VTK/Utilities/Python/CMakeLists.txt	2019-02-07 20:37:40.549877372 +0100

+ @@ -57,7 +57,7 @@

+      CACHE INTERNAL "Directory where python modules will be installed")

+  else()

+    set(VTK_INSTALL_PYTHON_MODULES_DIR

+ -    "${VTK_INSTALL_LIBRARY_DIR}/${VTK_PYTHON_SITE_PACKAGES_SUFFIX}"

+ +    "${LIB_INSTALL_DIR}/${VTK_PYTHON_SITE_PACKAGES_SUFFIX}"

+      CACHE INTERNAL "Directory where python modules will be installed")

+  endif()

+  

file modified
+102 -67
@@ -65,25 +65,32 @@ 

  

  Name:           paraview

  Version:        %{pv_majmin}.%{pv_patch}

- Release:        21%{?relsuf}%{?dist}

+ Release:        22%{?relsuf}%{?dist}

  Summary:        Parallel visualization application

  

  License:        BSD

  URL:            http://www.paraview.org/

  Source0:        http://www.paraview.org/files/v%{pv_majmin}/ParaView-v%{version}%{?versuf}.tar.gz

- Source1:        paraview.xml

+ Source1:        %{name}.xml

  # Fix for Qt 5.11

- Patch0:         https://gitlab.kitware.com/paraview/paraview/merge_requests/2474.patch

+ Patch0:         https://gitlab.kitware.com/paraview/paraview/merge_requests/2474.patch#/%{name}-2474.patch

  # Fix for cmake 3.12 doc build

- Patch1:         https://gitlab.kitware.com/paraview/paraview/merge_requests/2647.patch

+ Patch1:         https://gitlab.kitware.com/paraview/paraview/merge_requests/2647.patch#/%{name}-2647.patch

+ 

+ # Set paths for Python files

+ Patch2:         %{name}-set_python_path.patch

+ 

+ # Set paths for Python files

+ Patch3:         %{name}-set_python_mpi_path.patch

+ 

+ Patch4:         %{name}-set_appadata.patch

  

  %if 0%{?rhel} && 0%{?rhel} <= 7

- BuildRequires:  cmake3

  BuildRequires:  qt-assistant

  %else

- BuildRequires:  cmake

  BuildRequires:  qt-assistant-adp-devel

  %endif

+ BuildRequires:  cmake3

  BuildRequires:  lz4-devel

  %if %{with qt5}

  BuildRequires:  cmake(Qt5)
@@ -138,7 +145,7 @@ 

  BuildRequires:  glibc-langpack-en

  

  Requires: hdf5%{?_hdf5_version: = %{_hdf5_version}}

- Requires: %{name}-data = %{version}-%{release}

+ Requires: %{name}-data%{?_isa} = %{version}-%{release}

  Requires: %{py2_prefix}-pygments

  Requires: %{py2_prefix}-six

  %{?fedora:Requires: python2-numpy}
@@ -147,9 +154,11 @@ 

  Requires: %{py2_prefix}-autobahn

  Requires: qt5-qtx11extras%{?_isa}

  

- Obsoletes:      paraview-demos < 3.2.1-4

+ Obsoletes:      %{name}-demos < 3.2.1-4

+ 

+ Provides:       %{name}-demos = %{version}-%{release}

  

- Provides:       paraview-demos = %{version}-%{release}

+ %{?python_provide:%python_provide python2-%{name}}

  

  # Bundled KWSys

  # https://fedorahosted.org/fpc/ticket/555
@@ -221,7 +230,7 @@ 

          -DVISIT_BUILD_READER_CGNS=ON \\\

  %endif \

          -DPARAVIEW_WWW_DIR=%{buildroot}%{_pkgdocdir} \\\

-         -DPYTHONQT_DIR=/usr \\\

+         -DPYTHONQT_DIR=%{_prefix} \\\

          -DVTK_CUSTOM_LIBRARY_SUFFIX="" \\\

          -DVTK_INSTALL_DATA_DIR=share/paraview \\\

          -DVTK_INSTALL_PACKAGE_DIR=share/cmake/paraview \\\
@@ -246,12 +255,15 @@ 

          -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON

  

  %global paraview_cmake_mpi_options \\\

+         -DINCLUDE_INSTALL_DIR:PATH=$MPI_INCLUDE/paraview \\\

          -DCMAKE_PREFIX_PATH:PATH=$MPI_HOME \\\

          -DCMAKE_INSTALL_PREFIX:PATH=$MPI_HOME \\\

+         -DMPI_NAME:STRING=$(echo "${MPI_SUFFIX}" | sed -e 's/_//g') \\\

          -DHDF5_INCLUDE_DIRS:PATH=$MPI_INCLUDE \\\

-         -DVTK_INSTALL_INCLUDE_DIR:PATH=include/paraview \\\

+         -DVTK_INSTALL_INCLUDE_DIR:PATH=$MPI_INCLUDE/paraview \\\

          -DVTK_INSTALL_ARCHIVE_DIR:PATH=lib/paraview \\\

          -DVTK_INSTALL_LIBRARY_DIR:PATH=lib/paraview \\\

+         -DVTK_INSTALL_DATA_DIR:PATH=share/paraview \\\

          -DVTK_USE_SYSTEM_DIY2=OFF \\\

          -DVTK_USE_SYSTEM_ICET=OFF \\\

          -DVTK_USE_SYSTEM_MPI4PY:BOOL=ON \\\
@@ -290,9 +302,20 @@ 

  %package        data

  Summary:        Data files for ParaView

  

- Requires:       %{name} = %{version}-%{release}

+ BuildRequires:  doxygen

+ BuildRequires:  graphviz

+ BuildRequires:  hardlink

+ BuildRequires:  %{py2_prefix}-devel

+ %{?fedora:BuildRequires: python2-numpy}

+ %{?rhel:BuildRequires: numpy}

+ BuildRequires:  %{py2_prefix}-sphinx

  

- BuildArch:      noarch

+ # Unavailable on rhel

+ BuildRequires:  %{py2_prefix}-twisted

+ BuildRequires:  %{py2_prefix}-autobahn

+ Requires:       %{name}%{?_isa} = %{version}-%{release}

+ Obsoletes:      %{name}-doc < 5.5.2-23

+ Provides:       %{name}-doc = %{version}-%{release}

  

  %description    data

  %{summary}.
@@ -303,33 +326,13 @@ 

  

  Requires:       %{name}%{?_isa} = %{version}-%{release}

  Requires:       vtk-devel%{?_isa}

+ Provides:       %{name}-static = %{version}-%{release}

  

  %description    devel

  The %{name}-devel package contains libraries and header files for

  developing applications that use %{name}.

  

  

- %package        doc
orion commented 5 years ago

There is no reason to get rid of the doc sub-package. It may need to not be noarch, but it should be kept

- Summary:        Documentation files for ParaView

- 

- BuildRequires:  doxygen

- BuildRequires:  graphviz

- BuildRequires:  hardlink

- BuildRequires:  %{py2_prefix}-devel

- %{?fedora:BuildRequires: python2-numpy}

- %{?rhel:BuildRequires: numpy}

- BuildRequires:  %{py2_prefix}-sphinx

- 

- # Unavailable on rhel

- BuildRequires:  %{py2_prefix}-twisted

- BuildRequires:  %{py2_prefix}-autobahn

- 

- BuildArch:      noarch

- 

- %description    doc

- %{summary}.

- 

- 

  %if %{build_openmpi}

  %package        openmpi

  Summary:        Parallel visualization application
@@ -338,7 +341,7 @@ 

  BuildRequires:  mpi4py-openmpi

  BuildRequires:  netcdf-openmpi-devel

  

- Requires:       %{name}-data = %{version}-%{release}

+ Requires:       %{name}-data%{?_isa} = %{version}-%{release}

  Requires:       mpi4py-openmpi

  Requires:       %{py2_prefix}-pygments

  Requires:       %{py2_prefix}-six
@@ -348,9 +351,10 @@ 

  Requires:       %{py2_prefix}-autobahn

  

  Obsoletes:      %{name}-mpi < 3.6.2-5

- 

  Provides:       %{name}-mpi = %{version}-%{release}

  

+ %{?python_provide:%python_provide python2-%{name}-openmpi}

+ 

  %description    openmpi

  This package contains copies of the ParaView server binaries compiled with

  OpenMPI.  These are named pvserver_openmpi, pvbatch_openmpi, etc.
@@ -362,6 +366,7 @@ 

  Summary:        Development files for %{name}-openmpi

  

  Requires:       %{name}-openmpi%{?_isa} = %{version}-%{release}

+ Provides:       %{name}-openmpi-static = %{version}-%{release}

  

  %description    openmpi-devel

  The %{name}-openmpi-devel package contains libraries and header files for
@@ -377,7 +382,7 @@ 

  BuildRequires:  mpi4py-mpich

  BuildRequires:  netcdf-mpich-devel

  

- Requires:       %{name}-data = %{version}-%{release}

+ Requires:       %{name}-data%{?_isa} = %{version}-%{release}

  Requires:       mpi4py-mpich

  Requires:       %{py2_prefix}-pygments

  Requires:       %{py2_prefix}-six
@@ -388,6 +393,8 @@ 

  

  Obsoletes:      %{name}-mpich2 < 3.98.1-6

  

+ %{?python_provide:%python_provide python2-%{name}-mpich}

+ 

  %description    mpich

  This package contains copies of the ParaView server binaries compiled with

  mpich.  These are named pvserver_mpich, pvbatch_mpich, etc.
@@ -403,6 +410,7 @@ 

  Obsoletes:      %{name}-mpich2-devel < 3.98.1-6

  

  Provides:       %{name}-mpich2-devel = %{version}-%{release}

+ Provides:       %{name}-mpich-static = %{version}-%{release}

  

  %description    mpich-devel

  The %{name}-mpich-devel package contains libraries and header files for
@@ -411,7 +419,12 @@ 

  

  

  %prep

- %autosetup -n ParaView-v%{version}%{?versuf} -p 1

+ %autosetup -n ParaView-v%{version}%{?versuf} -N

+ 

+ %patch0 -p1

+ %patch1 -p1

+ %patch2 -p1

+ %patch4 -p1

  

  %if %{with VisitBridge}

  cp -p Utilities/VisItBridge/README.md Utilities/VisItBridge/README-VisItBridge.md
@@ -446,7 +459,7 @@ 

  %build

  mkdir %{_target_platform}

  pushd %{_target_platform}

- %cmake3 .. \

+ %cmake3 -Wno-dev .. \

          -DBUILD_DOCUMENTATION:BOOL=ON \

          -DVTK_INSTALL_INCLUDE_DIR:PATH=include/paraview \

          -DVTK_INSTALL_ARCHIVE_DIR:PATH=%{_lib}/paraview \
@@ -456,14 +469,21 @@ 

          -DQtTesting_INSTALL_CMAKE_DIR=%{_lib}/paraview/CMake \

          %{paraview_cmake_options}

  %make_build

- #export LD_LIBRARY_PATH="%{buildroot}%{_libdir}:%{_libdir}"

- #export PYTHONPATH="%{buildroot}%{_libdir}/%{name}/site-packages:${PYTHONPATH}"

- #export PYTHONPATH="${PYTHONPATH%:}:%{python2_sitearch}/mpich"

+ #export LD_LIBRARY_PATH="%%{buildroot}%%{_libdir}:%%{_libdir}"

+ #export PYTHONPATH="%%{buildroot}%%{_libdir}/%%{name}/site-packages:${PYTHONPATH}"

+ #export PYTHONPATH="${PYTHONPATH%:}:%%{python2_sitearch}/mpich"

  export LANG=en_US.UTF-8

  %make_build DoxygenDoc ParaViewDoc

  #unset LD_LIBRARY_PATH

  #unset PYTHONPATH

  popd

+ 

+ ## MPI builds

+ %if %{build_openmpi} || %{build_mpich} 

+ patch -p1 -R < %{PATCH2}

+ patch -p1 < %{PATCH3}

+ %endif

+ 

  %if %{build_openmpi}

  mkdir %{_target_platform}-openmpi

  pushd %{_target_platform}-openmpi
@@ -483,7 +503,7 @@ 

  # EL7 mpich module doesn't set PYTHONPATH

  # https://bugzilla.redhat.com/show_bug.cgi?id=1148992

  [ -z "$PYTHONPATH" ] && export PYTHONPATH=$MPI_PYTHON_SITEARCH

- %cmake3 .. \

+ %cmake3 -Wno-dev .. \

          %{paraview_cmake_mpi_options}

  # Fixup forward paths

  sed -i -e 's,../%{_lib}/mpich,..,' `find -name \*-forward.c`
@@ -491,6 +511,7 @@ 

  %{_mpich_unload}

  popd

  %endif

+ ## End of MPI builds

  

  

  %install
@@ -509,7 +530,7 @@ 

  %make_install -C %{_target_platform}-openmpi

  

  #Remove mpi copy of doc and man pages and  data

- rm -rf %{buildroot}%{_libdir}/openmpi/share/{appdata,applications,doc,icons,man,paraview,vtkm-*}

+ rm -rf %{buildroot}%{_libdir}/openmpi/share/{metainfo,applications,doc,icons,man,paraview,vtkm-*}

  

  # Fix shell script permissions

  chmod 0755 %{buildroot}%{_libdir}/openmpi/share/cmake/paraview/pre-commit
@@ -523,7 +544,7 @@ 

  %make_install -C %{_target_platform}-mpich

  

  #Remove mpi copy of doc and man pages and data

- rm -rf %{buildroot}%{_libdir}/mpich/share/{appdata,applications,doc,icons,man,paraview,vtkm-*}

+ rm -rf %{buildroot}%{_libdir}/mpich/share/{metainfo,applications,doc,icons,man,paraview,vtkm-*}

  

  # Fix shell script permissions

  chmod 0755 %{buildroot}%{_libdir}/mpich/share/cmake/paraview/pre-commit
@@ -535,7 +556,7 @@ 

  

  desktop-file-validate %{buildroot}%{_datadir}/applications/paraview.desktop

  %if 0%{?fedora} || 0%{?rhel} >= 8

- appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml

+ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml

  %endif

  

  #Cleanup only vtk conflicting binaries
@@ -555,6 +576,7 @@ 

  rm -rf %{buildroot}%{_docdir}/paraview-%{pv_majmin}

  find %{buildroot}%{_pkgdocdir} -name '.*' -print0 | xargs -0 rm -frv

  find %{buildroot}%{_pkgdocdir} -name '*.map' -or -name '*.md5' -print -delete

+ cp -pr Utilities/VisItBridge/README-VisItBridge.md %{buildroot}%{_pkgdocdir}/

  hardlink -cfv %{buildroot}%{_pkgdocdir}

  

  %if 0%{?rhel} && 0%{?rhel} <= 7
@@ -589,10 +611,7 @@ 

  %endif

  

  %files

- %license Copyright.txt License_v1.2.txt

- %doc %dir %{_pkgdocdir}

- %doc %{_pkgdocdir}/README.md

- %doc Utilities/VisItBridge/README-VisItBridge.md

+ %dir %{_pkgdocdir}

  %{_bindir}/paraview

  %{_bindir}/pvbatch

  # Currently disabled upstream
@@ -603,9 +622,16 @@ 

  %{_bindir}/pvserver

  %{_bindir}/smTestDriver

  %{_libdir}/paraview/

+ %exclude %{_libdir}/paraview/*.a

+ %{python2_sitearch}/paraview/

+ %{python2_sitearch}/vtkmodules/

+ %{python2_sitearch}/cinema_python/

+ %{python2_sitearch}/vtk.*

  

  %files data

- %{_datadir}/appdata/paraview.appdata.xml

+ %license Copyright.txt License_v1.2.txt

+ %{_pkgdocdir}/

+ %{_metainfodir}/paraview.appdata.xml

  %{_datadir}/applications/*paraview.desktop

  %{_datadir}/icons/hicolor/*/apps/paraview.png

  %{_datadir}/mime/packages/paraview.xml
@@ -614,47 +640,56 @@ 

  %{_bindir}/paraview-config

  %{_bindir}/vtkWrapClientServer

  %{_bindir}/vtkkwProcessXML

+ %{_libdir}/paraview/*.a

  %{_includedir}/paraview/

  %{_datadir}/cmake/

  

- %files doc

- %license %{_datadir}/licenses/%{name}*

- %doc %{_pkgdocdir}

- 

- 

  %if %{build_openmpi}

  %files openmpi

- %license %{_datadir}/licenses/%{name}*

- %doc %dir %{_pkgdocdir}

- %doc %{_pkgdocdir}/README.md

- %doc Utilities/VisItBridge/README-VisItBridge.md

+ %dir %{_pkgdocdir}

  %{_libdir}/openmpi/bin/[ps]*

  %{_libdir}/openmpi/lib/paraview/

+ %exclude %{_libdir}/openmpi/lib/paraview/*.a

+ %{python2_sitearch}/openmpi/paraview/

+ %{python2_sitearch}/openmpi/vtkmodules/

+ %{python2_sitearch}/openmpi/cinema_python/

+ %{python2_sitearch}/openmpi/vtk.*

  

  %files openmpi-devel

  %{_libdir}/openmpi/bin/vtk*

- %{_libdir}/openmpi/include/paraview/

+ %{_libdir}/openmpi/lib/paraview/*.a

+ %{_includedir}/openmpi-%{_arch}/paraview/

  %{_libdir}/openmpi/share/cmake/

  %endif

  

- 

  %if %{build_mpich}

  %files mpich

- %license %{_datadir}/licenses/%{name}*

- %doc %dir %{_pkgdocdir}

- %doc %{_pkgdocdir}/README.md

- %doc Utilities/VisItBridge/README-VisItBridge.md

+ %dir %{_pkgdocdir}

  %{_libdir}/mpich/bin/[ps]*

  %{_libdir}/mpich/lib/paraview/

+ %exclude %{_libdir}/mpich/lib/paraview/*.a

+ %{python2_sitearch}/mpich/paraview/

+ %{python2_sitearch}/mpich/vtkmodules/

+ %{python2_sitearch}/mpich/cinema_python/

+ %{python2_sitearch}/mpich/vtk.*

  

  %files mpich-devel

  %{_libdir}/mpich/bin/vtk*

- %{_libdir}/mpich/include/paraview/

+ %{_libdir}/mpich/lib/paraview/*.a

+ %{_includedir}/mpich-%{_arch}/paraview/

  %{_libdir}/mpich/share/cmake/

  %endif

  

  

  %changelog

+ * Sun Feb 10 2019 Antonio Trande <sagitter@fedoraproject.org> - 5.5.2-22

+ - Do not use %%_pkgdocdir and %%doc together

+ - Use %%_metainfodir

+ - Move %%_pkgdocdir under the data sub-package (arch dependent)

+ - Use default MPI include directories

+ - Install license files by the data sub-package only

+ - Rename patches with paraview- suffix

+ 

  * Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.5.2-21

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

  

I don't know why you used unusual paths like /usr/lib64/paraview/python2.7/site-packages/ so i have modified the SPEC file in order to install Python files into default Python2 paths.
The documentation package looks contain arch-dependent files, i have removed the -doc sub-package and moved all files into an arched -data sub-package.

Other changes:

  • Do not use %%_pkgdocdir and %%doc together
  • Use %%_metainfodir
  • Move %%_pkgdocdir under the data sub-package (arch dependent)
  • Use default MPI include directories
  • Install license files by the data sub-package only
  • Rename patches with paraview- suffix

There is no reason to get rid of the doc sub-package. It may need to not be noarch, but it should be kept

Thanks. Couple issues:

  • we definitely want to keep the -doc sub-package so that people do not have to install it if they don't want to (-data is required by paraview).
  • What's the point of %autosetup if not to automatically apply patches :)
  • why did you make -data arched?

Also, I'm in the middle of an update to paraview 5.6.0 so things are going to be a little messy merging.

Just a heads up - I'm going to just close this soon, but will incorporate many of your changes if the work out. Thanks again.

One issue with the python install location - we need to be sure not to conflict with the vtk python modules installed by the vtk package.

Thanks. Couple issues:

we definitely want to keep the -doc sub-package so that people do not have to install it if they don't want to (-data is required by paraview).
What's the point of %autosetup if not to automatically apply patches :)

Patch3 is used with MPI builds only, after reverting the patch2.

In this condition we need to control the patches one by one.

why did you make -data arched?

I wrote previously: The documentation package looks contain arch-dependent files, i have removed the -doc sub-package and moved all files into an arched -data sub-package.

One issue with the python install location - we need to be sure not to conflict with the vtk python modules installed by the vtk package.

I don't see packages with /vtkmodules:

$ repoquery -f */vtkmodules
Last metadata expiration check: 0:04:59 ago on mer 13 feb 2019 11:17:24 CET.
paraview-0:5.5.2-18.fc29.i686
paraview-0:5.5.2-18.fc29.x86_64
paraview-mpich-0:5.5.2-18.fc29.i686
paraview-mpich-0:5.5.2-18.fc29.x86_64
paraview-openmpi-0:5.5.2-18.fc29.i686
paraview-openmpi-0:5.5.2-18.fc29.x86_64

Pull-Request has been closed by orion

5 years ago