Bug 1414753

Summary: Review Request: puppet-auditd - puppet module to manage auditd service and customize auditd rules
Product: [Community] RDO Reporter: Luke Hinds <lhinds>
Component: Package ReviewAssignee: Javier Peña <jpena>
Status: CLOSED CURRENTRELEASE QA Contact: hguemar
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: trunkCC: jpena
Target Milestone: ---Flags: jpena: rdo-review+
Target Release: trunk   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: puppet-auditd-2.2.0-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-29 21:12:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1373513, 1437226, 1485292    
Attachments:
Description Flags
SPRM none

Description Luke Hinds 2017-01-19 11:21:30 UTC
Description of problem:

In order for systems to be security compliant, it is required that auditd be enabled service and has a set configuration type:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls_in_the_audit.rules_file.html

To manage the auditd service and audit.rules, the puppet-auditd module can be used:

https://forge.puppet.com/kemra102/auditd

https://github.com/kemra102/puppet-auditd


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Javier Peña 2017-01-20 12:05:28 UTC
Initial licensecheck output:

$ licensecheck -r .
./.fixtures.yml: *No copyright* UNKNOWN
./.travis.yml: *No copyright* UNKNOWN
./CHANGELOG.md: *No copyright* UNKNOWN
./Gemfile: *No copyright* UNKNOWN
./LICENSE: BSD (2 clause)
./README.md: *No copyright* UNKNOWN
./Rakefile: *No copyright* UNKNOWN
./Vagrantfile: *No copyright* UNKNOWN
./metadata.json: *No copyright* UNKNOWN
./examples/cis.pp: *No copyright* UNKNOWN
./examples/classrules.pp: *No copyright* UNKNOWN
./examples/puppetserver.pp: *No copyright* UNKNOWN
./manifests/init.pp: *No copyright* UNKNOWN
./manifests/params.pp: *No copyright* UNKNOWN
./manifests/rule.pp: *No copyright* UNKNOWN
./spec/spec_helper.rb: *No copyright* UNKNOWN
./templates/audisp.plugin.erb: *No copyright* UNKNOWN
./templates/audispd.conf.erb: *No copyright* UNKNOWN
./templates/audit.rules.begin.fragment.erb: *No copyright* UNKNOWN
./templates/auditd.conf.erb: *No copyright* UNKNOWN
./tests/audisp_af_unix.pp: *No copyright* UNKNOWN
./tests/audisp_au_remote.pp: *No copyright* UNKNOWN
./tests/audisp_audispd_zos_remote.pp: *No copyright* UNKNOWN
./tests/audisp_syslog.pp: *No copyright* UNKNOWN
./tests/cis.pp: *No copyright* UNKNOWN
./tests/init.pp: *No copyright* UNKNOWN
./manifests/audisp/af_unix.pp: *No copyright* UNKNOWN
./manifests/audisp/au_remote.pp: *No copyright* UNKNOWN
./manifests/audisp/audispd_zos_remote.pp: *No copyright* UNKNOWN
./manifests/audisp/plugin.pp: *No copyright* UNKNOWN
./manifests/audisp/syslog.pp: *No copyright* UNKNOWN
./spec/classes/init_spec.rb: *No copyright* UNKNOWN

The module is licensed using a BSD 2-Clause license. Looking at the git repo history, I cannot find any potential issue.

Comment 3 Luke Hinds 2017-01-25 12:50:32 UTC
Created attachment 1244246 [details]
SPRM

Comment 5 Javier Peña 2017-01-25 16:12:45 UTC
Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


Issues:
=======
- Dist tag is present.
- 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.
  Note: License file LICENSE is not marked as %license
  See:
  http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#License_Text


===== 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: "BSD (2 clause)", "Unknown or generated". 27 files have unknown
     license. Detailed output of licensecheck in /tmp/puppet-auditd/review-
     puppet-auditd/licensecheck.txt
[x]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/share/openstack-puppet/modules,
     /usr/share/openstack-puppet
[x]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/share/openstack-
     puppet/modules, /usr/share/openstack-puppet
[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.
[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]: Package is not known to require an ExcludeArch tag.
[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 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]: 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 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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: Sources can be downloaded from URI in Source: tag
     Note: Could not download Source0: https://github.com/kemra102/puppet-
     auditd/archive/2.2.0.tar.gz
     See: http://fedoraproject.org/wiki/Packaging:Guidelines#Tags
[-]: 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.
[x]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments
[-]: 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.
[-]: %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]: 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: There are rpmlint messages (see attachment).


Rpmlint
-------
Checking: puppet-auditd-2.2.0-0.20170124164949.cbeda30.el7.centos.noarch.rpm
          puppet-auditd-2.2.0-0.20170124164949.cbeda30.el7.centos.src.rpm
puppet-auditd.noarch: E: explicit-lib-dependency puppet-stdlib
puppet-auditd.noarch: W: summary-ended-with-dot C Manage the audit daemon and it's rules.
puppet-auditd.noarch: E: no-changelogname-tag
puppet-auditd.noarch: W: no-documentation
puppet-auditd.src: W: summary-ended-with-dot C Manage the audit daemon and it's rules.
puppet-auditd.src: E: no-changelogname-tag
puppet-auditd.src: W: invalid-url Source0: 2.2.0-0.20170124164949.cbeda30.tar.gz
2 packages and 0 specfiles checked; 3 errors, 4 warnings.




Rpmlint (installed packages)
----------------------------
puppet-auditd.noarch: E: explicit-lib-dependency puppet-stdlib
puppet-auditd.noarch: W: summary-ended-with-dot C Manage the audit daemon and it's rules.
puppet-auditd.noarch: E: no-changelogname-tag
puppet-auditd.noarch: W: no-documentation
1 packages and 0 specfiles checked; 2 errors, 2 warnings.



Diff spec file in url and in SRPM
---------------------------------
--- /tmp/puppet-auditd/puppet-auditd.spec	2017-01-25 17:07:43.780207498 +0100
+++ /tmp/puppet-auditd/review-puppet-auditd/srpm-unpacked/puppet-auditd.spec	2017-01-24 17:49:49.000000000 +0100
@@ -1,7 +1,9 @@
+%global dlrn 1
+%define upstream_version 2.2.0
 %{!?upstream_version: %global upstream_version %{version}%{?milestone}}
 
 Name:                   puppet-auditd
-Version:                2.2.0
-Release:                0.20170124164949.cbeda30
+Version: 2.2.0
+Release: 0.20170124164949.cbeda30%{?dist}
 Summary:                Manage the audit daemon and it's rules.
 License:                BSD
@@ -9,5 +11,5 @@
 URL:                    https://github.com/kemra102/puppet-auditd
 
-Source0:                https://github.com/kemra102/puppet-auditd/archive/%{version}.tar.gz
+Source0: 2.2.0-0.20170124164949.cbeda30.tar.gz
 
 BuildArch:              noarch


Requires
--------
puppet-auditd (rpmlib, GLIBC filtered):
    puppet
    puppet-concat
    puppet-stdlib



Provides
--------
puppet-auditd:
    puppet-auditd



Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -n puppet-auditd -m dlrn
Buildroot used: dlrn-centos7-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, EPEL6


* The differences between the spec from the review and srpm are due to the SRPM being generated by DLRN, so they are expected. Same for the dist tag being present.

* The LICENSE file issue is caused by the spec file being automatically generated, it is accepted as is.

The package is APPROVED.