From owner-freebsd-ports@FreeBSD.ORG Sat Jan 17 15:09:00 2015 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2427736; Sat, 17 Jan 2015 15:09:00 +0000 (UTC) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (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 62BF21B1; Sat, 17 Jan 2015 15:09:00 +0000 (UTC) Received: by mail-wi0-f177.google.com with SMTP id r20so1216992wiv.4; Sat, 17 Jan 2015 07:08:58 -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:content-transfer-encoding; bh=7a7NQuXLmw8lTcQ9bh5Ku4tbhMOlRss4rSMMt8f1Te8=; b=YqqxE3GCvv6vvqD5RGaXhyFGJT69UCdm7AM1vPCY143wgai0Qw+94PUO1GtNIYDBsf MQ9qC0ezcWPk0bfXihKiFDVbLoHM9iSF5Er/rth+0nFyrhYQJa5ATF4DfWQFUUPKHk1i AW9U4cguwS/zvh99YXk4Wy3mi1LomfYWYeFAMZF3e6HWViippGHwTxL/OBGtHJDIz77z 6GX/4KJ6Sv1tzJYKoVZjAeWhmeSZ+lU1JKhJbKJ+J3q+PSDAgh/VNNHrhZdjEau1iDt3 c1Y35Kj2xtNgfHuFs5ZKH6TAGC3bafA915cgD0Q6Q9YFAWUYS8W53vO18Cge+EoxkEIJ bv/Q== MIME-Version: 1.0 X-Received: by 10.180.198.51 with SMTP id iz19mr16627904wic.65.1421507338787; Sat, 17 Jan 2015 07:08:58 -0800 (PST) Received: by 10.27.212.129 with HTTP; Sat, 17 Jan 2015 07:08:58 -0800 (PST) In-Reply-To: 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> Date: Sat, 17 Jan 2015 07:08:58 -0800 Message-ID: Subject: Re: postgresql93 port and libedit From: Waitman Gobble To: Baptiste Daroussin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-ports@freebsd.org" , Palle Girgensohn , "pgsql@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, 17 Jan 2015 15:09:00 -0000 On Sat, Jan 17, 2015 at 7:00 AM, Waitman Gobble wrote= : > On Sat, Jan 17, 2015 at 6:54 AM, Baptiste Daroussin wr= ote: >> 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: >>> >> >>> >> >>> >> 17 jan 2015 kl. 01:41 skrev Baptiste Daroussin : >>> >> >>> >> > 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, >>> >> >>>> >>> >> >>>> I noticed that postgresql93-client port pulls in readline, whic= h is GPLv3. >>> >> >>>> When I get rid of readline in Makefile 'USES' and also change t= he >>> >> >>>> bottom of the Makefile in postgresql93-server, >>> >> >>>> >>> >> >>>> ... >>> >> >>>> .include "${.CURDIR}/../postgresql92-server/Makefile" >>> >> >>>> >>> >> >>>> CONFIGURE_ARGS+=3D--with-libedit-preferred >>> >> >>>> >>> >> >>>> >>> >> >>>> It builds without readline and links against libedit in base: >>> >> >>>> >>> >> >>> except that libedit is not really an alternative as it does not = supprot unicode >>> >> >>> (except in head) one solution would be to try linking against th= e editline port >>> >> >>> which contains the same fixes as libedit in head and see if it w= orks. >>> >> >>> >>> >> >>> Best regards, >>> >> >>> Bapt >>> >> >> >>> >> >> Thanks so much for the feedback. I've considered the options rega= rding >>> >> >> my project and I think it's more work to handle end-user devices = with >>> >> >> 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. >>> >> >> >>> >> > >>> >> > https://people.freebsd.org/~bapt/pglibedit.diff >>> >> > >>> >> > This patch works for me and accepts perfectly unicode. >>> >> > >>> >> > Can anyone from the postgresql team test, generalize to other post= egresql >>> >> > versions? (please keep it using the port version of libedit). >>> >> > >>> >> > Best regards, >>> >> > Bapt >>> >> >>> >> Hi, >>> >> >>> >> Looks like a reasonable patch. I have a hard time finding the differ= ences between readine and ilbedit. It aims at 100% API compatibility. How g= ood is libedit? If it degrades functionality compared to readline it should= really be an option, but I agree, lesser options are preferred. >>> >> >>> >> Palle >>> > It is not 100% compatible but I think it implements all pgsql require= ments, only >>> > the version in ports and he head handle correctly unicode. >>> > >>> > Some of the default settings are a bit different most ^W but that can= be changed >>> > via .editrc >>> > >>> > mysql has tips about the differences: >>> > https://docs.oracle.com/cd/E17952_01/refman-5.6-en/mysql-tips.html >>> > >>> > From what I can read in the code psql only uses compatible interfaces= . >>> > >>> > As the one who have done the latet updates on libedit both base and p= orts, I >>> > would recommand to only use the version from ports on all version of = FreeBSD as >>> > I can add quick fixes if needed. >>> > >>> > Once I'm sure the libedit in base is good enough everywhere we would = be able to >>> > switch on the base version if people prefers to avoid an external dep= . >>> > >>> > Best regards, >>> > Bapt >>> >>> 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'. >>> >>> 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. >>> >>> 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. >>> >>> 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. >>> >> >> 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 >> >> Which is what I was expected. >> >> With libedit-prefered it checks: >> READLINE_ORDER=3D"-ledit -lreadline" >> >> So from what I can see everything ok :) >> >> Bapt > > > 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.. > > -- > Waitman Gobble > Los Altos California USA > 510-830-7975 ... I think that's why '--without-readline' option help reads 'without readline AND libedit' --=20 Waitman Gobble Los Altos California USA 510-830-7975