Bug 1779404 - Review Request: rubygem-hrx - An HRX parser and serializer
Summary: Review Request: rubygem-hrx - An HRX parser and serializer
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jun Aruga
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-03 22:35 UTC by leigh scott
Modified: 2019-12-16 01:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-16 01:19:17 UTC
Type: ---
Embargoed:
jaruga: fedora-review+


Attachments (Terms of Use)

Description leigh scott 2019-12-03 22:35:43 UTC
Spec URL: https://leigh123linux.fedorapeople.org/pub/review/rubygem-hrx/rubygem-hrx.spec
SRPM URL: https://leigh123linux.fedorapeople.org/pub/review/rubygem-hrx/rubygem-hrx-1.0.0-1.fc31.src.rpm
Description: A parser and serializer for the HRX human-readable archive format.
Fedora Account System Username: leigh123linux

Comment 1 Vít Ondruch 2019-12-04 11:46:38 UTC
* Test suite is not executed
  - Please execute test suite in %check section. It seems the RSpec test suite is included in package, so "rspec spec" could be enough to make it running.

Comment 2 leigh scott 2019-12-04 12:28:59 UTC
I haven't included %check due to missing requires

+ pushd ./usr/share/gems/gems/hrx-1.0.0
~/development/rpmbuild/BUILD/hrx-1.0.0/usr/share/gems/gems/hrx-1.0.0 ~/development/rpmbuild/BUILD/hrx-1.0.0
+ rspec spec

An error occurred while loading ./spec/archive_spec.rb.
Failure/Error: require 'rspec/temp_dir'

LoadError:
  cannot load such file -- rspec/temp_dir
# ./spec/archive_spec.rb:16:in `<top (required)>'


Finished in 0.00018 seconds (files took 0.22822 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

Comment 3 Vít Ondruch 2019-12-04 12:53:55 UTC
(In reply to leigh scott from comment #2)
Jun covered this extensively here:

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/372XSBBEB2ATBTENVLUVGXPJ3F55PU54/

Comment 4 leigh scott 2019-12-04 22:16:43 UTC
koji scratch build

https://koji.fedoraproject.org/koji/taskinfo?taskID=39434394

Comment 5 Jun Aruga 2019-12-05 11:21:28 UTC
> Spec URL: https://leigh123linux.fedorapeople.org/pub/review/rubygem-hrx/rubygem-hrx.spec

> # Move the tests into place
> ln -s %{_builddir}/spec spec

You can remove the 2 lines, as the Source0 (= hrx-1.0.0.gem) includes `spec/*_spec.rb files` in it.
The "spec" exists there without doing "ln -s ...".

Maybe the lines came from following examples I introduced you.
In the examples the each Source0 does not have the unit test files in it (= the gem file).
That's the reason why the lines were needed.
https://src.fedoraproject.org/rpms/rubygem-listen/blob/master/f/rubygem-listen.spec
https://src.fedoraproject.org/rpms/rubygem-rake/blob/master/f/rubygem-rake.spec


> rspec -rspec_helper spec

You do not need to add "-rspec_helper", as it is correctly required from each `*_spec.rb` file.

Referring the Ruby guideline, you can just replace it with "rspec -Ilib spec".
https://docs.fedoraproject.org/en-US/packaging-guidelines/Ruby/#_rspec

> dot files.

I think that the dot files are for only development use like `.gitignore` as well.
Possibly you can change like this.

```
 %files
 %dir %{gem_instdir}
-%exclude %{gem_instdir}/.gitignore
+%exclude %{gem_instdir}/.*
 %license %{gem_instdir}/LICENSE
 %{gem_libdir}
 %exclude %{gem_cache}
@@ -64,8 +62,6 @@ popd
 
 %files doc
 %doc %{gem_docdir}
-%doc %{gem_instdir}/.rdoc_options
-%exclude %{gem_instdir}/.rspec
 %doc %{gem_instdir}/CONTRIBUTING.md
 %{gem_instdir}/Gemfile
 %doc %{gem_instdir}/README.md
```

Comment 6 Jun Aruga 2019-12-05 11:28:13 UTC
For your information, seeing the upstream hrx project's CI setting file could be the clue to know how to run the unit test files in the RPM spec file.

In this case, here it is.

https://github.com/google/hrx-ruby/blob/master/.travis.yml#L16
> script: bundle exec rspec

Comment 7 leigh scott 2019-12-05 11:31:10 UTC
(In reply to Jun Aruga from comment #5)
> > Spec URL: https://leigh123linux.fedorapeople.org/pub/review/rubygem-hrx/rubygem-hrx.spec
> 
> > # Move the tests into place
> > ln -s %{_builddir}/spec spec
> 
> You can remove the 2 lines, as the Source0 (= hrx-1.0.0.gem) includes
> `spec/*_spec.rb files` in it.
> The "spec" exists there without doing "ln -s ...".
> 
> Maybe the lines came from following examples I introduced you.
> In the examples the each Source0 does not have the unit test files in it (=
> the gem file).
> That's the reason why the lines were needed.
> https://src.fedoraproject.org/rpms/rubygem-listen/blob/master/f/rubygem-
> listen.spec
> https://src.fedoraproject.org/rpms/rubygem-rake/blob/master/f/rubygem-rake.
> spec
> 
> 
> > rspec -rspec_helper spec
> 
> You do not need to add "-rspec_helper", as it is correctly required from
> each `*_spec.rb` file.
> 
> Referring the Ruby guideline, you can just replace it with "rspec -Ilib
> spec".
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Ruby/#_rspec
> 
> > dot files.
> 
> I think that the dot files are for only development use like `.gitignore` as
> well.
> Possibly you can change like this.
> 
> ```
>  %files
>  %dir %{gem_instdir}
> -%exclude %{gem_instdir}/.gitignore
> +%exclude %{gem_instdir}/.*
>  %license %{gem_instdir}/LICENSE
>  %{gem_libdir}
>  %exclude %{gem_cache}
> @@ -64,8 +62,6 @@ popd
>  
>  %files doc
>  %doc %{gem_docdir}
> -%doc %{gem_instdir}/.rdoc_options
> -%exclude %{gem_instdir}/.rspec
>  %doc %{gem_instdir}/CONTRIBUTING.md
>  %{gem_instdir}/Gemfile
>  %doc %{gem_instdir}/README.md
> ```

Spec file and srpm updated with recommended review changes.

Comment 8 Jun Aruga 2019-12-05 13:07:10 UTC
I executed fedora-review.


```
$ fedora-review -b 1779404
```

Then,

* License check: ok
* rpmlint check: ok
* Installing built binary RPMs in mock environment: ok

```
$ mock -i rubygem-hrx-1.0.0-1.fc32.noarch.rpm rubygem-hrx-doc-1.0.0-1.fc32.noarch.rpm
```

* Running the installed RPM in mock environment: ok

```
<mock-chroot> sh-5.0# gem list | grep hrx
hrx (1.0.0)

<mock-chroot> sh-5.0# irb
irb(main):001:0> require 'hrx'
=> true
```

* Scratch build:

```
$ koji build --scratch --nowait rawhide rubygem-hrx-1.0.0-1.fc32.src.rpm
https://koji.fedoraproject.org/koji/taskinfo?taskID=39439333
```

Package is APPROVED.

Comment 9 leigh scott 2019-12-05 13:46:47 UTC
Thank you for the help and reviewing.

Comment 10 Gwyn Ciesla 2019-12-05 14:16:53 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/rubygem-hrx

Comment 11 Fedora Update System 2019-12-07 18:54:42 UTC
FEDORA-2019-884a24c994 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-884a24c994

Comment 12 Fedora Update System 2019-12-07 18:54:43 UTC
FEDORA-2019-126950287b has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-126950287b

Comment 13 Fedora Update System 2019-12-08 01:42:54 UTC
rubygem-hrx-1.0.0-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-126950287b

Comment 14 Fedora Update System 2019-12-08 01:46:48 UTC
rubygem-hrx-1.0.0-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-884a24c994

Comment 15 Fedora Update System 2019-12-16 01:19:17 UTC
rubygem-hrx-1.0.0-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2019-12-16 01:54:25 UTC
rubygem-hrx-1.0.0-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.


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