From owner-freebsd-ruby@freebsd.org Fri Aug 4 14:15:14 2017 Return-Path: Delivered-To: freebsd-ruby@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 1E4A2DB20F3 for ; Fri, 4 Aug 2017 14:15:14 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03BE469FBB; Fri, 4 Aug 2017 14:15:13 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from lm0.local (rrcs-96-10-213-43.midsouth.biz.rr.com [96.10.213.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.lifanov.com (Postfix) with ESMTPSA id BB53A239AAC; Fri, 4 Aug 2017 10:15:12 -0400 (EDT) Subject: Re: [Stage-QA] Gemfile-Check - WIP To: Torsten Zuehlsdorff , freebsd-ruby@freebsd.org References: <5a229e15-44b8-a941-7aa1-d6df667b744f@FreeBSD.org> <596ca897-f1ef-aa75-a23b-dec3f431c391@FreeBSD.org> From: Nikolai Lifanov Message-ID: Date: Fri, 4 Aug 2017 10:15:06 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <596ca897-f1ef-aa75-a23b-dec3f431c391@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="l3kDbfhOGoELalH9wu93xigIaKRdUmCIB" X-BeenThere: freebsd-ruby@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD-specific Ruby discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 14:15:14 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --l3kDbfhOGoELalH9wu93xigIaKRdUmCIB Content-Type: multipart/mixed; boundary="vXCQx2wwQ5w4wW1VDPqWC9b0saVP3smFf"; protected-headers="v1" From: Nikolai Lifanov To: Torsten Zuehlsdorff , freebsd-ruby@freebsd.org Message-ID: Subject: Re: [Stage-QA] Gemfile-Check - WIP References: <5a229e15-44b8-a941-7aa1-d6df667b744f@FreeBSD.org> <596ca897-f1ef-aa75-a23b-dec3f431c391@FreeBSD.org> In-Reply-To: <596ca897-f1ef-aa75-a23b-dec3f431c391@FreeBSD.org> --vXCQx2wwQ5w4wW1VDPqWC9b0saVP3smFf Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 8/4/17 10:04 AM, Torsten Zuehlsdorff wrote: >=20 >=20 > On 04.08.2017 15:48, Nikolai Lifanov wrote: >> On 8/4/17 8:51 AM, Torsten Zuehlsdorff wrote: >>> Aloha, >>> >>> inspired by lifanov and his work in PR 220605 to add a check for >>> .gemspec of rubygems i tried myself with Gemfile. >>> >>> Background is, that checking the actual Gemfile of non rubygem-* port= s >>> is often very time-consuming. When building Gitlab, Redmine or others= , >>> everything is fine. But when executing they fail - because the Gemfil= e >>> is not satisfied. >>> >>> Its WIP and my first try for an stage-qa script, so every comment is >>> appreciated. It adds a stage-qa stage for every non rubygem- port. Wh= en >>> executed i (intent) to scan for Gemfiles and checking every file with= >>> bundle check. If bundle fails, the stage-qa fails. >>> >>> It worked for simple test. If no Gemfile was present the test was >>> skipped. If it is, bundle is executed. When removing a needed depende= ncy >>> it is found. Its also found when the dependency is indirect (not in >>> Gemfile itself, but a dependency of an dependency listed there). >>> >>> But it don't work for net-im/mikutter for example and i don't know wh= y. >>> >>> So any feedback would be fine! :) >>> >>> Greetings, >>> Torsten >>> >> >> Hi! >> >> I think for something like this, a better initial approach is to make >> this stage-qa target non-fatal, so warnings instead of errors. >> >> At least initially it will cause less disruption and give porters an >> opportunity to fix the errors. >=20 > Or we fix all issues before submitting - because the ports are broken i= f > this fails. The could not be used in any way. >=20 >> I have two thoughts on it so far: >> >> $(find ${STAGEDIR} -name Gemfile) is pretty heavy to do on every port.= >> Can we export something to QA_ENV from USE_RUBY and check for this >> instead? >=20 Add something to QA_ENV from bsd.ruby.mk and check for it in qa.sh. For example, in bsd.ruby.mk, you can do this: QA_ENV+=3D USE_RUBY and in qa.sh, you can do this: if [ -n "${USE_RUBY}" ]; then =2E... do stuff.... I'm not sure that USE_RUBY is the best variable here, but you can pick anything defined there. > I would like to make it optional, but i have no idea how >=20 >> Is "bundle" guaranteed to be installed for ports that ship a Gemfile? >=20 > No. >=20 You can bail if it's not installed. command -v bundler >/dev/null || ... do something here to exit ... Or you can pick something else. >> Otherwise, it looks good and only has minor nits. Can we move this to >> Phabricator? This will make it easier to review and iterate on. >=20 > I was in doubt it is already good enough for a review. But here we go: > https://reviews.freebsd.org/D11865 >=20 > Greetings and thanks, > Torsten --vXCQx2wwQ5w4wW1VDPqWC9b0saVP3smFf-- --l3kDbfhOGoELalH9wu93xigIaKRdUmCIB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQJIBAEBCAAyFiEE5oT6TcuaWvG5gtjzZ6sv56ecR0UFAlmEgWoUHGxpZmFub3ZA ZnJlZWJzZC5vcmcACgkQZ6sv56ecR0VXGA/+JPKv8bXpq9nU1PDeyV144HSgGcTE sJUAKH5Yhhg4V9OlDDzcbSfaDqE0kAUByneY0W1icYi6t+HwmxTkxHq2EFqWvhzl O97BJIqwPjy7Y5SEzEmtd33h7Io70Xvo1DJyIBy9QPUdPDQ204zXUNJUfTL8lQpQ zA1CGqKdBaOG885YpvNN21mhoVTjvmJIuOM2yHNL7N7CTFdJrsmM/zFMXmIW5YSm cxMfdUU+G/oTgLhshgqnSOZkLWuC4+y+28jFGBfiOpUxVFikBgMUDmsNNSUdfwLB NWtViSlpKG31F2zf4BTjoC9eJ89+cXWW98XSPNbF0Qq6gGyQhcCJaYbiLDHX4Ivv OOEq1LoyJUq0RSWChNaffZ7/RsdSphrAWYJnCHYP6Rz8i6YmEPoN88soxeAWiASl QkveFz4gVUTQ9hhOXKZ1tjZimxhLFwCmsjWXDsXZGZiCe9B/kmHQL2hlXmAdnqkv 92OybSpiBiku3ekOziD75r/nfeXDZeAIlBUjsmlVRQ6DvLi0OsKbC3lfiXq/HI0D C94XbOXgZwFmuORjEjVT4qFnqBFbl7BX+fiC7n8iJqWEZqRZulGLY4B7+RZ1AvTC iZCLSEKGLToc482OLjHg1BmnwpIzhcqyqDEhucwdP2WBak9KvfRDGvQ10JgM/WeM bs6oOWuYjb1Oqg0= =vYMr -----END PGP SIGNATURE----- --l3kDbfhOGoELalH9wu93xigIaKRdUmCIB--