Bug 1631981 (gau2grid) - Review Request: gau2grid - Fast computation of a gaussian function and its derivative on a grid
Summary: Review Request: gau2grid - Fast computation of a gaussian function and its de...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: gau2grid
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-22 20:09 UTC by Susi Lehtola
Modified: 2021-06-11 14:22 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-06-11 14:22:09 UTC
Type: ---
Embargoed:
eclipseo: fedora-review+


Attachments (Terms of Use)

Description Susi Lehtola 2018-09-22 20:09:19 UTC
Spec URL: https://jussilehtola.fedorapeople.org/gau2grid.spec
SRPM URL: https://jussilehtola.fedorapeople.org/gau2grid-1.2.0-1.fc28.src.rpm
Fedora Account System Username: jussilehtola

Description:
A collocation code for computing gaussians on a grid of the form:
out_Lp = x^l y^m z^n \sum_i coeff_i e^(exponent_i * (|center - p|)^2)

This version has been built with -DCARTESIAN_ORDER=row
-DSPHERICAL_ORDER=gaussian for compatibility with psi4.


This package is necessary for updating psi4 to the 1.2 release series.

Comment 1 Robert-André Mauchin 🐧 2018-09-22 21:32:26 UTC
https://fedoraproject.org/wiki/Packaging:Guidelines#Downstream_.so_name_versioning

In cases where upstream ships unversioned .so library (so this is not needed for plugins, drivers, etc.), the packager MUST try to convince upstream to start versioning it.

If that fails due to unwilling or unresposive upstream, the packager may start versioning downstream but this must be done with caution and ideally only in rare cases. We don't want to create a library that could conflict with upstream if they later start providing versioned shared libraries. Under no circumstances should the unversioned library be shipped in Fedora.

Comment 2 Susi Lehtola 2018-09-22 22:11:08 UTC
(In reply to Robert-André Mauchin from comment #1)
> https://fedoraproject.org/wiki/Packaging:Guidelines#Downstream_.
> so_name_versioning
> 
> In cases where upstream ships unversioned .so library (so this is not needed
> for plugins, drivers, etc.), the packager MUST try to convince upstream to
> start versioning it.

https://github.com/dgasmith/gau2grid/issues/24

Comment 3 Robert-André Mauchin 🐧 2018-09-22 22:18:21 UTC
 - Add %make_build after %cmake

%build
mkdir objdir
cd objdir
%cmake .. -DCARTESIAN_ORDER=row -DSPHERICAL_ORDER=gaussian -DCMAKE_INSTALL_LIBDIR=%{_lib}
%make_build

 - make -C objdir install DESTDIR=%{buildroot} → %make_install -C objdir

 - Build fails:

[ 14%] Generating gau2grid.h, gau2grid_phi.c, gau2grid_deriv1.c, gau2grid_deriv2.c, gau2grid_spherical.c, gau2grid_helper.c
/usr/bin/python3.7 -c "import sys;                                      sys.path.append('/builddir/build/BUILD/gau2grid-1.2.0');                                      import gau2grid as gg;                                      gg.c_gen.generate_c_gau2grid(8, path='/builddir/build/BUILD/gau2grid-1.2.0/objdir', cartesian_order='row', spherical_order='gaussian')"
make[2]: Leaving directory '/builddir/build/BUILD/gau2grid-1.2.0/objdir'
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File "<string>", line 1, in <module>
BUILDSTDERR:   File "/builddir/build/BUILD/gau2grid-1.2.0/gau2grid/__init__.py", line 5, in <module>
BUILDSTDERR:     from . import RSH
BUILDSTDERR:   File "/builddir/build/BUILD/gau2grid-1.2.0/gau2grid/RSH.py", line 7, in <module>
BUILDSTDERR:     import numpy as np
BUILDSTDERR: ModuleNotFoundError: No module named 'numpy'

   Add:

BuildRequires:  python3-numpy

 - I've proposed a PR to add library versioning: https://github.com/dgasmith/gau2grid/pull/23

Patch0:         https://github.com/dgasmith/gau2grid/pull/23.patch#/0001-Add-SONAME-version-to-the-library.patch


   And:

%files
%license LICENSE
%doc README.md
%{_libdir}/libgg.so.1*

%files devel
%{_includedir}/gau2grid/ 
%{_datadir}/cmake/gau2grid/
%{_libdir}/libgg.so


 - ***In the next release***, you should not forget to build the docs with sphinx and install them in the devel package:

BuildRequires:  python3-sphinx
BuildRequires:  python3-sphinx_rtd_theme

   And in %build:

make -C docs html
rm -rf docs/build/html/.{doctrees,buildinfo}

   Then

%files devel
%doc docs/build/html

Comment 4 Susi Lehtola 2018-09-22 22:57:41 UTC
Thanks for a quick turnback time. Sorry for not checking if it built in mock, it looked too simple to have build requirements. I couldn't see any documentation, there is no doc(s) directory. Everything else is fixed.

https://jussilehtola.fedorapeople.org/gau2grid.spec
https://jussilehtola.fedorapeople.org/gau2grid-1.2.0-2.fc28.src.rpm

Comment 5 Robert-André Mauchin 🐧 2018-09-23 13:35:40 UTC
 - Add %make_build after %cmake

%build
mkdir objdir
cd objdir
%cmake .. -DCARTESIAN_ORDER=row -DSPHERICAL_ORDER=gaussian -DCMAKE_INSTALL_LIBDIR=%{_lib}
%make_build


 - cd .. is not needed

 - 
>I couldn't see any documentation, there is no doc(s) directory.

There will be in the next release, just don't forget to build it then.

Comment 7 Robert-André Mauchin 🐧 2018-09-23 14:34:02 UTC
All good, package approved.



Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Header files in -devel subpackage, if present.
[x]: ldconfig not called in %post and %postun for Fedora 28 and later.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.
[x]: Development (unversioned) .so files in -devel subpackage, if present.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "BSD (3 clause)", "Unknown or generated", "*No copyright* BSD
     (unspecified)". 36 files have unknown license. Detailed output of
     licensecheck in /home/bob/packaging/review/gau2grid/review-
     gau2grid/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     gau2grid-debuginfo , gau2grid-debugsource
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: gau2grid-1.2.0-3.fc30.x86_64.rpm
          gau2grid-devel-1.2.0-3.fc30.x86_64.rpm
          gau2grid-debuginfo-1.2.0-3.fc30.x86_64.rpm
          gau2grid-debugsource-1.2.0-3.fc30.x86_64.rpm
          gau2grid-1.2.0-3.fc30.src.rpm
gau2grid.x86_64: W: spelling-error Summary(en_US) gaussian -> Gaussian
gau2grid.x86_64: W: spelling-error %description -l en_US gaussians -> Gaussian, Russians
gau2grid.x86_64: W: spelling-error %description -l en_US coeff -> cuff, co eff, co-eff
gau2grid.x86_64: W: spelling-error %description -l en_US gaussian -> Gaussian
gau2grid.x86_64: W: shared-lib-calls-exit /usr/lib64/libgg.so.1.2.0 exit.5
gau2grid-devel.x86_64: W: no-documentation
gau2grid.src: W: spelling-error Summary(en_US) gaussian -> Gaussian
gau2grid.src: W: spelling-error %description -l en_US gaussians -> Gaussian, Russians
gau2grid.src: W: spelling-error %description -l en_US coeff -> cuff, co eff, co-eff
gau2grid.src: W: spelling-error %description -l en_US gaussian -> Gaussian
gau2grid.src:63: W: macro-in-comment %doc
5 packages and 0 specfiles checked; 0 errors, 11 warnings.

Comment 8 Susi Lehtola 2018-09-24 12:49:08 UTC
Thanks a lot!

Comment 9 Gwyn Ciesla 2018-09-24 13:40:37 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/gau2grid

Comment 10 Mattia Verga 2021-06-11 14:22:09 UTC
Package imported, closing.


Note You need to log in before you can comment on or make changes to this bug.