Bug 727670

Summary: Review Request: simplevalidation - A simple library for retrofitting user-interface input validation to Swing applications
Product: [Fedora] Fedora Reporter: Omair Majid <omajid>
Component: Package ReviewAssignee: Alexander Kurtakov <akurtako>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: akurtako, jon.vanalten, notting, package-review
Target Milestone: ---Flags: akurtako: fedora-review+
gwync: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-07 21:05:34 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 Omair Majid 2011-08-02 19:53:51 UTC
Spec URL: http://omajid.fedorapeople.org/simplevalidation/simplevalidation.spec
SRPM URL: http://omajid.fedorapeople.org/simplevalidation/simplevalidation-0.4-1.fc15.src.rpm

Description: 
This is a simple library for quickly adding validation code to Swing user-interfaces. It handles validating user input when the user changes a component's value, showing error messages and decorating components to indicate which component is the source of the problem. It contains a large number of built-in validators to handle most common situations, such as validating numbers, email addresses, urls and so forth.

The primary goal is to make it easy to retrofit validation code on existing UIs without needing to rewrite anything or add more than a few lines of code.

Scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=3247686

This package is needed for the netbeans ide.

Comment 1 Jon VanAlten 2011-09-26 18:49:48 UTC
Hi,
I'm just learning fedora package review stuff.  Please consider this an *informal* review.  I based this on a couple reviews I found for other packages.

Package Review
==============

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

=== REQUIRED ITEMS ===
[x]  Rpmlint output:

simplevalidation.spec:14: W: mixed-use-of-spaces-and-tabs (spaces: line 14, tab: line 1)

Not an actual problem, but would be nice to be consistent.

simplevalidation.spec: W: invalid-url Source0: http://kenai.com/project /simplevalidation/downloads/download/validation-src.zip HTTP Error 404: Not Found
0 packages and 1 specfiles checked; 0 errors, 2 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: GPLv2 or CDDL. Thank you for using the correct separator for this dual-licensed software. Please attempt to contact upstream to have separate licence file included.
[-]  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.
[-]  All independent sub-packages have license of their own
[x]  Spec file is legible and written in American English.
[x]  Sources used to build the package matches the upstream source, as provided
in the spec URL.
MD5SUM this package    : 1ecbbc482003d92263c507668b5d04ec
MD5SUM upstream package: 1ecbbc482003d92263c507668b5d04ec
[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.
[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)
[!]  Package consistently uses macros (no %{buildroot} and $RPM_BUILD_ROOT
mixing)

Some use of $foo (variables) and some %{bar} macros, please pick one.
(see http://fedoraproject.org/wiki/Packaging/Guidelines#Using_.25.7Bbuildroot.7D_and_.25.7Boptflags.7D_vs_.24RPM_BUILD_ROOT_and_.24RPM_OPT_FLAGS)

(NB: It's not entirely clear to me whether this is meant to apply to all use of variables/macros, or *just* the specific variables noted on the wiki.  If it is just aimed at those specific variables, feel free to ignore this)

[x]  Package contains code, or permissable content.
[-]  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
[x]  If package uses tarball from VCS include comment how to re-create that
tarball (svn export URL, git clone URL, ...)
[x]  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)
[-]  If package contains pom.xml files install it (including depmaps) even when
building with ant
[-]  pom files has correct add_to_maven_depmap call which resolves to the pom
file (use "JPP." and "JPP-" correctly)

=== Other suggestions ===
[x]  If possible use upstream build method (maven/ant/javac)
[x]  Avoid having BuildRequires on exact NVR unless necessary
[!]  Package has BuildArch: noarch (if possible)

This is pure java, no native code?  Unless there is reason to produce arch-specific packages, please specify noarch.

[x]  Latest version is packaged.
Tested on: fedora-15-x86_64

=== Final Notes, AKA Questions from the Noob ===
I notice in the files section, you use a wildcard even though there is only the single jarfile belonging to the package.  I can't find any guidelines about this, but it seems to me that what the specfile is doing here would be more clear if the file was specified, much as it is in the install section.  Is there some guideline I have missed?

One more nit: Extra newline amidst BuildRequires lines should probably be removed.


Hope this is helpful!

Comment 2 Omair Majid 2011-09-26 20:30:41 UTC
(In reply to comment #1)
> Hi,
> I'm just learning fedora package review stuff.  Please consider this an
> *informal* review.  I based this on a couple reviews I found for other
> packages.

Thanks; your review is appreciated!

> simplevalidation.spec:14: W: mixed-use-of-spaces-and-tabs (spaces: line 14,
> tab: line 1)
> 
> Not an actual problem, but would be nice to be consistent.
> 

Fixed.

> simplevalidation.spec: W: invalid-url Source0: http://kenai.com/project
> /simplevalidation/downloads/download/validation-src.zip HTTP Error 404: Not
> Found

I am not sure why this error is happening - the url works for me.

> [!]  Package consistently uses macros (no %{buildroot} and $RPM_BUILD_ROOT
> mixing)
> 
> Some use of $foo (variables) and some %{bar} macros, please pick one.
> (see
> http://fedoraproject.org/wiki/Packaging/Guidelines#Using_.25.7Bbuildroot.7D_and_.25.7Boptflags.7D_vs_.24RPM_BUILD_ROOT_and_.24RPM_OPT_FLAGS)
> 
> (NB: It's not entirely clear to me whether this is meant to apply to all use of
> variables/macros, or *just* the specific variables noted on the wiki.  If it is
> just aimed at those specific variables, feel free to ignore this)
> 

From what I understand, it is only for %{buildroot} vs RPM_BUILD_ROOT and %{optflags} vs $RPM_OPT_FLAGS, not for general variables. But I have "fixed" it anyway.

> [!]  Package has BuildArch: noarch (if possible)
> 
> This is pure java, no native code?  Unless there is reason to produce
> arch-specific packages, please specify noarch.
> 

Whoops. My mistake. Fixed now.

> === Final Notes, AKA Questions from the Noob ===
> I notice in the files section, you use a wildcard even though there is only the
> single jarfile belonging to the package.  I can't find any guidelines about
> this, but it seems to me that what the specfile is doing here would be more
> clear if the file was specified, much as it is in the install section.  Is
> there some guideline I have missed?
> 

No, I am not aware of any such guideline. I don't think it makes too much of a difference either way. * may be a little more future-proof in case the jar gets renamed. But I have made the name explicit now.

> One more nit: Extra newline amidst BuildRequires lines should probably be
> removed.
> 

Actually, I would rather keep this. It separates the packages required by the java packaging policy (jpackage-utils and java-devel) from the actual build-dependencies.

> Hope this is helpful!

It is. Thanks.

Updated files:
Spec URL: http://omajid.fedorapeople.org/simplevalidation/simplevalidation.spec
SRPM URL:
http://omajid.fedorapeople.org/simplevalidation/simplevalidation-0.4-1.fc15.src.rpm

Comment 3 Alexander Kurtakov 2011-09-27 09:56:37 UTC
Jon,
When you start a review you should change its status to assigned and the fedora-cvs flag to ?. Once you think the package is good to go you should set the fedora-cvs flag to + .

Comment 4 Jon VanAlten 2011-09-27 21:29:35 UTC
Thanks Alex,
I can (and have, I believe) assigned to myself, but since I have not yet been sponsored to the packagers group I cannot change the fedora-cvs flag.

FWIW, I *do* think the package is good to go with the update posted above, assuming Omair has tested the revised spec.

Comment 5 Alexander Kurtakov 2011-10-02 09:53:34 UTC
Thanks Jon,
I'll do the formal review myself. Thanks for the prereview.
Btw, you should submit a package yourself so we can get you sponsored.

Comment 6 Alexander Kurtakov 2011-10-02 10:12:58 UTC
Package Review
==============

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

=== REQUIRED ITEMS ===
[!]  Rpmlint output:
simplevalidation-javadoc.noarch: W: spelling-error Summary(en_US) Javadocs -> Java docs, Java-docs, Avocados
simplevalidation-javadoc.noarch: W: wrong-file-end-of-line-encoding /usr/share/javadoc/simplevalidation/javadoc/package-list
simplevalidation-javadoc.noarch: W: wrong-file-end-of-line-encoding /usr/share/javadoc/simplevalidation/javadoc/stylesheet.css
simplevalidation.noarch: E: summary-too-long C A simple library for retrofitting user-interface input validation to Swing applications
simplevalidation.noarch: W: spelling-error %description -l en_US validators -> liquidators
simplevalidation.noarch: W: spelling-error %description -l en_US urls -> curls, purls, hurls
simplevalidation.noarch: W: incoherent-version-in-changelog 0.4.1 ['0.4-1.fc15', '0.4-1']
Simple to fix, don't care for the spelling errors.
simplevalidation.noarch: W: no-documentation
Not a real problem as the package is not providing any documentation but please remove the empty doc macro in the files section.
[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: GPLv2 or CDDL
[-]  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.
[-]  All independent sub-packages have license of their own
[x]  Spec file is legible and written in American English.
[x]  Sources used to build the package matches the upstream source, as provided in the spec URL.
MD5SUM this package    :1ecbbc482003d92263c507668b5d04ec
MD5SUM upstream package:1ecbbc482003d92263c507668b5d04ec
[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.
[x]  Package does not contain duplicates in %files.
[x]  File sections do not contain %defattr(-,root,root,-) unless changed with good reason
[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.
[-]  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, ...)
[x]  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)
[-]  If package contains pom.xml files install it (including depmaps) even when building with ant
[-]  pom files has correct add_maven_depmap

=== 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.


=== Issues ===
1. Please fix the rpmlint warnings/errors.

Jon: when you do a review you're supposed to run rpmlint on the binary rpms too not only on the spec file.

Comment 7 Omair Majid 2011-10-03 16:01:56 UTC
Spec URL: http://omajid.fedorapeople.org/simplevalidation/simplevalidation.spec
SRPM URL:
http://omajid.fedorapeople.org/simplevalidation/simplevalidation-0.4-1.fc15.src.rpm

(In reply to comment #6)
> simplevalidation-javadoc.noarch: W: wrong-file-end-of-line-encoding
> /usr/share/javadoc/simplevalidation/javadoc/package-list
> simplevalidation-javadoc.noarch: W: wrong-file-end-of-line-encoding
> /usr/share/javadoc/simplevalidation/javadoc/stylesheet.css

Fixed.

> simplevalidation.noarch: E: summary-too-long C A simple library for
> retrofitting user-interface input validation to Swing applications

Fixed.

> simplevalidation.noarch: W: incoherent-version-in-changelog 0.4.1
> ['0.4-1.fc15', '0.4-1']

Fixed.

> simplevalidation.noarch: W: no-documentation
> Not a real problem as the package is not providing any documentation but please
> remove the empty doc macro in the files section.

I found a docs dir that contained some documentation; I have added it to %docs.

> === Issues ===
> 1. Please fix the rpmlint warnings/errors.
> 

Done.

Comment 8 Alexander Kurtakov 2011-10-05 19:44:24 UTC
APPROVED

Comment 9 Omair Majid 2011-10-05 20:08:43 UTC
New Package SCM Request
=======================
Package Name: simplevalidation
Short Description: A library for adding user-interface input validation to Swing applications
Owners: omajid
Branches: 
InitialCC:

Comment 10 Gwyn Ciesla 2011-10-05 20:09:55 UTC
Git done (by process-git-requests).

Comment 11 Omair Majid 2011-10-07 21:05:34 UTC
Built for rawhide: http://koji.fedoraproject.org/koji/buildinfo?buildID=267437

Thanks for the reviews!