Bug 1459693 (recap)

Summary: Review Request: recap - Generates reports of various system information
Product: [Fedora] Fedora Reporter: Carl George <carl>
Component: Package ReviewAssignee: Christos Triantafyllidis <christos.triantafyllidis>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: ben.harper, carl, christos.triantafyllidis, package-review, tonysk8
Target Milestone: ---Flags: christos.triantafyllidis: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-03 15:53:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Carl George 2017-06-07 20:44:16 UTC
Spec URL: https://carlgeorge.fedorapeople.org/recap/recap.spec
SRPM URL: https://carlgeorge.fedorapeople.org/recap/recap-1.0.0-1.src.rpm
Description:
This program is intended to be used as a companion for the reporting provided
by sysstat. It will create a set of reports summarizing hardware resource
utilization. The script also provides optional reporting on Apache, MySQL, and
network connections.
Fedora Account System Username: carlgeorge

Comment 1 Christos Triantafyllidis 2017-06-08 08:09:29 UTC
Hello Carl,

Thanks for submitting this, I'm going to review it.

Cheers,
Christos

Comment 2 Christos Triantafyllidis 2017-06-08 09:33:27 UTC
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.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "*No copyright* GPL (v2 or later) (with incorrect FSF
     address)", "Unknown or generated", "*No copyright* GPL". 13 files have
     unknown license. Detailed output of licensecheck in
     /home/ctrianta/1459693-recap/licensecheck.txt
Can you please raise a ticket to the upstream to correct the FSF address in src/recaptool.8? Also adding a copyright message in the beginning of each file is recommended (13 files are reported with no license)
[x]: Package must own all directories that it creates.
     Note: Directories without known owners: /etc/cron.d
[x]: Package contains no bundled libraries without FPC exception.
[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
[x]: Package uses nothing in %doc for runtime.
[!]: Package consistently uses macros (instead of hard-coded directory
     names).
Can you please replace "recap" with %{name} in the %files section.
[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.
Is there a reason we have the following requirements:
bash
coreutils
gawk
grep
procps/procps-ng
The seem to be on the base installation anyway.
    
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[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 20480 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 does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[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]: %config files are marked noreplace or the reason is justified.
[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 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.
[!]: Final provides and requires are sane (see attachments).
As stated above we need to clarify the requiment for:
bash
coreutils
gawk
grep
procps/procps-ng
[?]: Package functions as described.
I haven't tested this version yet and as it includes a major release update I'd like to test it for couple of days. I'll return on that later.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[-]: 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]: 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 all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.

===== Additional items =====
[!] Can you please document the reason for the non-standard-dir-perm on /var/log/recap folders? My understanding is to protect logs that include output that normally only root can see.
[!] How are the files in the /var/log/recap folder rotated? What prevents them from filling the disk?



Rpmlint
-------
Checking: recap-1.0.0-1.fc27.noarch.rpm
          recap-1.0.0-1.fc27.src.rpm
recap.noarch: E: non-standard-dir-perm /var/log/recap/snapshots 750
recap.noarch: E: non-standard-dir-perm /var/log/recap 750
recap.noarch: E: non-standard-dir-perm /var/log/recap/backups 750
recap.noarch: W: log-files-without-logrotate ['/var/log/recap']
recap.src: W: spelling-error %description -l en_US sysstat -> stately
recap.src: W: no-%build-section
2 packages and 0 specfiles checked; 3 errors, 3 warnings.




Rpmlint (installed packages)
----------------------------
recap.noarch: E: non-standard-dir-perm /var/log/recap 750
recap.noarch: E: non-standard-dir-perm /var/log/recap/backups 750
recap.noarch: E: non-standard-dir-perm /var/log/recap/snapshots 750
recap.noarch: W: log-files-without-logrotate ['/var/log/recap']
1 packages and 0 specfiles checked; 3 errors, 1 warnings.



Requires
--------
recap (rpmlib, GLIBC filtered):
    /bin/bash
    bash
    bc
    config(recap)
    coreutils
    gawk
    grep
    iotop
    net-tools
    procps-ng
    psmisc
    sysstat



Provides
--------
recap:
    config(recap)
    recap



Source checksums
----------------
https://github.com/rackerlabs/recap/archive/1.0.0/recap-1.0.0.tar.gz :
  CHECKSUM(SHA256) this package     : 126468e6c20efe3724d95581dfb5e51bae558f46f84d40beac71a9906e05eb81
  CHECKSUM(SHA256) upstream package : 126468e6c20efe3724d95581dfb5e51bae558f46f84d40beac71a9906e05eb81


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -b 1459693 -D EPEL6
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api
Disabled plugins: Java, C/C++, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH

Comment 3 Carl George 2017-06-13 14:16:13 UTC
> [!]: License field in the package spec file matches the actual license.
>      Note: Checking patched sources after %prep for licenses. Licenses
>      found: "*No copyright* GPL (v2 or later) (with incorrect FSF
>      address)", "Unknown or generated", "*No copyright* GPL". 13 files have
>      unknown license. Detailed output of licensecheck in
>      /home/ctrianta/1459693-recap/licensecheck.txt
> Can you please raise a ticket to the upstream to correct the FSF address in src/recaptool.8? Also adding a copyright message in the beginning of each file is recommended (13 files are reported with no license)

Done and merged.

https://github.com/rackerlabs/recap/pull/95

> [x]: Package must own all directories that it creates.
>      Note: Directories without known owners: /etc/cron.d

Added a requirement of crontabs, per https://fedoraproject.org/wiki/Packaging:CronFiles.

> [!]: Package consistently uses macros (instead of hard-coded directory
>      names).
> Can you please replace "recap" with %{name} in the %files section.

This is not really necessary.

> [!]: Requires correct, justified where necessary.
> Is there a reason we have the following requirements:
> bash
> coreutils
> gawk
> grep
> procps/procps-ng
> The seem to be on the base installation anyway.

I'll remove bash, coreutils, gawk, and grep since they appear to always be installed, even on minimal docker images.  I have seen instances where procps(-ng) wasn't installed, so I'll keep that one.

> [!] Can you please document the reason for the non-standard-dir-perm on /var/log/recap folders? My understanding is to protect logs that include output that normally only root can see.

Upstream sets these to 750 in the Makefile.  I believe you are correct that the original intent was for logs to only be viewable by root.  I've opened an issue upstream to discuss possibly changing it.  

https://github.com/rackerlabs/recap/issues/98

> [!] How are the files in the /var/log/recap folder rotated? What prevents them from filling the disk?

Recap implements it's own custom log rotation.  https://github.com/rackerlabs/recap/blob/1.0.0/CHANGELOG.md#097---2013-10-31

Comment 4 Carl George 2017-06-13 14:30:40 UTC
Changes are live at https://carlgeorge.fedorapeople.org/recap/recap.spec (1.0.0-2).  Let me know if you spot anything else during your testing.

Comment 5 Christos Triantafyllidis 2017-06-14 16:32:50 UTC
Hello Carl,

The updated .spec looks good to me. Same applies for the justification for the lack of the log rotating.

The only remaining point for me is the log file permissions. I'd say let's wait 1-2 days for the upstream to conclude on whether 750 is needed or not. Looks like there is a PR now to make them world readable but some comments (with which I'd agree) to not :). If the upstream decision is to have them world readable I'd say we'll have to wait upstream to merge this change or patch this in the .spec to avoid changing the permissions later in the package's lifecycle.

I'll revisit this and the upstream issues in the next days.

Cheers,
Christos

Comment 6 Carl George 2017-07-06 19:52:45 UTC
Upstream has decided to stick with the 750 permissions on /var/log/recap.  Can we proceed with the review?

Comment 7 Christos Triantafyllidis 2017-07-21 09:46:03 UTC
Thanks Carl!

With this update everything looks fine now.

Cheers,
Christos

Comment 8 Gwyn Ciesla 2017-07-24 15:45:13 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/recap

Comment 9 Fedora Update System 2017-07-24 18:47:07 UTC
recap-1.0.0-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-b35db31d5d

Comment 10 Fedora Update System 2017-07-25 22:54:12 UTC
recap-1.0.0-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-ef046b5dff

Comment 11 Fedora Update System 2017-07-26 01:19:06 UTC
recap-1.0.0-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-5015a0178c

Comment 12 Fedora Update System 2017-07-26 01:47:22 UTC
recap-1.0.0-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-b35db31d5d

Comment 13 Fedora Update System 2017-07-26 01:48:42 UTC
recap-1.0.0-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-3eaaba69d5

Comment 14 Fedora Update System 2017-08-03 15:53:06 UTC
recap-1.0.0-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2017-08-03 20:52:54 UTC
recap-1.0.0-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2017-08-04 01:16:35 UTC
recap-1.0.0-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2017-08-04 01:46:31 UTC
recap-1.0.0-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.