Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 652434 - app-admin/fluentd ebuild request
Summary: app-admin/fluentd ebuild request
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL: https://www.fluentd.org
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-04 17:12 UTC by William Hubbs
Modified: 2018-04-10 16:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Hubbs gentoo-dev 2018-04-04 17:12:37 UTC
All,

I am working on getting fluentd into the tree for my work, but I'm not
familiar with ruby so need assistance from the ruby team.

I'm opening this bug so we can communicate more efficiently than trying
to catch each other on irc.

Any help is appreciated.

Thanks,

William
Comment 1 Hans de Graaff gentoo-dev 2018-04-04 18:18:22 UTC
Looking at the dependencies at https://rubygems.org/gems/fluentd

We already have dev-ruby/coolio, dev-ruby/http_parser_rb, dev-ruby/msgpack, dev-ruby/tzinfo, and dev-ruby/yajl-ruby.

fluentd should not depend on dev-ruby/tzinfo-data. We do not package this because dev-ruby/tzinfo-1* will actually use sys-libs/timezone-data without it, and it makes much more sense to have one consistent source of that stuff. tzinfo-data is a crutch only to be used when your system timezone stuff is completely out of whack.

You'll need to edit the gemspec to remove this dependency, most likely.

dev-ruby/serverengine and dev-ruby/sigdump are in my overlay. I can move them over to the main tree, but I'll likely need to do some cleanups.

It looks like dig_rb isn't needed. It backports the dig method for Arrays and Hashes from ruby 2.3 back to earlier versions. Since ruby 2.2 is going to go away very soon in Gentoo my proposal would be to remove this gem from the gemspec and run without it because it is a no-op for ruby 2.3+

That leaves strptime to be added.
Comment 2 Hans de Graaff gentoo-dev 2018-04-04 18:28:31 UTC
dev-ruby/strptime is now available.
Comment 3 William Hubbs gentoo-dev 2018-04-04 21:13:54 UTC
(In reply to Hans de Graaff from comment #1)
> Looking at the dependencies at https://rubygems.org/gems/fluentd
> 
> We already have dev-ruby/coolio, dev-ruby/http_parser_rb, dev-ruby/msgpack,
> dev-ruby/tzinfo, and dev-ruby/yajl-ruby.

Do all of these have the appropriate use_ruby settings?

> fluentd should not depend on dev-ruby/tzinfo-data. We do not package this
> because dev-ruby/tzinfo-1* will actually use sys-libs/timezone-data without
> it, and it makes much more sense to have one consistent source of that
> stuff. tzinfo-data is a crutch only to be used when your system timezone
> stuff is completely out of whack.
> You'll need to edit the gemspec to remove this dependency, most likely.
> 
> dev-ruby/serverengine and dev-ruby/sigdump are in my overlay. I can move
> them over to the main tree, but I'll likely need to do some cleanups.

Can you let me know when this can be done?

> It looks like dig_rb isn't needed. It backports the dig method for Arrays
> and Hashes from ruby 2.3 back to earlier versions. Since ruby 2.2 is going
> to go away very soon in Gentoo my proposal would be to remove this gem from
> the gemspec and run without it because it is a no-op for ruby 2.3+
> 
> That leaves strptime to be added.


Where is the best place to edit a gemspec in a ruby ebuild?


Also, what settings do I need for the ruby-fakegem eclass variables before I inherit the eclass in the fluentd ebuild?

Where is the best place in a ruby ebuild to do things like install init scripts?
Comment 4 Hans de Graaff gentoo-dev 2018-04-05 05:42:04 UTC
(In reply to William Hubbs from comment #3)
> > We already have dev-ruby/coolio, dev-ruby/http_parser_rb, dev-ruby/msgpack,
> > dev-ruby/tzinfo, and dev-ruby/yajl-ruby.
> 
> Do all of these have the appropriate use_ruby settings?

What do you consider to be appropriate? They should all have at least ruby23 which is the current stable version.

> > dev-ruby/serverengine and dev-ruby/sigdump are in my overlay. I can move
> > them over to the main tree, but I'll likely need to do some cleanups.
> 
> Can you let me know when this can be done?

dev-ruby/serverengine is now moved as well.

> Where is the best place to edit a gemspec in a ruby ebuild?

all_ruby_prepare() which is a prepare phase that applies to all ruby targets.

> Also, what settings do I need for the ruby-fakegem eclass variables before I
> inherit the eclass in the fluentd ebuild?

This is all documented in the eclass :-) USE_RUBY is mandatory. Note that the eclass adds code for USE=doc and FEATURES=test by default, so you may need to tweak this if the defaults don't work. You can use RUBY_FAKEGEM_RECIPE_DOC and RUBY_FAKEGEM_RECIPE_TEST for that.

> Where is the best place in a ruby ebuild to do things like install init
> scripts?

all_ruby_install(), see for example www-servers/thin.
Comment 5 William Hubbs gentoo-dev 2018-04-05 17:34:18 UTC
Several of the dependencies do not have ruby25 in USE_RUBY.
Can I just add it?
Comment 6 Hans de Graaff gentoo-dev 2018-04-05 17:49:33 UTC
(In reply to William Hubbs from comment #5)
> Several of the dependencies do not have ruby25 in USE_RUBY.
> Can I just add it?

Only if all dependencies have it as well and all tests pass.
Comment 7 William Hubbs gentoo-dev 2018-04-05 18:01:45 UTC
If you want to take a look, here is the list:

dev-ruby/coolio
dev-ruby/http_parser_rb
dev-ruby/msgpack
dev-ruby/tzinfo
dev-ruby/yajl-ruby

Thanks much.
Comment 8 Hans de Graaff gentoo-dev 2018-04-07 05:35:05 UTC
(In reply to William Hubbs from comment #7)
> If you want to take a look, here is the list:
> 
> dev-ruby/coolio
> dev-ruby/http_parser_rb
> dev-ruby/msgpack
> dev-ruby/tzinfo
> dev-ruby/yajl-ruby
> 
> Thanks much.

All of these now include ruby25
Comment 9 William Hubbs gentoo-dev 2018-04-09 16:15:15 UTC
Thanks much for your help.

When I add fluentd, is it ok for me to add ruby as a co-maintainer?
Comment 10 William Hubbs gentoo-dev 2018-04-10 00:55:46 UTC
I have added thapp-admin/fluentd to the tree with Ruby as a
co-maintainer.
If you do not want to co-maintain, feel free to remove the team.

I will leave this bug open until I hear either way.

Thanks a lot for your help.

William
Comment 11 Hans de Graaff gentoo-dev 2018-04-10 05:15:16 UTC
(In reply to William Hubbs from comment #9)

> When I add fluentd, is it ok for me to add ruby as a co-maintainer?

That's fine to help out with ruby issues, but if we end up the only maintainer we'll drop that.
Comment 12 Hans de Graaff gentoo-dev 2018-04-10 05:33:43 UTC
(In reply to Hans de Graaff from comment #4)

> Note that
> the eclass adds code for USE=doc and FEATURES=test by default, so you may
> need to tweak this if the defaults don't work.

USE=doc fails:

 * Running compile phase for all ...
fatal: Not a git repository (or any parent up to mount point /var/tmp)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
rake aborted!
Don't know how to build task 'rdoc' (see --tasks)

(See full trace by running task with --trace)


FEATURES=test is also broken, looks like it require the currently unpackaged oj gem.
Comment 13 William Hubbs gentoo-dev 2018-04-10 16:23:07 UTC
'm doing a high priority work related task at the moment, so feel free
to work on those issues for now. I'll look later if you haven't.