From owner-freebsd-ports@FreeBSD.ORG Thu Jan 15 15:37:50 2015 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CF8AF79 for ; Thu, 15 Jan 2015 15:37:50 +0000 (UTC) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 937511DC for ; Thu, 15 Jan 2015 15:37:49 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id n3so18639647wiv.1 for ; Thu, 15 Jan 2015 07:37:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KnWJvENFYxE0w/QyovNmO0b4zs95+/EStpoxDPivF2o=; b=QtkoHxrt88GrPzCZC7K3tHoRVSyRb7MXF+f6gSORhEJE1/bHhETqkAQwskIKMdIuOb HG/rTK3QHnbyETWabW4hBInoSLIZhRm4Nv72jmKwYyHn7dLuwAU4N5cVk8MSX0nLVEK0 50LPx6w+X+ee/Tc2WDGLZFbUy3XjVfB7jRAoTWDduYig2Ithk56NVOQHF0h8YCcjNJfl sxfAkZVLQYUc+SZLjIOvt1MRJY7uWYynnskn3dcqfcKtZXNqRuzFvo0tprDuFbm302CR oGCoLa2CWmPiySCCBtoiih/0f6OJwOFO8baWBSD9jYyIdIRsgKrPJA2C7zy1W5uNGUTb zR4A== MIME-Version: 1.0 X-Received: by 10.194.108.202 with SMTP id hm10mr19943423wjb.72.1421336267661; Thu, 15 Jan 2015 07:37:47 -0800 (PST) Received: by 10.27.212.129 with HTTP; Thu, 15 Jan 2015 07:37:47 -0800 (PST) In-Reply-To: <54B779BC.1040501@heuristicsystems.com.au> References: <54B779BC.1040501@heuristicsystems.com.au> Date: Thu, 15 Jan 2015 07:37:47 -0800 Message-ID: Subject: Re: postgresql93 port and libedit From: Waitman Gobble To: Dewayne Geraghty Content-Type: text/plain; charset=UTF-8 Cc: freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 15:37:50 -0000 On Thu, Jan 15, 2015 at 12:26 AM, Dewayne Geraghty wrote: > > On 15/01/2015 5:27 PM, Waitman Gobble wrote: >> Hi, >> >> I noticed that postgresql93-client port pulls in readline, which is GPLv3. >> When I get rid of readline in Makefile 'USES' and also change the >> bottom of the Makefile in postgresql93-server, >> >> ... >> .include "${.CURDIR}/../postgresql92-server/Makefile" >> >> CONFIGURE_ARGS+=--with-libedit-preferred >> >> >> It builds without readline and links against libedit in base: >> >> >> # ldd /usr/local/bin/psql >> /usr/local/bin/psql: >> libpq.so.5 => /usr/local/lib/libpq.so.5 (0x800885000) >> libintl.so.8 => /usr/local/lib/libintl.so.8 (0x800ab3000) >> libssl.so.7 => /usr/lib/libssl.so.7 (0x800cbe000) >> libedit.so.7 => /lib/libedit.so.7 (0x800f2a000) >> libthr.so.3 => /lib/libthr.so.3 (0x801161000) >> libc.so.7 => /lib/libc.so.7 (0x801385000) >> libcrypto.so.7 => /lib/libcrypto.so.7 (0x80171e000) >> libncursesw.so.8 => /lib/libncursesw.so.8 (0x801b16000) >> >> >> >> .. there's a link to gettext libintl but that's LGPL (2.1) >> >> Anyhow I haven't done testing with psql linked to libedit instead of >> readline.. There's some noise about this a few years back but I don't >> see anything recent. Anyone have any 'bad' recent experience with >> libedit? pitfalls? It might be good to have libedit added as an >> option. I'm working on an appliance and the readline dependency kinda >> messes things up a bit for me. Obviously other remedies beyond ports >> but I think it could be a nice option. Comments appreciated. >> >> Thanks, >> > > Good catch Waitman. And thanks for sharing an approach to avoid GPLv3 > inclusion. > > Though you've raised an interesting question as to whether the licencing > information displayed by "pkg info" is accurate where a port pulls in > mandatory dependencies that use a more restrictive open source licence. > > Of the subset of ports that I use (servers only), the ports [licences] > that may be of concern are: python27 [PSFL], mediawiki [GPLv2], > mysql56-server [from mysql web GPL], pcre [BSD3CLAUSE] also use readline > and aren't tagged as GPLv3 which they probably should as FreeBSD > metaports requires readline? > > > _______________________________________________ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" There seems to be an issue that makes this problem more complicated, could be worked out. I tried building in poudiere without any readline, configure fails. Adding readline back to USES in client Makefile gets a build, but --with-libedit-preferred links to base libedit. In postgresql configure script, still looks for readline even if it uses libedit. So the package built by poudiere still pulls in readline. ie, if test "$with_readline" = yes; then { $as_echo "$as_me:$LINENO: checking for library containing readline" >&5 $as_echo_n "checking for library containing readline... " >&6; } if test "${pgac_cv_check_readline+set}" = set; then $as_echo_n "(cached) " >&6 else pgac_cv_check_readline=no pgac_save_LIBS=$LIBS if test x"$with_libedit_preferred" != x"yes" then READLINE_ORDER="-lreadline -ledit" else READLINE_ORDER="-ledit -lreadline" fi so basically it's setting the READLINE_ORDER with both libedit and libreadline but in alternate order depending on 'preferred' after a build using 'preferred' the client is linked to libedit, but pkg still pulls in readline as dependency. # pkg install postgresql93-server ... New packages to be INSTALLED: postgresql93-server: 9.3.5 postgresql93-client: 9.3.5 readline: 6.3.8 ... # ldd /usr/local/bin/psql /usr/local/bin/psql: libpq.so.5 => /usr/local/lib/libpq.so.5 (0x2009a000) libintl.so.8 => /usr/local/lib/libintl.so.8 (0x200c9000) libssl.so.7 => /usr/lib/libssl.so.7 (0x200db000) libedit.so.7 => /lib/libedit.so.7 (0x2013e000) libthr.so.3 => /lib/libthr.so.3 (0x20173000) libc.so.7 => /lib/libc.so.7 (0x20200000) libcrypto.so.7 => /lib/libcrypto.so.7 (0x20400000) libncursesw.so.8 => /lib/libncursesw.so.8 (0x2019e000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x20384000) Apparently this behavior is because libedit doesn't work properly on some (non BSD) platforms. (?) ...reference: the notes in the configure script. So some work would need to be done to alter the configure script and pull out the readline stuff, (but should probably be an option). This makes for a more complicated port, but it's doable. For my own project I can make a custom port with readline stripped out, but for everyone with an 'optionally really remove readline' option that would be a bigger challenge I think. -- Waitman Gobble Los Altos California USA 510-830-7975