From owner-freebsd-ports@FreeBSD.ORG Wed Aug 31 07:11:19 2011 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF29A106564A; Wed, 31 Aug 2011 07:11:19 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward15.mail.yandex.net (forward15.mail.yandex.net [IPv6:2a02:6b8:0:801::5]) by mx1.freebsd.org (Postfix) with ESMTP id DEEDE8FC13; Wed, 31 Aug 2011 07:11:18 +0000 (UTC) Received: from smtp14.mail.yandex.net (smtp14.mail.yandex.net [95.108.131.192]) by forward15.mail.yandex.net (Yandex) with ESMTP id 402E69E2389; Wed, 31 Aug 2011 11:11:17 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1314774677; bh=Qm4ClbhE6iNRKTGB6cMz6jg3pL4Ady7ognyd+cmza0Q=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=lz7EwAp5Oa2nse6NE8Tw1pD++aB7Ipg4bPbemc2Y9EtcmE93PBaqZz+DJMeygSXQ5 7g0s3+x8RuxFozXrklXRVsqAZsDlqL115P/U1OVGQQgWeYM0x4QnwisYq8aIK1xjnh yiX6dKV3sLrrpYz83ep4zLaPAEsm7qz6Z5FsyuAY= Received: from smtp14.mail.yandex.net (localhost [127.0.0.1]) by smtp14.mail.yandex.net (Yandex) with ESMTP id 21E6F1B603AB; Wed, 31 Aug 2011 11:11:17 +0400 (MSD) Received: from unknown (unknown [213.27.65.65]) by smtp14.mail.yandex.net (nwsmtp/Yandex) with ESMTP id BGUK0EhM; Wed, 31 Aug 2011 11:11:16 +0400 X-Yandex-Spam: 1 Message-ID: <4E5DDE91.80500@yandex.ru> Date: Wed, 31 Aug 2011 11:11:13 +0400 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:6.0) Gecko/20110828 Thunderbird/6.0 MIME-Version: 1.0 To: FreeBSD Ports Mailing List References: <4E4A8AB7.5080501@yandex.ru> <4E4C0048.5090509@yandex.ru> In-Reply-To: <4E4C0048.5090509@yandex.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Chris Rees , Palle Girgensohn Subject: Re: Some concerns about our postgresql and plpython ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2011 07:11:20 -0000 So... two weeks are now passed and i still see no objections from maintainer. Can please anybody commit? It will be terrible sad if work that took so much time and energy will remains unfinished. Thanks. Ruslan Mahmatkhanov wrote on 17.08.2011 21:54: > > So i split this up to three pr's as was suggested by Mark: > 1. Python pkg-plist fix for WITHOUT_THREADS case: > http://www.freebsd.org/cgi/query-pr.cgi?pr=159842 > 2. postgresql-plpython unbreak: > http://www.freebsd.org/cgi/query-pr.cgi?pr=159843 > 3. postgresql9x-client unbreak: > http://www.freebsd.org/cgi/query-pr.cgi?pr=159844 > > Palle (maintainer of postgresql ports) cc'ed. > > Thanks in advance for handling this. > > PS. I just found that the similar plist fix was submitted for python26 a > year ago: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/148406 > > > Ruslan Mahmatkhanov wrote on 16.08.2011 19:20: >> Hi there. >> >> We have databases/postgresql-plpython, that is marked as broken with >> this message: "Does not configure without threaded Python", but this is >> totally wrong - it actually does. I checked the internets and found >> this: [1] and [2]. People are actually had problems when building it >> WITH threaded python (that is built with threads support by default). >> Rebuilding python w/o threads support do the trick actually. But if you >> will try to build this port with threads-aware python, you'll get this >> error message: >> >> """ >> checking whether Python is compiled with thread support... yes >> configure: error: threaded Python not supported on this platform >> """ >> >> But the funny thing that it actually builds and works fine with threaded >> python too :). We just need to apply this patch to postgresqlXX-server's >> configure: >> >> - openbsd*|freebsd*) >> + openbsd*) >> >> And then there is no error: >> >> """ >> checking whether Python is compiled with thread support... yes >> checking for main in -lm... yes >> """ >> >> So what i did - i have tested the build and runtime of 8.4, 9.0, 9.1b3. >> both with threads-aware python and threadless python (version 2.7.2, >> runtime is tested only on 9-CURRENT, but with all the three PostgreSQL >> versions). >> And all of this configurations works well. For testing i'm used sample >> function (pymax.sql) from PosgreSQL manual and simple script >> (plpython.sh), that adds/removes and runs the function: >> >> """ >> [mrk@smeshariki2 plpython]> cat pymax.sql >> CREATE FUNCTION pymax (a integer, b integer) >> RETURNS integer >> AS $$ >> if a > b: >> return a >> return b >> $$ LANGUAGE plpythonu; >> """ >> >> """ >> [mrk@smeshariki2 plpython]> cat plpython.sh >> #!/bin/sh >> >> createlang -U pgsql plpythonu test >> psql -U pgsql test -f pymax.sql >> psql -U pgsql test -c "select pymax(1,2)" >> psql -U pgsql test -c "drop function pymax(a integer, b integer)" >> droplang -U pgsql plpythonu test >> """ >> >> To build databases/postgresql-plpython with PostgreSQL 9.1b3 i've used >> patch from [4] by Martin Neubauer , >> it is also included into my patch [3]. Updated regexp also working >> fine with 8.4 and 9.0. >> >> plpython module for 9.0 and 9.1 was renamed to plpython2.so, but there >> is also plpython.so symlink in 9.0 that points to plpython2.so. 9.1 also >> installs some extension files, so i fixed pkg-plists accordingly. >> >> Since 9.0 PostgreSQL guys use docbook for building all the >> documentation, including man-pages. They ever listed all the >> dependencies needed on FreeBSD to make it build. See [5]. But because >> our postgresql-client ports didn't include needed dependencies, their >> build are broken. In particular: >> >> postgresql91-client is broken on FreeBSD-8.2 >> postgresql90-client is broken on FreeBSD-7.4 >> postgresql91-client is broken on FreeBSD-7.4 >> >> So i have fixed this too by adding this deps to the ports. And i'm not >> see another solution. We need man-pages for postgresql9x-client, and >> man-pages needs all that docbook stuff. >> >> To make lang/python27 build without threads under tinderbox, i was >> forced to fix it's plist. Please see patch [6]. Probably similar patch >> should be applied against other python versions. >> >> The plpython port is unmantained, so please commit this anybody. >> Below are build logs of various configurations. >> >> Threads-aware python: >> --------------------- >> 8.2: >> http://happy-nation.by.ru/ports/tb/8.2/postgresql-plpython-8.4.8_1.log >> 8.2: >> http://happy-nation.by.ru/ports/tb/8.2/postgresql-plpython-9.0.4_1.log >> 8.2: >> http://happy-nation.by.ru/ports/tb/8.2/postgresql-plpython-9.1.b3_1.log >> 7.4: >> http://happy-nation.by.ru/ports/tb/7.4/postgresql-plpython-8.4.8_1.log >> 7.4: http://happy-nation.by.ru/ports/tb/7.4/postgresql-client-9.0.4_1.log >> 7.4: >> http://happy-nation.by.ru/ports/tb/7.4/postgresql-plpython-9.1.b3_1.log >> >> Threadless python: >> ------------------ >> 8.2: >> http://happy-nation.by.ru/ports/tb/8.2/postgresql-plpython-8.4.8_1-wo-threads.log >> >> >> 8.2: >> http://happy-nation.by.ru/ports/tb/8.2/postgresql-plpython-9.0.4_1-wo-threads.log >> >> >> 8.2: >> http://happy-nation.by.ru/ports/tb/8.2/postgresql-plpython-9.1.b3_1-wo-threads.log >> >> >> 7.4: >> http://happy-nation.by.ru/ports/tb/7.4/postgresql-plpython-8.4.8_1-wo-threads.log >> >> >> 7.4: >> http://happy-nation.by.ru/ports/tb/7.4/postgresql-plpython-9.0.4_1-wo-threads.log >> >> >> 7.4: >> http://happy-nation.by.ru/ports/tb/7.4/postgresql-plpython-9.1.b3_1-wo-threads.log >> >> >> >> To sum up what is included into patch [3]: >> - databases/postgresql-plpython no more marked as broken, since it >> builds both with threaded and threaless python on all supported >> FreeBSD versions with three major PostgreSQL branches >> - added configure patch for PostgreSQL 8.4, 9.0, 9.1 to make it able to >> build plpython threads-aware python >> - merge changed regexp to make plpython built with 9.1b3 from [4] >> - fix plists for postgresql9x-server/pkg-plist-plpython (plpython2.so >> and extensions) >> - fix build of postgresql9x-client (docbook related deps added) >> - portrevisions for -client and -plpython bumped >> >> I know that 8.2 and 8.3 are still supported branches, but i'm not much >> interested in them, so hadn't ever tried them, but believe that the same >> fixes applies. >> Please let me know if anybody actually need them, so i'll take a look >> at it in my spare time. >> >> Sorry for the long letter and my engrish :) >> >> [1] http://forums.freebsd.org/showthread.php?t=19472 >> [2] >> http://postgresql.1045698.n5.nabble.com/Threaded-python-on-FreeBSD-td1955052.html >> >> >> [3] http://happy-nation.by.ru/ports/postgresql-plpython-unbreak.diff.txt >> [4] http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/159319 >> [5] http://www.postgresql.org/docs/9.0/static/docguide-toolsets.html >> [6] >> http://happy-nation.by.ru/ports/fix-python27-plist-without-threads.diff.txt -- Regards, Ruslan Tinderboxing kills... the drives.