Spec URL: https://coiby.fedorapeople.org/kdump-utils.spec SRPM URL: https://coiby.fedorapeople.org/kdump-utils-1.0.42-10.fc41.src.rpm Description: kdump-utils is responsible for collecting the crash kernel dump. It builds and loads the kdump initramfs so when a kernel crashes, the system will boot the kdump kernel and initramfs to save the collected crash kernel dump to specified target. Fedora Account System Username: coiby Note this package is split from current kexec-tools.
This may be exempt from needing a review. FPC is currently discussing. https://pagure.io/packaging-committee/issue/1303 Assigning to myself for now to avoid other reviewers taking it.
Ultimately FPC decided that this package is not exempt, so I'll proceed with the review. On a first pass I noticed the following issues: ================================================================================ There is no URL tag, resulting in an rpmlint warning. On a related note, there are quite a few source files in this package. Would it be possible to establish an upstream repository somewhere like GitHub or GitLab that can be used to obtain tarballs of the source files? That upstream could also determine the versions. Right now it's not clear where the version of 1.0.42 is coming from. No other file in the SRPM besides the spec file has that string. ================================================================================ /usr/lib/dracut/modules.d/99kdumpbase/monitor_dd_progress has some inconsistencies with other scripts in that directory. It is missing the .sh extension and is not executable. The latter is resulting in an rpmlint error. If none of these scripts should be executable, then the rpmlint error can be cleared by removing the shebang lines. This file also is triggering an rpmlint warning for "potential-bashisms". I'm not sure if this is something that can be resolved or not, but please look into it. The checkbashisms CLI tool is flagging the usage of `echo -e` on line 24. ================================================================================ rpmlint is also reporting an error that this architecture-specific package does not contain any architecture-specific binaries. Should it be marked as noarch? ================================================================================ Consider converting instances of $RPM_BUILD_ROOT to %{buildroot}. This is not required, as the guidelines only say that you need to use one or the other consistently, but the latter is considered more modern and is more common in Fedora spec files. https://docs.fedoraproject.org/en-US/packaging-guidelines/#_using_buildroot_and_optflags_vs_rpm_build_root_and_rpm_opt_flags ================================================================================ I noticed the remove_prefix helper function in the spec file. Is that really necessary? It's more characters than just using the filename directly in the install commands. Fedora spec files aim for legibility, and I think using a helper function that requires more characters to invoke than just being explicit with the installed filename is less legible. https://docs.fedoraproject.org/en-US/packaging-guidelines/#_spec_legibility ================================================================================ fedora-review and rpmlint are flagging an issue with /usr/lib/udev/rules.d (and recursively applying to 98-kexec.rules in that directory) being marked as %config. %config should only be used on files in /etc. ================================================================================ I noticed there are systemd service files and a target file installed to /usr/lib/dracut/modules.d/99kdumpbase. Should those be installed to the regular systemd directories, or do they need to be here? ================================================================================ This package has a license tag of GPL-2.0-only, but /usr/lib/dracut/modules.d/99kdumpbase/kdump-capture.service and /usr/lib/dracut/modules.d/99kdumpbase/kdump-emergency.target have headers that indicate they are licensed as LGPL-2.1-or-later. Please refer to the license guidelines to set the license tag appropriately. https://docs.fedoraproject.org/en-US/legal/license-field/#_conjunctive_and_licensing ================================================================================ fedora-review is also flagging this as uninstallable, but upon closer inspection this appears to be because it needs makedumpfile present first. We may want to finish that review first for simplicity.
One more thing I just noticed after hitting submit on my last comment, in your %files section you have man pages listed with an explicit .gz extension. It is required to mark these with a wildcard for the extension in case RPM is every changed to use a different compression format. https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages
Hi Carl, thanks for the thorough review. It's very much appreciated! Please find a my questions/comments below. (In reply to Carl George 🤠 from comment #2) [...] > ============================================================================= > === > > There is no URL tag, resulting in an rpmlint warning. On a related note, > there are quite a few source files in this package. Would it be possible to > establish an upstream repository somewhere like GitHub or GitLab that can be > used to obtain tarballs of the source files? That upstream could also > determine the versions. Right now it's not clear where the version of > 1.0.42 is coming from. No other file in the SRPM besides the spec file has > that string. I see your point and agree that having an upstream repo would be beneficial. But in my opinion splitting the current rpm is already a pretty big task. That's why I would prefer to do the change in a subsequent step after the split has been completed. [...] > ============================================================================= > === > > rpmlint is also reporting an error that this architecture-specific package > does not contain any architecture-specific binaries. Should it be marked as > noarch? Ok, that's one area where I'm not entirely sure. Thing is that while we don't ship arch-specific binaries we do ship arch-specific udev rules and dracut modules. In addition there are some arch-specific dependencies. My problem is that I don't know exactly when those arch-specific parts in the spec file are evaluated. In case that is done during build time I'm afraid we need to stick with the arch-specific rpms. If not we should mark it as noarch. [...] > ============================================================================= > === > > I noticed there are systemd service files and a target file installed to > /usr/lib/dracut/modules.d/99kdumpbase. Should those be installed to the > regular systemd directories, or do they need to be here? Those need to stay here. Reason is that those services are only needed in the initrd that contain the kdump module. But those initrds are special purpose and cannot be used for a "normal" boot. In fact those services won't even start after a "normal" boot. > ============================================================================= > === [...] Thanks Philipp
Hi Carl, Thank you for providing such a detailed review! I've applied most of your suggestions to latest version (if it make it easier for you to review, I've created separate commits for each suggestion in https://src.fedoraproject.org/rpms/kexec-tools/pull-request/17). For creating an upstream repo, I agree with you and Philipp that this is a good idea but it will take time to do so. For making the package architecture independent, it is also good to have but will take time. As reminded by my manager Dave, RHEL10 beta compose will start Feb 8th around. So can we leave these two issues to the future?
Hi Coiby, Everything seems fine, except that when I use fedora-review, I get mock-build errors, which I can see from the logs are because there is an error when trying to build the debug package for kdump-utils. I think kdump-utils has no debug source, maybe it can be solved by declaring `%global debug_package %{nil}` in the spec file, or we should mark it as noarch. Lichen
(In reply to Carl George 🤠 from comment #2) > > This package has a license tag of GPL-2.0-only, but > /usr/lib/dracut/modules.d/99kdumpbase/kdump-capture.service and > /usr/lib/dracut/modules.d/99kdumpbase/kdump-emergency.target have headers > that indicate they are licensed as LGPL-2.1-or-later. Please refer to the > license guidelines to set the license tag appropriately. > > https://docs.fedoraproject.org/en-US/legal/license-field/ > #_conjunctive_and_licensing Given the trivial nature of these files I think `LGPL-2.1-or-later` can be omitted from the license tag.
(In reply to Lichen Liu from comment #6) > Hi Coiby, > > Everything seems fine, except that when I use fedora-review, I get > mock-build errors, which I can see from the logs are because there is an > error when trying to build the debug package for kdump-utils. > > I think kdump-utils has no debug source, maybe it can be solved by declaring > `%global debug_package %{nil}` in the spec file, or we should mark it as > noarch. > > Lichen Hi Lichen, Thanks for reviewing the package! Could you share the detail of the mock-build error and related logs? I'm curious to find out why I don't hit this issue myself.
The latest version looks good to me. Checklist generated by fedora-reivew: ===== 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. [x]: Package does not own files or directories owned by other packages. [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. [x]: %config files are marked noreplace or the reason is justified. [-]: Package contains desktop file if it is a GUI application. [-]: 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. [x]: 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. [x]: Package contains systemd file(s) if in need. [-]: 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 75367 bytes in 7 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]: The License field must be a valid SPDX expression. [x]: Package requires other packages for directories it uses. [x]: Package must own all directories that it creates. [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]: No %config files under /usr. [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]: Package functions as described. [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]: 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]: Spec use %global instead of %define unless justified. Note: %define requiring justification: %define kexec_tools_no_preset %{_localstatedir}/lib/rpm-state/kexec-tools.no-preset [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. ===== 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.
The Pagure repository was created at https://src.fedoraproject.org/rpms/kdump-utils