Bug 647885 - Review Request: apache-rat - Apache Release Audit Tool (RAT)
Summary: Review Request: apache-rat - Apache Release Audit Tool (RAT)
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Stanislav Ochotnicky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 647602
Blocks: 529441
TreeView+ depends on / blocked
 
Reported: 2010-10-29 19:14 UTC by Orion Poplawski
Modified: 2011-03-11 20:28 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-11 20:28:02 UTC
Type: ---
Embargoed:
sochotni: fedora-review+
j: fedora-cvs+


Attachments (Terms of Use)
surefire-reports/org.apache.rat.mp.RatCheckMojoTest.txt (3.83 KB, text/plain)
2010-12-22 19:27 UTC, Orion Poplawski
no flags Details

Description Orion Poplawski 2010-10-29 19:14:12 UTC
Spec URL: http://www.cora.nwra.com/~orion/fedora/apache-rat.spec
SRPM URL: http://www.cora.nwra.com/~orion/fedora/apache-rat-0.8-0.2.20100827.fc14.src.rpm
Description:
Release Audit Tool (RAT) is a tool to improve accuracy and efficiency when
checking releases. It is heuristic in nature: making guesses about possible
problems. It will produce false positives and cannot find every possible
issue with a release. It's reports require interpretation.

RAT was developed in response to a need felt in the Apache Incubator to be
able to review releases for the most common faults less labour intensively.
It is therefore highly tuned to the Apache style of releases.



This depends on apache-ant-anttasks (see dependent review) and ant-testutil which is only in Rawhide at the moment.

I'm also unsure about the organization of the sub-packages, and I'm probably missing various Requires.  Suggestions welcome.

Comment 1 Terje Røsten 2010-10-29 20:35:36 UTC
You have incoherent version in changelog -1 vs 0.2.20100827 and
more req might be needed? The rest looks good!

Comment 2 Orion Poplawski 2010-10-29 20:45:29 UTC
I reloaded the images with updated changelog.  Not really sure how best to determine the proper requires.

Comment 3 Alexander Kurtakov 2010-10-30 05:52:56 UTC
You are missing the /etc/ant.d file for the tasks package too.

Comment 4 Orion Poplawski 2010-11-01 15:43:19 UTC
(In reply to comment #3)
> You are missing the /etc/ant.d file for the tasks package too.

What should the contents be?  I don't see any guidance in the wiki.

Comment 5 Alexander Kurtakov 2010-11-01 15:59:47 UTC
Hmm, you have done that in https://bugzilla.redhat.com/show_bug.cgi?id=647602 :)
It should contain the classpath for the given task in the way build-classpath works. I.e. it should be "apache-rat/rat-core apache-rat/rat-tasks" in your case.
I'll add it to the guidelines update.

Comment 6 Orion Poplawski 2010-11-01 16:09:14 UTC
I just blindly copied from existing ant entries :-).  Thanks.

http://www.cora.nwra.com/~orion/fedora/apache-rat.spec
http://www.cora.nwra.com/~orion/fedora/apache-rat-0.8-0.3.20100827.fc14.src.rpm

* Mon Nov 1 2010 Orion Poplawski <orion.com> 0.8-0.3.20100827
- Add /etc/ant.d/apache-rat

Comment 7 Orion Poplawski 2010-12-09 18:34:39 UTC
http://www.cora.nwra.com/~orion/fedora/apache-rat.spec
http://www.cora.nwra.com/~orion/fedora/apache-rat-0.8-0.4.20100827.fc14.src.rpm

* Mon Nov 1 2010 Orion Poplawski <orion.com> 0.8-0.4.20100827
- Change BR to ant-antunit

Comment 8 Orion Poplawski 2010-12-09 18:39:01 UTC
Also:

- Drop versioned jar and javadoc
- Drop BuildRoot and %%clean

Comment 9 Stanislav Ochotnicky 2010-12-22 14:12:01 UTC
I'll have a look

Comment 10 Stanislav Ochotnicky 2010-12-22 14:45:48 UTC
Package Review
==============

Key:
- = N/A
x = Check
! = Problem
? = Not evaluated

=== REQUIRED ITEMS ===
[!]  Rpmlint output:
apache-rat.noarch: W: spelling-error %description -l en_US labour -> labor, lab our, lab-our
Yeah, I'd also prefer labour, but it's supposed to be en_US

apache-rat.noarch: W: spelling-error %description -l en_US metadata -> meta data, meta-data, metatarsus
apache-rat.noarch: W: spelling-error %description -l en_US plugin -> plug in, plug-in, plugging
apache-rat.noarch: W: non-conffile-in-etc /etc/maven/fragments/apache-rat
apache-rat.src: W: spelling-error %description -l en_US labour -> labor, lab our, lab-our
apache-rat.src: W: spelling-error %description -l en_US metadata -> meta data, meta-data, metatarsus
apache-rat.src: W: spelling-error %description -l en_US plugin -> plug in, plug-in, plugging
apache-rat.src:45: W: macro-in-comment %{name}
apache-rat.src:45: W: macro-in-comment %{version}
apache-rat.src:45: W: macro-in-comment %{release}
apache-rat.src:46: W: macro-in-comment %{name}
apache-rat.src:46: W: macro-in-comment %{version}
apache-rat.src:46: W: macro-in-comment %{release}

Remove those commented Requires please

apache-rat.src: W: invalid-url Source0: apache-rat-0.8-20100827.tar.bz2
apache-rat-core.noarch: W: spelling-error %description -l en_US plugin -> plug in, plug-in, plugging
apache-rat-javadoc.noarch: W: spelling-error Summary(en_US) Javadocs -> Java docs, Java-docs, Javanese
apache-rat-tasks.noarch: W: non-conffile-in-etc /etc/ant.d/apache-rat
6 packages and 0 specfiles checked; 0 errors, 17 warnings

[x]  Package is named according to the Package Naming Guidelines[1].
[x]  Spec file name must match the base package name, in the format %{name}.spec.
[x]  Package meets the Packaging Guidelines[2].
[x]  Package successfully compiles and builds into binary rpms.
[x]  Buildroot definition is not present
[x]  Package is licensed with an open-source compatible license and meets other legal requirements as defined in the legal section of Packaging Guidelines[3,4].
[x]  License field in the package spec file matches the actual license.
License type: ASL 2.0
[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 %doc.
[x]  All independent sub-packages have license of their own
[!]  Spec file is legible and written in American English.
Well..en_GB would be fine with me. Just that labour...
[?]  Sources used to build the package matches the upstream source, as provided in the spec URL.

It would be good to have reasoning for use of snapshot. Plus giving svn export with "-r 990212" argument. 

[x]  All build dependencies are listed in BuildRequires, except for any that are listed in the exceptions section of Packaging Guidelines[5].
[x]  Package must own all directories that it creates.
[x]  Package requires other packages for directories it uses.
core/plugin/tasks all have requires in jpackage utils and also on main package. You should probably respect dependencies so that when main package requires jpackage-utils don't put it also in dependencies. Same thing for example plugin requiring main package and also core. Core is enough because it pulls in main. IMO the less lines of code the better...
[x]  Package does not contain duplicates in %files.
[x]  Permissions on files are set properly.
[x]  Package does NOT have a %clean section which contains rm -rf %{buildroot} (or $RPM_BUILD_ROOT). (not needed anymore)
[x]  Package consistently uses macros (no %{buildroot} and $RPM_BUILD_ROOT mixing)
[x]  Package contains code, or permissable content.
[x]  Fully versioned dependency in subpackages, if present.
[-]  Package contains a properly installed %{name}.desktop file if it is a GUI application.
[x]  Package does not own files or directories owned by other packages.
[x]  Javadoc documentation files are generated and included in -javadoc subpackage
[x]  Javadocs are placed in %{_javadocdir}/%{name} (no -%{version} symlinks)
[x]  Packages have proper BuildRequires/Requires on jpackage-utils
[x]  Javadoc subpackages have Require: jpackage-utils
[x]  Package uses %global not %define
[!]  If package uses tarball from VCS include comment how to re-create that tarball (svn export URL, git clone URL, ...)
Put that revision directly into svn export command I guess so it's not scattered.
[-]  If source tarball includes bundled jar/class files these need to be removed prior to building
[x]  All filenames in rpm packages must be valid UTF-8.
[x]  Jar files are installed to %{_javadir}/%{name}.jar (see [6] for details)
[x]  If package contains pom.xml files install it (including depmaps) even when building with ant
[x]  pom files has correct add_to_maven_depmap call which resolves to the pom file (use "JPP." and "JPP-" correctly)

=== Maven ===
[!]  Use %{_mavenpomdir} macro for placing pom files instead of %{_datadir}/maven2/poms
[!]  If package uses "-Dmaven.test.skip=true" explain why it was needed in a comment
Please add reasoning (and prefer to use -Dmaven.test.ignore.failure=true)
[-]  If package uses custom depmap "-Dmaven2.jpp.depmap.file=*" explain why it's needed in a comment
[-]  Package uses %update_maven_depmap in %post/%postun
[x]  Packages have Requires(post) and Requires(postun) on jpackage-utils (for %update_maven_depmap macro)

=== Other suggestions ===
[x]  If possible use upstream build method (maven/ant/javac)
[x]  Avoid having BuildRequires on exact NVR unless necessary
[x]  Package has BuildArch: noarch (if possible)
[x]  Latest version is packaged.
[x]  Reviewer should test that the package builds in mock.
Tested on: fedora-rawhide-x86_64


=== Other Issues ===
1. patch adding maven-settings to deps is no longer needed (bug in maven that was fixed recently)

Comment 11 Orion Poplawski 2010-12-22 19:27:36 UTC
Created attachment 470290 [details]
surefire-reports/org.apache.rat.mp.RatCheckMojoTest.txt

Comment 12 Orion Poplawski 2010-12-22 19:30:50 UTC
Comment on attachment 470290 [details]
surefire-reports/org.apache.rat.mp.RatCheckMojoTest.txt

I tried -Dmaven.test.ignore.failure=true but the build still fails with:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.rat.mp.RatCheckMojoTest
Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.65 sec <<< FAILURE!
Results :
Tests in error: 
  testIt1(org.apache.rat.mp.RatCheckMojoTest)
  testIt2(org.apache.rat.mp.RatCheckMojoTest)
  testIt3(org.apache.rat.mp.RatCheckMojoTest)
Tests run: 3, Failures: 0, Errors: 3, Skipped: 0
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
Please refer to /builddir/build/BUILD/apache-rat-0.8-20100827/apache-rat-plugin/target/surefire-reports for the individual test results.

I've attached the surefire-reports output.

Comment 13 Stanislav Ochotnicky 2010-12-23 12:35:22 UTC
Ah, sorry that was supposed to be -Dmaven.test.failure.ignore=true. 

About those failures...They could be caused by new/old plexus-container-default. Quick look didn't give me much more info. Feel free to ignore the failures, IMO they shouldn't cause trouble in runtime. It's most probably due to our use of local repo and other things...

Comment 14 Orion Poplawski 2010-12-28 18:06:00 UTC
* Mon Dec 27 2010 Orion Poplawski <orion.com> 0.8-0.5.20100827
- Drop maven settings patch
- Add svn revision to export command
- Set maven.test.failure.ignore=true instead of maven.test.skip
- Use %%{_mavenpomdir}

http://www.cora.nwra.com/~orion/fedora/apache-rat.spec
http://www.cora.nwra.com/~orion/fedora/apache-rat-0.8-0.5.20100827.fc14.src.rpm

Comment 15 Stanislav Ochotnicky 2011-01-06 14:17:14 UTC
So...Few more things:
 * rm -rf $RPM_BUILD_ROOT in %install is not needed
 * you shouldn't install BUILD.txt
 * you probably didn't see my note about useless Requires where:

apache-rat-core -> apache-rat -> jpackage utils
                -> jpackage-utils

the requires on jpackage-utils in core is not needed because it is pulled in by main package. Similar other requires like this are in the spec. It's not exactly a packaging problem, but makes the spec file bigger without any reason (that I can see). If you have a reason for this, please explain. 

All in all the package is good now, but I'll wait for new version/response before accepting...

Comment 16 Alexander Kurtakov 2011-03-03 16:00:26 UTC
Orion, ping?

Comment 17 Orion Poplawski 2011-03-03 16:17:13 UTC
Sorry, been busy.

* Thu Mar 3 2011 Orion Poplawski <orion.com> 0.8-0.6.20100827
- Drop unneeded rm from %%install
- Don't ship BUILD.txt
- Cleanup Requires

http://www.cora.nwra.com/~orion/fedora/apache-rat.spec
http://www.cora.nwra.com/~orion/fedora/apache-rat-0.8-0.6.20100827.fc14.src.rpm

Comment 18 Stanislav Ochotnicky 2011-03-11 07:59:50 UTC
OK, Package is good. Sorry for the delay, I didn't notice nagmails :-/

Comment 19 Alexander Kurtakov 2011-03-11 14:44:50 UTC
Dropping FE-JAVASIG block. Nothing that depends on the Java SIG anymore.

Comment 20 Orion Poplawski 2011-03-11 15:11:24 UTC
New Package SCM Request
=======================
Package Name: apache-rat
Short Description: Apache Release Audit Tool (RAT)
Owners: orion
Branches: f15 el6
InitialCC: 

Thanks everyone.

Comment 21 Jason Tibbitts 2011-03-11 19:28:36 UTC
Git done (by process-git-requests).

Comment 22 Orion Poplawski 2011-03-11 20:28:02 UTC
Imported and built.


Note You need to log in before you can comment on or make changes to this bug.