Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 629382 - >=app-admin/puppet-4.10.5 localisation support generates loads of warnings
Summary: >=app-admin/puppet-4.10.5 localisation support generates loads of warnings
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthew Thode ( prometheanfire )
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-30 15:08 UTC by Fabian Groffen
Modified: 2017-12-02 06:40 UTC (History)
3 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 Fabian Groffen gentoo-dev 2017-08-30 15:08:37 UTC
since version 4.10.5 puppet supports string localisation:
https://docs.puppet.com/puppet/4.10/release_notes.html#puppet-4105

When either the packages gettext-setup or locale are missing, or puppet can't find it's locales it will emit an ugly warning for each class it loads like this:

Warning: GettextSetup is not available, skipping GettextSetup initialization for dhcp.

installing dev-ruby/ruby-gettext doesn't help, because the current ebuild(s) do not install the locales.

I applied this change to the ebuild:

--- a/app-admin/puppet/puppet-4.10.6.ebuild
+++ b/app-admin/puppet/puppet-4.10.6.ebuild
@@ -113,6 +113,7 @@ all_ruby_compile() {
 
 each_ruby_install() {
        each_fakegem_install
+       ruby_fakegem_doins -r locales
 #      dosym "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${P}" "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${PN}"
 }
 
It installs the locales in one of the three ways puppet looks for, compatible with how we (Gentoo) package it.

I think we should at least include this change, and think about a dependency on dev-ruby/ruby-gettext to silence the warnings in a default install.
Comment 1 Fabian Groffen gentoo-dev 2017-08-30 15:12:25 UTC
sorry, I mean dev-ruby/gettext-setup instead of dev-ruby/ruby-gettext
Comment 2 Hans de Graaff gentoo-dev Security 2017-08-30 16:06:39 UTC
(In reply to Fabian Groffen from comment #0)

> +       ruby_fakegem_doins -r locales

We normally use RUBY_FAKEGEM_EXTRAINSTALL for this:

RUBY_FAKEGEM_EXTRAINSTALL="locales"
Comment 3 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2017-08-31 17:14:49 UTC
I could look at this but would be more comfortable with the ruby team fixing it.  graff's change looks most correct but my knowledge of how ruby installs locales is non-existent.
Comment 4 Fabian Groffen gentoo-dev 2017-09-01 09:48:41 UTC
graaff's suggestion is the way to go (I didn't have the cycles to cook a new patch).  Ruby has nothing to do with this, this is a Puppet specific thing, we just don't install everything.
Comment 5 Hans de Graaff gentoo-dev Security 2017-09-02 07:15:09 UTC
This is now fixed in puppet-4.10.6-r1 and puppet-5.1.0-r1.
Comment 6 Fabian Groffen gentoo-dev 2017-09-02 07:52:29 UTC
I guess it just leaves us with whether we should depend on dev-ruby/gettext-setup now, or einfo the user to emerge it if they want to get rid of the many warnings.
Comment 7 Hans de Graaff gentoo-dev Security 2017-09-02 08:14:09 UTC
(In reply to Fabian Groffen from comment #6)
> I guess it just leaves us with whether we should depend on
> dev-ruby/gettext-setup now, or einfo the user to emerge it if they want to
> get rid of the many warnings.

Ah, sorry, I thought this was the case already and didn't check. We should depend on gettext-setup since it is listed as a runtime dependency. I have updated this in those ebuilds.
Comment 8 Hans de Graaff gentoo-dev Security 2017-09-03 06:15:54 UTC
(In reply to Hans de Graaff from comment #7)

> Ah, sorry, I thought this was the case already and didn't check. We should
> depend on gettext-setup since it is listed as a runtime dependency. I have
> updated this in those ebuilds.

Reopening this since I did not push this change yet. It requires rekeywording and pulls in a dependency chain that includes parts of dev-ruby/rails. That will causes issues for stable since we don't have the man-power in the ruby team to manage a stable rails (or have it keyworded by all the arches that have puppet keyworded).
Comment 9 Fabian Groffen gentoo-dev 2017-09-03 10:49:17 UTC
@graaff: where does rails get pulled in?  Is that as part of test USE-flag?

dev-ruby/locale should be ok, dev-ruby/gettext-setup just required dev-ruby/fast_gettext here.
Comment 10 Hans de Graaff gentoo-dev Security 2017-12-02 06:40:08 UTC
(In reply to Fabian Groffen from comment #9)
> @graaff: where does rails get pulled in?  Is that as part of test USE-flag?
> 
> dev-ruby/locale should be ok, dev-ruby/gettext-setup just required
> dev-ruby/fast_gettext here.

The test suite for fast_gettext does that. I have now removed the need for that test dependency and this (missing gettext-setup dependency on puppet) is fixed in puppet 4.10.9.