Date: Fri, 4 Aug 2017 10:15:06 -0400 From: Nikolai Lifanov <lifanov@FreeBSD.org> To: Torsten Zuehlsdorff <tz@FreeBSD.org>, freebsd-ruby@freebsd.org Subject: Re: [Stage-QA] Gemfile-Check - WIP Message-ID: <c3219bf4-2396-385a-7cab-1110dc9208cb@FreeBSD.org> In-Reply-To: <596ca897-f1ef-aa75-a23b-dec3f431c391@FreeBSD.org> References: <5a229e15-44b8-a941-7aa1-d6df667b744f@FreeBSD.org> <af4bc3fd-57c6-6501-a216-72282e5ec949@FreeBSD.org> <596ca897-f1ef-aa75-a23b-dec3f431c391@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --l3kDbfhOGoELalH9wu93xigIaKRdUmCIB Content-Type: multipart/mixed; boundary="vXCQx2wwQ5w4wW1VDPqWC9b0saVP3smFf"; protected-headers="v1" From: Nikolai Lifanov <lifanov@FreeBSD.org> To: Torsten Zuehlsdorff <tz@FreeBSD.org>, freebsd-ruby@freebsd.org Message-ID: <c3219bf4-2396-385a-7cab-1110dc9208cb@FreeBSD.org> Subject: Re: [Stage-QA] Gemfile-Check - WIP References: <5a229e15-44b8-a941-7aa1-d6df667b744f@FreeBSD.org> <af4bc3fd-57c6-6501-a216-72282e5ec949@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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c3219bf4-2396-385a-7cab-1110dc9208cb>