Bug 165245 - [exp-run] Make databases/postgresql90-client the default
Summary: [exp-run] Make databases/postgresql90-client the default
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Chris Rees
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-17 18:20 UTC by Chris Rees
Modified: 2012-03-06 07:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rees freebsd_committer 2012-02-17 18:20:12 UTC
	Set default pgsql version to 9.0-- discussed with upstream who suggested that 9.1 isn't quite yet ready.

	Add ability to use WANT_PGSQL_VER=90+, 90- etc.

	[indented the .if blocks to stop head exploding]

Fix: 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.--ysI4bh2wyzTew7VAkjCxq9ONki9V6ZLGHDV81QXZGMzzzC4J
Content-Type: text/plain; name="patch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="patch.txt"

Index: bsd.database.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.database.mk,v
retrieving revision 1.66
diff -u -r1.66 bsd.database.mk
--- bsd.database.mk	14 Oct 2011 22:30:35 -0000	1.66
+++ bsd.database.mk	17 Feb 2012 18:05:42 -0000
@@ -39,16 +39,14 @@
 #				  If no version is given (by the maintainer via the port or
 #				  by the user via defined variable), try to find the
 #				  currently installed version.  Fall back to default if
-#				  necessary (PostgreSQL-8.4 = 84).
+#				  necessary (PostgreSQL-9.0 = 90).
 # DEFAULT_PGSQL_VER
 #				- PostgreSQL default version.  Can be overridden within a
-#				  port.  Default: 84.
+#				  port.  Default: 90.
 # WANT_PGSQL_VER
 #				- Maintainer can set an arbitrary version of PostgreSQL to
 #				  always build this port with (overrides WITH_PGSQL_VER).
-# IGNORE_WITH_PGSQL
-#				- This variable can be defined if the ports does not support
-#				  one or more versions of PostgreSQL.
+#				  Minimum and maximum versions can be set (e.g. 90+)
 # WITH_PGSQL_VER
 #				- User defined variable to set PostgreSQL version.
 # PGSQL_VER
@@ -173,7 +171,8 @@
 .endif # USE_MYSQL
 
 .if defined(USE_PGSQL)
-DEFAULT_PGSQL_VER?=	84
+VALID_PGSQL_VER=	82 83 84 90 91
+DEFAULT_PGSQL_VER?=	90
 PGSQL82_LIBVER=		5
 PGSQL83_LIBVER=		5
 PGSQL84_LIBVER=		5
@@ -181,24 +180,56 @@
 PGSQL91_LIBVER=		5
 
 # Setting/finding PostgreSQL version we want.
-.if exists(${LOCALBASE}/bin/pg_config)
+.  if exists(${LOCALBASE}/bin/pg_config)
 _PGSQL_VER!=	${LOCALBASE}/bin/pg_config --version | ${SED} -n 's/PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)[^0-9].*/\1\2/p'
-.endif
+.  endif
 
-.if defined(WANT_PGSQL_VER)
-.if defined(WITH_PGSQL_VER) && ${WITH_PGSQL_VER} != ${WANT_PGSQL_VER}
-IGNORE=		cannot install: the port wants postgresql${WANT_PGSQL_VER}-client and you try to install postgresql${WITH_PGSQL_VER}-client
-.endif
-PGSQL_VER=	${WANT_PGSQL_VER}
-.elif defined(WITH_PGSQL_VER)
+.  if defined(WANT_PGSQL_VER)
+.    if ${WANT_PGSQL_VER:M*+}
+.      for version in ${VALID_PGSQL_VER}
+.        if ${WANT_PGSQL_VER:S/+//} <= ${version}
+_WANT_PGSQL_VER+=${version}
+.        endif
+.      endfor
+.    elif ${WANT_PGSQL_VER:M*-}
+.      for version in ${VALID_PGSQL_VER}
+.        if ${WANT_PGSQL_VER:S/-//} >= ${version}
+_WANT_PGSQL_VER+=${version}
+.        endif
+.      endfor
+.    endif
+_WANT_PGSQL_VER?=	${WANT_PGSQL_VER}
+
+.    if defined(WITH_PGSQL_VER) && !empty(_WANT_PGSQL_VER)
+.      for version in ${_WANT_PGSQL_VER}
+.        if ${WITH_PGSQL_VER} == ${version} 
 PGSQL_VER=	${WITH_PGSQL_VER}
-.else
-.if defined(_PGSQL_VER)
+.        endif
+.      endfor
+
+.      if !defined(PGSQL_VER)
+IGNORE=	cannot install: the port wants postgresql-client version ${WANT_PGSQL_VER} and you have set postgresql${WITH_PGSQL_VER}-client in make.conf
+.      endif
+
+# Take lowest allowed version, but take default if allowed
+.    elif !empty(_WANT_PGSQL_VER)
+.      for ver in ${_WANT_PGSQL_VER}
+.        if ${DEFAULT_PGSQL_VER} == ${ver}
+PGSQL_VER=	${ver}
+.        else
+PGSQL_VER?=	${ver}
+.        endif
+.      endfor
+.    elif defined(WITH_PGSQL_VER)
+PGSQL_VER=	${WITH_PGSQL_VER}
+.  endif
+.  else
+.    if defined(_PGSQL_VER)
 PGSQL_VER=	${_PGSQL_VER}
-.else
+.    else
 PGSQL_VER=	${DEFAULT_PGSQL_VER}
-.endif
-.endif # WANT_PGSQL_VER
+.    endif
+.  endif # WANT_PGSQL_VER
 
 .if defined(_PGSQL_VER) && ${PGSQL_VER} != ${_PGSQL_VER}
 IGNORE=		cannot install: the port wants postgresql${PGSQL_VER}-client but you have postgresql${_PGSQL_VER}-client installed
@@ -206,10 +237,6 @@
 
 # And now we are checking if we can use it
 .if defined(PGSQL${PGSQL_VER}_LIBVER)
-# compatibility shim
-.if defined(BROKEN_WITH_PGSQL)
-IGNORE_WITH_PGSQL=${BROKEN_WITH_PGSQL}
-.endif
 .if defined(IGNORE_WITH_PGSQL)
 .	for VER in ${IGNORE_WITH_PGSQL}
 .		if (${PGSQL_VER} == "${VER}")
Comment 1 Chris Rees freebsd_committer 2012-02-17 18:21:55 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

Ask nicely for an exp-run
Comment 2 Erwin Lansing freebsd_committer 2012-02-17 19:26:07 UTC
State Changed
From-To: open->analyzed

Take for -exp run.
Comment 3 Erwin Lansing freebsd_committer 2012-02-19 19:22:39 UTC
State Changed
From-To: analyzed->open

-exp run completed with three direct errors, but only 15027 
finished packages, most likely caused by a cluster error that 
preventet php52-extensions to build. 

Will need a rerun with those 3 ports fixed. 

http://pointyhat.freebsd.org/errorlogs/i386-errorlogs/e.9-exp.20120218105723/thundersnarf-1.3_1,1.log 
http://pointyhat.freebsd.org/errorlogs/i386-errorlogs/e.9-exp.20120218105723/thundercache-6.1_3.log 
http://pointyhat.freebsd.org/errorlogs/i386-errorlogs/e.9-exp.20120218105723/postgresql-plruby-0.5.4_1.log 



Comment 4 Erwin Lansing freebsd_committer 2012-02-19 19:22:39 UTC
Responsible Changed
From-To: portmgr->crees

-exp run completed with three direct errors, but only 15027 
finished packages, most likely caused by a cluster error that 
preventet php52-extensions to build. 

Will need a rerun with those 3 ports fixed. 

http://pointyhat.freebsd.org/errorlogs/i386-errorlogs/e.9-exp.20120218105723/thundersnarf-1.3_1,1.log 
http://pointyhat.freebsd.org/errorlogs/i386-errorlogs/e.9-exp.20120218105723/thundercache-6.1_3.log 
http://pointyhat.freebsd.org/errorlogs/i386-errorlogs/e.9-exp.20120218105723/postgresql-plruby-0.5.4_1.log
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2012-02-20 05:20:53 UTC
State Changed
From-To: open->analyzed

One run has been completed, but new patches needed.
Comment 6 Chris Rees freebsd_committer 2012-02-26 16:17:14 UTC
For the audit trail,

I've fixed thunder* just by modifying the Makefile to accept 84+, but
postgresql-plperl needs a functional change.

I've emailed knu@ with my suggestion, so when he gets back I'll be
able to provide a new patch.

Chris
Comment 7 Chris Rees freebsd_committer 2012-03-01 22:07:28 UTC
State Changed
From-To: analyzed->open

Thanks for the feedback. 


Comment 8 Chris Rees freebsd_committer 2012-03-01 22:07:28 UTC
Responsible Changed
From-To: crees->portmgr

Fix at http://www.bayofrum.net/~crees/patches/pgsql-default-change2.diff
Comment 9 Pav Lucistnik freebsd_committer 2012-03-02 14:58:13 UTC
Responsible Changed
From-To: portmgr->pav

Take for exp-run
Comment 10 Pav Lucistnik freebsd_committer 2012-03-05 22:11:54 UTC
Responsible Changed
From-To: pav->crees

No failures detected in an exp-run, this is good to commit.
Comment 11 dfilter service freebsd_committer 2012-03-06 07:32:05 UTC
crees       2012-03-06 07:31:51 UTC

  FreeBSD ports repository

  Modified files:
    Mk                   bsd.database.mk 
    databases/postgresql-plruby Makefile 
    www/thundercache     Makefile 
    www/thundersnarf     Makefile 
  Log:
  - Set postgresql version 9.0 as default
  - Add facility to set minimum/maximum version ranges in WANT_PGSQL_VER
  - Remove BROKEN_WITH_PGSQL shim
  
  PR:             ports/165245
  Submitted by:   crees (me)
  Reviewed by:    exp-runs by pav and erwin
  Discussed with: girgen
  
  Revision  Changes    Path
  1.67      +63 -31    ports/Mk/bsd.database.mk
  1.42      +2 -4      ports/databases/postgresql-plruby/Makefile
  1.22      +2 -2      ports/www/thundercache/Makefile
  1.7       +2 -2      ports/www/thundersnarf/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 12 Chris Rees freebsd_committer 2012-03-06 07:32:18 UTC
State Changed
From-To: open->closed

Committed. Thanks!