From owner-freebsd-ports@FreeBSD.ORG Mon May 6 18:39:22 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B0489B53; Mon, 6 May 2013 18:39:22 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) by mx1.freebsd.org (Postfix) with ESMTP id 78170A14; Mon, 6 May 2013 18:39:22 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id x12so4439021ief.40 for ; Mon, 06 May 2013 11:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=P+3NM2Y5NuAcGIahjh1J5ZY2zn0VNMnKw/TILNKC9tk=; b=Ujo3DjtlGlsmiTRdLFeYGkMSmRGNeSHd7SuLTUKZTcFGdfRngl1rKY699WTERraFM2 qpNZBk+BkDAWoA2kF5LaWzrfww0+pYdM5ioM4RSzNGY7JqGiq1PvPqEFNO//eV/DuqPo WOk4dHHWUNhQg/hONGqFzgBB3HWWqkSrfbxv8qZkUKK1YB7i+JCzPb1vozSbOusAftIx 2ULlORGKPUnxR3vTdmwauyvl7mcsUmxGCKpru4QdIwrgVLX2cSw2PO1Ulv6Bz7PHh0c4 3Boc5aRR87FstLPs3zV4CliFbzF928cmEdpjzZkjVI3dO56quCQFR4HtnZ0bS1qbysho f6Ew== X-Received: by 10.50.114.131 with SMTP id jg3mr3119305igb.75.1367865562225; Mon, 06 May 2013 11:39:22 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.64.44.76 with HTTP; Mon, 6 May 2013 11:38:52 -0700 (PDT) In-Reply-To: References: <517C1DCE.2050603@peterschmitt.fr> <517C3F8F.2080602@FreeBSD.org> <517C43E6.4080907@peterschmitt.fr> From: Chris Rees Date: Mon, 6 May 2013 19:38:52 +0100 X-Google-Sender-Auth: XCM1GPYCiOrfL39KEflQgMApDhQ Message-ID: Subject: Re: poudriere - postgresql90-client, LDAP, requires ldap.h To: Scot Hetzel Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "pgsql@freebsd.org" , FreeBSD Ports , Palle Girgensohn , Florent Peterschmitt X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 May 2013 18:39:22 -0000 On 28 April 2013 15:37, Chris Rees wrote: > On 28 April 2013 15:36, Scot Hetzel wrote: >> On Sun, Apr 28, 2013 at 9:16 AM, Chris Rees wrote: >>> >>> On 28 April 2013 15:07, Scot Hetzel wrote: >>> > On Sun, Apr 28, 2013 at 6:25 AM, Palle Girgensohn >>> > wrote: >>> >> 28 apr 2013 kl. 10:37 skrev Chris Rees : >>> >> >>> >> > Please CC maintainers when you're asking about specific ports! >>> >> > On 28 April 2013 07:05, Scot Hetzel wrote: >>> >> >> On Sat, Apr 27, 2013 at 4:32 PM, Florent Peterschmitt < >>> >> >> florent@peterschmitt.fr> wrote: >>> >> >> >>> >> >>> Le 27/04/2013 23:13, Matthew Seaman a =E9crit : >>> >> >>>> On 27/04/2013 19:49, Florent Peterschmitt wrote: >>> >> >>>>> Hello, >>> >> >>>>> >>> >> >>>>> I use the latest poudriere-devel to make my own pkg repository= , >>> >> >>>>> and >>> >> >>>>> would like to build postgresql with LDAP support. >>> >> >>>>> >>> >> >>>>> Since it's in a virgin jail, and because the log said =AB hey = I >>> >> >>>>> need >>> >> >>>>> ldap.h =BB, I understand that openldap should be installed but= , is >>> >> >>>>> it >>> >> >>>>> the >>> >> >>>>> good way to do ? For each package requirement, it is needed to >>> >> >>>>> install >>> >> >>>>> it by hand ? (or with previously built packages :) ) >>> >> >>>>> >>> >> >>>> >>> >> >>>> You should use the 'poudriere options' command to enable LDAP >>> >> >>>> support >>> >> >>>> in >>> >> >>>> the postgresql server. >>> >> >>> >>> >> >>> Yep, I did that. Sorry, I missed to say I already have done this= . >>> >> >>> The >>> >> >>> problem is that when building the package, the configure step fa= il >>> >> >>> saying ldap.h is missing. >>> >> >>> >>> >> >>>> Now, when you use poudriere to build the postgresql package, it >>> >> >>>> will >>> >> >>>> have LDAP client added as a requirement -- so poudriere will al= so >>> >> >>>> build >>> >> >>>> you an LDAP package -- and when you go to install postgresql, l= dap >>> >> >>>> will >>> >> >>>> be installed as well as a dependency. >>> >> >>>> >>> >> >>>> Cheers, >>> >> >>>> >>> >> >>>> Matthew >>> >> >>>> >>> >> >>> Yep. But how does work poudriere ? Because I have built postfix = and >>> >> >>> dovecot2 with LDAP support and there was no problem. I think it'= s a >>> >> >>> problem from the port itself and not from poudriere, I should tr= y >>> >> >>> in a >>> >> >>> new system (perhaps, a jail, without poudriere). >>> >> >>> >>> >> >> >>> >> >> The problem seems to be caused by the following from >>> >> >> databases/postgresql91-server/Makefile: >>> >> >> >>> >> >> 66 .if !defined(CLIENT_ONLY) && !defined(SLAVE_ONLY) >>> >> >> 67 SERVER_ONLY=3D yes >>> >> >> 68 USE_RC_SUBR=3D postgresql >>> >> >> 69 USE_PGSQL=3D yes >>> >> >> 70 WANT_PGSQL_VER=3D >>> >> >> ${DISTVERSION:C/([0-9][0-9]*)\.([0-9][0-9]*).*/\1\2/g} >>> >> >> 71 USERS=3D ${PG_USER} >>> >> >> 72 GROUPS=3D ${PG_GROUP} >>> >> >> 73 SUB_FILES+=3D 502.pgsql >>> >> >> 74 .endif >>> >> >> >>> >> >> 81 .if !defined(SLAVE_ONLY) >>> >> >> 82 OPTIONS_DEFINE+=3D NLS DTRACE PAM LDAP GSSAPI OPTIMIZED_CF= LAGS >>> >> >> XML >>> >> >> TZDATA DEBUG KRB5 >>> >> >> 83 OPTIONS_SINGLE=3D KRB5 >>> >> >> 84 OPTIONS_SINGLE_KRB5=3D MIT_KRB5 HEIMDAL_KRB5 >>> >> >> : >>> >> >> 112 OPTIONS_DEFAULT=3D NLS XML TZDATA INTDATE SSL >>> >> >> 113 .endif # !SLAVE_ONLY >>> >> >> >>> >> >> 159 . if ${PORT_OPTIONS:MLDAP} >>> >> >> 160 CONFIGURE_ARGS+=3D--with-ldap >>> >> >> 161 . if defined (SERVER_ONLY) >>> >> >> 162 USE_OPENLDAP=3D yes >>> >> >> 163 . endif >>> >> >> 164 . endif >>> >> >> >>> >> >> NOTE: postgresql90-client/Makefile includes >>> >> >> postgresql90-server/Makefile >>> >> >> which then includes postgresql91-server/Makefile >>> >> >> >>> >> >> Unfortunately, you can't set USE_OPENLDAP as a build depends. Tr= y >>> >> >> commenting out lines 161 and 163 in the >>> >> >> postgresql91-server/Makefile. >>> >> >> This >>> >> >> will add OpenLDAP as a LIB_DEPENDS to the postgresql*-client port= s. >>> >> >> >>> >> > >>> >> > Actually, >>> >> > >>> >> > [crees@medusa]~% psql >>> >> > Shared object "libldap_r-2.4.so.8" not found, required by >>> >> > "libpq.so.5" >>> >> > [crees@medusa]~% >>> >> > >>> >> > LDAP is indeed a LIB_DEPENDS. >>> >> > >>> >> > Palle, Jason, if you don't object I'm going to add || defined >>> >> > (CLIENT_ONLY) to line 161 above. >>> >> > >>> >> > Chris >>> >> >>> >> It seems strange to me that psql should require libldap? That seems >>> >> like a >>> >> bug, or am I missing something? Why would the client side of the >>> >> connection >>> >> need to use ldap? >>> > >>> > >>> > Since the postgresql*-client ports install the below files: >>> > >>> > bin/clusterdb >>> > bin/createdb >>> > bin/createlang >>> > bin/createuser >>> > bin/dropdb >>> > bin/droplang >>> > bin/dropuser >>> > bin/ecpg >>> > bin/pg_config >>> > bin/pg_dump >>> > bin/pg_dumpall >>> > bin/pg_restore >>> > bin/psql >>> > bin/reindexdb >>> > bin/vacuumdb >>> > lib/libecpg.so.6 >>> > lib/libecpg_compat.so.3 >>> > lib/libpgtypes.so.3 >>> > lib/libpq.so.5 >>> > >>> > We'll need someone to check with ldd to see if they require any of th= e >>> > ldap >>> > libraries after commenting out lines 161 and 163. If they don't requi= re >>> > LDAP, then we just need to remove LDAP from line 82, and add the belo= w >>> > between line 82 and 83: >>> > >>> > .if defined (SERVER_ONLY) >>> > OPTIONS_DEFINE+=3D LDAP >>> > .endif >>> > >>> > Then move line 161 to before line 159. >>> >>> Ohononono, you can't just set different OPTIONS for each port, that >>> makes them stomp over the saved ones for each variant-- I got bitten >>> by that before. The simpler solution would be to ignore the setting >>> for LDAP for anything !server. >>> >> It shouldn't be a problem unless both the postgresql*-server and >> postgresql*-client are using the same OPTIONSFILE. >> >> What does make -V OPTIONSFILE display in databases/postgresql*-client an= d >> databases/postgresql*-server? > > It does use the same OPTIONSFILE. This was fixed in r317540. Thanks for the comments and review. Chris