Spec URL: https://trix.fedorapeople.org/half.spec SRPM URL: https://trix.fedorapeople.org/half-2.2.0-1.fc38.src.rpm FAS: trix This is a C++ header-only library to provide an IEEE-754 conformant half-precision floating point type along with corresponding arithmetic operators, type conversions and common mathematical functions. It aims for both efficiency and ease of use, trying to accurately mimic the behaviour of the builtin floating point types at the best performance possible. It automatically uses and provides C++11 features when possible, but stays completely C++98-compatible when neccessary. Used be several AI/ML packages including pytorch my local fedora review $ cat review-half/review.txt This is a review *template*. Besides handling the [ ]-marked tests you are also supposed to fix the template before pasting into bugzilla: - Add issues you find to the list of issues on top. If there isn't such a list, create one. - Add your own remarks to the template checks. - Add new lines marked [!] or [?] when you discover new things not listed by fedora-review. - Change or remove any text in the template which is plain wrong. In this case you could also file a bug against fedora-review - Remove the "[ ] Manual check required", you will not have any such lines in what you paste. - Remove attachments which you deem not really useful (the rpmlint ones are mandatory, though) - Remove this text Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed ===== MUST items ===== 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", "MIT License", "*No copyright* MIT License". 1 files have unknown license. Detailed output of licensecheck in /home/trix/work/fedora/half-fedora/review- half/licensecheck.txt [ ]: Package requires other packages for directories it uses. Note: No known owner of /usr/share/doc/half [ ]: Package must own all directories that it creates. Note: Directories without known owners: /usr/share/doc/half [ ]: 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. [ ]: 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 18869 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]: The License field must be a valid SPDX expression. [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. [ ]: 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: No rpmlint messages. [x]: Spec file according to URL is the same as in SRPM. Rpmlint ------- Checking: half-devel-2.2.0-1.fc39.noarch.rpm half-2.2.0-1.fc39.src.rpm ====================================================================================================== rpmlint session starts ===================================================================================================== rpmlint: 2.4.0 configuration: /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora-legacy-licenses.toml /etc/xdg/rpmlint/fedora-spdx-licenses.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml rpmlintrc: [PosixPath('/tmp/tmp3wvobf3z')] checks: 31, packages: 2 half.spec: W: no-%build-section ======================================================================= 2 packages and 0 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 0.1 s ====================================================================== Rpmlint (installed packages) ---------------------------- ============================ rpmlint session starts ============================ rpmlint: 2.4.0 configuration: /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora-legacy-licenses.toml /etc/xdg/rpmlint/fedora-spdx-licenses.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml checks: 31, packages: 1 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.0 s Source checksums ---------------- http://sourceforge.net/projects/half/files/half/2.2.0/half-2.2.0.zip : CHECKSUM(SHA256) this package : 1d1d9e482fb95fcd7cab0953a4bd35e00b86578f11cb6939a067811a055a563b CHECKSUM(SHA256) upstream package : 1d1d9e482fb95fcd7cab0953a4bd35e00b86578f11cb6939a067811a055a563b Requires -------- half-devel (rpmlib, GLIBC filtered): Provides -------- half-devel: half-devel half-static Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24 Command line :/usr/bin/fedora-review -n half Buildroot used: fedora-rawhide-x86_64 Active plugins: Shell-api, Generic Disabled plugins: Ocaml, Java, C/C++, R, PHP, SugarActivity, fonts, Python, Haskell, Perl Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH Reproducible: Always
Copr build: https://copr.fedorainfracloud.org/coprs/build/6261352 (succeeded) Review template: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2230617-half/fedora-rawhide-x86_64/06261352-half/fedora-review/review.txt Please take a look if any issues were found. --- This comment was created by the fedora-review-service https://github.com/FrostyX/fedora-review-service If you want to trigger a new Copr build, add a comment containing new Spec and SRPM URLs or [fedora-review-service-build] string.
Taking this review.
Initial spec review: > BuildArch: noarch This is not allowed on the main package, only on the devel subpackage. Cf. https://docs.fedoraproject.org/en-US/packaging-guidelines/#_packaging_header_only_libraries > rm -rf %{name}-%{version} > unzip -d %{name}-%{version} %{SOURCE0} > cd %{name}-%{version} This can be simplified to "%autosetup -c" > # change dos endings to unix > sed -i "s|\r||g" include/half.hpp > sed -i "s|\r||g" LICENSE.txt > sed -i "s|\r||g" README.txt I'm a bit wary of using sed for this when "dos2unix" is perfectly suitable here. Add "BuildRequires: dos2unix" and use the tool for this instead. > cd %{name}-%{version} This is no longer required, since %autosetup configures the %install phase correctly > mkdir -p %{buildroot}%{_docdir}/%{name}/ > install -m 644 LICENSE.txt %{buildroot}%{_docdir}/%{name}/ > install -m 644 README.txt %{buildroot}%{_docdir}/%{name}/ This can all be dropped, because we can manage this from %files... > %doc %{_docdir}/%{name}/README.txt > %license %{_docdir}/%{name}/LICENSE.txt This can be replaced with "%doc README.txt" and "%license LICENSE.txt".
Spec URL: https://trix.fedorapeople.org/half.spec SRPM URL: https://trix.fedorapeople.org/half-2.2.0-2.fc40.src.rpm Thanks for the pointer on autosetup!
Created attachment 1983920 [details] The .spec file difference from Copr build 6261352 to 6314082
Copr build: https://copr.fedorainfracloud.org/coprs/build/6314082 (succeeded) Review template: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2230617-half/fedora-rawhide-x86_64/06314082-half/fedora-review/review.txt Please take a look if any issues were found. --- This comment was created by the fedora-review-service https://github.com/FrostyX/fedora-review-service If you want to trigger a new Copr build, add a comment containing new Spec and SRPM URLs or [fedora-review-service-build] string.
(In reply to Tom Rix from comment #0) > Spec URL: https://trix.fedorapeople.org/half.spec > SRPM URL: https://trix.fedorapeople.org/half-2.2.0-1.fc38.src.rpm > FAS: trix > > This is a C++ header-only library to provide an IEEE-754 conformant > half-precision floating point type along with corresponding arithmetic > operators, type conversions and common mathematical functions. GCC 13 already provides both std::float16_t and std::bfloat16_t as built-in types, with support in <cmath> (and <limits>, and <format>). Does this library take advantage of that if available? > It aims > for both efficiency and ease of use, trying to accurately mimic the > behaviour of the builtin floating point types at the best performance > possible. It automatically uses and provides C++11 features when > possible, but stays completely C++98-compatible when neccessary. This suggests it doesn't.
Several ai packages use this file. The trade off is they all carry there own copies until if/when they switch over. I'm ok with dropping this as it would confuse a new, better solution. Sound ok ?
I think the ideal solution would be for those packages to make use of this one (so they aren't each bundling it separately) and then for this package to be optimized to use the new built-in types when available (assuming they do actually perform better when implemented by the compiler+runtime). But since the new types are only available for C++23, it will probably be some time before those packages can actually benefit from them. So this package will probably make sense for several years. I didn't mean to express an objection to adding this package, I was just asking about the interaction with the new C++23 types, and raising awareness of them.
Ok we can go ahead with the package. Thanks for the input.
Any update on this package ?
Review notes: * Package follows Fedora Packaging Guidelines * Package builds and installs * Package licensing is correctly handled * No serious issues from rpmlint PACKAGE APPROVED.
The Pagure repository was created at https://src.fedoraproject.org/rpms/half