Bug 1317592

Summary: Review Request: rubygem-websocket-extensions - Generic extension manager for WebSocket connections
Product: [Fedora] Fedora Reporter: Jun Aruga <jaruga>
Component: Package ReviewAssignee: Vít Ondruch <vondruch>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: package-review, vondruch
Target Milestone: ---Flags: vondruch: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-websocket-extensions-0.1.2-1.fc25 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-16 15:09:17 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 Jun Aruga 2016-03-14 15:48:50 UTC
Spec URL: http://people.redhat.com/jaruga/git/rubygem-websocket-extensions/rubygem-websocket-extensions.spec
SRPM URL: http://people.redhat.com/jaruga/git/rubygem-websocket-extensions/rubygem-websocket-extensions-0.1.2-1.fc25.src.rpm
Description: Generic extension manager for WebSocket connections
Fedora Account System Username: jaruga
Koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=13344975

Note:
- I prepared tests from upstream following below page.
  https://fedoraproject.org/wiki/Packaging:Ruby#Test_suites_not_included_in_the_package
  Source1 URL: http://people.redhat.com/jaruga/git/rubygem-websocket-extensions/rubygem-websocket-extensions-0.1.2-specs.tgz
  Though for the modification, the rpmlint warns about Source1, I think it is no problem.
  About the spec file Line 16, I wrote it without macro, because it looks easier to copy from Line 15 to Line16, when we will update the spec file in the future.

Thank you for the review.

Comment 1 Vít Ondruch 2016-03-14 17:04:08 UTC
I'll take it for a review.

Comment 2 Vít Ondruch 2016-03-15 11:46:47 UTC
Thx for the upstream query about the separate license file. Here is one minor nit:

* Test suite
  - If you are going to expand the test suite in %prep section, you should use
    %setup macro together with -a or -b parameter for that [1].
  - Nevertheless, the safer option is to expand the test suite in the %check
    section. This way you will avoid possible pollution of the rebuilt gem and
    the necessity to copy the test suite.
  - You don't really need to delete the test suite after execution, unless you
    insist on using rpmbuild directly (in that case, I can imagine it might
    cause some issues)


Otherwise the package looks sane => APPROVED

I am also going to sponsor you now, so please follow with the next steps [2]. But please consider fixing the issues I pointed out above prior importing the package into Fedora.



[1] http://www.rpm.org/max-rpm/s1-rpm-inside-macros.html
[2] https://fedoraproject.org/wiki/Join_the_package_collection_maintainers#Add_Package_to_Source_Code_Management_.28SCM.29_system_and_Set_Owner

Comment 3 Jun Aruga 2016-03-15 13:02:15 UTC
Thanks, Vit for the review.
I fixed the issued that you pointed out. [1]

Koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=13353927
I ran Koji again after that.

Do we need to update below page, because I referred the page?
https://fedoraproject.org/wiki/Packaging:Ruby#Test_suites_not_included_in_the_package

And thanks for your sponsor!! and will check next steps[2].


[1]
$ git diff 97f720687b588892ceb9e3d810711589c9468b58 rubygem-websocket-extensions.spec 
diff --git a/rubygem-websocket-extensions.spec b/rubygem-websocket-extensions.spec
index fabfade..f9c419c 100644
--- a/rubygem-websocket-extensions.spec
+++ b/rubygem-websocket-extensions.spec
@@ -40,8 +40,6 @@ gem unpack %{SOURCE0}
 
 gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
 
-tar -xzf %{SOURCE1}
-
 %build
 # Create the gem as gem install only works on a gem file
 gem build %{gem_name}.gemspec
@@ -60,10 +58,10 @@ cp -a .%{gem_dir}/* \
 
 # Run the test suite
 %check
+tar -xzf %{SOURCE1}
 cp -pr spec/ ./%{gem_instdir}
 pushd .%{gem_instdir}
 rspec spec
-rm -rf spec
 popd
 
 %files

Comment 4 Vít Ondruch 2016-03-15 15:14:29 UTC
(In reply to Jun Aruga from comment #3)
> Do we need to update below page, because I referred the page?
> https://fedoraproject.org/wiki/Packaging:
> Ruby#Test_suites_not_included_in_the_package

Ah, this is where it comes from. Not sure if that is worth of the effort but ...

>  # Run the test suite
>  %check
> +tar -xzf %{SOURCE1}
>  cp -pr spec/ ./%{gem_instdir}
>  pushd .%{gem_instdir}

If you moved the tar after the pushd, you could get rid of the "cp" line as well.

Comment 5 Gwyn Ciesla 2016-03-15 17:51:57 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rubygem-websocket-extensions

Comment 6 Jun Aruga 2016-03-16 11:25:46 UTC
Hi, Vit

I updated the spec and srpm file following your review again. [1]
Also finished to run Mock and Koji for test again.

Koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=13366172

[1]
$ git diff 3e6b5d0cfe833e89748d87df2934732cfe32d92b rubygem-websocket-extensions.spec 
diff --git a/rubygem-websocket-extensions.spec b/rubygem-websocket-extensions.spec
index f9c419c..0a628f9 100644
--- a/rubygem-websocket-extensions.spec
+++ b/rubygem-websocket-extensions.spec
@@ -58,9 +58,8 @@ cp -a .%{gem_dir}/* \
 
 # Run the test suite
 %check
-tar -xzf %{SOURCE1}
-cp -pr spec/ ./%{gem_instdir}
 pushd .%{gem_instdir}
+tar -xzf %{SOURCE1}
 rspec spec
 popd

Comment 7 Vít Ondruch 2016-03-16 11:35:40 UTC
(In reply to Jun Aruga from comment #6)
Thx. Now just go ahead, import the SRPM into dist-git and build it in Koji.

Comment 8 Jun Aruga 2016-03-16 11:54:10 UTC
(In reply to Vít Ondruch from comment #7)
> (In reply to Jun Aruga from comment #6)
> Thx. Now just go ahead, import the SRPM into dist-git and build it in Koji.

Yes, I imported the SRPM by "fedpkg import PATH_TO_SRPM".
Also built it by "fedpkg build" right now. [1]

[1]
Koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=13366277

Comment 9 Vít Ondruch 2016-03-16 13:41:22 UTC
(In reply to Jun Aruga from comment #8)

Nice.

Once the build is done, don't forget to close the issue with "Rawhide" resolution and fill in the "Fixed in version" field.