Spec URL: https://jonathanwright.me/btop-rpm/btop.spec SRPM URL: https://jonathanwright.me/btop-rpm/btop-1.2.8-1.fc36.src.rpm Description: Resource monitor that shows usage and stats for processor, memory, disks, network and processes. Fedora Account System Username: jonathanspw Successful scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=89514840
The Source URL should use the format in the package guidelines. Optionally consider using Source instead of Source0, and taking advantage of the %{url} macro. -Source0: https://github.com/aristocratos/btop/archive/refs/tags/v%{version}.tar.gz +Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_git_tags ================================================================================ Does this need both gcc and gcc-c++ to build? I only see CXX in the Makefile, not CC, so I think you can remove the former. -BuildRequires: gcc ================================================================================ Wrap the description at 80 characters. https://docs.fedoraproject.org/en-US/packaging-guidelines/#_summary_and_description ================================================================================ Consider including the CHANGELOG.md file as a %doc in %files. https://docs.fedoraproject.org/en-US/packaging-guidelines/#_documentation ================================================================================ You'll need to run desktop-file-validate on the desktop file, either in %install or %check. +desktop-file-validate %{buildroot}%{_datadir}/applications/btop.desktop https://docs.fedoraproject.org/en-US/packaging-guidelines/#_desktop_file_install_usage ================================================================================ The file %{_datadir}/btop/README.md is a duplicate of what we put in %{_docdir} (via %doc). I'd recommend rm-ing that file after the %make_install. ================================================================================ This current %files structure will result in %{_datadir}/btop being an unowned directory, which isn't allowed. You can remove the explicit listing of the contents of that directory and own it recursively. -%{_datadir}/btop/themes/HotPurpleTrafficLight.theme ...(and the rest)... +%{_datadir}/btop Same thing with %{_datadir}/icons/hicolor/, which we should resolve by requiring the package that does own it. +Requires: hicolor-icon-theme https://docs.fedoraproject.org/en-US/packaging-guidelines/UnownedDirectories/ ================================================================================ In case upstream adds more resolutions of their icon, it would be better to use a wildcard to pick them up. You could also glob the extension to avoid a separate line for the svg. -%{_datadir}/icons/hicolor/48x48/apps/btop.png -%{_datadir}/icons/hicolor/scalable/apps/btop.svg +%{_datadir}/icons/hicolor/*/apps/btop.* ================================================================================ That's what I noticed manually reviewing the spec file. I wasn't able to run fedora-review because it seems jonathanwright.me has certificate problems. Can you fix the cert or post them somewhere else with a working cert?
Thanks for the very thorough review! (In reply to Carl George 🤠 from comment #1) > The Source URL should use the format in the package guidelines. Optionally > consider using Source instead of Source0, and taking advantage of the %{url} > macro. > > -Source0: > https://github.com/aristocratos/btop/archive/refs/tags/v%{version}.tar.gz > +Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz > > https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/ > #_git_tags Excellent point! > ============================================================================= > === > > Does this need both gcc and gcc-c++ to build? I only see CXX in the > Makefile, not CC, so I think you can remove the former. > > -BuildRequires: gcc Old habits die hard :( gcc should not be needed. > ============================================================================= > === > > Wrap the description at 80 characters. > > https://docs.fedoraproject.org/en-US/packaging-guidelines/ > #_summary_and_description Noted! > ============================================================================= > === > > Consider including the CHANGELOG.md file as a %doc in %files. > > https://docs.fedoraproject.org/en-US/packaging-guidelines/#_documentation Good point! > ============================================================================= > === > > You'll need to run desktop-file-validate on the desktop file, either in > %install or %check. > > +desktop-file-validate %{buildroot}%{_datadir}/applications/btop.desktop > > https://docs.fedoraproject.org/en-US/packaging-guidelines/ > #_desktop_file_install_usage I've never come across desktop files before so these docs are very helpful! > ============================================================================= > === > > The file %{_datadir}/btop/README.md is a duplicate of what we put in > %{_docdir} (via %doc). I'd recommend rm-ing that file after the > %make_install. > > ============================================================================= > === > > This current %files structure will result in %{_datadir}/btop being an > unowned directory, which isn't allowed. You can remove the explicit listing > of the contents of that directory and own it recursively. > > -%{_datadir}/btop/themes/HotPurpleTrafficLight.theme > ...(and the rest)... > +%{_datadir}/btop > > Same thing with %{_datadir}/icons/hicolor/, which we should resolve by > requiring the package that does own it. > > +Requires: hicolor-icon-theme > > https://docs.fedoraproject.org/en-US/packaging-guidelines/UnownedDirectories/ Makes perfect sense! > ============================================================================= > === > > In case upstream adds more resolutions of their icon, it would be better to > use a wildcard to pick them up. You could also glob the extension to avoid > a separate line for the svg. > > -%{_datadir}/icons/hicolor/48x48/apps/btop.png > -%{_datadir}/icons/hicolor/scalable/apps/btop.svg > +%{_datadir}/icons/hicolor/*/apps/btop.* Good to know that wildcards are acceptable! > ============================================================================= > === > > That's what I noticed manually reviewing the spec file. I wasn't able to > run fedora-review because it seems jonathanwright.me has certificate > problems. Can you fix the cert or post them somewhere else with a working > cert? All of this information is very helpful. I need to go through all of the packaging guidelines for various sections. In all the docs I read somehow I didn't read most of them regarding various best practices which is how we ended up here :) I'll get this all patched up tomorrow. The certificate is fixed so you can run fedora-review.
Updated to include your recommendations. Spec URL: https://jonathanwright.me/btop-rpm/btop.spec SRPM URL: https://jonathanwright.me/btop-rpm/btop-1.2.8-1.fc36.src.rpm
rpmlint is giving me this warning: btop.x86_64: W: files-duplicate /usr/share/doc/btop/README.md /usr/share/btop/README.md The rm command needs to delete it from the buildroot, not the regular filesystem location. -rm -f %{_datadir}/btop/README.md +rm -f %{buildroot}%{_datadir}/btop/README.md ============================================================================= Running the licensecheck tool turned up a few bundled header-only libraries. I don't see them packaged separately in Fedora yet, so for now we can just note them as bundled and include them in the License field. If at some point in the future you or another packager adds them to Fedora, you can BuildRequire them and delete the bundled copy. -License: ASL 2.0 +# The entire source code is ASL 2.0 except: +# include/robin_hood.h - MIT +# include/widechar_width.hpp - Public Domain +License: ASL 2.0 and MIT and Public Domain +Provides: bundled(widecharwidth) +Provides: bundled(robin-hood-hashing) = 3.11.5 https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_multiple_licensing_scenarios https://docs.fedoraproject.org/en-US/packaging-guidelines/#bundling ============================================================================= Optional suggestion, you can put both doc files on one line if you like. -%doc README.md -%doc CHANGELOG.md +%doc README.md CHANGELOG.md
I opted to keep both libs bundled indefinitely with reasons cited in the spec file. Other fixes/suggestions implemented. SRPM URL: https://jonathanspw.fedorapeople.org/btop/btop-1.2.8-1.fc36.src.rpm Spec URL: https://jonathanspw.fedorapeople.org/btop/btop.spec
Package APPROVED. Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated ===== 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]: 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: [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", "*No copyright* Apache License 2.0", "MIT License", "Apache License 2.0". 46 files have unknown license. Detailed output of licensecheck in /home/carl/packaging/reviews/btop/2107381-btop/licensecheck.txt [x]: License file installed when any subpackage combination is installed. [x]: If the package is under multiple licenses, the licensing breakdown must be documented in the spec. [x]: %build honors applicable compiler flags or justifies otherwise. [x]: Changelog in prescribed format. [x]: Sources contain only permissible code or content. [-]: 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 40960 bytes in 2 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 contains desktop file if it is a GUI application. [x]: Package installs a %{name}.desktop using desktop-file-install or desktop-file-validate if there is such a file. [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. [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. [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]: Fully versioned dependency in subpackages if applicable. [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 debuginfo package(s). Note: There are rpmlint messages (see attachment). [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.
(fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/btop
https://bodhi.fedoraproject.org/updates/FEDORA-2022-6fa6802e95