Re: fix PHP version in doku wiki

2017-11-23 Thread Stuart Henderson
On 2017/11/23 17:36, Landry Breuil wrote:
> Digging a bit more, on the long term (for 6.3?) we'll have to switch to
> php7 by default, as only libsodium-php-1.x seems to support php 5.6,
> libsodium-php-2.x only targets 7.x, and the 1.x branch wont receive
> updates anymore.

There are several extensions like that. We need version infrastructure
for multiple PHP versions in pecl.port.mk.

libsodium is relatively easy - it's in core PHP for 7.2 anyway.



Re: fix PHP version in doku wiki

2017-11-23 Thread Rafael Sadowski
On Thu Nov 23, 2017 at 04:28:44PM +, Stuart Henderson wrote:
> On 2017/11/23 17:15, Landry Breuil wrote:
> > On Wed, Nov 22, 2017 at 10:55:14AM +, Stuart Henderson wrote:
> > > On 2017/11/21 10:22, Rafael Sadowski wrote:
> > > > PHP message: PHP Fatal error:  Uncaught exception 'Exception' with 
> > > > message 'There is no suitable CSPRNG installed on your system' in 
> > > > /dokuwiki/vendor/paragonie/random_compat/lib/random.php:203
> > > 
> > > This came up before. The deps should be changed to install pecl-libsodium
> > > or php-mcrypt.
> > 
> > Funnily, i faced the exact same issue today when migrating my work
> > dokuwiki install from 5.7 to 6.2, the previous testing instance was
> > working fine on 6.1, and started failing with 6.2 (ie you can see the
> > index, but it blows the same as soon as you try to login).
> > Installing/enabling pecl-libsodium solved the issue, and since mcrypt is
> > dead upstream, is deprecated in php 7.1 and seems replaced by libsodium
> > in php 7.2 (ref:
> > https://serverpilot.io/community/articles/how-to-install-the-php-mcrypt-extension.html),
> >  how about the following:
> > 
> > Index: Makefile
> > ===
> > RCS file: /cvs/ports/www/dokuwiki/Makefile,v
> > retrieving revision 1.23
> > diff -u -r1.23 Makefile
> > --- Makefile10 May 2017 12:32:48 -  1.23
> > +++ Makefile23 Nov 2017 16:10:30 -
> > @@ -27,7 +27,8 @@
> >  TINSTDIR = ${TRUEPREFIX}/dokuwiki
> >  SUBST_VARS =   INSTDIR TINSTDIR
> >  
> > -RUN_DEPENDS =  lang/php/${MODPHP_VERSION},-gd
> > +RUN_DEPENDS =  lang/php/${MODPHP_VERSION},-gd \
> > +   security/pecl-libsodium
> >  
> >  do-install:
> > cp -Rp ${WRKDIST} ${INSTDIR}
> > 
> > Worth backporting to 6.2 ?
> > 
> 
> Needs REVISION bump, then it's ok with me. I doubt it's really
> worth the backport though..
> 

Thanks for the test. I didn't find any time.
Ok for me too with the REVISION bump. I would love to see it in -stable,
it doesn't hurt anyone. But It's up to you.

Rafael



Re: fix PHP version in doku wiki

2017-11-23 Thread Pierre-Emmanuel André
On Thu, Nov 23, 2017 at 04:28:44PM +, Stuart Henderson wrote:
> On 2017/11/23 17:15, Landry Breuil wrote:
> > On Wed, Nov 22, 2017 at 10:55:14AM +, Stuart Henderson wrote:
> > > On 2017/11/21 10:22, Rafael Sadowski wrote:
> > > > PHP message: PHP Fatal error:  Uncaught exception 'Exception' with 
> > > > message 'There is no suitable CSPRNG installed on your system' in 
> > > > /dokuwiki/vendor/paragonie/random_compat/lib/random.php:203
> > > 
> > > This came up before. The deps should be changed to install pecl-libsodium
> > > or php-mcrypt.
> > 
> > Funnily, i faced the exact same issue today when migrating my work
> > dokuwiki install from 5.7 to 6.2, the previous testing instance was
> > working fine on 6.1, and started failing with 6.2 (ie you can see the
> > index, but it blows the same as soon as you try to login).
> > Installing/enabling pecl-libsodium solved the issue, and since mcrypt is
> > dead upstream, is deprecated in php 7.1 and seems replaced by libsodium
> > in php 7.2 (ref:
> > https://serverpilot.io/community/articles/how-to-install-the-php-mcrypt-extension.html),
> >  how about the following:
> > 
> > Index: Makefile
> > ===
> > RCS file: /cvs/ports/www/dokuwiki/Makefile,v
> > retrieving revision 1.23
> > diff -u -r1.23 Makefile
> > --- Makefile10 May 2017 12:32:48 -  1.23
> > +++ Makefile23 Nov 2017 16:10:30 -
> > @@ -27,7 +27,8 @@
> >  TINSTDIR = ${TRUEPREFIX}/dokuwiki
> >  SUBST_VARS =   INSTDIR TINSTDIR
> >  
> > -RUN_DEPENDS =  lang/php/${MODPHP_VERSION},-gd
> > +RUN_DEPENDS =  lang/php/${MODPHP_VERSION},-gd \
> > +   security/pecl-libsodium
> >  
> >  do-install:
> > cp -Rp ${WRKDIST} ${INSTDIR}
> > 
> > Worth backporting to 6.2 ?
> > 
> 
> Needs REVISION bump, then it's ok with me. I doubt it's really
> worth the backport though..
> 

ok pea@ with REVISION bump



Re: fix PHP version in doku wiki

2017-11-23 Thread Landry Breuil
On Thu, Nov 23, 2017 at 04:28:44PM +, Stuart Henderson wrote:
> On 2017/11/23 17:15, Landry Breuil wrote:
> > On Wed, Nov 22, 2017 at 10:55:14AM +, Stuart Henderson wrote:
> > > On 2017/11/21 10:22, Rafael Sadowski wrote:
> > > > PHP message: PHP Fatal error:  Uncaught exception 'Exception' with 
> > > > message 'There is no suitable CSPRNG installed on your system' in 
> > > > /dokuwiki/vendor/paragonie/random_compat/lib/random.php:203
> > > 
> > > This came up before. The deps should be changed to install pecl-libsodium
> > > or php-mcrypt.
> > 
> > Funnily, i faced the exact same issue today when migrating my work
> > dokuwiki install from 5.7 to 6.2, the previous testing instance was
> > working fine on 6.1, and started failing with 6.2 (ie you can see the
> > index, but it blows the same as soon as you try to login).
> > Installing/enabling pecl-libsodium solved the issue, and since mcrypt is
> > dead upstream, is deprecated in php 7.1 and seems replaced by libsodium
> > in php 7.2 (ref:
> > https://serverpilot.io/community/articles/how-to-install-the-php-mcrypt-extension.html),
> >  how about the following:
> > 
> > Index: Makefile
> > ===
> > RCS file: /cvs/ports/www/dokuwiki/Makefile,v
> > retrieving revision 1.23
> > diff -u -r1.23 Makefile
> > --- Makefile10 May 2017 12:32:48 -  1.23
> > +++ Makefile23 Nov 2017 16:10:30 -
> > @@ -27,7 +27,8 @@
> >  TINSTDIR = ${TRUEPREFIX}/dokuwiki
> >  SUBST_VARS =   INSTDIR TINSTDIR
> >  
> > -RUN_DEPENDS =  lang/php/${MODPHP_VERSION},-gd
> > +RUN_DEPENDS =  lang/php/${MODPHP_VERSION},-gd \
> > +   security/pecl-libsodium
> >  
> >  do-install:
> > cp -Rp ${WRKDIST} ${INSTDIR}
> > 
> > Worth backporting to 6.2 ?
> > 
> 
> Needs REVISION bump, then it's ok with me. I doubt it's really
> worth the backport though..

Digging a bit more, on the long term (for 6.3?) we'll have to switch to
php7 by default, as only libsodium-php-1.x seems to support php 5.6,
libsodium-php-2.x only targets 7.x, and the 1.x branch wont receive
updates anymore.

Landry



Re: fix PHP version in doku wiki

2017-11-23 Thread Stuart Henderson
On 2017/11/23 17:15, Landry Breuil wrote:
> On Wed, Nov 22, 2017 at 10:55:14AM +, Stuart Henderson wrote:
> > On 2017/11/21 10:22, Rafael Sadowski wrote:
> > > PHP message: PHP Fatal error:  Uncaught exception 'Exception' with 
> > > message 'There is no suitable CSPRNG installed on your system' in 
> > > /dokuwiki/vendor/paragonie/random_compat/lib/random.php:203
> > 
> > This came up before. The deps should be changed to install pecl-libsodium
> > or php-mcrypt.
> 
> Funnily, i faced the exact same issue today when migrating my work
> dokuwiki install from 5.7 to 6.2, the previous testing instance was
> working fine on 6.1, and started failing with 6.2 (ie you can see the
> index, but it blows the same as soon as you try to login).
> Installing/enabling pecl-libsodium solved the issue, and since mcrypt is
> dead upstream, is deprecated in php 7.1 and seems replaced by libsodium
> in php 7.2 (ref:
> https://serverpilot.io/community/articles/how-to-install-the-php-mcrypt-extension.html),
>  how about the following:
> 
> Index: Makefile
> ===
> RCS file: /cvs/ports/www/dokuwiki/Makefile,v
> retrieving revision 1.23
> diff -u -r1.23 Makefile
> --- Makefile10 May 2017 12:32:48 -  1.23
> +++ Makefile23 Nov 2017 16:10:30 -
> @@ -27,7 +27,8 @@
>  TINSTDIR = ${TRUEPREFIX}/dokuwiki
>  SUBST_VARS =   INSTDIR TINSTDIR
>  
> -RUN_DEPENDS =  lang/php/${MODPHP_VERSION},-gd
> +RUN_DEPENDS =  lang/php/${MODPHP_VERSION},-gd \
> +   security/pecl-libsodium
>  
>  do-install:
> cp -Rp ${WRKDIST} ${INSTDIR}
> 
> Worth backporting to 6.2 ?
> 

Needs REVISION bump, then it's ok with me. I doubt it's really
worth the backport though..



Re: fix PHP version in doku wiki

2017-11-23 Thread Landry Breuil
On Wed, Nov 22, 2017 at 10:55:14AM +, Stuart Henderson wrote:
> On 2017/11/21 10:22, Rafael Sadowski wrote:
> > PHP message: PHP Fatal error:  Uncaught exception 'Exception' with message 
> > 'There is no suitable CSPRNG installed on your system' in 
> > /dokuwiki/vendor/paragonie/random_compat/lib/random.php:203
> 
> This came up before. The deps should be changed to install pecl-libsodium
> or php-mcrypt.

Funnily, i faced the exact same issue today when migrating my work
dokuwiki install from 5.7 to 6.2, the previous testing instance was
working fine on 6.1, and started failing with 6.2 (ie you can see the
index, but it blows the same as soon as you try to login).
Installing/enabling pecl-libsodium solved the issue, and since mcrypt is
dead upstream, is deprecated in php 7.1 and seems replaced by libsodium
in php 7.2 (ref:
https://serverpilot.io/community/articles/how-to-install-the-php-mcrypt-extension.html),
 how about the following:

Index: Makefile
===
RCS file: /cvs/ports/www/dokuwiki/Makefile,v
retrieving revision 1.23
diff -u -r1.23 Makefile
--- Makefile10 May 2017 12:32:48 -  1.23
+++ Makefile23 Nov 2017 16:10:30 -
@@ -27,7 +27,8 @@
 TINSTDIR = ${TRUEPREFIX}/dokuwiki
 SUBST_VARS =   INSTDIR TINSTDIR
 
-RUN_DEPENDS =  lang/php/${MODPHP_VERSION},-gd
+RUN_DEPENDS =  lang/php/${MODPHP_VERSION},-gd \
+   security/pecl-libsodium
 
 do-install:
cp -Rp ${WRKDIST} ${INSTDIR}

Worth backporting to 6.2 ?



Re: fix PHP version in doku wiki

2017-11-22 Thread Stuart Henderson
On 2017/11/21 10:22, Rafael Sadowski wrote:
> PHP message: PHP Fatal error:  Uncaught exception 'Exception' with message 
> 'There is no suitable CSPRNG installed on your system' in 
> /dokuwiki/vendor/paragonie/random_compat/lib/random.php:203

This came up before. The deps should be changed to install pecl-libsodium
or php-mcrypt.



Re: fix PHP version in doku wiki

2017-11-21 Thread Rafael Sadowski
On Tue Nov 21, 2017 at 08:59:51AM +0100, Landry Breuil wrote:
> On Mon, Nov 20, 2017 at 10:46:35PM +0100, Rafael Sadowski wrote:
> > Hi All!
> > 
> > Today I installed dokwiki on OpenBSD 6.2 and ran into different php
> > issues. I uninstalled the default php 5.6 version and replaces it with
> > php 7.x. Now everything works as usual.
> > 
> > Please find below a simple -current diff. After an okay I would like to
> > commit the same diff into -stable.
> > 
> > Ok? Comments?
> 
> Well, sorry but no. Upstream clearly states on
> https://www.dokuwiki.org/requirements that 5.6 is the minimal version
> ("but newer versions are highly recommended"), so that should work - but
> since you didnt say what "different php issues" were we cant really
> tell..
> 
> Landry
> 

use-case: create a dokwiki account

PHP message: PHP Fatal error:  Uncaught exception 'Exception' with message 
'There is no suitable CSPRNG installed on your system' in 
/dokuwiki/vendor/paragonie/random_compat/lib/random.php:203
Stack trace:
#0 /dokuwiki/vendor/paragonie/random_compat/lib/random_int.php(153): 
random_bytes(1)
#1 /dokuwiki/inc/PassHash.class.php(630): random_int(0, 61)
#2 /dokuwiki/inc/PassHash.class.php(110): PassHash->random(0, 61)
#3 /dokuwiki/inc/PassHash.class.php(127): PassHash->gen_salt(8)
#4 /dokuwiki/inc/PassHash.class.php(153): PassHash->init_salt(NULL, 8)
#5 /dokuwiki/install.php(390): PassHash->hash_smd5('Anibas')
#6 /dokuwiki/install.php(142): store_data(Array)
#7 {main}
  thrown in /dokuwiki/vendor/paragonie/random_compat/lib/random.php on line 203


"Note: Although this function was added to PHP in PHP 7.0, a » userland
implementation is available for PHP 5.2 to 5.6, inclusive."
-- http://php.net/manual/en/function.random-bytes.php



Re: fix PHP version in doku wiki

2017-11-21 Thread Landry Breuil
On Mon, Nov 20, 2017 at 10:46:35PM +0100, Rafael Sadowski wrote:
> Hi All!
> 
> Today I installed dokwiki on OpenBSD 6.2 and ran into different php
> issues. I uninstalled the default php 5.6 version and replaces it with
> php 7.x. Now everything works as usual.
> 
> Please find below a simple -current diff. After an okay I would like to
> commit the same diff into -stable.
> 
> Ok? Comments?

Well, sorry but no. Upstream clearly states on
https://www.dokuwiki.org/requirements that 5.6 is the minimal version
("but newer versions are highly recommended"), so that should work - but
since you didnt say what "different php issues" were we cant really
tell..

Landry