Bug 1779403 - Review Request: rubygem-linked-list - Ruby implementation of Doubly Linked List, following some Ruby idioms
Summary: Review Request: rubygem-linked-list - Ruby implementation of Doubly Linked Li...
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:32 UTC by leigh scott
Modified: 2019-12-13 01:04 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-13 00:54:26 UTC
Type: ---
Embargoed:
jaruga: fedora-review+


Attachments (Terms of Use)

Description leigh scott 2019-12-03 22:32:44 UTC
Spec URL: https://leigh123linux.fedorapeople.org/pub/review/rubygem-linked-list/rubygem-linked-list.spec
SRPM URL: https://leigh123linux.fedorapeople.org/pub/review/rubygem-linked-list/rubygem-linked-list-0.0.13-1.fc31.src.rpm
Description: Ruby implementation of Doubly Linked List, following some Ruby idioms
Fedora Account System Username: leigh123linux

Comment 1 Vít Ondruch 2019-12-04 11:25:47 UTC
* Execute the test suite
  - The test files are using name_test.rb convention, so you should change the test command to:

~~~
ruby -Ilib:. -e 'Dir.glob "test/**/*_test.rb", &method(:require)'
~~~

* Do not ship content of bin/*
  - If I am not mistaken, these files are useful just for development purposes and probably not really useful at all. I would suggest to either move them to -doc subpackage or remove them entirely. I think that even upstream should not ship them in the package.

Comment 2 leigh scott 2019-12-04 12:10:00 UTC
Spec and srpm updated

(In reply to Vít Ondruch from comment #1)
> * Execute the test suite
>   - The test files are using name_test.rb convention, so you should change
> the test command to:
> 
> ~~~
> ruby -Ilib:. -e 'Dir.glob "test/**/*_test.rb", &method(:require)'
> ~~~
> 

The tests fail

+ ruby -Ilib:. -e 'Dir.glob "test/**/*_test.rb", &method(:require)'
Traceback (most recent call last):
	6: from -e:1:in `<main>'
	5: from -e:1:in `glob'
	4: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
	3: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
	2: from /home/leigh/development/rpmbuild/BUILD/linked-list-0.0.13/usr/share/gems/gems/linked-list-0.0.13/test/conversions_test.rb:1:in `<top (required)>'
	1: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- test_helper (LoadError)
error: Bad exit status from /var/tmp/rpm-tmp.bVoGik (%check)


> * Do not ship content of bin/*
>   - If I am not mistaken, these files are useful just for development
> purposes and probably not really useful at all. I would suggest to either
> move them to -doc subpackage or remove them entirely. I think that even
> upstream should not ship them in the package.

bin/* moved to -doc subpackage

Comment 3 Jun Aruga 2019-12-04 12:37:56 UTC
> /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- test_helper (LoadError)

Possibly following command requiring test_helper works.

```
+ ruby -Ilib:test -r test_helper.rb -e 'Dir.glob "test/**/*_test.rb", &method(:require)'
```

Comment 4 Vít Ondruch 2019-12-04 12:51:17 UTC
(In reply to Jun Aruga from comment #3)
> > /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- test_helper (LoadError)
> 
> Possibly following command requiring test_helper works.
> 
> ```
> + ruby -Ilib:test -r test_helper.rb -e 'Dir.glob "test/**/*_test.rb",
> &method(:require)'
> ```

The `-r test_helper.rb` should not be necessary. Just adding `test` into load path via the `-I` option should be enough.

Comment 5 leigh scott 2019-12-04 13:07:01 UTC
The tests still fail

+ pushd ./usr/share/gems/gems/linked-list-0.0.13
~/rpmbuild/BUILD/linked-list-0.0.13/usr/share/gems/gems/linked-list-0.0.13 ~/rpmbuild/BUILD/linked-list-0.0.13
+ sed -i '/bundler/ s/^/#/' Rakefile
+ ruby -Ilib:test -r test_helper.rb -e 'Dir.glob "test/**/*_test.rb",&method(:require)'
Traceback (most recent call last):
	3: from -e:1:in `<main>'
	2: from -e:1:in `glob'
	1: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- test/conversions_test.rb (LoadError)
error: Bad exit status from /var/tmp/rpm-tmp.CjdiAv (%check)


+ pushd ./usr/share/gems/gems/linked-list-0.0.13
~/rpmbuild/BUILD/linked-list-0.0.13/usr/share/gems/gems/linked-list-0.0.13 ~/rpmbuild/BUILD/linked-list-0.0.13
+ sed -i '/bundler/ s/^/#/' Rakefile
+ ruby -Ilib:test -e 'Dir.glob "test/**/*_test.rb",&method(:require)'
Traceback (most recent call last):
	3: from -e:1:in `<main>'
	2: from -e:1:in `glob'
	1: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- test/conversions_test.rb (LoadError)
error: Bad exit status from /var/tmp/rpm-tmp.OrwEM1 (%check)

Comment 6 leigh scott 2019-12-04 13:40:19 UTC
Spec file and srpm have been updated, tests are working now.


+ pushd ./usr/share/gems/gems/linked-list-0.0.13
~/rpmbuild/BUILD/linked-list-0.0.13/usr/share/gems/gems/linked-list-0.0.13 ~/rpmbuild/BUILD/linked-list-0.0.13
+ sed -i '/bundler/ s/^/#/' Rakefile
+ ruby -Ilib:test -r test_helper.rb -e 'Dir.glob "./test/*_test.rb", &method(:require)'
Run options: --seed 59628

# Running:

..................................................................................................................

Fabulous run in 0.021618s, 5273.2808 runs/s, 7169.8117 assertions/s.

114 runs, 155 assertions, 0 failures, 0 errors, 0 skips
+ popd

Comment 7 Vít Ondruch 2019-12-04 13:48:41 UTC
Is the `sed -i '/bundler/ s/^/#/' Rakefile` required? Are you using the Rakefile anywhere?

Comment 8 Jun Aruga 2019-12-04 13:56:01 UTC
> The `-r test_helper.rb` should not be necessary. Just adding `test` into load path via the `-I` option should be enough.

You are right, Vit. The `test_helper.rb` is required from all the "*_test.rb" file.

```
$ grep -r test_helper test/
test/list_test.rb:require 'test_helper'
test/node_test.rb:require 'test_helper'
test/conversions_test.rb:require 'test_helper'
```

Leigh, could you try without `-r test_helper.rb` option? Then you can remove the option.

Comment 9 leigh scott 2019-12-04 14:06:09 UTC
Thanks for the help, spec file and srpm updated.

(In reply to Vít Ondruch from comment #7)
> Is the `sed -i '/bundler/ s/^/#/' Rakefile` required? Are you using the
> Rakefile anywhere?

I don't believe so, line removed

(In reply to Jun Aruga from comment #8)
> > The `-r test_helper.rb` should not be necessary. Just adding `test` into load path via the `-I` option should be enough.
> 
> You are right, Vit. The `test_helper.rb` is required from all the
> "*_test.rb" file.
> 
> ```
> $ grep -r test_helper test/
> test/list_test.rb:require 'test_helper'
> test/node_test.rb:require 'test_helper'
> test/conversions_test.rb:require 'test_helper'
> ```
> 
> Leigh, could you try without `-r test_helper.rb` option? Then you can remove
> the option.

It works ok without `-r test_helper.rb`

Comment 10 Jun Aruga 2019-12-04 14:56:00 UTC
> %exclude %{gem_instdir}/.gitignore
> %exclude %{gem_instdir}/.travis.yml

Following way could be more maintainable. You see it in other rubygem-*.spec files.
You can replace the 2 lines to `%exclude %{gem_instdir}/.*`.

```
-%exclude %{gem_instdir}/.gitignore
-%exclude %{gem_instdir}/.travis.yml
+%exclude %{gem_instdir}/.*
``


I executed `fedora-review` command for this ticket.

$ fedora-review -b 1779403

Then seeing `1779403-rubygem-linked-list/review.txt`.

> rpmlint

okay.

```
rubygem-linked-list.noarch: W: no-documentation
2 packages and 0 specfiles checked; 0 errors, 1 warnings.
```

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

```
$ mock -i rubygem-linked-list-0.0.13-1.fc32.noarch.rpm rubygem-linked-list-doc-0.0.13-1.fc32.noarch.rpm
```

* Running the installed RPM in mock environment: ok

```
$ mock shell

<mock-chroot> sh-5.0# gem list | grep linked-list
linked-list (0.0.13)

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

* Scratch build: ok

```
$ koji build --scratch --nowait rawhide rubygem-linked-list-0.0.13-1.fc31.src.rpm
https://koji.fedoraproject.org/koji/taskinfo?taskID=39429931
```

Package is APPROVED. Please fix the `%exclude %{gem_instdir}/.*` issue above when importing.

Comment 11 Jun Aruga 2019-12-04 15:00:41 UTC
Leigh, you next action could be possibly

https://fedoraproject.org/wiki/Package_Review_Process

> If you have not yet been sponsored ...

or
 
> When your package pass the review, you should use the fedpkg tool to request a git repository for it.

Comment 12 leigh scott 2019-12-04 15:07:10 UTC
(In reply to Jun Aruga from comment #11)
> Leigh, you next action could be possibly
> 
> https://fedoraproject.org/wiki/Package_Review_Process
> 
> > If you have not yet been sponsored ...
> 
> or
>  
> > When your package pass the review, you should use the fedpkg tool to request a git repository for it.

Thank you for reviewing, SCM request is done.

Comment 13 Gwyn Ciesla 2019-12-04 15:31:15 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/rubygem-linked-list

Comment 14 leigh scott 2019-12-04 20:29:20 UTC
Package built for f32, removing block.

https://koji.fedoraproject.org/koji/buildinfo?buildID=1419651

Comment 15 Fedora Update System 2019-12-04 20:43:54 UTC
FEDORA-2019-0ae6be7263 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-0ae6be7263

Comment 16 Fedora Update System 2019-12-04 20:44:41 UTC
FEDORA-2019-f7876a8b0a has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-f7876a8b0a

Comment 17 Fedora Update System 2019-12-05 01:23:48 UTC
rubygem-linked-list-0.0.13-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-f7876a8b0a

Comment 18 Fedora Update System 2019-12-05 02:01:16 UTC
rubygem-linked-list-0.0.13-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-0ae6be7263

Comment 19 Fedora Update System 2019-12-13 00:54:26 UTC
rubygem-linked-list-0.0.13-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 20 Fedora Update System 2019-12-13 01:04:25 UTC
rubygem-linked-list-0.0.13-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.