Bug 1828205 - Review Request: doctest - fast header-only C++ unit testing
Summary: Review Request: doctest - fast header-only C++ unit testing
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-27 10:13 UTC by Nick Black
Modified: 2021-02-23 14:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-23 14:49:46 UTC
Type: ---
dcantrell: fedora-review+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 177841 0 medium NEW Tracker: Review requests from new Fedora packagers who need a sponsor 2021-02-22 00:41:40 UTC

Description Nick Black 2020-04-27 10:13:26 UTC
Spec URL: https://github.com/dankamongmen/fedora-mmmmlady/blob/master/doctest.spec
SRPM URL: https://www.dsscaw.com/repos/dnf/doctest-2.3.7-1.fc33.src.rpm
Description: A fast (both in compile times and runtime) C++ testing framework, with the ability to write tests directly along production source (or in their own source, if you prefer).
Fedora Account System Username: nickblack

This is my second Fedora package; my first is Notcurses (https://bugzilla.redhat.com/show_bug.cgi?id=1822971). Notcurses will use this package as a build-dependency once admitted (right now the former's unit tests are disabled by the spec file). I'm a big fan of this header-only solution for C++ unit testing: it's fast, robust, and flexible.

I've verified the build from SRPM using 'mock'.

I will need a sponsor, but this ought be an easy package to review!

Comment 1 David Cantrell 2020-04-27 13:48:56 UTC
Package Review
==============

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


Issues:
=======
- Header files in -devel subpackage, if present.
  Note: doctest : /usr/include/doctest/doctest.h
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_devel_packages
- Package does not contain duplicates in %files.
  Note: warning: File listed twice: /usr/share/doc/doctest/CHANGELOG.md
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_duplicate_files


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

C/C++:
[ ]: Package does not contain kernel modules.
[ ]: 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]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[ ]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[ ]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "Expat License", "Boost Software
     License (v1.0)", "Expat License Boost Software License (v1.0)", "*No
     copyright* GNU General Public License (v3)", "Apache License (v2.0)".
     199 files have unknown license. Detailed output of licensecheck in
     /home/dcantrell/doctest/licensecheck.txt
[ ]: %build honors applicable compiler flags or justifies otherwise.
[ ]: Package contains no bundled libraries without FPC exception.
[ ]: Changelog in prescribed format.
[ ]: Sources contain only permissible code or content.
[ ]: Package contains desktop file if it is a GUI application.
[ ]: Development files must be in a -devel package
[ ]: Package uses nothing in %doc for runtime.
[ ]: Package consistently uses macros (instead of hard-coded directory
     names).
[ ]: Package is named according to the Package Naming Guidelines.
[ ]: Package does not generate any conflict.
[ ]: Package obeys FHS, except libexecdir and /usr/target.
[ ]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[ ]: Requires correct, justified where necessary.
[ ]: Spec file is legible and written in American English.
[ ]: Package contains systemd file(s) if in need.
[ ]: Useful -debuginfo package or justification otherwise.
[ ]: 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 61440 bytes in 2 files.
[ ]: 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 must own all directories that it creates.
[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]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[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.
[ ]: Final provides and requires are sane (see attachments).
[ ]: Package functions as described.
[ ]: Latest version is packaged.
[ ]: Package does not include license text files separate from upstream.
[ ]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[ ]: Package should compile and build into binary rpms on all supported
     architectures.
[ ]: %check is present and all tests pass.
[ ]: 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]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[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.


Rpmlint
-------
Checking: doctest-2.3.7-1.fc33.x86_64.rpm
          doctest-2.3.7-1.fc33.src.rpm
doctest.x86_64: E: no-changelogname-tag
doctest.x86_64: W: only-non-binary-in-usr-lib
doctest.x86_64: W: devel-file-in-non-devel-package /usr/include/doctest/doctest.h
doctest.src: E: no-changelogname-tag
2 packages and 0 specfiles checked; 2 errors, 2 warnings.




Rpmlint (installed packages)
----------------------------
doctest.x86_64: E: no-changelogname-tag
doctest.x86_64: W: invalid-url URL: https://github.com/onqtam/doctest <urlopen error [Errno -2] Name or service not known>
doctest.x86_64: W: only-non-binary-in-usr-lib
doctest.x86_64: W: devel-file-in-non-devel-package /usr/include/doctest/doctest.h
1 packages and 0 specfiles checked; 1 errors, 3 warnings.



Source checksums
----------------
https://nick-black.com/dankamongmen.gpg :
  CHECKSUM(SHA256) this package     : 0a6f979c9d88b0d72310b8462d2066a60b657a2f188a74c3cb19cac0064616ce
  CHECKSUM(SHA256) upstream package : 0a6f979c9d88b0d72310b8462d2066a60b657a2f188a74c3cb19cac0064616ce
https://raw.githubusercontent.com/dankamongmen/fedora-mmmmlady/master/2.3.7.tar.gz.asc :
  CHECKSUM(SHA256) this package     : 05af960c6f87e7829cb258299534b192ea68b8f8ca3656ba3e14bc941c16cba0
  CHECKSUM(SHA256) upstream package : 05af960c6f87e7829cb258299534b192ea68b8f8ca3656ba3e14bc941c16cba0
https://github.com/onqtam/doctest/archive/2.3.7.tar.gz :
  CHECKSUM(SHA256) this package     : a70cd25875029879e577b08cfaa57a76c7bea62c473ca94d85ec87ea53af7177
  CHECKSUM(SHA256) upstream package : a70cd25875029879e577b08cfaa57a76c7bea62c473ca94d85ec87ea53af7177


Requires
--------
doctest (rpmlib, GLIBC filtered):
    cmake-filesystem(x86-64)



Provides
--------
doctest:
    cmake(doctest)
    doctest
    doctest(x86-64)



Generated by fedora-review 0.7.5 (5fa5b7e) last change: 2020-02-16
Command line :/usr/bin/fedora-review --rpm-spec -n doctest-2.3.7-1.fc33.src.rpm
Buildroot used: fedora-rawhide-x86_64
Active plugins: C/C++, Generic, Shell-api
Disabled plugins: Perl, Python, Java, PHP, SugarActivity, Ocaml, fonts, R, Haskell
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 2 David Cantrell 2020-04-27 13:55:18 UTC
Condensed list of items to take care of for review:

* Make the package a noarch package with:  BuildArch: noarch

* Drop '%global debug_package %{nil}' since the noarch thing will take care of that.

* In %install, you don't need to install the docs.  Just use the %doc macro in %files and reference files in the source dir.  They will be installed to %{_docdir}/%{name}

* Drop '%docdir' line from %files section.

* There is no %changelog section.

Everything else checks out.  Compliant with packaging policy, has an allowed license, etc.

Comment 3 Nick Black 2020-04-30 04:06:30 UTC
* rename to doctest-devel: done

* noarch: done

* drop global: done

* drop doc enumeration: done

* drop docdir: done

* changelog: added

Verified specfile with `spectool -g`
Built SRPM with `rpmbuild -bs doctest.spec`
Built noarch RPM with `mock -r fedora-rawhide-x srcrpm`

I get four rpmlint results, 1 an error, 3 warnings:

* E: noarch-with-lib64 (cmake files)
* only-non-binary-in-usr-lib

I don't see a place to install CMake files outside of /usr/lib64, but I'm digging into the documentation, and might have a natural fix for that shortly.

Comment 4 Nick Black 2020-04-30 04:11:15 UTC
That ought have read "1 error, 1 warning", sorry

Comment 5 Nick Black 2020-04-30 04:35:08 UTC
OK, I've verified that if I install the CMake config files into /usr/lib/cmake (which did not exist on my system before, and my package would need create), cmake as installed picks it up, and things can build against doctest successfully. So I just need to figure out how to pass /usr/lib/ down into CMake using the cmake macro, and they ought get installed to /usr/lib/cmake, eliminating the error noarch-with-lib64.

I'm not sure what to do about only-non-binary-in-usr-lib.

The following paths get searched by CMake by default:

<prefix>/(lib/<arch>|lib*|share)/cmake/<name>*/               
<prefix>/(lib/<arch>|lib*|share)/<name>*/                       
<prefix>/(lib/<arch>|lib*|share)/<name>*/(cmake|CMake)/         
<prefix>/<name>*/(lib/<arch>|lib*|share)/cmake/<name>*/         
<prefix>/<name>*/(lib/<arch>|lib*|share)/<name>*/               
<prefix>/<name>*/(lib/<arch>|lib*|share)/<name>*/(cmake|CMake)/

so it doesn't seem like I'm getting out of /usr/lib easily. :/

Comment 6 Nick Black 2020-04-30 05:44:18 UTC
Actually, I see that /usr/lib is explicitly 32-bit, not "noarch". So I'm not sure how to proceed here. It almost makes me think this shouldn't actually be a noarch package?

Comment 7 David Cantrell 2020-04-30 16:09:16 UTC
If it's noarch, put it in /usr/share/cmake.

Comment 8 Nick Black 2020-04-30 23:45:24 UTC
Unfortunately, that is both prohibited by cmake (https://gitlab.kitware.com/cmake/cmake/issues/17530), and non-functional even if you do it anyway. I tested with /usr/share/cmake, /usr/share/cmake/Modules, and /usr/share/cmake/Modules/doctest/. I expected the second to work, but it does not. Your options are only the ones listed in comment #5, unless you want everyone to have to manually supply /usr/share/doctest/cmake or whatever. :/

Comment 9 David Cantrell 2020-05-01 16:44:40 UTC
*sigh*

Alright, put it wherever and I'll just ignore the fedora-review warning there.  I don't see why cmake can't also read /usr/share/cmake in addition to /usr/lib/cmake but I guess I shouldn't be surprised.

That means dropping the noarch thing and adding back the %global to disable debuginfo generation.  Put the %global at the top of the spec file.   And then just use %{_libdir} since that expands correctly to /usr/lib or /usr/lib64.

Comment 10 Nick Black 2020-05-02 14:41:25 UTC
> *sigh*

you and me both, buddy

Yeah, I was expecting /usr/share/cmake/Modules to work, as there are a bunch of other .cmake files in there. I expected it enough that I went and verified in the CMake source that, yes, it is looking for particular shipped files there, and doing searches for find_package() only in the directories enumerated above. Sorry :/.

On the "plus" side, this is the right thing to do anyway, because those cmake files have /usr/lib64 references in them as installed. So this was never properly a noarch package.

I don't see any means to disable particular warnings like Lintian, alas.

> That means dropping the noarch thing and adding back the %global to disable debuginfo generation.  Put the %global at the top of the spec file.   And then just use %{_libdir} since that expands correctly to /usr/lib or /usr/lib64.

Done.


Validated specfile  and grabbed sources with `spectool -g`
Built SRPM with `rpmbuild -bs`
Built RPM+SRPM with `mock -r fedora-rawhide-x86_64 --rebuild`
Installed `doctest-devel` x86_64 RPM, verified that doctest was discovered by CMake
Removed `doctest-devel`, verified that all residue was clean
rpmlint complains: W: only-non-binary-in-usr-lib


[vps](0) $ sha256sum *doctest*
2f478adeb87cf8444fffdb01ab4de54e64c12b807842275cf2325dc4c8512f9f  doctest-devel-2.3.7-1.fc33.src.rpm
9667ee059437b8fe84ac1a8aab3b4a38e832c8528dfd50e02793cb6a3af718da  doctest-devel-2.3.7-1.fc33.x86_64.rpm
[vps](0) $


https://www.dsscaw.com/repos/dnf/doctest-devel-2.3.7-1.fc33.src.rpm

PTAL

Comment 11 Vitaly Zaitsev 2020-05-04 09:59:10 UTC
Are you still interested in this package? If not, I will take it for myself. I need this package ASAP to build another as a strict dependency.

> Source2:        https://nick-black.com/dankamongmen.gpg

1. You cannot use your own GPG signatures. You should verify tarballs **only** if upstream provide valid signed tarballs. The doctest upstream don't do this => you must not check anything.

> %setup -q -n doctest-%{version}

2. Replace by %autosetup.

> mkdir -p %{buildroot}/%{_docdir}/doctest

3. Remove this row and use only %doc directive.

4. Also I suggest to use ninja instead of legacy makefiles:

%prep
%autosetup -p1
mkdir -p %{_target_platform}

%build
pushd %{_target_platform}
    %cmake -G Ninja \
    -DCMAKE_BUILD_TYPE=Release \
    -DDOCTEST_WITH_MAIN_IN_STATIC_LIB:BOOL=OFF \
    -DDOCTEST_WITH_TESTS:BOOL=ON \
    ..
popd
%ninja_build -C %{_target_platform}

%install
%ninja_install -C %{_target_platform}

Check my SPEC: https://raw.githubusercontent.com/EasyCoding/doctest/master/doctest.spec

5. Enable tests:

%check
pushd %{_target_platform}
    ctest --output-on-failure
popd

> I don't see why cmake can't also read /usr/share/cmake in addition to /usr/lib/cmake but I guess I shouldn't be surprised.

You must use arched package to verify that all tests will pass on all architectures.

Comment 12 Vitaly Zaitsev 2020-05-04 11:03:39 UTC
> Name:           doctest-devel

6. Name must be doctest.

> Source1:        https://raw.githubusercontent.com/dankamongmen/fedora-mmmmlady/master/%{version}.tar.gz.asc

7. Must be removed as does not belongs to upstream.

> %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'

8. Must be removed.

9. Add devel subpackage:

%package devel
Summary: Development files for %{name}
Provides: %{name}-static%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: libstdc++-devel%{?_isa}

%description devel
%{summary}.

%files devel
%doc README.md CHANGELOG.md CONTRIBUTING.md
%license LICENSE.txt
%{_includedir}/%{name}/
%{_libdir}/cmake/%{name}/

Comment 13 Nick Black 2020-05-04 11:57:51 UTC
Hi Vitaly, thanks for the review!

> Are you still interested in this package? If not, I will take it for myself.

I last commented on it two days ago, and my sponsor has yet to reply. I have not lost interest in it over the weekend, no.

> > Source2:        https://nick-black.com/dankamongmen.gpg
> 1. You cannot use your own GPG signatures. You should verify tarballs
> **only** if upstream provide valid signed tarballs. The doctest upstream
> don't do this => you must not check anything.

Removed both these lines. Removed gnupg from BuildRequires.

> > %setup -q -n doctest-%{version}
> 2. Replace by %autosetup.

I needed to do this to name the package doctest-devel. I see that in #6 you suggest renaming it doctest. Please see comments #1--#3 where this is discussed. Your recommendation appears to contradict the advice given me by David Cantrell.

> > mkdir -p %{buildroot}/%{_docdir}/doctest
> 3. Remove this row and use only %doc directive.

I believe that without this line, I got an error during "make install". I'll test with your change and see, but this was only added due to a need for it.

> 4. Also I suggest to use ninja instead of legacy makefiles:
> %prep
> %autosetup -p1
> mkdir -p %{_target_platform}
> 
> %build
> pushd %{_target_platform}
>     %cmake -G Ninja \
>     -DCMAKE_BUILD_TYPE=Release \
>     -DDOCTEST_WITH_MAIN_IN_STATIC_LIB:BOOL=OFF \
>     -DDOCTEST_WITH_TESTS:BOOL=ON \
>     ..
> popd
> %ninja_build -C %{_target_platform}

It was my understanding that Ninja is faster for *rebuilds*, not initial builds. I'll go ahead and run with both and see if the timings are different.

> 5. Enable tests:
> 
> %check
> pushd %{_target_platform}
>     ctest --output-on-failure
> popd

Good call. Done.

> You must use arched package to verify that all tests will pass on all
> architectures.

I'm using an arched package.

Comment 14 Vitaly Zaitsev 2020-05-04 13:55:26 UTC
> I needed to do this to name the package doctest-devel. I see that in #6 you suggest renaming it doctest. Please see comments #1--#3 where this is discussed. Your recommendation appears to contradict the advice given me by David Cantrell.

He gave you the wrong recommendation. The upstream name is doctest, so you must use it as the name of package.

The main package will not produce any output, all logic will be moved to -devel subpackage.

Read this:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Naming/
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_packaging_header_only_libraries

> I believe that without this line, I got an error during "make install". I'll test with your change and see, but this was only added due to a need for it.

Just take my SPEC file. It builds absolutely fine and follow all Fedora guidelines.

> It was my understanding that Ninja is faster for *rebuilds*, not initial builds. I'll go ahead and run with both and see if the timings are different.

Make is a legacy, ancient tool. Ninja is much more better. It has no issues with special characters and generate beautiful output.

> I'm using an arched package.

Good. This line was for the reviewer.

Comment 15 David Cantrell 2020-05-04 18:56:10 UTC
If a review is already in progress by someone else, please make sure it is ok to jump in.  I wasted a lot of time today because you had already commented here.  I assigned the review to myself because I was handling it.

(In reply to Vitaly Zaitsev from comment #14)
> > I needed to do this to name the package doctest-devel. I see that in #6 you suggest renaming it doctest. Please see comments #1--#3 where this is discussed. Your recommendation appears to contradict the advice given me by David Cantrell.
> 
> He gave you the wrong recommendation. The upstream name is doctest, so you
> must use it as the name of package.

I never said to rename the package to 'doctest-devel', I'm not sure where anyone is getting this.

> The main package will not produce any output, all logic will be moved to
> -devel subpackage.
> 
> Read this:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Naming/
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> #_packaging_header_only_libraries
> 
> > I believe that without this line, I got an error during "make install". I'll test with your change and see, but this was only added due to a need for it.
> 
> Just take my SPEC file. It builds absolutely fine and follow all Fedora
> guidelines.
> 
> > It was my understanding that Ninja is faster for *rebuilds*, not initial builds. I'll go ahead and run with both and see if the timings are different.
> 
> Make is a legacy, ancient tool. Ninja is much more better. It has no issues
> with special characters and generate beautiful output.

These comments are subjective and an opinion.  The package maintainer is free to use tools they prefer.  Many projects offer multiple ways to build and if the package maintainer wants to use one method of another, that's fine.  The reviewer can advise on common best practices but the requirement is not that a packager must use specific tools, but rather that the packaged output conforms to agreed upon packaging guidelines.

> > I'm using an arched package.
> 
> Good. This line was for the reviewer.

The package in question delivers metadata.  My original understanding was that this was not architecture specific, but as later discovered it encodes arch-specific library paths in those files which now makes it arch-specific.

Comment 16 Vitaly Zaitsev 2020-05-05 08:26:53 UTC
> If a review is already in progress by someone else, please make sure it is ok to jump in.  I wasted a lot of time today because you had already commented here.  I assigned the review to myself because I was handling it.

I'm not taking this review to myself. Sorry about this. I just need this package in repositories ASAP.

Comment 17 David Cantrell 2020-05-05 19:49:59 UTC
(In reply to Vitaly Zaitsev from comment #16)
> > If a review is already in progress by someone else, please make sure it is ok to jump in.  I wasted a lot of time today because you had already commented here.  I assigned the review to myself because I was handling it.
> 
> I'm not taking this review to myself. Sorry about this. I just need this
> package in repositories ASAP.

Understood.  I am working through this with the packager as quickly as possible.  The packager is also a new Fedora contributor, so we are also working through the various Fedora processes and such.  Thanks.

Comment 18 Nick Black 2020-05-13 13:53:52 UTC
I have updated the candidate package SRPM and spec integrating Vitaly's valuable feedback (except for the switch to Ninja, which my tests found IMHO unwarranted). PTAL.

https://www.dsscaw.com/repos/dnf/doctest-2.3.7-1.fc33.src.rpm
https://www.dsscaw.com/repos/dnf/doctest.spec
https://www.dsscaw.com/repos/dnf/doctest-devel-2.3.7-1.fc33.x86_64.rpm

Comment 19 Nick Black 2020-05-19 02:50:50 UTC
friendly ping!

Comment 20 David Cantrell 2020-05-19 12:55:15 UTC
Package Review
==============

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



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

C/C++:
[ ]: Package does not contain kernel modules.
[ ]: 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]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[ ]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[ ]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "Expat License", "Boost Software
     License (v1.0)", "Expat License Boost Software License (v1.0)", "*No
     copyright* GNU General Public License (v3)", "Apache License (v2.0)".
     199 files have unknown license. Detailed output of licensecheck in
     /home/dcantrell/doctest/licensecheck.txt
[ ]: %build honors applicable compiler flags or justifies otherwise.
[ ]: Package contains no bundled libraries without FPC exception.
[ ]: Changelog in prescribed format.
[ ]: Sources contain only permissible code or content.
[ ]: Package contains desktop file if it is a GUI application.
[ ]: Development files must be in a -devel package
[ ]: Package uses nothing in %doc for runtime.
[ ]: Package consistently uses macros (instead of hard-coded directory
     names).
[ ]: Package is named according to the Package Naming Guidelines.
[ ]: Package does not generate any conflict.
[ ]: Package obeys FHS, except libexecdir and /usr/target.
[ ]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[ ]: Requires correct, justified where necessary.
[ ]: Spec file is legible and written in American English.
[ ]: Package contains systemd file(s) if in need.
[ ]: Useful -debuginfo package or justification otherwise.
[ ]: 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 61440 bytes in 3 files.
[ ]: 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 must own all directories that it creates.
[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 must not depend on deprecated() packages.
[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.
[ ]: Final provides and requires are sane (see attachments).
[ ]: Package functions as described.
[ ]: Latest version is packaged.
[ ]: Package does not include license text files separate from upstream.
[ ]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[ ]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[ ]: Package should compile and build into binary rpms on all supported
     architectures.
[ ]: %check is present and all tests pass.
[ ]: 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 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.


Rpmlint
-------
Checking: doctest-devel-2.3.7-1.fc33.x86_64.rpm
          doctest-2.3.7-1.fc33.src.rpm
doctest-devel.x86_64: W: only-non-binary-in-usr-lib
2 packages and 0 specfiles checked; 0 errors, 1 warnings.




Rpmlint (installed packages)
----------------------------
warning: Found bdb Packages database while attempting sqlite backend: using bdb backend.
warning: Found bdb Packages database while attempting sqlite backend: using bdb backend.
doctest-devel.x86_64: W: invalid-url URL: https://github.com/onqtam/doctest <urlopen error [Errno -2] Name or service not known>
doctest-devel.x86_64: W: only-non-binary-in-usr-lib
1 packages and 0 specfiles checked; 0 errors, 2 warnings.



Source checksums
----------------
https://github.com/onqtam/doctest/archive/2.3.7/doctest-2.3.7.tar.gz :
  CHECKSUM(SHA256) this package     : a70cd25875029879e577b08cfaa57a76c7bea62c473ca94d85ec87ea53af7177
  CHECKSUM(SHA256) upstream package : a70cd25875029879e577b08cfaa57a76c7bea62c473ca94d85ec87ea53af7177


Requires
--------
doctest-devel (rpmlib, GLIBC filtered):
    cmake-filesystem(x86-64)
    libstdc++-devel(x86-64)



Provides
--------
doctest-devel:
    cmake(doctest)
    doctest(x86-64)
    doctest-devel
    doctest-devel(x86-64)
    doctest-static(x86-64)



Generated by fedora-review 0.7.5 (5fa5b7e) last change: 2020-02-16
Command line :/usr/bin/fedora-review --rpm-spec -n doctest-2.3.7-1.fc33.src.rpm
Buildroot used: fedora-rawhide-x86_64
Active plugins: C/C++, Shell-api, Generic
Disabled plugins: R, Java, fonts, PHP, SugarActivity, Python, Ocaml, Haskell, Perl
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 21 David Cantrell 2020-05-19 13:03:16 UTC
> ===== MUST items =====
> 
> C/C++:
> [ ]: Package does not contain kernel modules.

It does not.

> [ ]: Package contains no static executables.

It does now.

> Generic:
> [ ]: Package is licensed with an open-source compatible license and meets
>      other legal requirements as defined in the legal section of Packaging
>      Guidelines.

MIT is approved.

> [ ]: License field in the package spec file matches the actual license.
>      Note: Checking patched sources after %prep for licenses. Licenses
>      found: "Unknown or generated", "Expat License", "Boost Software
>      License (v1.0)", "Expat License Boost Software License (v1.0)", "*No
>      copyright* GNU General Public License (v3)", "Apache License (v2.0)".
>      199 files have unknown license. Detailed output of licensecheck in
>      /home/dcantrell/doctest/licensecheck.txt

Everything in the project is licensed under the MIT license noted in LICENSE.txt in the source.  licensecheck.txt contains false information where it is misdetecting some licenses.

> [ ]: %build honors applicable compiler flags or justifies otherwise.

Yep.

> [ ]: Package contains no bundled libraries without FPC exception.

None.

> [ ]: Changelog in prescribed format.

Yes.

> [ ]: Sources contain only permissible code or content.

Yes.

> [ ]: Package contains desktop file if it is a GUI application.

N/A

> [ ]: Development files must be in a -devel package

Yes.

> [ ]: Package uses nothing in %doc for runtime.

Correct.

> [ ]: Package consistently uses macros (instead of hard-coded directory
>      names).

Yes.

> [ ]: Package is named according to the Package Naming Guidelines.

Yes.

> [ ]: Package does not generate any conflict.

None.

> [ ]: Package obeys FHS, except libexecdir and /usr/target.

Yes, as much as cmake allows.

> [ ]: If the package is a rename of another package, proper Obsoletes and
>      Provides are present.

N/A

> [ ]: Requires correct, justified where necessary.

N/A

> [ ]: Spec file is legible and written in American English.

Yes.

> [ ]: Package contains systemd file(s) if in need.

N/A

> [ ]: Useful -debuginfo package or justification otherwise.

N/A

> [ ]: Package is not known to require an ExcludeArch tag.

N/A

> [ ]: Large documentation must go in a -doc subpackage. Large could be size
>      (~1MB) or number of files.
>      Note: Documentation size is 61440 bytes in 3 files.

N/A

> [ ]: Package complies to the Packaging Guidelines

Yes

> ===== 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.

N/A, license already included.

> [ ]: Final provides and requires are sane (see attachments).

Yes.

> [ ]: Package functions as described.

Yes.

> [ ]: Latest version is packaged.

Yes.

> [ ]: Package does not include license text files separate from upstream.

Yes.

> [ ]: Sources are verified with gpgverify first in %prep if upstream
>      publishes signatures.
>      Note: gpgverify is not used.

N/A

> [ ]: Description and summary sections in the package spec file contains
>      translations for supported Non-English languages, if available.

N/A

> [ ]: Package should compile and build into binary rpms on all supported
>      architectures.

N/A

> [ ]: %check is present and all tests pass.

Yes

> [ ]: Packages should try to preserve timestamps of original installed
>      files.

Yes

Comment 22 David Cantrell 2020-05-19 13:05:04 UTC
Everything looks good, thanks for the update.

My only comment is to change the %description.  Rather than duplicating the Summary string, I suggest the first paragraph from the doctest README file:

doctest is a new C++ testing framework but is by far the fastest both in compile times (by orders of magnitude) and runtime compared to other feature-rich alternatives. It brings the ability of compiled languages such as D / Rust / Nim to have tests written directly in the production code thanks to a fast, transparent and flexible test runner with a clean interface.

Up to you, but generally the %description blocks are meant to be more text and explanation about what the package actually is.

Comment 23 Nick Black 2020-05-22 14:29:23 UTC
Outstanding, thanks for the review, and for the good advice, both of you. I'll make that suggested change. Just requested the new repo.

Comment 24 Gwyn Ciesla 2020-05-22 14:31:25 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/doctest

Comment 25 David Cantrell 2021-02-23 14:49:46 UTC
This package is including in Fedora now, forgot to close out the bug.


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