https://bugzilla.redhat.com/show_bug.cgi?id=2082886
Bug ID: 2082886 Summary: Review Request: python-nagios-plugins-check_systemd - Nagios plugin to check systemd Product: Fedora Version: rawhide Hardware: All OS: Linux Status: NEW Component: Package Review Severity: medium Priority: medium Assignee: nobody@fedoraproject.org Reporter: thofmann@fedoraproject.org QA Contact: extras-qa@fedoraproject.org CC: package-review@lists.fedoraproject.org Target Milestone: --- Classification: Fedora
Spec URL: https://thofmann.fedorapeople.org/python-nagios-plugins-check_systemd.spec SRPM URL: https://thofmann.fedorapeople.org/python-nagios-plugins-check_systemd-2.3.1-...
Description: This systemd check for nagios compatible monitoring systems will report a degraded systemd to your monitoring solution. It can also be used to monitor individual systemd services and timers units.
Fedora Account System Username: thofmann
COPR: https://copr.fedorainfracloud.org/coprs/thofmann/nagios-plugins/ koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=86792294 fedora-review run on COPR: https://download.copr.fedorainfracloud.org/results/thofmann/nagios-plugins/f...
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
Till Hofmann thofmann@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Doc Type|--- |If docs needed, set a value
--- Comment #1 from Till Hofmann thofmann@fedoraproject.org --- Spec URL: https://thofmann.fedorapeople.org/python-nagios-plugins-check_systemd.spec SRPM URL: https://thofmann.fedorapeople.org/python-nagios-plugins-check_systemd-2.3.1-...
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
Otto Liljalaakso otto.liljalaakso@iki.fi changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Flags| |fedora-review? CC| |otto.liljalaakso@iki.fi Assignee|nobody@fedoraproject.org |otto.liljalaakso@iki.fi
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
Otto Liljalaakso otto.liljalaakso@iki.fi changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(thofmann@fedorapr | |oject.org)
--- Comment #2 from Otto Liljalaakso otto.liljalaakso@iki.fi --- Could you build this again for current Rawhide? I get an error when I try 'fedpkg mockbuild':
+ /usr/bin/python3 -m tox --current-env -q --recreate -e py311 .S..Traceback (most recent call last): File "/builddir/build/BUILDROOT/python-nagios-plugins-check_systemd-2.3.1-2.fc38.x86_64//usr/lib64/nagios/plugins/check_systemd", line 5, in <module> from check_systemd import main ModuleNotFoundError: No module named 'check_systemd' F..................................... ====================================================================== FAIL: test_entry_point (test_subprocess.TestCli.test_entry_point) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/check_systemd-2.3.1/test/test_subprocess.py", line 288, in test_entry_point self.assertEqual(process.returncode, 0) AssertionError: 1 != 0
---------------------------------------------------------------------- Ran 42 tests in 2.614s
FAILED (SKIP=1, failures=1) ERROR: InvocationError for command /usr/bin/nosetests --nocapture (exited with code 1) ___________________________________ summary ____________________________________ ERROR: py311: commands failed
Since an importable module is involved, should you be using %pyproject_save_files in the specfile?
Other than that, two comments from reading the specfile:
License: LGPLv2+
Since recently, new packages must use SPDX license identifiers. Thus, this should be "LGPL-2.1-or-later".
Reference: https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuideline...
Additionally, where did you get the "+"? Looking at the repo, it looks like the license is "LGPL-2.1-only".
Summary: Nagios plugin to check systemd
Would it make sense to use %{summary} here? You are already doing a similar thing for descriptions. (This comment is not review blocking.)
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
Till Hofmann thofmann@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(thofmann@fedorapr | |oject.org) |
--- Comment #3 from Till Hofmann thofmann@fedoraproject.org --- Spec URL: https://thofmann.fedorapeople.org/python-nagios-plugins-check_systemd.spec SRPM URL: https://thofmann.fedorapeople.org/python-nagios-plugins-check_systemd-2.3.1-...
I did not realize that the SPDX change was already in place, thanks for pointing this out! I've also changed it to LGPL-2.1-only.
I also fixed the test, it should now build on rawhide. The problem was that the python module is not in the standard python module path but instead in the nagios plugins dir. It seems like previously, PATH was also considered when looking for modules, but not anymore. I've added the plugins dir to PYTHONPATH, which fixed the issue.
I've also switched to using %_summary, as you suggested.
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
--- Comment #4 from Otto Liljalaakso otto.liljalaakso@iki.fi --- Thank you for the update, now it builds! I now managed to run fedora-review, I have only two comments:
[!]: Package must own all directories that it creates. Note: Directories without known owners: /usr/lib64/nagios/plugins, /usr/lib64/nagios
Either own them in this package, or Require: nagios-common. Reference: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_file_and_directo... The reference is terribly unclearly written, unfortunately, but it boils down to "if some dependency of yours does not own it, you have to own it yourself."
[ ]: Package is named according to the Package Naming Guidelines.
Inspecting the output of 'dnf -C search nagios-plugin', it seems to me that the name of this package should be 'nagios-plugins-systemd'. There is a large set of others that dropp the 'check_' part from the package name. (This comment is not release blocking.)
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
Mohamed El Morabity pikachu.2014@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pikachu.2014@gmail.com
--- Comment #5 from Mohamed El Morabity pikachu.2014@gmail.com --- Since this package is not a Python library, its name shouldn't be prefixed by python*-:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_applicati...
For consistency with other Nagios plugins available in the Fedora repos, I'd rename this package to nagios-plugins-check-systemd: $ dnf list nagios-plugins-*
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
Till Hofmann thofmann@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Review Request: |Review Request: |python-nagios-plugins-check |nagios-plugins-systemd - |_systemd - Nagios plugin to |Nagios plugin to check |check systemd |systemd
--- Comment #6 from Till Hofmann thofmann@fedoraproject.org --- Spec URL: https://thofmann.fedorapeople.org/nagios-plugins-systemd.spec SRPM URL: https://thofmann.fedorapeople.org/nagios-plugins-systemd-2.3.1-2.fc38.src.rp...
Thank you for the suggestions! I've renamed the package to nagios-plugins-systemd, this seems to be the most common naming scheme for nagios plugins. I've also added a Requires: for the plugin dir.
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
--- Comment #7 from Otto Liljalaakso otto.liljalaakso@iki.fi ---
Summary: Nagios plugin to check systemd
Many existing Nagios plugins seem to use the following convention: "Nagios Plugin - check_systemd". Maybe it would make sense to use it here as well, so that 'dnf search check_systemd' would find it. (This comment is not review blocking.)
[!]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin. Note: Incorrect Requires : /usr/lib64/nagios/plugins See: https://docs.fedoraproject.org/en-US/packaging- guidelines/#_file_and_directory_dependencies
Your solution for depending on the directory itself makes sense, but unfortunately, the Packaging Guidelines say you SHOULD NOT have a file dependency outside of certain fixed paths. So please just do Requires: nagios-common.
Reference is included above.
[!]: Spec file according to URL is the same as in SRPM. Note: Spec file as given by url is not the same as in SRPM (see attached diff). See: (this test has no URL)
This is just an incompatibility between 'fedpkg srpm', fedora-review and rpmautospec. No action needed, just remember not to do 'fedpkg import' with that srpm.
Provides
nagios-plugins-systemd: python3.11dist(check-systemd) python3dist(check-systemd)
I actually find it quite strange that this plugin is marked as an installed Python package. It does not provide anything that is available for anything else to use, and we already discovered with the problem in %check.
Unfortunately, I am not good enough with Python to say, if it would make sense to suggest upstream to install the main content to a module in site-packages.
(This comment is not release blocking.)
Since there is only one review blocking comment left, and that one is very simple to correct, I do not think it makes sense to strecth the review any longer. Package accepted.
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
--- Comment #8 from Otto Liljalaakso otto.liljalaakso@iki.fi --- Package Review ==============
Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
===== 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", "GNU Lesser General Public License, Version 2.1", "*No copyright* GNU Library General Public License, Version 2.0". 43 files have unknown license. Detailed output of licensecheck in /home/otto/src/Jakelut/Fedora/Katselmointi/2082886-nagios-plugins- systemd/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. [x]: 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. [-]: 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. [-]: 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. [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]: 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: [!]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin. Note: Incorrect Requires : /usr/lib64/nagios/plugins See: https://docs.fedoraproject.org/en-US/packaging- guidelines/#_file_and_directory_dependencies [ ]: 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]: 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: [!]: Spec file according to URL is the same as in SRPM. Note: Spec file as given by url is not the same as in SRPM (see attached diff). See: (this test has no URL) [x]: Rpmlint is run on all installed packages. Note: No rpmlint messages. [x]: Large data in /usr/share should live in a noarch subpackage if package is arched.
Rpmlint ------- Cannot parse rpmlint output:
Rpmlint (installed packages) ---------------------------- ============================ 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 checks: 31, packages: 1
1 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.0 s
Source checksums ---------------- https://github.com/Josef-Friedrich/check_systemd/archive/v2.3.1/nagios-plugi... : CHECKSUM(SHA256) this package : 4e583a9a78b2182705a2f806f745eccf90055bb995bd282c84f5bc86d24221d4 CHECKSUM(SHA256) upstream package : 4e583a9a78b2182705a2f806f745eccf90055bb995bd282c84f5bc86d24221d4
Requires -------- nagios-plugins-systemd (rpmlib, GLIBC filtered): /usr/bin/python3 /usr/lib64/nagios/plugins python(abi) python3.11dist(nagiosplugin)
Provides -------- nagios-plugins-systemd: nagios-plugins-systemd nagios-plugins-systemd(x86-64) python3.11dist(check-systemd) python3dist(check-systemd)
Diff spec file in url and in SRPM --------------------------------- --- /home/otto/src/Jakelut/Fedora/Katselmointi/2082886-nagios-plugins-systemd/srpm/nagios-plugins-systemd.spec 2022-10-07 23:05:19.468812839 +0300 +++ /home/otto/src/Jakelut/Fedora/Katselmointi/2082886-nagios-plugins-systemd/srpm-unpacked/nagios-plugins-systemd.spec 2022-10-07 14:49:59.000000000 +0300 @@ -1,2 +1,11 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.3.0) +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 2; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + %global nagiospluginsdir %{_libdir}/nagios/plugins Name: nagios-plugins-systemd @@ -56,3 +65,7 @@
%changelog -%autochangelog +* Fri Oct 07 2022 Till Hofmann thofmann@fedoraproject.org 2.3.1-2 +- Require the package that owns the plugin dir + +* Fri Oct 07 2022 Till Hofmann thofmann@fedoraproject.org 2.3.1-1 +- Rename package to nagios-plugins-systemd
Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23 Command line :/usr/bin/fedora-review --bug 2082886 Buildroot used: fedora-rawhide-x86_64 Active plugins: Shell-api, Generic Disabled plugins: Ruby, R, PHP, Perl, Python, SugarActivity, Haskell, fonts, Java, C/C++, Ocaml Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
Otto Liljalaakso otto.liljalaakso@iki.fi changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|fedora-review? |fedora-review+
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
--- Comment #9 from Jens Petersen petersen@redhat.com --- (fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/nagios-plugins-systemd
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |MODIFIED
--- Comment #10 from Fedora Update System updates@fedoraproject.org --- FEDORA-2022-69fb181ee2 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-69fb181ee2
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
--- Comment #11 from Fedora Update System updates@fedoraproject.org --- FEDORA-2022-c1372db834 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-c1372db834
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |ON_QA
--- Comment #12 from Fedora Update System updates@fedoraproject.org --- FEDORA-2022-69fb181ee2 has been pushed to the Fedora 37 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-69fb181ee2 *` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-69fb181ee2
See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
--- Comment #13 from Fedora Update System updates@fedoraproject.org --- FEDORA-2022-c1372db834 has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-c1372db834 *` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-c1372db834
See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |ERRATA Status|ON_QA |CLOSED Last Closed| |2022-11-17 01:27:24
--- Comment #14 from Fedora Update System updates@fedoraproject.org --- FEDORA-2022-c1372db834 has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=2082886
--- Comment #15 from Fedora Update System updates@fedoraproject.org --- FEDORA-2022-69fb181ee2 has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.
package-review@lists.fedoraproject.org