Our observation from Enterprise Linux testing and customer issues in the recent past has been that most customers have challenges in setting up their Linux systems for First Failure Data Capture(FFDC). In some cases, log gathering packages aren't installed, in some, the requisite daemons for the platform are neither installed or configured properly. The most apparent problem is the incorrect configuration of kdump/fadump, where insufficient memory reservation causes OOM and therefore a failure in capturing the dump. To alleviate these issues, we have come up with a python plugin based framework called ServiceReport. This tool is integrated with Systemd to run on boot. ServiceReport runs in two modes: validate and repair. By default, ServiceReport runs in the validate mode - depending on the platform it is run on, it will determine what necessary packages and daemons are needed for log collection and normal system run. It will then check if those are installed and configured to run as needed. If it isn't, ServiceReport will log errors into syslog and on the console so that the sysadmin can take necessary action. In the repair phase, subject to the system configured to reach the appropriate repositories, ServiceReport will fix issues found in the validate phase. It will also tweak the boot commandline and refresh the bootloader settings for a successful dump, trigger distro specified steps for regenerating the initramfs, etc. ServiceReport also provides a convenient dummy trigger to test the dump configuration. The tool is available at: https://github.com/linux-ras/ServiceReport
This will need a package owner and follow https://fedoraproject.org/wiki/Package_Review_Process
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle. Changing version to 32.
------- Comment From sjain014.com 2020-02-16 22:57 EDT------- Hello, As our distro compatible build infrastructure is now in place, we will soon open a new package request for ServiceReport on the Fedora forum. Thanks, Sourabh Jain
Created attachment 1683603 [details] ServiceReport Source RPM package.
Created attachment 1683604 [details] ServiceReport Spec file.
I have attached the SRPM and SPEC file of ServiceReport. Please let me know if any changes are required. Thanks, Sourabh Jain
I have attached the SRPM and SPEC file of ServiceReport. Please review it and let me know if any changes are required. Thanks, Sourabh Jain
I have grabbed attached specfile and rpm. I have done initial review of the package. This shouldn't be considered as final review. Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed Issues: ======= - Package contains BR: python2-devel or python3-devel - Dist tag is present. - systemd_post is invoked in %post, systemd_preun in %preun, and systemd_postun in %postun for Systemd service files. Note: Systemd service file(s) in ServiceReport See: https://docs.fedoraproject.org/en-US/packaging- guidelines/Scriptlets/#_scriptlets Use systemd_* syntax. ===== 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]: 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. [?]: License field in the package spec file matches the actual license. Note: Checking patched sources after %prep for licenses. Licenses found: "Unknown or generated". 31 files have unknown license. Detailed output of licensecheck in servicereport/ServiceReport/licensecheck.txt [?]: Package does not own files or directories owned by other packages. Note: Dirs in package are owned also by: /usr/lib/python3.8(python3-libs), /usr/lib/python3.8/site- packages(solarwolf, flatpak-runtime-config, python3-flask-whooshee, python3-libs, python-pysword, nut-client), /usr/lib/systemd(systemd), /usr/lib/systemd/system(389-ds-base, openqa-worker, plymouth, systemd) [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]: Each %files section contains %defattr if rpm < 4.4 Note: %defattr present but not needed Please fix this. [x]: Package contains desktop file if it is a GUI application. [x]: 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. [x]: 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]: 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]: 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 Python: [x]: Python eggs must not download any dependencies during the build process. [x]: A package which is used by another package via an egg interface should provide egg info. [x]: Package meets the Packaging Guidelines::Python [x]: Packages MUST NOT have dependencies (either build-time or runtime) on packages named with the unversioned python- prefix unless no properly versioned package exists. Dependencies on Python packages instead MUST use names beginning with python2- or python3- as appropriate. [x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files [x]: Binary eggs must be removed in %prep ===== SHOULD items ===== Generic: [!]: Packager, Vendor, PreReq, Copyright tags should not be in spec file Note: Found : Vendor: IBM Corp. See: https://docs.fedoraproject.org/en-US/packaging- guidelines/#_tags_and_sections Please fix this. [x]: 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]: Description and summary sections in the package spec file contains translations for supported Non-English languages, if available. [x]: Package should compile and build into binary rpms on all supported architectures. [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 name ServiceReport, %define version 2.2.1, %define release 1, %define python python3, %define debug_package %{nil} Please fix this. [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]: 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. Rpmlint ------- Checking: ServiceReport-2.2.1-1.x86_64.rpm ServiceReport-2.2.1-1.src.rpm ServiceReport.x86_64: E: description-line-too-long C ServiceReport is a python based tool that investigates the incorrect First Failure Data ServiceReport.x86_64: W: incoherent-version-in-changelog 2.2.1 ['2.2.1-1', '2.2.1-1'] ServiceReport.x86_64: E: no-binary ServiceReport.src: E: description-line-too-long C ServiceReport is a python based tool that investigates the incorrect First Failure Data ServiceReport.src:45: E: hardcoded-library-path in /usr/lib/* 2 packages and 0 specfiles checked; 4 errors, 1 warnings. Rpmlint (installed packages) ---------------------------- ServiceReport.x86_64: E: description-line-too-long C ServiceReport is a python based tool that investigates the incorrect First Failure Data ServiceReport.x86_64: W: incoherent-version-in-changelog 2.2.1 ['2.2.1-1', '2.2.1-1'] ServiceReport.x86_64: W: invalid-url URL: https://github.com/linux-ras/ServiceReport <urlopen error [Errno -2] Name or service not known> ServiceReport.x86_64: E: no-binary 1 packages and 0 specfiles checked; 2 errors, 2 warnings. Source checksums ---------------- https://github.com/linux-ras/ServiceReport/archive/v2.2.1/ServiceReport-2.2.1.tar.gz : CHECKSUM(SHA256) this package : 9f2951a0a33fd9aa037657015461d1c720c94f7c6703d5c86bc519dc86e9104a CHECKSUM(SHA256) upstream package : 9f2951a0a33fd9aa037657015461d1c720c94f7c6703d5c86bc519dc86e9104a Requires -------- ServiceReport (rpmlib, GLIBC filtered): /bin/sh /usr/bin/python3 python3 systemd Provides -------- ServiceReport: ServiceReport ServiceReport(x86-64) Generated by fedora-review 0.7.5 (5fa5b7e) last change: 2020-02-16 Command line :/usr/bin/fedora-review --rpm-spec -n ServiceReport-2.2.1-1.src.rpm Buildroot used: fedora-rawhide-x86_64 Active plugins: Shell-api, Python, Generic Disabled plugins: PHP, Ocaml, SugarActivity, R, Java, C/C++, fonts, Perl, Haskell Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH -Vasant
Moving to the package review component so reviewers can see it.
Hello, Thanks, Vasant for reviewing the source rpm and SPEC file. I have made a couple of changes in the SPEC file to get rid of reported issues. The v2 SPEC file and SRC RPM are uploaded here: SPEC: https://download.copr.fedorainfracloud.org/results/sourabhjains/ServiceReport/fedora-31-x86_64/01372837-ServiceReport/ServiceReport.spec SRC RPM: https://download.copr.fedorainfracloud.org/results/sourabhjains/ServiceReport/fedora-31-x86_64/01372837-ServiceReport/ServiceReport-2.2.1-1.src.rpm ChangeLog: BuildArch tag is changed to noarch. Description text is now under 80 char %systemd_post tag is used instead of direct systemctl command. Removed vendor tag from SPEC file. All the rpmlint errors and warnings are handled by adding appropriate macros. Please let me know if any changes required in SPEC file. Best, Sourabh Jain
Sourabh: SPEC and SRPM give 404 error.
------- Comment From sjain014.com 2020-06-19 00:52 EDT------- Hello Team, (In reply to comment #17) > Sourabh: SPEC and SRPM give 404 error. I am not sure why the SPEC file and Source RPM file has been removed from the corp portal. I guess the corp portal removes all files belongs to builds after certain days. The below link contains a fresh build of ServiceReport on the corp portal. It includes SPEC file and Source RPMs. https://download.copr.fedorainfracloud.org/results/sourabhjains/ServiceReport/fedora-31-x86_64/01486459-ServiceReport/ Note: added a new BuildRequires[: %{python}-devel] tag in the SPEC file to handle the missing python3_sitelib macro error.
- Don't use %define but %global: %define name ServiceReport %define version 2.2.1 %define release 1 And you shouldn't redefine name, version and release, use the header field for that - Group: is not used in Fedora - No: %define debug_package %{nil} Instead make you package noarch since it's Python stuff: BuildArch: noarch - Use Python macros: see https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_macros %{python} setup.py build → %py3_build %{python} setup.py install --root=$RPM_BUILD_ROOT → %py3_install - Not needed: %defattr(-,root,root) - Use macros for directories: /usr/share/man → %{_mandir} /usr/lib/systemd/system/ → %{_unitdir} - Man pages are not to be installed with %doc: %{_mandir}/man8/* - Not needed: Requires: %{python} systemd - BR systemd-rpm-macros instead of systemd (if you need EPEL7 support put it behind a condition) - Some systemd scriptles are missing: see: https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_systemd %post %systemd_post servicereport.service %preun %systemd_preun servicereport.service %postun %systemd_postun_with_restart servicereport.service - Not needed: %doc /usr/share/doc/*, install the README.md with: %doc README.md - You should provide a COPYING file and install it with %license in %files: %license COPYING - # By default python 3 is used to build the package. Only Python 3 is available for Fedora 32 and above. If you're planning EPEL7 and Python2, use conditionals, for example %if 0%{?fedora} || 0%{?rhel} >= 7 %bcond_with python2 %bcond_without python3 %else %bcond_with python3 %bcond_without python2 %endif although I'd recommend to stick with Python3
Also the reporter of the bug (with their bugzilla email) must be the one to request the repository, Using bugproxy.com instead of a real FAS account will prevent the script to request a repo to work.
I.e. you should open a new bug as jainsourabh 'Sourabh Jain' <sourabhjain.com> and close this one as duplicate because it won't go anywhere. You'll need a sponsor to become a member of the packager group.
------- Comment From sjain014.com 2020-07-01 03:01 EDT------- Hello Team, Thanks for the review. I will open a new BUG and will post the updated SPEC file there. (In reply to comment #19) > - Don't use %define but %global: > > %define name ServiceReport > %define version 2.2.1 > %define release 1
------- Comment From sjain014.com 2020-07-02 06:16 EDT------- Hello Team, As suggested in the previous comment I have opened a new BZ with 'Sourabh Jain' <sourabhjain.com> ID on https://bugzilla.redhat.com. Also addressed the comments on the SPEC file and posted the updated SPEC on the new BZ. New BZ link: https://bugzilla.redhat.com/show_bug.cgi?id=1853217
fyi ... with LTC bug 187118 - RH1860811- Fedora - Review Request: ServiceReport - a tool to validate and repair system configuration for specific purposes now included for Fedora 33 I am closing this Red Hat bugzilla now ...