Re: ports default version system

2013-11-10 Thread olli hauer
On 2013-11-09 03:34, Allan Jude wrote:
 Attached is a proposed patch for Mk/bsd.default-versions.mk
 
 Currently, perl, python, ruby and tcl are supported
 
 The patch adds support for apache, fpc, mysql, pgsql, and php
 
 Users can specify in /etc/make.conf
 
 DEFAULT_VERSIONS= perl5=5.18 ruby=2.0 php=5.3 mysql=55p
 
 and change the default version of php from lang/php5 to lang/php53
 and mysql from database/mysql55-server to database/perconba55-server
 etc.
 
 The apache part of the patch might also consider deprecating the
 APACHE_PORT make.conf variable.
 
 Using the 'old way' produces a warning the same way it does for ruby,
 perl etc.
 

I'm reviewing the apache part, at the first look it seems OK, at the second
it seems to overwrites the version check logic by always assigning
the default version regardless if the default version is fine for the port.


-- 
olli
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: ports default version system

2013-11-10 Thread Allan Jude
On 2013-11-10 15:36, olli hauer wrote:
 On 2013-11-09 03:34, Allan Jude wrote:
 Attached is a proposed patch for Mk/bsd.default-versions.mk

 Currently, perl, python, ruby and tcl are supported

 The patch adds support for apache, fpc, mysql, pgsql, and php

 Users can specify in /etc/make.conf

 DEFAULT_VERSIONS= perl5=5.18 ruby=2.0 php=5.3 mysql=55p

 and change the default version of php from lang/php5 to lang/php53
 and mysql from database/mysql55-server to database/perconba55-server
 etc.

 The apache part of the patch might also consider deprecating the
 APACHE_PORT make.conf variable.

 Using the 'old way' produces a warning the same way it does for ruby,
 perl etc.

 I'm reviewing the apache part, at the first look it seems OK, at the second
 it seems to overwrites the version check logic by always assigning
 the default version regardless if the default version is fine for the port.


That might be a mistake on my part, although with the original code, I
couldn't get it to ever use anything except apache22 no matter what I
did, so it might have been broken before the patch too

-- 
Allan Jude




signature.asc
Description: OpenPGP digital signature


Re: ports default version system

2013-11-10 Thread olli hauer
On 2013-11-10 21:38, Allan Jude wrote:
 On 2013-11-10 15:36, olli hauer wrote:
 On 2013-11-09 03:34, Allan Jude wrote:
 Attached is a proposed patch for Mk/bsd.default-versions.mk

 Currently, perl, python, ruby and tcl are supported

 The patch adds support for apache, fpc, mysql, pgsql, and php

 Users can specify in /etc/make.conf

 DEFAULT_VERSIONS= perl5=5.18 ruby=2.0 php=5.3 mysql=55p

 and change the default version of php from lang/php5 to lang/php53
 and mysql from database/mysql55-server to database/perconba55-server
 etc.

 The apache part of the patch might also consider deprecating the
 APACHE_PORT make.conf variable.

 Using the 'old way' produces a warning the same way it does for ruby,
 perl etc.

 I'm reviewing the apache part, at the first look it seems OK, at the second
 it seems to overwrites the version check logic by always assigning
 the default version regardless if the default version is fine for the port.


 That might be a mistake on my part, although with the original code, I
 couldn't get it to ever use anything except apache22 no matter what I
 did, so it might have been broken before the patch too
 

Until now the only way to define for example apache24 as default is to use
APACHE_PORT=www/apache24 in make.conf

I will look into this but it needs some time ...

-- 
olli
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: ports default version system

2013-11-09 Thread Florian Smeets
On 09/11/13 05:42, Eitan Adler wrote:
 On Fri, Nov 8, 2013 at 9:34 PM, Allan Jude free...@allanjude.com wrote:
 Attached is a proposed patch for Mk/bsd.default-versions.mk

I had a quick look at the PHP and MySQL parts and they look sane to me,
but don't take this as an Approved by, as I'm sure ale want's to have a
look at it, too. :)

 DEFAULT_VERSIONS is a really poorly thought out API which is hard to
 read, hard to parse, and makes make -V far less useful.  It pushes
 parsing logic into every single consumer.

Why do we have to discuss this in a thread that just extends the usage
of the feature, and not the original commit/discussion? Please don't
hijack this thread.

Florian



signature.asc
Description: OpenPGP digital signature


Re: ports default version system

2013-11-09 Thread Mark Felder

On Nov 8, 2013, at 20:34, Allan Jude free...@allanjude.com wrote:

 and change the default version of php from lang/php5 to lang/php53

Wouldn't that need to be set to lang/php54 as default?
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: ports default version system

2013-11-09 Thread Allan Jude
On 2013-11-09 11:00, Mark Felder wrote:
 On Nov 8, 2013, at 20:34, Allan Jude free...@allanjude.com wrote:

 and change the default version of php from lang/php5 to lang/php53
 Wouldn't that need to be set to lang/php54 as default?
The port for php 5.4 is called lang/php5 

confusingly, the default port for php is always lang/php5, and every
other version is lang/php53 or lang/php55 etc. so when the default gets
bumped, php 5.4 will become lang/php54 and php5.5 will change from
lang/php55 to lang/php5

-- 
Allan Jude




signature.asc
Description: OpenPGP digital signature


Re: ports default version system

2013-11-09 Thread Mark Felder

On Nov 9, 2013, at 11:09, Allan Jude free...@allanjude.com wrote:

 On 2013-11-09 11:00, Mark Felder wrote:
 On Nov 8, 2013, at 20:34, Allan Jude free...@allanjude.com wrote:
 
 and change the default version of php from lang/php5 to lang/php53
 Wouldn't that need to be set to lang/php54 as default?
 The port for php 5.4 is called lang/php5 
 
 confusingly, the default port for php is always lang/php5, and every
 other version is lang/php53 or lang/php55 etc. so when the default gets
 bumped, php 5.4 will become lang/php54 and php5.5 will change from
 lang/php55 to lang/php5
 

Maybe this should be coordinated with the move of lang/php5 to lang/php54 then? 
PHP 5.3 is EOL as of March and only receives critical security fixes now. It 
would also unexpectedly downgrade existing users to 5.3 in some scenarios.

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: ports default version system

2013-11-09 Thread Florian Smeets
On 09/11/13 18:14, Mark Felder wrote:
 
 On Nov 9, 2013, at 11:09, Allan Jude free...@allanjude.com wrote:
 
 On 2013-11-09 11:00, Mark Felder wrote:
 On Nov 8, 2013, at 20:34, Allan Jude free...@allanjude.com
 wrote:
 
 and change the default version of php from lang/php5 to
 lang/php53
 Wouldn't that need to be set to lang/php54 as default?
 The port for php 5.4 is called lang/php5
 
 confusingly, the default port for php is always lang/php5, and
 every other version is lang/php53 or lang/php55 etc. so when the
 default gets bumped, php 5.4 will become lang/php54 and php5.5 will
 change from lang/php55 to lang/php5

No. lang/php5 will die, see r321684 and
http://lists.freebsd.org/pipermail/freebsd-ports/2013-July/084714.html

 
 
 Maybe this should be coordinated with the move of lang/php5 to
 lang/php54 then? PHP 5.3 is EOL as of March and only receives
 critical security fixes now. It would also unexpectedly downgrade
 existing users to 5.3 in some scenarios.
 

I think you misunderstood what Alan said, as did I on my first read of
the email.

 Users can specify in /etc/make.conf

 DEFAULT_VERSIONS= perl5=5.18 ruby=2.0 php=5.3 mysql=55p

 and change the default version of php from lang/php5 to lang/php53

On reading this a second time it became clear to me that he is not
suggesting changing the default PHP to 5.3, it was merely an example
what users can do if they build their own packages.

Florian



signature.asc
Description: OpenPGP digital signature


Re: ports default version system

2013-11-09 Thread Mark Felder

On Nov 9, 2013, at 11:47, Florian Smeets f...@smeets.im wrote:

 On reading this a second time it became clear to me that he is not
 suggesting changing the default PHP to 5.3, it was merely an example
 what users can do if they build their own packages.

Yep. My mistake!
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


ports default version system

2013-11-08 Thread Allan Jude
Attached is a proposed patch for Mk/bsd.default-versions.mk

Currently, perl, python, ruby and tcl are supported

The patch adds support for apache, fpc, mysql, pgsql, and php

Users can specify in /etc/make.conf

DEFAULT_VERSIONS= perl5=5.18 ruby=2.0 php=5.3 mysql=55p

and change the default version of php from lang/php5 to lang/php53
and mysql from database/mysql55-server to database/perconba55-server
etc.

The apache part of the patch might also consider deprecating the
APACHE_PORT make.conf variable.

Using the 'old way' produces a warning the same way it does for ruby,
perl etc.


-- 
Allan Jude
Index: Mk/bsd.apache.mk
===
--- Mk/bsd.apache.mk(revision 333272)
+++ Mk/bsd.apache.mk(working copy)
@@ -80,7 +80,13 @@
 
 Apache_Pre_Include=bsd.apache.mk
 
-DEFAULT_APACHE_VERSION=22
+.include ${PORTSDIR}/Mk/bsd.default-versions.mk
+
+.if defined(DEFAULT_APACHE_VER)
+WARNING+=  DEFAULT_APACHE_VER is defined, consider using 
DEFAULT_VERSIONS=apache=${DEFAULT_APACHE_VER} instead
+.endif
+
+DEFAULT_APACHE_VERSION?=   ${APACHE_DEFAULT:S/.//}
 APACHE_SUPPORTED_VERSION=  22 24 # preferred version first
 
 # Print warnings
@@ -335,19 +341,17 @@
 .  endif
 .endif
 
-.if ${APACHE_VERSION} = 22
 AP_BUILDEXT=   la
-APACHEMODDIR=  libexec/apache${APACHE_VERSION}
-APACHEINCLUDEDIR=include/apache${APACHE_VERSION}
-APACHEETCDIR=  etc/apache${APACHE_VERSION}
-APACHE_PORT?=  www/apache${APACHE_VERSION}
-.endif
+APACHEMODDIR=  libexec/apache${DEFAULT_APACHE_VERSION}
+APACHEINCLUDEDIR=include/apache${DEFAULT_APACHE_VERSION}
+APACHEETCDIR=  etc/apache${DEFAULT_APACHE_VERSION}
+APACHE_PORT?=  www/apache${DEFAULT_APACHE_VERSION}
 
 PLIST_SUB+=APACHEMODDIR=${APACHEMODDIR} \
APACHEINCLUDEDIR=${APACHEINCLUDEDIR} \
APACHEETCDIR=${APACHEETCDIR}
 
-APACHE_PKGNAMEPREFIX=  ap${APACHE_VERSION}-
+APACHE_PKGNAMEPREFIX=  ap${DEFAULT_APACHE_VERSION}-
 .if defined(AP_FAST_BUILD)
 PKGNAMEPREFIX?=${APACHE_PKGNAMEPREFIX}
 .endif
Index: Mk/bsd.database.mk
===
--- Mk/bsd.database.mk  (revision 333272)
+++ Mk/bsd.database.mk  (working copy)
@@ -102,8 +102,18 @@
 # FIREBIRD_VER
 #  - Detected Firebird version.
 
+.include ${PORTSDIR}/Mk/bsd.default-versions.mk
+
+.if defined(DEFAULT_MYSQL_VER)
+WARNING+=  DEFAULT_MYSQL_VER is defined, consider using 
DEFAULT_VERSIONS=mysql=${DEFAULT_MYSQL_VER} instead
+.endif
+
+.if defined(DEFAULT_PGSQL_VER)
+WARNING+=  DEFAULT_PGSQL_VER is defined, consider using 
DEFAULT_VERSIONS=pgsql=${DEFAULT_PGSQL_VER} instead
+.endif
+
 .if defined(USE_MYSQL)
-DEFAULT_MYSQL_VER?=55
+DEFAULT_MYSQL_VER?=${MYSQL_DEFAULT:S/.//}
 # MySQL client version currently supported.
 MYSQL51_LIBVER=16
 MYSQL53m_LIBVER=   16
@@ -190,7 +200,7 @@
 
 .if defined(USE_PGSQL)
 VALID_PGSQL_VER=   84 90 91 92 93
-DEFAULT_PGSQL_VER?=90
+DEFAULT_PGSQL_VER?=${PGSQL_DEFAULT:S/.//}
 PGSQL83_LIBVER=5
 PGSQL84_LIBVER=5
 PGSQL90_LIBVER=5
Index: Mk/bsd.default-versions.mk
===
--- Mk/bsd.default-versions.mk  (revision 333272)
+++ Mk/bsd.default-versions.mk  (working copy)
@@ -17,11 +17,16 @@
 ${_l:U}_DEFAULT=   ${lang:C/.*=//g}
 .endfor
 
+APACHE_DEFAULT?=   2.2
+FPC_DEFAULT?=  2.6.2
+MYSQL_DEFAULT?=5.5
 PERL5_DEFAULT?=5.16
-RUBY_DEFAULT?= 1.9
-TCLTK_DEFAULT?=8.6
+PGSQL_DEFAULT?=9.0
+PHP_DEFAULT?=  5.4
 PYTHON_DEFAULT?=   2.7
 PYTHON2_DEFAULT?=  2.7
 PYTHON3_DEFAULT?=  3.3
+RUBY_DEFAULT?= 1.9
+TCLTK_DEFAULT?=8.6
 
 .endif
Index: Mk/bsd.fpc.mk
===
--- Mk/bsd.fpc.mk   (revision 333272)
+++ Mk/bsd.fpc.mk   (working copy)
@@ -27,10 +27,16 @@
 
 _FPCMKINCLUDED=yes
 
+.include ${PORTSDIR}/Mk/bsd.default-versions.mk
+
+.if defined(DEFAULT_FPC_VER)
+WARNING+=  DEFAULT_FPC_VER is defined, consider using 
DEFAULT_VERSIONS=fpc=${DEFAULT_FPC_VER} instead
+.endif
+
 FPC_Include_MAINTAINER=a...@freebsd.org
 FPC_Pre_Include=   bsd.fpc.mk
 
-DEFAULT_FPC_VER=   2.6.2
+DEFAULT_FPC_VER=   ${FPC_DEFAULT}
 FPC_VER=   ${DEFAULT_FPC_VER}
 FPC_ARCH=  ${ARCH:S/amd64/x86_64/}
 
Index: Mk/bsd.php.mk
===
--- Mk/bsd.php.mk   (revision 333272)
+++ Mk/bsd.php.mk   (working copy)
@@ -39,13 +39,19 @@
 
 _PHPMKINCLUDED=yes
 
+.include ${PORTSDIR}/Mk/bsd.default-versions.mk
+
+.if defined(DEFAULT_PHP_VER)
+WARNING+=  DEFAULT_PHP_VER is defined, consider using 
DEFAULT_VERSIONS=php=${DEFAULT_PHP_VER} instead
+.endif
+
 PHPBASE?=