Bug 712203

Summary: Review Request: eclipse-mercurial - Mercurial plugin for Eclipse
Product: [Fedora] Fedora Reporter: minoo ziaei <mziaei>
Component: Package ReviewAssignee: Andrew Overholt <overholt>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: akurtako, andjrobins, fedora-package-review, mziaei, notting, overholt, sgehwolf
Target Milestone: ---Flags: overholt: 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-06-27 14:19:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description minoo ziaei 2011-06-09 19:14:53 UTC
Spec URL:  http://mziaei1.fedorapeople.org/eclipse-mercurial/eclipse-mercurial.spec

SRPM URL: http://mziaei1.fedorapeople.org/eclipse-mercurial/eclipse-mercurial-1.8.1-1.fc15.src.rpm

Description: The eclipse-mercurial package contains 
Eclipse plugins to interact with Mercurial Repositories.

Hi, I would appreciate a review for this package.

Comment 1 Andrew Overholt 2011-06-09 20:43:28 UTC
I can look at this tomorrow, but first up, drop "The eclipse-mercurial package contains " from the description.

Comment 2 minoo ziaei 2011-06-09 21:08:26 UTC
Thanks for reviewing it. 

I removed it from the .spec file.

Comment 3 Alexander Kurtakov 2011-06-10 05:59:57 UTC
There are some unneeded things in the spec that can be removed because rpmbuild handles them implicitly:
* BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
* rm -rf %{buildroot} from install section
* %defattr(-,root,root,-) from files section

This is not a review just a quick look at the spec file.

Comment 4 minoo ziaei 2011-06-10 13:54:25 UTC
(In reply to comment #3)
Removed those lines too.

Comment 5 Andrew Overholt 2011-06-10 15:31:02 UTC
Thanks, this submission looks pretty good!  Below is the review.  The items with an [!] need attention.  Also see a few notes at the bottom.

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

=== REQUIRED ITEMS ===
[!]  Rpmlint output:
rpmlint gives a few warnings which can be fixed by adding -q to %setup.  The other two are okay to ignore since you say how to reproduce the source in the .spec.

$ rpmlint /home/overholt/rpmbuild/SRPMS/eclipse-mercurial-1.8.1-1.fc15.src.rpm 
eclipse-mercurial.src:33: W: setup-not-quiet
eclipse-mercurial.src:34: W: setup-not-quiet
eclipse-mercurial.src: W: invalid-url Source1: com.vectrace.mercurialeclipse-feature.tar.bz2
eclipse-mercurial.src: W: invalid-url Source0: eclipse-mercurial-1.8.1.tar.bz2
1 packages and 0 specfiles checked; 0 errors, 4 warnings.

rpmlint also gives an error on the resulting binary package.  This should be fixed in your source .tar.bz2 for the feature.

$ rpmlint /home/overholt/rpmbuild/RPMS/noarch/eclipse-mercurial-1.8.1-1.fc15.noarch.rpm
eclipse-mercurial.noarch: E: non-standard-dir-perm /usr/share/eclipse/dropins/mercurial/eclipse/features/com.vectrace.mercurialeclipse_0.1.1 0775L
1 packages and 0 specfiles checked; 1 errors, 0 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:  EPL
[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
[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:  59de59ca556b2bb93dfc11df62b088d9
MD5SUM upstream package (what I generated):  1370eba31ae047b7657c70b6ee04b905
- these don't match but a recursive diff on the content doesn't show any differences so I'm okay with this
[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
[!]  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.
[-]  Javadoc documentation files are generated and included in -javadoc subpackage
[-]  Javadocs are placed in %{_javadocdir}/%{name} (no -%{version} symlinks)
[-]  Packages have proper BuildRequires/Requires on jpackage-utils
[-]  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.

=== Final Notes ===
1.  Don't forget to bump the Release in your .spec with each change you make (and add a %changelog comment each time).  Also, please post URLs to the new .spec and .src.rpm each time.
2.  Lines are <= 80 character except for the unzip line in %install; please fix
3. Please make the qualifier match the upstream one:  v201104191217.  Look into a few other Eclipse plugin .spec files to see how this is done (-DforceContextQualifier=).
4. I see a feature in the upstream p2 repository:  mercurialeclipse.feature.group=1.8.1.v201104191217.  Can you ask them if they'd like to distribute such a feature?
5. As for the feature you've created, it's fine but I'd like to see a comment in the .spec about how you generated it, why it's  necessary, etc.  Just for future maintainability.

Comment 6 Severin Gehwolf 2011-06-10 19:51:09 UTC
Adding Andrew, so he can learn a few things as comments fly by :)

Comment 7 minoo ziaei 2011-06-14 15:48:48 UTC
(In reply to comment #5)

> [!]  Rpmlint output:
> $ rpmlint /home/overholt/rpmbuild/SRPMS/eclipse-mercurial-1.8.1-1.fc15.src.rpm 
> eclipse-mercurial.src:33: W: setup-not-quiet
> eclipse-mercurial.src:34: W: setup-not-quiet
Fixed

> rpmlint also gives an error on the resulting binary package.  This should be
> fixed in your source .tar.bz2 for the feature.
> 
> $ rpmlint
> /home/overholt/rpmbuild/RPMS/noarch/eclipse-mercurial-1.8.1-1.fc15.noarch.rpm
> eclipse-mercurial.noarch: E: non-standard-dir-perm
> /usr/share/eclipse/dropins/mercurial/eclipse/features/com.vectrace.mercurialeclipse_0.1.1
I'm not actually getting this error. Maybe I changed something else that affected this error as well. Could you please double check?

> [!]  Permissions on files are set properly.
Is it related to what causes rpmlint error? Or I'm missing something here?

> === Final Notes ===
> 1.  Don't forget to bump the Release in your .spec with each change you make
> (and add a %changelog comment each time). 
> 2.  Lines are <= 80 character except for the unzip line in %install; 
> 3. Please make the qualifier match the upstream one:  v201104191217.
> 5. As for the feature you've created, it's fine but I'd like to see a comment
> in the .spec about how you generated it, why it's  necessary, etc.
Fixed

> 4. I see a feature in the upstream p2 repository: 
> mercurialeclipse.feature.group=1.8.1.v201104191217.  Can you ask them if they'd like to distribute such a feature?
Will do. Was just wondering did you find this feature.group in eclipse-marketplace or javaforge? 

Here are the updated versions:
Spec URL: 
http://mziaei1.fedorapeople.org/eclipse-mercurial/eclipse-mercurial.spec

SRPM URL:
http://mziaei1.fedorapeople.org/eclipse-mercurial/eclipse-mercurial-1.8.1-2.fc15.src.rpm

Thanks!

Comment 8 Andrew Overholt 2011-06-14 17:25:23 UTC
(In reply to comment #7)
> (In reply to comment #5)
> > $ rpmlint
> > /home/overholt/rpmbuild/RPMS/noarch/eclipse-mercurial-1.8.1-1.fc15.noarch.rpm
> > eclipse-mercurial.noarch: E: non-standard-dir-perm
> >
> /usr/share/eclipse/dropins/mercurial/eclipse/features/com.vectrace.mercurialeclipse_0.1.1
> I'm not actually getting this error. Maybe I changed something else that
> affected this error as well. Could you please double check?

Weird, it must be something on my machine.  Forget it :)

> > [!]  Permissions on files are set properly.
> Is it related to what causes rpmlint error? Or I'm missing something here?

Yes, just the rpmlint error.

> > 4. I see a feature in the upstream p2 repository:
> > mercurialeclipse.feature.group=1.8.1.v201104191217.  Can you ask them if
> they'd like to distribute such a feature?
> Will do.

On second thought, I think this is generated at build time and Fedora's pdebuild.sh is not capable of doing this.  Instead, host a tarball of your feature at your fedorapeople page and make Source1 a fully-qualified URL to it.

> Was just wondering did you find this feature.group in
> eclipse-marketplace or javaforge?

I got it from the output of this:

eclipse -consolelog -nosplash -application org.eclipse.equinox.p2.director -repository http://cbes.javaforge.com/update -list

Comment 9 minoo ziaei 2011-06-14 17:45:10 UTC
(In reply to comment #8)

> 
> On second thought, I think this is generated at build time and Fedora's
> pdebuild.sh is not capable of doing this.  Instead, host a tarball of your
> feature at your fedorapeople page and make Source1 a fully-qualified URL to it.
> 
Done

Here are the updated versions:
Spec URL: 
http://mziaei1.fedorapeople.org/eclipse-mercurial/eclipse-mercurial.spec

SRPM URL:
http://mziaei1.fedorapeople.org/eclipse-mercurial/eclipse-mercurial-1.8.1-3.fc15.src.rpm

Thanks!

Comment 10 Andrew Overholt 2011-06-14 19:17:55 UTC
Thanks, everything looks good.  There's just one final issue:  your feature doesn't have all necessary files in its build.properties.  I think  you should have feature.properties and also a copy of epl-v10.html and license.html.  Look at one of the Mylyn features for an example (minus p2.inf).

$ ls /usr/share/eclipse/dropins/mylyn/eclipse/features/org.eclipse.mylyn_feature_3.5.1.v20110422-0200/
epl-v10.html  feature.properties  feature.xml  license.html  p2.inf

Comment 11 minoo ziaei 2011-06-16 18:21:46 UTC
(In reply to comment #10)

> /usr/share/eclipse/dropins/mylyn/eclipse/features/org.eclipse.mylyn_feature_3.5.1.v20110422-0200/
> epl-v10.html  feature.properties  feature.xml  license.html  p2.inf

Files were added. 
Just one question about license.html. There is an existing license file in upstream. You can find it here:
http://mziaei1.fedorapeople.org/LICENSE
Is this file enough for the %doc in .spec file or should I add the usual license.html (which you mentioned in the feature) to the plugin feature and the .spec file as well?

Thanks,
Here are the update files:
Spec URL: 
http://mziaei1.fedorapeople.org/eclipse-mercurial/eclipse-mercurial.spec

SRPM URL:
http://mziaei1.fedorapeople.org/eclipse-mercurial/eclipse-mercurial-1.8.1-4.fc15.src.rpm

Comment 12 Andrew Overholt 2011-06-16 19:18:28 UTC
Sorry, Minoo, I shouldn't have suggested you ship a copy of the EPL in your feature.  Referencing the LICENSE as it's included in the plugin is the correct thing to do.  You can get rid of this line:  %doc com.vectrace.mercurialeclipse-feature/epl-v10.html and drop that file from your feature.  It also might be a good idea to add a version to the tarball of your feature.  Something like com.vectrace.mercurialeclipse-feature-0.0.1.tar.bz2 might be good (make the version equal what's in your feature.xml).

Otherwise, we're good to go.

Comment 13 minoo ziaei 2011-06-16 20:08:16 UTC
(In reply to comment #12)
> It also might be a good idea to add a version to the tarball of your
> feature.  Something like com.vectrace.mercurialeclipse-feature-0.0.1.tar.bz2
> might be good (make the version equal what's in your feature.xml).

Removed the EPL.
I've changed the feature version to the same of the upstream version(1.8.1), is that fine?

Thanks,

Update files:
Spec URL: 
http://mziaei1.fedorapeople.org/eclipse-mercurial/eclipse-mercurial.spec

SRPM URL:
http://mziaei1.fedorapeople.org/eclipse-mercurial/eclipse-mercurial-1.8.1-5.fc15.src.rpm

Comment 14 Andrew Overholt 2011-06-16 20:44:55 UTC
Yes, 1.8.1 is fine.

APPROVED

You can request the git repo now.  I'll sponsor you ... I forget exactly what needs to happen now in this situation.

Comment 15 minoo ziaei 2011-06-16 21:13:46 UTC
New Package SCM Request
=======================
Package Name: eclipse-mercurial
Short Description: Eclipse Interaction with Mercurial Repositories
Owners: mziaei1 overholt
Branches: f15
InitialCC: overholt jerboaa

Comment 16 Andrew Overholt 2011-06-17 18:09:17 UTC
I've sponsored Minoo.

Comment 17 Gwyn Ciesla 2011-06-21 16:56:32 UTC
Git done (by process-git-requests).

Comment 18 Andrew Overholt 2011-06-21 17:04:43 UTC
That was very fast, Jon; thanks!

Minoo, please go ahead and get your package committed.

Comment 19 minoo ziaei 2011-06-21 17:14:12 UTC
Thanks..

So, here is the discussion with maintainers of Mercurial-Eclipse plug-in regarding the distribution of their feature project:
http://www.javaforge.com/issue/17846?orgDitchnetTabPaneId=task-details-comments

At the moment we change their upstream feature version(1.9.0) cloned from their update site: http://www.javaforge.com/issue/17846?orgDitchnetTabPaneId=task-details-comments
to the release we are using: 1.8.1.
Seems like they are interested in adding the feature project to their upstream repository, though. 

The update files:
Spec URL: 
http://mziaei1.fedorapeople.org/eclipse-mercurial/eclipse-mercurial.spec

SRPM URL:
http://mziaei1.fedorapeople.org/eclipse-mercurial/eclipse-mercurial-1.8.1-6.fc15.src.rpm

Comment 20 Andrew Overholt 2011-06-21 20:50:59 UTC
This seems fine, Minoo.  Please check in what you have and then you can update it when upstream adds their feature to their hg repository.  Thanks!