Bug 1871157 - Review Request: rubygem-ronn-ng - Manual authoring tool
Summary: Review Request: rubygem-ronn-ng - Manual authoring tool
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Vít Ondruch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1817168
TreeView+ depends on / blocked
 
Reported: 2020-08-21 12:58 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2020-11-19 08:16 UTC (History)
2 users (show)

Fixed In Version: rubygem-ronn-ng-0.9.1-1.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-18 16:30:08 UTC
Type: ---
Embargoed:
vondruch: fedora-review+


Attachments (Terms of Use)

Description Zbigniew Jędrzejewski-Szmek 2020-08-21 12:58:21 UTC
Spec URL: https://in.waw.pl/~zbyszek/fedora/rubygem-ronn-ng.spec
SRPM URL: https://in.waw.pl/~zbyszek/fedora/rubygem-ronn-ng-0.9.1-1.fc34.src.rpm
Description: 
Ronn builds manuals. It converts simple, human readable text files to
roff for terminal display, and also to HTML for the web.

The source format includes all of Markdown but has a more rigid structure and
syntax extensions for features commonly found in man pages (definition lists,
link notation, etc.). The ronn-format(7) manual page defines the format in
detail.

Fedora Account System Username: zbyszek

This is a replacement for rubygem-ronn, see https://bugzilla.redhat.com/show_bug.cgi?id=1817168.

Comment 1 Vít Ondruch 2020-08-26 13:39:23 UTC
Taking this for a review.

Comment 2 Vít Ondruch 2020-08-26 13:44:56 UTC
Zbysek, could you please use gem2rpm to bring the .spec to the more up2date form? It seems that you spec contains a lot of archaisms. Also, it does not execute the test suite.

Comment 3 Vít Ondruch 2020-08-26 13:47:56 UTC
Also, it does not replace the rubygem-ronn, which it should IMO. However, I am not sure how many times is required 'rubygem-ronn' vs '%{_bindir}/ronn'.

Comment 4 Zbigniew Jędrzejewski-Szmek 2020-08-26 16:06:05 UTC
Updated in place.

Comment 5 Vít Ondruch 2020-09-01 14:56:25 UTC
* Test suite
  - There is not missing rubygem(contest) just proper load path [1]. To load the `contest`, there have to be added `-Itest` specified.
    And for loading rest of the Ronn, the load path has to be `-Ilib:test`.
  - You also need a few BRs:

~~~
BuildRequires:  rubygem(kramdown)
BuildRequires:  rubygem(mustache)
BuildRequires:  rubygem(nokogiri)
BuildRequires:  rubygem(test-unit)
~~~

* Soft dependency on groff-base?
  - The `Requires: groff-base` could be possibly changed to `Recommends`. This could help if Ronn is used as Ruby library. OTOH,
    if it is included into buildroot to generate documentation, the soft dependency would not be installed and that could be annoying.
  - Nevertheless, wouldn't it be better to use `Requires: %{_bindir}/groff` instead?

* Changing gem version dependencies.
  - I prefer to remove/add specific versions with `%gemspec_{remove,add}_dep`. This gives me hint if the dependencies are changing.
    This way, I would be able to remove the lines in the future (https://github.com/apjanke/ronn-ng/pull/46), otherwise changes like
    this will go unnoticed.
  - Also, you are changing wrong .gemspec file. The right file will be modified if you drop the `-s %{gem_name}.gemspec`.
  - IOW, this and nothing else should be what you want to do:

~~~
%gemspec_remove_dep -g mustache "~> 0.7"
~~~

* Use macros where appropriate
  - Please use macros on places where `/usr/share/` is used ATM.

* Keep license file in its original place?
  - I typically keep the license file in its original place, but this might be even better, so I'm just saying because I stumbled upon it.

* Small typo in changelog
  - s/get2rpm/gem2rpm/

* Shebang vs execute bit
  - Not sure this is worth of fixing, but upstream report about the first one would not hurt:

~~~
*** WARNING: ./usr/share/gems/gems/ronn-ng-0.9.1/lib/ronn.rb is executable but has no shebang, removing executable bit
mangling shebang in /usr/share/gems/gems/ronn-ng-0.9.1/bin/ronn from /usr/bin/env ruby to #!/usr/bin/ruby
~~~



[1]: https://docs.fedoraproject.org/en-US/packaging-guidelines/Ruby/#_minitest_testunit

Comment 6 Zbigniew Jędrzejewski-Szmek 2020-09-19 16:46:07 UTC
Thanks!

(In reply to Vít Ondruch from comment #5)
> * Test suite
>   - There is not missing rubygem(contest) just proper load path [1]. To load
> the `contest`, there have to be added `-Itest` specified.
>     And for loading rest of the Ronn, the load path has to be `-Ilib:test`.
>   - You also need a few BRs:
> 
> ~~~
> BuildRequires:  rubygem(kramdown)
> BuildRequires:  rubygem(mustache)
> BuildRequires:  rubygem(nokogiri)
> BuildRequires:  rubygem(test-unit)
> ~~~

Yep, I did that, and the tests pass.

> * Soft dependency on groff-base?
>   - The `Requires: groff-base` could be possibly changed to `Recommends`.
> This could help if Ronn is used as Ruby library. OTOH,
>     if it is included into buildroot to generate documentation, the soft
> dependency would not be installed and that could be annoying.
>   - Nevertheless, wouldn't it be better to use `Requires: %{_bindir}/groff`
> instead?

I changed it to /usr/bin/groff. I think this is not going to be used as a library
much, and breaking the commandline use would be annoying. (I didn't use a macro
in the build requires, because if this package was rebuilt with a different
%_bindir, e.g. for a flatpak, we'd still want the original location for groff.)

> ~~~
> %gemspec_remove_dep -g mustache "~> 0.7"
> ~~~

Done.

> * Use macros where appropriate
>   - Please use macros on places where `/usr/share/` is used ATM.

Done.
 
> * Keep license file in its original place?
>   - I typically keep the license file in its original place, but this might
> be even better, so I'm just saying because I stumbled upon it.

Done.

> * Small typo in changelog
>   - s/get2rpm/gem2rpm/

Done.

> * Shebang vs execute bit
>   - Not sure this is worth of fixing, but upstream report about the first
> one would not hurt:
>
> ~~~
> *** WARNING: ./usr/share/gems/gems/ronn-ng-0.9.1/lib/ronn.rb is executable
> but has no shebang, removing executable bit
> mangling shebang in /usr/share/gems/gems/ronn-ng-0.9.1/bin/ronn from
> /usr/bin/env ruby to #!/usr/bin/ruby
> ~~~

I remove the bit now in %prep.

.spec and .src.rpm updated in place.

Comment 7 Vít Ondruch 2020-09-24 11:05:40 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #6)
> Thanks!
> 
> (In reply to Vít Ondruch from comment #5)
> > * Test suite
> Yep, I did that, and the tests pass.

We typically execute test in `pushd .%{gem_instdir}`, because that is the final layout as after `gem install` call.

> > * Soft dependency on groff-base?
> >   - The `Requires: groff-base` could be possibly changed to `Recommends`.
> > This could help if Ronn is used as Ruby library. OTOH,
> >     if it is included into buildroot to generate documentation, the soft
> > dependency would not be installed and that could be annoying.
> >   - Nevertheless, wouldn't it be better to use `Requires: %{_bindir}/groff`
> > instead?
> 
> I changed it to /usr/bin/groff. I think this is not going to be used as a
> library
> much, and breaking the commandline use would be annoying. (I didn't use a
> macro
> in the build requires, because if this package was rebuilt with a different
> %_bindir, e.g. for a flatpak, we'd still want the original location for
> groff.)

While I understand the Flatpak argument, I don't think it is valid.

1) It is not reflected in guidelines, so if you feel strong about it, the guidelines should be updated.
2) It should be resolved on RPM level and there is already discussion:

https://github.com/rpm-software-management/rpm/issues/721


> .spec and .src.rpm updated in place.

Other that that, I don't have any serious concerns => APPROVED

Comment 8 Zbigniew Jędrzejewski-Szmek 2020-09-24 11:18:21 UTC
> We typically execute test in `pushd .%{gem_instdir}`, because that is the final layout as after `gem install` call.
Added.

> https://github.com/rpm-software-management/rpm/issues/721
I commented there. I'll leave it as is for now. If FPC decides clarifies that %_bindir should be used here,
it will be trivial change.

Thank you for the review.

Comment 9 Gwyn Ciesla 2020-09-24 13:19:28 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/rubygem-ronn-ng

Comment 10 Vít Ondruch 2020-11-18 13:07:40 UTC
Ping?

Comment 11 Zbigniew Jędrzejewski-Szmek 2020-11-18 16:30:08 UTC
Oops, thanks for the reminder. Built in rawhide now.


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