Bug 873738

Summary: Review Request: sequence-library - Textual diff and merge library
Product: [Fedora] Fedora Reporter: Ismael Olea <ismael>
Component: Package ReviewAssignee: Mikolaj Izdebski <mizdebsk>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: mizdebsk, notting, package-review
Target Milestone: ---Flags: mizdebsk: 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: 2012-11-15 21:20:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 873748, 877403    

Description Ismael Olea 2012-11-06 15:45:27 UTC
Spec URL: sequence-library.spec
SRPM URL: http://olea.org/tmp/omegat-fedora-feature/sequence-library-1.0.2.20121003svn-2.fc17.src.rpm
Description: A textual diff and merge library.
Fedora Account System Username: olea


This library is required by svnkit-1.7.5 (which is neeed to be updated for last OmegaT release)

Comment 1 Ismael Olea 2012-11-06 15:46:48 UTC
Spec URL: http://olea.org/tmp/omegat-fedora-feature/sequence-library.spec
SRPM URL: http://olea.org/tmp/omegat-fedora-feature/sequence-library-1.0.2.20121003svn-2.fc17.src.rpm
Description: A textual diff and merge library.
Fedora Account System Username: olea


This library is required by svnkit-1.7.5 (which is neeed to be updated for last OmegaT release)

(sorry!)

Comment 2 Mikolaj Izdebski 2012-11-06 16:57:58 UTC
I didn't do a full review, just took a quick look at the spec file. There are a few problems, that should be enough for now.

1. Pre-release packages should have the .svnXXX suffix in Release field, not in Version. They should be "Version: 1.0.2" and "Release: 0.1.svn20121003".
See: http://fedoraproject.org/wiki/Packaging:NamingGuidelines#Pre-Release_packages

2. License tag is wrong. Should be "License: Sequence"
See: http://lists.fedoraproject.org/pipermail/legal/2012-November/002003.html

3. Javadoc package should not require the main package.

4. According this comment:
> # I really don't understand why _mavendepmapdir doesn't work as expected:
> #%{_mavendepmapdir}
It should be %{_mavendepmapfragdir}

5. License file should be installed with javadoc package too.

6. %update_maven_depmap is unneeded. %post and %postun scriplets should be removed (along with corresponding Requires).

7. Jar file should be installed unversioned, i.e. %{_javadir}/%{name}.jar. Symlink should not be installed.

8. Uhe URL tag is supposed to be used by users, so it should contain address of a home website, not SVN repo.

9. Packages should use upstream build method. Upstream uses gradle. Is there any reason to use ant with custom build.xml instead?

10. There is "BuildRequires: jpackage-utils >= 0:1.6". Fedora ships version 1.6 (or later) since 2004-12-01. IMO there is no reason for versioned requires in this case.

Comment 3 Mikolaj Izdebski 2012-11-06 17:07:57 UTC
(In reply to comment #2)
> 1. Pre-release packages should have the .svnXXX suffix in Release field, not
> in Version. They should be "Version: 1.0.2" and "Release: 0.1.svn20121003".
In case this is not pre-release package the svn part should be omited, so "Version: 1.0.2" and "Release: 1".

Also to note:
> %add_maven_depmap JPP-%{name}.pom %{name}.jar
is equivalent to:
> %add_maven_depmap
without any arguments. I would use the second one.

Comment 4 Ismael Olea 2012-11-08 07:26:51 UTC
(In reply to comment #2)

> 1. Pre-release packages should have the .svnXXX suffix in Release field, not
> in Version. They should be "Version: 1.0.2" and "Release: 0.1.svn20121003".
> See:
> http://fedoraproject.org/wiki/Packaging:NamingGuidelines#Pre-Release_packages

Fixed. I can't believe I did it so wrong.
 
> 2. License tag is wrong. Should be "License: Sequence"
> See: http://lists.fedoraproject.org/pipermail/legal/2012-November/002003.html

Fixed.

> 3. Javadoc package should not require the main package.

Fixed.
 
> 4. According this comment:
> > # I really don't understand why _mavendepmapdir doesn't work as expected:
> > #%{_mavendepmapdir}
> It should be %{_mavendepmapfragdir}

Seems I've been using outdated macros. Fixed.

> 5. License file should be installed with javadoc package too.

Fixed.
 
> 6. %update_maven_depmap is unneeded. %post and %postun scriplets should be
> removed (along with corresponding Requires).

Fixed.

> 7. Jar file should be installed unversioned, i.e. %{_javadir}/%{name}.jar.
> Symlink should not be installed.

> 8. Uhe URL tag is supposed to be used by users, so it should contain address
> of a home website, not SVN repo.

At the moment it's the more similar thing to a home website available.

> 9. Packages should use upstream build method. Upstream uses gradle. Is there
> any reason to use ant with custom build.xml instead?

I understood gradle building does not fit with Fedora:
https://lists.fedoraproject.org/pipermail/java-devel/2012-September/004540.html so I used the same approach here.

> 10. There is "BuildRequires: jpackage-utils >= 0:1.6". Fedora ships version
> 1.6 (or later) since 2004-12-01. IMO there is no reason for versioned
> requires in this case.

Fixed.

Comment 5 Ismael Olea 2012-11-08 07:31:31 UTC
(In reply to comment #3)

> In case this is not pre-release package the svn part should be omited, so
> "Version: 1.0.2" and "Release: 1".

This is the case. Fixed.

> Also to note:
> > %add_maven_depmap JPP-%{name}.pom %{name}.jar
> is equivalent to:
> > %add_maven_depmap
> without any arguments. I would use the second one.

Fixed too.


Uploading to:

Spec URL: http://olea.org/tmp/omegat-fedora-feature/sequence-library.spec
SRPM URL: http://olea.org/tmp/omegat-fedora-feature/sequence-library-1.0.2-1.fc17.src.rpm

Comment 6 Mikolaj Izdebski 2012-11-08 11:36:40 UTC
> > 4. According this comment:
> > > # I really don't understand why _mavendepmapdir doesn't work as expected:
> > > #%{_mavendepmapdir}
> > It should be %{_mavendepmapfragdir}
> 
> Seems I've been using outdated macros. Fixed.

Not exactly what I meant. "%{_mavendepmapfragdir}" is the same as "%{_datadir}/maven-fragments", so you should replace:
> %{_mavendepmapfragdir}
> %{_datadir}/maven-fragments/%{name}
with
> %{_mavendepmapfragdir}/%{name}


> I understood gradle building does not fit with Fedora:
> https://lists.fedoraproject.org/pipermail/java-devel/2012-September/004540.
> html so I used the same approach here.

Right, that's fine then. For some reason I thought gradle had "offline mode", suitable to use in Fedora, seems not.

I'll submit a full review a bit later today.

Comment 7 Mikolaj Izdebski 2012-11-09 12:22:08 UTC
Package Review
==============

Key:
[x] = Pass
[!] = Fail
[-] = Not applicable
[?] = Not evaluated


Issues:
=======
[!]: Requires correct, justified where necessary.
     Missing Requires: java

[!]: Packages have proper BuildRequires/Requires on jpackage-utils
     There is missing Requires: jpackage-utils
See: https://fedoraproject.org/wiki/Packaging:Java

[!]: Package does not contain duplicates in %files.
     File listed twice: /usr/share/maven-fragments/sequence-library
See: http://fedoraproject.org/wiki/Packaging/Guidelines#DuplicateFiles

[!]: Javadoc subpackages have Requires: jpackage-utils
See: https://fedoraproject.org/wiki/Packaging:Java

[!]: Package requires other packages for directories it uses.
     Missing Requires: jpackage-utils

===== 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]: Package successfully compiles and builds into binary rpms on at least one
     supported primary architecture.
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: All build dependencies are listed in BuildRequires, except for any that
     are listed in the exceptions section of Packaging Guidelines.
[x]: Package contains no bundled libraries.
[x]: Changelog in prescribed format.
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Sources contain only permissible code or content.
[x]: Each %files section contains %defattr if rpm < 4.4
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[!]: Package requires other packages for directories it uses.
[x]: Package uses nothing in %doc for runtime.
[x]: Package is not known to require ExcludeArch.
[!]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Fully versioned dependency in subpackages, if present.
[x]: Package complies to the Packaging Guidelines
[x]: Spec file lacks Packager, Vendor, PreReq tags.
[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]: License field in the package spec file matches the actual license.
[x]: License file installed when any subpackage combination is installed.
[x]: Package consistently uses macro is (instead of hard-coded directory
     names).
[x]: Package is named using only allowed ASCII characters.
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package do not use a name that already exist
[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]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package installs properly.
[x]: Package is not relocatable.
[!]: Requires correct, justified where necessary.
[x]: CheckResultdir
[x]: Rpmlint is run on all rpms the build produces.
[x]: Sources used to build the package match the upstream source, as provided
     in the spec URL.
[x]: Spec file is legible and written in American English.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: Package contains systemd file(s) if in need.
[x]: File names are valid UTF-8.
[x]: Large documentation must go in a -doc subpackage.
[x]: Packages must not store files under /srv, /opt or /usr/local

Java:
[!]: Packages have proper BuildRequires/Requires on jpackage-utils
[x]: Fully versioned dependency in subpackages, if present.
[x]: Javadoc documentation files are generated and included in -javadoc
     subpackage
[!]: Javadoc subpackages have Requires: jpackage-utils
[x]: Javadocs are placed in %{_javadocdir}/%{name} (no -%{version} symlink)
[x]: Bundled jar/class files should be removed before build

Maven:
[x]: Pom files have correct add_maven_depmap call
[x]: Old add_to_maven_depmap macro is not being used
[x]: Packages DOES NOT have Requires(post) and Requires(postun) on jpackage-
     utils for %update_maven_depmap macro
[x]: If package contains pom.xml files install it (including depmaps) even
     when building with ant
[x]: Package DOES NOT use %update_maven_depmap in %post/%postun
[x]: Packages use %{_mavenpomdir} instead of %{_datadir}/maven2/poms

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

Generic:
[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]: 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]: Dist tag is present.
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Final provides and requires are sane (rpm -q --provides and rpm -q
     --requires).
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: The placement of pkgconfig(.pc) files are correct.
[x]: SourceX tarball generation or download is documented.
[x]: SourceX / PatchY prefixed with %{name}.
[x]: SourceX is a working URL.
[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.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed files.
[x]: Spec use %global instead of %define.

Java:
[x]: Package has BuildArch: noarch (if possible)
[!]: Package uses upstream build method (ant/maven/etc.)

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
[x]: Spec file according to URL is the same as in SRPM.
[x]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.


Rpmlint
-------
Checking: sequence-library-javadoc-1.0.2-1.fc19.noarch.rpm
          sequence-library-1.0.2-1.fc19.noarch.rpm
          sequence-library-1.0.2-1.fc19.src.rpm
sequence-library-javadoc.noarch: W: spelling-error Summary(en_US) Javadocs -> Java docs, Java-docs, Avocados
sequence-library-javadoc.noarch: W: invalid-license Sequence
sequence-library.noarch: W: invalid-license Sequence
sequence-library.src: W: invalid-license Sequence
sequence-library.src:12: W: macro-in-comment %{name}
sequence-library.src:12: W: macro-in-comment %{version}
sequence-library.src:12: W: macro-in-comment %{name}
sequence-library.src:12: W: macro-in-comment %{version}
sequence-library.src: W: invalid-url Source0: sequence-library-1.0.2.tar.gz
3 packages and 0 specfiles checked; 0 errors, 9 warnings.

Comment 9 Mikolaj Izdebski 2012-11-09 22:28:23 UTC
The spec from comment #8 doesn't match the spec file from the SRPM.

Comment 10 Ismael Olea 2012-11-09 23:23:40 UTC
my fault.

Now both are online and checked.

Comment 11 Mikolaj Izdebski 2012-11-12 12:58:13 UTC
Approved.

Comment 12 Ismael Olea 2012-11-15 20:26:38 UTC
Thanks!

Comment 13 Ismael Olea 2012-11-15 20:28:19 UTC
New Package SCM Request
=======================
Package Name: sequence-library
Short Description: A textual diff and merge library
Owners: olea
Branches: 
InitialCC:

Comment 14 Gwyn Ciesla 2012-11-15 20:49:04 UTC
Git done (by process-git-requests).