Spec URL: https://mikel.olasagasti.info/tmp/fedora/termcolor.spec SRPM URL: https://mikel.olasagasti.info/tmp/fedora/termcolor-2.0.0-1.fc35.src.rpm Description: Termcolor is a header-only C++ library for printing colored messages to the terminal. Written just for fun with a help of the Force. Termcolor uses ANSI color formatting, so you can use it on every system that is used such terminals (most *nix systems, including Linux and Mac OS). Fedora Account System Username: mikelo2
.spec has the following path: > %{_prefix}/lib/cmake/%{name}/ As the package is a header-only package it's built with noarch, so I think hardcoding it to /usr/lib makes sense because of non 64bit archs. rpmlint will complain about it, so the following rpmlintrc will be included: https://mikel.olasagasti.info/tmp/fedora/termcolor.rpmlintrc
Note even header-only package should not be packaged as noarch. Read guidelines, especially [1]. In order to test the package on all platforms, it should build even header-only package as platform dependent packages. 1. https://docs.fedoraproject.org/en-US/packaging-guidelines/#_packaging_header_only_libraries
Thanks for reviewing Petr. I'll change the spec asap. I used `elfio`[1] as base to create this one, that uses noarch, but was not happy with the result spec. I was going to ask in devel if it was correct, as the library install path is /usr/lib and rpmlint complains about it. I even created a patch upstream[2] to have per arch install dirs, but was not sure how to fit this with noarch. [1] https://src.fedoraproject.org/rpms/elfio [2] https://github.com/ikalnytskyi/termcolor/pull/63
Spec URL: https://mikel.olasagasti.info/tmp/fedora/termcolor.spec SRPM URL: https://mikel.olasagasti.info/tmp/fedora/termcolor-2.0.0-1.fc35.src.rpm - Remove noarch - Apply patch to use GNUInstallDirs
Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated Issues: ======= - Dist tag is present. OK (rpmautospec) - The -devel package should Require: cmake-filesystem for ownership of the %{_libdir}/cmake directory. - There is a test that can be enabled with -DTERMCOLOR_TESTS:BOOL=ON, but since it is only a “visual” test for human inspection, there is probably no value in running the test executable in %check. However, I think it would be worth enabling it as a “does it even compile” test. Notes (no change required): =========================== - If you wanted, you could save repeating the description with something like: %global common_description %{expand: Termcolor is a header-only C++ library for printing colored messages to the terminal. Written just for fun with a help of the Force. Termcolor uses ANSI color formatting, so you can use it on every system that is used such terminals (most *nix systems, including Linux and Mac OS).} %description %{common_description} […] %description devel %{common_description} ===== 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]: Package does not contain any libtool archives (.la) [x]: Rpath absent or only used for internal libs. 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: "Unknown or generated", "BSD 3-Clause License". 18 files have unknown license. Detailed output of licensecheck in /home/reviewer/2028270-termcolor/licensecheck.txt [x]: %build honors applicable compiler flags or justifies otherwise. Nothing is compiled when tests are disabled. [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. [!]: Requires correct, justified where necessary. devel package should Require cmake-filesystem [x]: Spec file is legible and written in American English. [-]: Package contains systemd file(s) if in need. [-]: Useful -debuginfo package or justification otherwise. [x]: Package is not known to require an ExcludeArch tag. [x]: 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. [-]: Package complies to the Packaging Guidelines (except as noted) [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]: 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. [x]: Final provides and requires are sane (see attachments). (except cmake-filesystem) [x]: Package functions as described. Manually inspected output of test program when enabled [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. [-]: 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. [x]: Package should compile and build into binary rpms on all supported architectures. [-]: %check is present and all tests pass. No *automated* upstream tests exist. [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 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 ------- Cannot parse rpmlint output: Rpmlint (installed packages) ---------------------------- Cannot parse rpmlint output: Source checksums ---------------- https://github.com/ikalnytskyi/termcolor/archive/refs/tags/v2.0.0.tar.gz : CHECKSUM(SHA256) this package : 4a73a77053822ca1ed6d4a2af416d31028ec992fb0ffa794af95bd6216bb6a20 CHECKSUM(SHA256) upstream package : 4a73a77053822ca1ed6d4a2af416d31028ec992fb0ffa794af95bd6216bb6a20 Requires -------- termcolor-devel (rpmlib, GLIBC filtered): cmake-filesystem(x86-64) Provides -------- termcolor-devel: cmake(termcolor) termcolor-devel termcolor-devel(x86-64) termcolor-static Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10 Command line :/usr/bin/fedora-review -b 2028270 Buildroot used: fedora-rawhide-x86_64 Active plugins: Generic, C/C++, Shell-api Disabled plugins: Python, Ocaml, SugarActivity, PHP, R, fonts, Haskell, Perl, Java Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH ============================ rpmlint session starts ============================ rpmlint: 2.1.0 configuration: /usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/licenses.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml checks: 31, packages: 2 termcolor-devel.x86_64: W: only-non-binary-in-usr-lib termcolor.spec:53: W: macro-in-%changelog %autochangelog 2 packages and 0 specfiles checked; 0 errors, 2 warnings, 0 badness; has taken 0.1 s
In my opinion, what elfio does (arched base package with noarch -devel subpackage) should be allowed for header-only libraries, because it addresses the stated reasons for requiring them to be arched: - The tests still run on all architectures, because the base package is arched. - Koji can already detect the situation where an allegedly-noarch subpackage is actually different across architectures (https://docs.pagure.org/koji/misc/#how-noarch-sub-packages-are-built). However, Petr Menšík is correct that the guidelines don’t currently allow this. I should probably bring this up on the packaging list and see if there is support for revising the guidelines to allow the technique used in elfio.
https://lists.fedoraproject.org/archives/list/packaging@lists.fedoraproject.org/thread/KI3WBC62U3NCHJWFD5L2Z2NK6BSX7N7H/
I would say [!]: %check is present and all tests pass. There is a test which should be enabled and built. At least it ensures the code compiles. I admit those nice colors would not be verified similar way to human, but it would ensure at least minimal test. But that is only SHOULD, not required. Maybe the test could be part of base package. I think testing different terminal capabilities might be useful, it can display common colors in a compact way. I have missed unowned %{_libdir}/cmake though, that is mandatory change.
Spec URL: https://mikel.olasagasti.info/tmp/fedora/termcolor.spec SRPM URL: https://mikel.olasagasti.info/tmp/fedora/termcolor-2.0.0-1.fc35.src.rpm - Added Require on cmake-filesystem - Enabled test at build time - Run %check by running built binary, but shell mock's shell doesn't show colors. - Adopt `%global common_description`
I think elfio's noarch works fine because it's installing cmake's definitions in /usr/share/elfio/cmake/ that is architecture agnostic. termcolor was installing them in /usr/lib by default. If elfio was using %{_libdir} rather than %{_datadir} it coulnd't use noarch.
Could you please adjust the path to the test executable? Change: %{_builddir}/%{name}-%{version}/redhat-linux-build/test_termcolor to %{_vpath_builddir}/test_termcolor See: https://docs.fedoraproject.org/en-US/packaging-guidelines/vpath/ https://docs.fedoraproject.org/en-US/packaging-guidelines/CMake/#_available_macros The definition of _vpath_builddir has changed in the past and may well change again. ---- > I think elfio's noarch works fine because it's installing cmake's definitions in /usr/share/elfio/cmake/ that is architecture agnostic. This came up on the packaging mailing list in the thread I linked in a previous comment. Independent of packaging policy, you’re certainly correct that installing anything in %{_libdir} precludes using noarch for the (sub)package in question.
Spec URL: https://mikel.olasagasti.info/tmp/fedora/termcolor.spec SRPM URL: https://mikel.olasagasti.info/tmp/fedora/termcolor-2.0.0-1.fc35.src.rpm - Use %{_vpath_builddir} for test executable
Thanks. Package is APPROVED. Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated Issues: ======= - Dist tag is present. OK (rpmautospec) ===== 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]: Package does not contain any libtool archives (.la) [x]: Rpath absent or only used for internal libs. 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: "Unknown or generated", "BSD 3-Clause License". 18 files have unknown license. Detailed output of licensecheck in /home/reviewer/2028270-termcolor/20211209-2/2028270-termcolor/licensecheck.txt [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 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]: 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: [x]: 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]: 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. [-]: 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. [x]: Package should compile and build into binary rpms on all supported architectures. [x]: %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 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 ------- Cannot parse rpmlint output: Rpmlint (installed packages) ---------------------------- Cannot parse rpmlint output: Source checksums ---------------- https://github.com/ikalnytskyi/termcolor/archive/refs/tags/v2.0.0.tar.gz : CHECKSUM(SHA256) this package : 4a73a77053822ca1ed6d4a2af416d31028ec992fb0ffa794af95bd6216bb6a20 CHECKSUM(SHA256) upstream package : 4a73a77053822ca1ed6d4a2af416d31028ec992fb0ffa794af95bd6216bb6a20 Requires -------- termcolor-devel (rpmlib, GLIBC filtered): cmake-filesystem cmake-filesystem(x86-64) Provides -------- termcolor-devel: cmake(termcolor) termcolor-devel termcolor-devel(x86-64) termcolor-static Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10 Command line :/usr/bin/fedora-review -b 2028270 Buildroot used: fedora-rawhide-x86_64 Active plugins: Shell-api, C/C++, Generic Disabled plugins: PHP, Java, Ocaml, Python, Perl, R, Haskell, SugarActivity, fonts Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH ============================ rpmlint session starts ============================ rpmlint: 2.1.0 configuration: /usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/licenses.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml checks: 31, packages: 2 termcolor-devel.x86_64: W: only-non-binary-in-usr-lib termcolor.spec:56: W: macro-in-%changelog %autochangelog 2 packages and 0 specfiles checked; 0 errors, 2 warnings, 0 badness; has taken 0.1 s
(fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/termcolor
FEDORA-2021-bdb6075e22 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2021-bdb6075e22
FEDORA-2021-bdb6075e22 has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.