From owner-freebsd-ports@freebsd.org Thu Sep 21 06:22:28 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BA8EE17087 for ; Thu, 21 Sep 2017 06:22:28 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 32F4E6B855 for ; Thu, 21 Sep 2017 06:22:28 +0000 (UTC) (envelope-from romain@blogreen.org) Received: by mailman.ysv.freebsd.org (Postfix) id 32663E17086; Thu, 21 Sep 2017 06:22:28 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 320C9E17085 for ; Thu, 21 Sep 2017 06:22:28 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from marvin.blogreen.org (blogreen.org [IPv6:2001:41d0:fea8:8901::2]) by mx1.freebsd.org (Postfix) with ESMTP id D67956B852; Thu, 21 Sep 2017 06:22:27 +0000 (UTC) (envelope-from romain@blogreen.org) Received: by marvin.blogreen.org (Postfix, from userid 1001) id 6E2F096BCF; Thu, 21 Sep 2017 08:22:26 +0200 (CEST) Date: Thu, 21 Sep 2017 08:22:26 +0200 From: Romain =?iso-8859-1?Q?Tarti=E8re?= To: Karli =?iso-8859-1?Q?Sj=F6berg?= , Zach , ports@freebsd.org, puppet@freebsd.org Subject: Re: gettextsetup warnings Message-ID: <20170921062226.GA65348@blogreen.org> Mail-Followup-To: Karli =?iso-8859-1?Q?Sj=F6berg?= , Zach , ports@freebsd.org, puppet@freebsd.org References: <08c976dd-c1c3-4fb5-8455-4495aa74b75e@email.android.com> <20170919160959.fzkfc5kheny47naq@celtis.u.larch.space> <20170919224759.GA25389@blogreen.org> <1505886363.2296.61.camel@inparadise.se> <20170920064116.GA54261@blogreen.org> <20170920074323.GA56396@blogreen.org> <20170920130652.GA64379@blogreen.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="C7zPtVaVf+AK4Oqc" Content-Disposition: inline In-Reply-To: <20170920130652.GA64379@blogreen.org> X-PGP-Key: http://romain.blogreen.org/pubkey.asc User-Agent: Mutt/1.9.0 (2017-09-02) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 06:22:28 -0000 --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 20, 2017 at 03:06:52PM +0200, Romain Tarti=C3=A8re wrote: > Unfortunately, changing locales works on my computer =E2=80=A6 > [...] > =E2=80=A6 but not on the other nodes I manage :-/ > [...] > I currently fail at locating what is different between these nodes. Found the culprit yesterday in the train! But Internet access is flaky here :-/ The problems is in the gettext-setup gem, which detects the available locales in a wrong way (it search for .po files, and when found, add the directory name to the valid locales available): https://github.com/puppetlabs/gettext-setup-gem/blob/master/lib/gettext-set= up/gettext_setup.rb#L97-L102 Since we only have .mo files in the searched directory, you guess why the 'ja' locale was not considered available. But in fact the problem is deeper: the hunt for .po files happens in multiple directories, and if such a file is available in any of these directories, the locale is enabled=E2=80=A6 So on my system, it looks like= the file /usr/local/share/locale/ja/gutenprint_ja.po installed by print/gutenprint white-listed the 'ja' locale, and then /var/puppet/share/locale/ja/LC_MESSAGES/puppet.mo could be used. The patched gettext-setup gem is available here: https://github.com/smortex/puppet5/commit/41ea629eca9112510613d966a8e0639f3= cb91da1 I am currently deploying this on my nodes in case this changes has other unexpected consequences. Romain --=20 Romain Tarti=C3=A8re http://people.FreeBSD.org/~romai= n/ pgp: 8234 9A78 E7C0 B807 0B59 80FF BA4D 1D95 5112 336F (ID: 0x5112336F) (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated) --C7zPtVaVf+AK4Oqc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCAAdFiEEgjSaeOfAuAcLWYD/uk0dlVESM28FAlnDWp4ACgkQuk0dlVES M2+ljgv+LjaK0iXnzkOI70bfCtM/cq7s6A0wTZL/q6aLw8B5b7Xu2kQtrufOa+il dKxLW4Y6olOQWGqWMu7zM2RGhU3/3DmVMd5tLaKsHGsjzaK8fUAjp1lbnryYe3bE UusDnf4+pnNBHgSjTw0PLHPSgXsCMISnrSlTDj4hnn3Uah9qygVPqTiTTXrbjFYQ fPWc6LBeiscmIkR32Var5pbVtTRfHKO5GZQmpc0a1GSywIujkKfr4IhZ0P+RENYV cK40oM809syfcKIULlCoeDs+HkWagYC3C4VtAYghe4NECAf5qrQTckZKXG0ZhAzY i648w0GaA867PLkCvj3NU7YBQFYQLWXEWKE6N18t+HDK7Tmd9cKtqCWHLfNv/yne IMZm0BYvVDDhoAxnUV18mEhWWyvsC/Zb3X18uvR9wuUNviSTD1ohD6iPYGRraK0C VIPKpt1bqpc4RbGBe3nJ/Cz6hRei/GDCvhRrz5LhE1Q7yZfQg+7bXvt29pjjPsnP tFI3mOJX =dPDE -----END PGP SIGNATURE----- --C7zPtVaVf+AK4Oqc--