From owner-freebsd-ports@FreeBSD.ORG Sat Feb 7 09:33:58 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 0F8BE5B1; Sat, 7 Feb 2015 09:33:58 +0000 (UTC) Received: from mail.pingpong.net (mail2.pingpong.net [79.136.116.202]) by mx1.freebsd.org (Postfix) with ESMTP id 08BF8FDF; Sat, 7 Feb 2015 09:33:57 +0000 (UTC) Received: from [10.0.1.10] (h-85-24-195-48.na.cust.bahnhof.se [85.24.195.48]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.pingpong.net (Postfix) with ESMTPSA id 99E3951F8; Sat, 7 Feb 2015 10:33:48 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: postgresql93 port and libedit From: Palle Girgensohn X-Mailer: iPhone Mail (12B466) In-Reply-To: Date: Sat, 7 Feb 2015 10:33:48 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20150115160113.GE98528@ivaldir.etoilebsd.net> <20150117004151.GO98528@ivaldir.etoilebsd.net> <171ED59D-E445-4605-B72C-E9ED8A74CA28@pingpong.net> <20150117140935.GQ98528@ivaldir.etoilebsd.net> <20150117145425.GR98528@ivaldir.etoilebsd.net> To: Waitman Gobble Cc: Baptiste Daroussin , "pgsql@FreeBSD.org" , "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: Sat, 07 Feb 2015 09:33:58 -0000 Hello, I switched to Libedit with the latest release, and it appears that some colo= ur code support is missing from Libedit. Any of you know or have ideas how t= o fix this? Is it just not implemented yet in Libedit? I cod of course add a= n option to build with readline, but I am more inclined to just switch back r= ather than having one more option/complication in the port. So could you ple= ase advice, is there a way to make this user happy using Libedit? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D197362 Palle > 17 jan 2015 kl. 16:08 skrev Waitman Gobble : >=20 >> On Sat, Jan 17, 2015 at 7:00 AM, Waitman Gobble wro= te: >>> On Sat, Jan 17, 2015 at 6:54 AM, Baptiste Daroussin w= rote: >>>> On Sat, Jan 17, 2015 at 06:38:10AM -0800, Waitman Gobble wrote: >>>>> On Sat, Jan 17, 2015 at 6:09 AM, Baptiste Daroussin = wrote: >>>>>> On Sat, Jan 17, 2015 at 10:37:49AM +0100, Palle Girgensohn wrote: >>>>>>=20 >>>>>>=20 >>>>>>> 17 jan 2015 kl. 01:41 skrev Baptiste Daroussin : >>>>>>>=20 >>>>>>>> On Thu, Jan 15, 2015 at 08:02:22PM -0800, Waitman Gobble wrote: >>>>>>>>> On Thu, Jan 15, 2015 at 8:01 AM, Baptiste Daroussin wrote: >>>>>>>>>> On Wed, Jan 14, 2015 at 10:27:14PM -0800, Waitman Gobble wrote: >>>>>>>>>> Hi, >>>>>>>>>>=20 >>>>>>>>>> I noticed that postgresql93-client port pulls in readline, which i= s GPLv3. >>>>>>>>>> When I get rid of readline in Makefile 'USES' and also change the= >>>>>>>>>> bottom of the Makefile in postgresql93-server, >>>>>>>>>>=20 >>>>>>>>>> ... >>>>>>>>>> .include "${.CURDIR}/../postgresql92-server/Makefile" >>>>>>>>>>=20 >>>>>>>>>> CONFIGURE_ARGS+=3D--with-libedit-preferred >>>>>>>>>>=20 >>>>>>>>>>=20 >>>>>>>>>> It builds without readline and links against libedit in base: >>>>>>>>> except that libedit is not really an alternative as it does not su= pprot unicode >>>>>>>>> (except in head) one solution would be to try linking against the e= ditline port >>>>>>>>> which contains the same fixes as libedit in head and see if it wor= ks. >>>>>>>>>=20 >>>>>>>>> Best regards, >>>>>>>>> Bapt >>>>>>>>=20 >>>>>>>> Thanks so much for the feedback. I've considered the options regard= ing >>>>>>>> my project and I think it's more work to handle end-user devices wi= th >>>>>>>> a pkg repository if I indeed must manage custom ports built using >>>>>>>> customized sources. Distributing the initial appliance isn't the >>>>>>>> problem, i'm working out an update strategy for down the road. >>>>>>>=20 >>>>>>> https://people.freebsd.org/~bapt/pglibedit.diff >>>>>>>=20 >>>>>>> This patch works for me and accepts perfectly unicode. >>>>>>>=20 >>>>>>> Can anyone from the postgresql team test, generalize to other posteg= resql >>>>>>> versions? (please keep it using the port version of libedit). >>>>>>>=20 >>>>>>> Best regards, >>>>>>> Bapt >>>>>>=20 >>>>>> Hi, >>>>>>=20 >>>>>> Looks like a reasonable patch. I have a hard time finding the differe= nces between readine and ilbedit. It aims at 100% API compatibility. How goo= d is libedit? If it degrades functionality compared to readline it should re= ally be an option, but I agree, lesser options are preferred. >>>>>>=20 >>>>>> Palle >>>>> It is not 100% compatible but I think it implements all pgsql requirem= ents, only >>>>> the version in ports and he head handle correctly unicode. >>>>>=20 >>>>> Some of the default settings are a bit different most ^W but that can b= e changed >>>>> via .editrc >>>>>=20 >>>>> mysql has tips about the differences: >>>>> https://docs.oracle.com/cd/E17952_01/refman-5.6-en/mysql-tips.html >>>>>=20 >>>>> =46rom what I can read in the code psql only uses compatible interface= s. >>>>>=20 >>>>> As the one who have done the latet updates on libedit both base and po= rts, I >>>>> would recommand to only use the version from ports on all version of Fre= eBSD as >>>>> I can add quick fixes if needed. >>>>>=20 >>>>> Once I'm sure the libedit in base is good enough everywhere we would b= e able to >>>>> switch on the base version if people prefers to avoid an external dep.= >>>>>=20 >>>>> Best regards, >>>>> Bapt >>>>=20 >>>> Looks great. The patch looks fine, however there is an issue that the >>>> configure script in postgresql93 src still needs readline. If readline >>>> is already on the machine then it builds fine, however if it is not >>>> then the build fails. adding 'readline' back into USES will fix that >>>> problem, and the resulting client is still linked to libedit and not >>>> readline.. however the pkg will show a dependency on readline and pull >>>> that in. The configure script is based on having readline, if you use >>>> the --without-readline switch it won't even use libedit, however if >>>> you use --with-libedit-preferred it will check for readline and then >>>> switch the library linking order from 'readline libedit' to 'libedit >>>> readline'. >>>>=20 >>>> I think the configure script for postgresql needs some rework so that >>>> it only uses libedit, and the option would be --with-readline or >>>> --with-libedit. >>>>=20 >>>> if 'readline' is removed from the Makefile (and readline is already >>>> installed on the machine) then the package will build fine without the >>>> dependency on readline. It's kind of a tricky predicament that it >>>> needs it but not really. >>>>=20 >>>> As far as a port, I'm not sure how to 'optionally' replace the >>>> configure script with what is in 'files' if the libedit option is >>>> selected. I'm sure there is an example in the ports tree, just haven't >>>> yet taken the time to check. >>>=20 >>> I have no readline installed and I can see: >>> checking for rl_completion_append_character... no >>> checking for rl_completion_matches... yes >>> checking for rl_filename_completion_function... yes >>> checking for append_history... no >>> checking for history_truncate_file... yes >>>=20 >>> Which is what I was expected. >>>=20 >>> With libedit-prefered it checks: >>> READLINE_ORDER=3D"-ledit -lreadline" >>>=20 >>> So from what I can see everything ok :) >>>=20 >>> Bapt >>=20 >>=20 >> Hmmm, I'll check again. The build was failing for me using poudriere. >> it looks to me like the configure script checks for readline existence >> and the with-libedit-preferred check block is inside the readline >> check block.. >>=20 >> -- >> Waitman Gobble >> Los Altos California USA >> 510-830-7975 >=20 > ... I think that's why '--without-readline' option help reads 'without > readline AND libedit' >=20 > --=20 > Waitman Gobble > Los Altos California USA > 510-830-7975