Bug 1470699 - New version of rubygem-jekyll is available
Summary: New version of rubygem-jekyll is available
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rubygem-jekyll
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Björn 'besser82' Esser
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1470648 1470654 1542583
Blocks: 1470702
TreeView+ depends on / blocked
 
Reported: 2017-07-13 13:35 UTC by František Zatloukal
Modified: 2018-07-19 15:45 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-19 15:45:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description František Zatloukal 2017-07-13 13:35:59 UTC
Updated SPEC: https://copr-be.cloud.fedoraproject.org/results/frantisekz/fedora-developer-portal/fedora-26-x86_64/00578916-rubygem-jekyll/rubygem-jekyll.spec

Build is failing in mock env with: 
+ /usr/bin/help2man -N -s1 -o /builddir/build/BUILDROOT/rubygem-jekyll-3.5.0-1.fc26.x86_64/usr/share/man/man1/jekyll.1 /builddir/build/BUILDROOT/rubygem-jekyll-3.5.0-1.fc26.x86_64/usr/bin/jekyll
help2man: can't get `--help' info from /builddir/build/BUILDROOT/rubygem-jekyll-3.5.0-1.fc26.x86_64/usr/bin/jekyll
Try `--no-discard-stderr' if option outputs to stderr

Comment 1 Zbigniew Jędrzejewski-Szmek 2017-07-13 17:11:36 UTC
<mock-chroot> sh-4.4# /builddir/build/BUILDROOT/rubygem-jekyll-3.5.0-1.fc27.x86_64/usr/bin/jekyll --help
/usr/share/rubygems/rubygems.rb:270:in `find_spec_for_exe': can't find gem jekyll (>= 0.a) (Gem::GemNotFoundException)
	from /usr/share/rubygems/rubygems.rb:298:in `activate_bin_path'
	from /builddir/build/BUILDROOT/rubygem-jekyll-3.5.0-1.fc27.x86_64/usr/bin/jekyll:22:in `<main>'

Comment 2 František Zatloukal 2017-07-18 23:24:34 UTC
New SPEC: https://copr-be.cloud.fedoraproject.org/results/frantisekz/fedora-developer-portal/fedora-26-x86_64/00581120-rubygem-jekyll/rubygem-jekyll.spec


Updated to Jekyll 3.5.1, added new BuildRequires: rubygem-addressable (which I somehow forgot and it wasn't apparent that it's missing from error log :/ ).

Building in rawhide mock is now going well (if you have added my COPR with latest rubygem-liquid).

Comment 3 Jan Kurik 2017-08-15 08:07:41 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 4 František Zatloukal 2017-08-30 10:59:41 UTC
SPEC: https://copr-be.cloud.fedoraproject.org/results/frantisekz/fedora-developer-portal/fedora-rawhide-x86_64/00595500-rubygem-jekyll/rubygem-jekyll.spec

SRPM: https://copr-be.cloud.fedoraproject.org/results/frantisekz/fedora-developer-portal/fedora-rawhide-x86_64/00595500-rubygem-jekyll/rubygem-jekyll-3.6.0.pre.beta1-1.fc28.src.rpm

Updated to 3.6.0.pre.beta1, manually added Test Suite which is removed in upstream Gem (current rpm in Fedora doesn't run tests at all). 

Tests are still not being run though:

rspec test/
No examples found.

Comment 5 Robert-André Mauchin 🐧 2017-08-31 07:33:37 UTC
Hello,

 - rubygem-jekyll.src:21: W: mixed-use-of-spaces-and-tabs (spaces: line 21, tab: line 4)

  Please use spaces only or tabs only, don't mix them. I'd prefer spaces only. 

 - %{__rm} -rf %{gem_name}-%{version} is not needed
 
 - Please remove the extraneous %{_bindir} before gem:

%prep
gem unpack %{SOURCE0}
%setup -DTqn %{gem_name}-%{version}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
f="exe/%{gem_name}"
%{__sed} -e '1s:^#![ \t]*%{_bindir}/env ruby:#!%{_bindir}/ruby:'	\
	< ${f} > ${f}.new &&						\
touch -r ${f} ${f}.new && %{__mv} -f ${f}.new ${f}

tar -xzf %{SOURCE1}

%build
gem build %{gem_name}.gemspec
%gem_install

  - same with help2man in %install:

help2man -N -s1 -o %{buildroot}%{_mandir}/man1/%{gem_name}.1	\
	%{buildroot}%{_bindir}/%{gem_name}


 - The documentation should probably depend on the main package:

Requires:       %{name} = %{version}-%{release}

  Otherwise, if you choose not to do this, add the LICENSE.txt to the doc subpackage:

%license %{gem_instdir}/LICENSE.txt

 - Package doesn't work because it wants rubygem-addressable >= 2.4. Thus, you should add:

BuildRequires:	rubygem(addressable)>= 2.4

 
  rubygem(addressable) 2.5.2.1 was built in Koji on August the 29th. It should be available in Rawhide soon.

Comment 6 František Zatloukal 2017-09-03 08:51:37 UTC
Hey,
thanks for the Review, I've updated spec file according to your comments, I've left it with tabs if you don't mind (as I do with my other spec files).

SPEC: https://copr-be.cloud.fedoraproject.org/results/frantisekz/fedora-developer-portal/fedora-rawhide-x86_64/00597520-rubygem-jekyll/rubygem-jekyll.spec

SRPM: https://copr-be.cloud.fedoraproject.org/results/frantisekz/fedora-developer-portal/fedora-rawhide-x86_64/00597520-rubygem-jekyll/rubygem-jekyll-3.6.0.pre.beta1-2.fc28.src.rpm

I hope I didn't miss anything :)

Comment 7 Vít Ondruch 2017-09-06 14:46:35 UTC
* Wrong version
  - Since this is pre-release, you want to follow this guidelines: https://fedoraproject.org/wiki/Packaging:Versioning#Prerelease_versions

* Wrong provides
  - The double equal in provides is wrong, e.g.:
      Provides:	%{gem_name}		== %{version}-%{release}

* Gem installation
  - The way the gem is installed is rather nonstandard. I'd suggest to use standard gem2rpm way of installation.
  - And why is there the "export GEM_PATH"? Is is used by the help2man? Just wondering.

* Test suite execution
  - We typically execute the test suite in the %{gem_instdir}. Probably good to follow this standard (see the gem2rpm output again).

Comment 8 František Zatloukal 2017-09-11 11:10:55 UTC
SPEC: https://paste.fedoraproject.org/paste/vEk5KyhsLGRGit5Xp-3R3w
SRPM: https://copr-be.cloud.fedoraproject.org/results/frantisekz/fedora-developer-portal/fedora-rawhide-x86_64/00600769-rubygem-jekyll/rubygem-jekyll-3.6.0.pre.beta1-0.1.fc28.src.rpm

Thanks for comments.

I've recreated the spec file with gem2rpm, looks far more cleaner then it was before. Building works fine, jekyll does work too after installation from new rpm.

Tests are still behaving oddly:
rspec test/
No examples found.

Comment 9 Vít Ondruch 2017-09-12 06:21:56 UTC
(In reply to František Zatloukal from comment #8)
> SRPM:
> https://copr-be.cloud.fedoraproject.org/results/frantisekz/fedora-developer-
> portal/fedora-rawhide-x86_64/00600769-rubygem-jekyll/rubygem-jekyll-3.6.0.
> pre.beta1-0.1.fc28.src.rpm

From the SRPM, it seems the version is still wrong. It should be: 3.6.0-0.1.pre.beta1.fc28.src.rpm

You should realize the reasons:

~~~
$ rpmdev-vercmp 3.6.0.pre.beta1-1.fc28  3.6.0-1.fc28
3.6.0.pre.beta1-1.fc28 > 3.6.0-1.fc28
~~~

If you had 3.6.0.pre.beta1 installed, the 3.6.0 stable would never get installed as an upgrade afterwards. Therefore the ".pre.beta1" has to be moved into release.

Comment 10 Vít Ondruch 2017-09-12 07:13:11 UTC
* Missing man pages
  - There were man pages in previous iteration. It would be nice to keep them
    available.

* Tests are still behaving oddly
  - You include the test suite, but you have to expand it somewhere.
  - It seems this is minitest test suite.
  - This is the %check section I come up so far:

~~~
%check
pushd .%{gem_instdir}
tar xzvf %{SOURCE1}

# We don't care about code coverage.
sed -i '/^if ENV\["CI"\]$/,/^end$/ s/^/#/' test/helper.rb

# We don't have minitest-reporters in Fedora yet.
sed -i '/minitest\/reporters/ s/^/#/' test/helper.rb
sed -i '/^Minitest::Reporters.use! \[$/,/^\]$/ s/^/#/' test/helper.rb

# We don't have minitest-profile in Fedora yet.
sed -i '/minitest\/profile/ s/^/#/' test/helper.rb

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

    but it seems that the test suite should be executed via Bundler, otherwise
    it won't load "test-theme" dependency properly and there is missing
    pygments.rb and jekyll-coffeescript ...

Comment 11 Vít Ondruch 2017-09-12 07:21:19 UTC
(In reply to Vít Ondruch from comment #10)
> and there is missing pygments.rb and jekyll-coffeescript ...

Actually, not sure if, for example, adding jekyll-coffeescript is worth of the effort ATM, since this looks to be optional (test) dependency. So you should consider these one by one.

Comment 12 Vít Ondruch 2017-09-12 07:22:20 UTC
Also, there is integration test suite available upstream [1]. You probably want to consider its execution.


[1] https://github.com/jekyll/jekyll/tree/master/features

Comment 13 František Zatloukal 2017-09-23 09:54:29 UTC
SRPM: https://copr-be.cloud.fedoraproject.org/results/frantisekz/fedora-developer-portal/fedora-rawhide-x86_64/00607052-rubygem-jekyll/rubygem-jekyll-3.6.0-1.fc28.src.rpm
SPEC: https://paste.fedoraproject.org/paste/nN6OCT-1FYZf45EuO5r76Q

So, I've tried installing jekyll-coffeescript locally for tests. It would require additional gem coffee-script-source, so I don't think it's worth the burden just to get tests passing. We can add it later, the package was in repos without tests long enough.

I've added integration test, it runs with some failures (missing test-theme, jekyll-coffeescript).

So, should we keep test/integration test or comment it out for now?

Comment 14 Fabio Valentini 2018-01-18 14:12:56 UTC
In the meantime, jekyll 3.7.0 has been released upstream, and the version in fedora is still 3.2.1. Any news? Can I help?

Comment 15 Vít Ondruch 2018-01-19 14:33:56 UTC
Sorry for late response. But why the last Copr build is gone now? :/

Comment 16 František Zatloukal 2018-01-31 09:58:51 UTC
Don't know why few last builds disappeared from my copr :/

Anyway, I've tried rebasing to jekyll 3.7.2, apart from missing em-websocket in Fedora, I am facing some weird behavior.

All dependencies should be met, but running installed gem in mock fails with:
./jekyll 
Traceback (most recent call last):
	2: from ./jekyll:23:in `<main>'
	1: from /usr/share/rubygems/rubygems.rb:308:in `activate_bin_path'
/usr/share/rubygems/rubygems.rb:289:in `find_spec_for_exe': can't find gem jekyll (>= 0.a) with executable jekyll (Gem::GemNotFoundException)

Installing gem inside the mock fails with:
<mock-chroot> sh-4.4# gem install --local jekyll-3.7.2.gem 
ERROR:  Could not find a valid gem 'safe_yaml' (~> 1.0) in any repository

(but safe_yaml is installed)

Here is latest src rpm: https://drive.google.com/file/d/1f1DWDNpHra7OUOPFD1NjH-JLgY-rctad/view?usp=sharing

You can rebuild it in rawhide mock with added COPR: https://copr.fedorainfracloud.org/coprs/frantisekz/fedora-developer-portal/

Comment 17 Vít Ondruch 2018-02-05 12:10:26 UTC
(In reply to František Zatloukal from comment #16)
> Don't know why few last builds disappeared from my copr :/
> 
> Anyway, I've tried rebasing to jekyll 3.7.2, apart from missing em-websocket
> in Fedora

em-websocket is already WIP:

https://gitlab.com/jackorp/rubygem-em-websocket
https://copr.fedorainfracloud.org/coprs/vondruch/ascii_binder/package/rubygem-em-websocket/

> I am facing some weird behavior.
> 
> All dependencies should be met, but running installed gem in mock fails with:
> ./jekyll 
> Traceback (most recent call last):
> 	2: from ./jekyll:23:in `<main>'
> 	1: from /usr/share/rubygems/rubygems.rb:308:in `activate_bin_path'
> /usr/share/rubygems/rubygems.rb:289:in `find_spec_for_exe': can't find gem
> jekyll (>= 0.a) with executable jekyll (Gem::GemNotFoundException)
> 
> Installing gem inside the mock fails with:
> <mock-chroot> sh-4.4# gem install --local jekyll-3.7.2.gem 
> ERROR:  Could not find a valid gem 'safe_yaml' (~> 1.0) in any repository
> 
> (but safe_yaml is installed)
> 
> Here is latest src rpm:
> https://drive.google.com/file/d/1f1DWDNpHra7OUOPFD1NjH-JLgY-rctad/
> view?usp=sharing
> 
> You can rebuild it in rawhide mock with added COPR:
> https://copr.fedorainfracloud.org/coprs/frantisekz/fedora-developer-portal/

Not really sure what you are struggling with, but trying to rebuild the SRPM, it fails with:

~~~
+ help2man -N -s1 -o /builddir/build/BUILDROOT/rubygem-jekyll-3.7.2-1.fc28.x86_64/usr/share/man/man1/jekyll.1 /builddir/build/BUILDROOT/rubygem-jekyll-3.7.2-1.fc28.x86_64/usr/bin/jekyll
help2man: can't get `--help' info from /builddir/build/BUILDROOT/rubygem-jekyll-3.7.2-1.fc28.x86_64/usr/bin/jekyll
Try `--no-discard-stderr' if option outputs to stderr
~~~

Trying to run this manually, to analyze the error, this is the command the help2man is trying to execute:

~~~
$ /builddir/build/BUILDROOT/rubygem-jekyll-3.7.2-1.fc28.x86_64/usr/bin/jekyll
Traceback (most recent call last):
	2: from /builddir/build/BUILDROOT/rubygem-jekyll-3.7.2-1.fc28.x86_64/usr/bin/jekyll:23:in `<main>'
	1: from /usr/share/rubygems/rubygems.rb:308:in `activate_bin_path'
/usr/share/rubygems/rubygems.rb:289:in `find_spec_for_exe': can't find gem jekyll (>= 0.a) with executable jekyll (Gem::GemNotFoundException)
~~~

This is similar error to yours. But this gem is not installed yet, so better to use "/builddir/build/BUILDROOT/rubygem-jekyll-3.7.2-1.fc28.x86_64/usr/share/gems/gems/jekyll-3.7.2/exe/jekyll".

Does this help?

Comment 18 František Zatloukal 2018-02-06 13:09:31 UTC
Yeah, changing the path for help2man worked. Thanks!

rubygem-jekyll-3.7.2 has been built successfully in COPR: https://copr.fedorainfracloud.org/coprs/frantisekz/fedora-developer-portal/build/710043/

Comment 19 Fedora End Of Life 2018-02-20 15:22:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 20 Fabio Valentini 2018-07-19 15:45:46 UTC
The latest version of jekyll and everything that's needed to deploy a jekyll site with default settings (even offline) is now available on rawhide.


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