jnr-netdb: upstream offers help making ebuilds easier
Martin von Gagern <[email protected]> Wed, 23 Jun 2010 09:44:54 +0200
| Newsgroups | gmane.linux.gentoo.java |
|---|---|
| Message-ID | <[email protected]> |
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF5BCBDA9BD9EBB22BAA592A8 Content-Type: multipart/mixed; boundary="------------060301070103000103090602" This is a multi-part message in MIME format. --------------060301070103000103090602 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi! As you can see in the attached mail, the jnr-netdb maintainer, Wayne Meissner, offers his help in making the build process easier. As I only reported bug https://bugs.gentoo.org/325079 as a user, and haven't dug deeply into this project, I don't have any strong whishes. But looking at the ebuild, there is some sed-ing going on, which might perhaps be avoidable if upstream used variables in a few more places. So maybe one of you wants to suggest suitable improvements? Greetings, Martin von Gagern --------------060301070103000103090602 Content-Type: message/rfc822; name="Re: jnr-netdb requires Java 6.eml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Re: jnr-netdb requires Java 6.eml" Return-Path: <[email protected]> X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on server.fritz.box X-Spam-Level: X-Spam-Status: No, score=-0.1 required=8.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.1 X-Spam-Tests: DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001,RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Report: * 0.0 FREEMAIL_FROM Sender email is freemail (wmeissner[at]gmail.com) * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.45 listed in list.dnswl.org] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's * domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Original-To: mvg@localhost Delivered-To: [email protected] X-Flags: 0000 Delivered-To: GMX delivery to [email protected] Received: from pop.gmx.net [212.227.17.185] by server.fritz.box with POP3 (fetchmail-6.3.17) for <mvg@localhost> (single-drop); Wed, 23 Jun 2010 08:54:38 +0200 (CEST) Received: (qmail invoked by alias); 22 Jun 2010 22:49:49 -0000 Received: from mail-vw0-f45.google.com (EHLO mail-vw0-f45.google.com) [209.85.212.45] by mx0.gmx.net (mx115) with SMTP; 23 Jun 2010 00:49:49 +0200 Received: by mail-vw0-f45.google.com with SMTP id 10so416599vws.18 for <[email protected]>; Tue, 22 Jun 2010 15:49:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=tO6LrEorBumZABUX/apq+eDEA5bIc5UK/5H+XoUn1rM=; b=IJGLCKCoAvl3Bxodwee9BuflVFr/cn6iealEXRuudlD03lmk5K6wxf4G4CrKBA951W aPaDn/UmKl5DJ1/hoH+JWn+yqGXlPzW6fllVKdFC+mEIn5oL8T1rygpjX8S2HIjsjQ/Q 3V/HbgiVdnClzAtM/dxQqtTT9tT9me8EpA6u8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=B5WWbzl4cOhy51QsFkUuddit7VCRG8YUTsU6grwnsaLYFAuu+OD3ti19TaWhwh9beH OwbWAUQlIfK8YrY0tJFoML2ZQKD7lmNXCXC67BvYQHeMfVamLpd8ZM6aoPzHp4NryGz0 YM21uMk2C3wSzvzoNmcQzFyCRyOgQqnzJNpkw= MIME-Version: 1.0 Received: by 10.220.127.16 with SMTP id e16mr3445522vcs.138.1277245827782; Tue, 22 Jun 2010 15:30:27 -0700 (PDT) Received: by 10.220.187.129 with HTTP; Tue, 22 Jun 2010 15:30:27 -0700 (PDT) In-Reply-To: <[email protected]> References: <[email protected]> Date: Wed, 23 Jun 2010 08:30:27 +1000 Message-ID: <AANLkTik7bjJNcCoj5hu8caPSBJke3B9agU8isRZGf7Qf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> Subject: Re: jnr-netdb requires Java 6 From: Wayne Meissner <[email protected]> To: Martin von Gagern <[email protected]> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-GMX-Antivirus: 0 (no virus found) X-GMX-Antispam: -2 (not scanned, spam filter disabled); Detail=5D7Q89H36p4L00VTXC6D4q0N+AH0PUCnKGJbGgJLbSXk30NezpdxUg==V1; X-GMX-UID: PgkTfcZsIyd1+TR9eWdrxulaa2FkZpV9 Thanks for pointing both those issues out! Yup, the line.length check should be checking for line.length <1 (or <=3D 0). Will apply those changes and update when I get a chance. btw, if there's anything else needed to make the gentoo build a bit easier, let me know. On 23 June 2010 02:07, Martin von Gagern <[email protected]> wrote: > Dear Wayne, > > the jnr-netdb package you develop currently does require Java 6 because > in jnr/netdb/NetDBIterator.java you make use of String.isEmpty(). It > would be fairly easy to change that requirement to Java 5 by using a > String.length() =3D=3D 0 check instead. > > I also noticed that the line in question not only has this compatibility > problem, but has a bug as well: it contains a check for "line.length < > 0", with line being an array. The length of an array will never be > negative, and in case of zero length the check won't prevent subsequent > access to line[0] in case of a zero-length array, thereby leading to an > ArrayIndexOutOfBoundsException. Haven't experienced this in real life, > but you should probably fix the code in any case, and perhaps add a test > case ensuring proper behaviour. > > https://bugs.gentoo.org/show_bug.cgi?id=3D325079#c1 has a patch addressin= g > both these issues. I'll attach a copy here. > > Greetings, > =A0Martin von Gagern > --------------060301070103000103090602-- --------------enigF5BCBDA9BD9EBB22BAA592A8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwhu3sACgkQRhp6o4m9dFvBMgCbBPtU24TiRsHADRPp+ud8wmBB 7LcAnRT+zKLCvXynPk7YcN953oS37Q6k =hJ+7 -----END PGP SIGNATURE----- --------------enigF5BCBDA9BD9EBB22BAA592A8--