https://bugzilla.redhat.com/show_bug.cgi?id=2583643
--- Comment #1 from Ben Beasley <[email protected]> --- I think that this is basically acceptable. I think the concerns about the (lack of) Requires and unowned directories are the only things that absolutely must be addressed somehow before I can approve the package. There’s quite a bit of discussion below, a bit of it specific to this package and much of it more broadly applicable to the new Crystal ecosystem tooling, which I think that you are overall doing a good job with. I hope you will find some of these thoughts helpful. Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated The spec file is generated by cr2rpm, which simplifies the review. I consulted the draft Crystal packaging guidelines at https://forge.fedoraproject.org/packaging/guidelines/pulls/1568 for the review. While https://fedoraproject.org/wiki/Changes/CrystalLanguage targets Fedora 46, it would be helpful for both package maintenance and review purposes if the cr2rpm package and any necessary dependencies could be branched to at least Fedora 45. Some Fedora contributors do their work on Rawhide, but most use a recent stable release. Compared to the raw output of cr2rpm: - The rpmautospec macros are expanded; this is innocuous. - The order of the "%bcond_without check" and "%bcond_without debug" lines is reversed. This doesn’t hurt anything, but it does make it a bit harder to audit differences from cr2rpm’s output. - Instead of Name: crystal-radix we have Name: crystal-%{shard_name} This is more consistent with the rest of the spec file, and also with what rust2rpm does. I think it’s a good change. But perhaps cr2rpm should be adjusted to always do this in the first place? - The BR on libyaml-devel is made unconditional (not check-only) and BRs on openssl-devel and zlib-devel are added. To be honest, I’m not sure how to trace these dependencies other than test-building and seeing what crystal tries and fails to link. The dependency on libyaml seems to come from require "yaml" in spec/radix/version_spec.cr, but that’s a standard-library module, https://crystal-lang.org/api/1.22.3/YAML.html. I don’t think it is reasonable for each library package maintainer to have to keep track of which shared libraries are required for each standard-library module. It seems like the crystal package should have hard dependencies on these rather than weak ones. - Given that crystal shards are packaged in source format, I think they should have Requires (not just BuildRequires) on anything needed to build them. That would seem to be Requires: crystal >= 0.35.0 Requires: shards Requires: libyaml-devel Requires: openssl-devel Requires: zlib-devel although as noted above, it looks like the last three should be hard dependencies of crystal. - The description is converted from markdown to plain text, which is sensible. ---- I notice that cr2rpm has a poor-quality heuristic for suggesting Summary and description text. It offers: Summary: Radix tree implementation for %description [Radix tree](https://en.wikipedia.org/wiki/Radix_tree) implementation for That’s it; nothing follows the “for.” The Summary and description in the submission are sensible, but this suggests a possible improvement in cr2rpm. ---- While it’s not forbidden, there is no need for the LICENSE file and documentation to be packaged twice to be packaged twice, once in the shard directory, /usr/share/crystal/shards/radix-0.4.1/CHANGELOG.md /usr/share/crystal/shards/radix-0.4.1/LICENSE /usr/share/crystal/shards/radix-0.4.1/README.md and once in dedicated doc/license directories: /usr/share/doc/crystal-radix/CHANGELOG.md /usr/share/doc/crystal-radix/README.md /usr/share/licenses/crystal-radix/LICENSE Instead, it would be better if the listings of these files in %crystal_files could be marked as %doc or %license as appropriate. At the cost of some harmless “file listed twice” warnings, it’s possible to do this manually without help from cr2rpm, using a similar technique to what rust2rpm does: %files %license %{crystal_shards_dir}/%{shard_name}-%{version}/LICENSE %doc %{crystal_shards_dir}/%{shard_name}-%{version}/CHANGELOG.md %doc %{crystal_shards_dir}/%{shard_name}-%{version}/README.md %crystal_files ---- This is really more of a suggestion for cr2rpm, but the %bcond_with/%bcond_without style is widely agreed to be confusing. Please consider this style instead: %bcond debug 1 %bcond check 1 As a bonus, this style makes it easier to derive default values for build conditionals from expressions, like %bcond foo %[ %{undefined fc44} && %{undefined el10} ] and it’s supported everywhere but EPEL8. ---- I assume that %{!?crystal_arches: %global crystal_arches x86_64 aarch64} is a workaround until you get a dependency on crystal-rpm-macros added to redhat-rpm-macros. Ideally you wouldn’t have a hard-coded architecture list in every crystal shard package, even one that’s used conditionally. ---- Overall the above are a mix of suggestions for this package and for the crystal package and/or cr2rpm. ===== MUST items ===== 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". 1 files have unknown license. Detailed output of licensecheck in /home/ben/fedora/review/2583643-crystal- radix/licensecheck.txt [!]: Package must own all directories that it creates. Note: Directories without known owners: /usr/share/crystal, /usr/share/crystal/shards This would be solved by Requires: crystal >= 0.35.0 which ought to be present anyway, since this is a source library. [x]: Package contains no bundled libraries or specifies bundled libraries with Provides: bundled(<libname>) if unbundling is not possible. [x]: Changelog in prescribed format. [x]: 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 Everything here is a development file, but https://forge.fedoraproject.org/packaging/guidelines/pulls/1568 does not prescribe the use of the -devel suffix for source distributions of crystal shards. This is a different choice from the Rust ecosystem in Fedora. [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. As discussed above, this should have Requires on crystal, and (ideally indirect via crystal, but if not, direct) Requires on libyaml-devel, openssl-devel, and zlib-devel. [x]: 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. Package is ExclusicveArch based on architectures supported by the crystal language. [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]: The License field must be a valid SPDX expression. [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 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]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 7869 bytes in 2 files. [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). As discussed above, this should have Requires on crystal, and (ideally indirect via crystal, but if not, direct) Requires on libyaml-devel, openssl-devel, and zlib-devel. [x]: Package functions as described. (Tests / examples pass.) [x]: Latest version is packaged. [x]: 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. [x]: %check is present and all tests pass. [x]: Packages should try to preserve timestamps of original installed files. [-]: Spec use %global instead of %define unless justified. Note: %define requiring justification: %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: [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]: Package should compile and build into binary rpms on all supported architectures. ===== EXTRA items ===== Generic: [x]: Rpmlint is run on all installed packages. Note: There are rpmlint messages (see attachment). [x]: Spec file according to URL is the same as in SRPM. Rpmlint ------- Checking: crystal-radix-0.4.1-5.fc46.noarch.rpm crystal-radix-0.4.1-5.fc46.src.rpm ============================ rpmlint session starts ============================ rpmlint: 2.9.0 configuration: /usr/lib/python3.15/site-packages/rpmlint/configdefaults.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/tmpiezmtcp1')] checks: 32, packages: 2 crystal-radix.noarch: W: files-duplicate /usr/share/doc/crystal-radix/CHANGELOG.md /usr/share/crystal/shards/radix-0.4.1/CHANGELOG.md crystal-radix.noarch: W: files-duplicate /usr/share/licenses/crystal-radix/LICENSE /usr/share/crystal/shards/radix-0.4.1/LICENSE crystal-radix.noarch: W: files-duplicate /usr/share/doc/crystal-radix/README.md /usr/share/crystal/shards/radix-0.4.1/README.md 2 packages and 0 specfiles checked; 0 errors, 3 warnings, 7 filtered, 0 badness; has taken 0.1 s Rpmlint (installed packages) ---------------------------- ============================ rpmlint session starts ============================ rpmlint: 2.10.0 configuration: /usr/lib/python3.15/site-packages/rpmlint/configdefaults.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: 33, packages: 1 crystal-radix.noarch: W: files-duplicate /usr/share/doc/crystal-radix/CHANGELOG.md /usr/share/crystal/shards/radix-0.4.1/CHANGELOG.md crystal-radix.noarch: W: files-duplicate /usr/share/licenses/crystal-radix/LICENSE /usr/share/crystal/shards/radix-0.4.1/LICENSE crystal-radix.noarch: W: files-duplicate /usr/share/doc/crystal-radix/README.md /usr/share/crystal/shards/radix-0.4.1/README.md 1 packages and 0 specfiles checked; 0 errors, 3 warnings, 3 filtered, 0 badness; has taken 0.0 s Source checksums ---------------- https://github.com/luislavena/radix/archive/v0.4.1/radix-0.4.1.tar.gz : CHECKSUM(SHA256) this package : 5f207eb769101d94726eb476eb5f9b4603482c7941396ab4c85866722b7497b1 CHECKSUM(SHA256) upstream package : 5f207eb769101d94726eb476eb5f9b4603482c7941396ab4c85866722b7497b1 Requires -------- crystal-radix (rpmlib, GLIBC filtered): Provides -------- crystal-radix: crystal-radix crystal-shard(radix) Generated by fedora-review 0.12.0 (a08f0fc) last change: 2026-09-18 Command line :/usr/bin/fedora-review -b 2583643 Buildroot used: fedora-rawhide-x86_64 Active plugins: Shell-api, Generic Disabled plugins: Perl, fonts, Haskell, Ocaml, C/C++, Java, Python, R, PHP, SugarActivity Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH, UNRETIREMENT -- You are receiving this mail because: You are always notified about changes to this product and component You are on the CC list for the bug. https://bugzilla.redhat.com/show_bug.cgi?id=2583643 Report this comment as SPAM: https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202583643%23c1 -- _______________________________________________ package-review mailing list -- [email protected] To unsubscribe send an email to [email protected] Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/[email protected] Do not reply to spam, report it: https://forge.fedoraproject.org/infra/tickets/issues/new
