DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 3rd February 2016
jkl jkl is offline
dat guy
 
Join Date: Feb 2014
Posts: 106
Default PHP-5.6 with PECL

My OpenBSD (5.8) server runs PHP 5.6. I would like to add the OAuth module from PECL, but the pear package is bound to PHP 5.4. How can I change that?
Reply With Quote
  #2   (View Single Post)  
Old 4th February 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

What version and flavor of OpenBSD do you have installed? Looking through the port INDEX for OpenBSD 5.8, all of the pecl-* packages have a run dependency on PHP 5.6, and a dependency on www/pear, which itself is an independent and does not have any run dependencies.

At OpenBSD 5.7, the pecl-* applications were dependent on PHP 5.5.

At OpenBSD 5.6, the pecl-* applications were dependent on PHP 5.4.
Reply With Quote
  #3   (View Single Post)  
Old 4th February 2016
jkl jkl is offline
dat guy
 
Join Date: Feb 2014
Posts: 106
Default

I have OpenBSD 5.8 installed, filled entirely from the binary packages off the FTP mirrors and M:Tier. pkg_add pear still pulls and installs PHP 5.4 for me.
Reply With Quote
  #4   (View Single Post)  
Old 4th February 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Yes, I saw you mentioned 5.8 in your top post, just now. My mistake for missing it. But I am confused, because on a 5.8-stable system I have, I asked the ports tree what the run dependencies were, and it says:
Code:
$ cd /stable/usr/ports/www/pear
$ env PORTSDIR=/stable/usr/ports make print-run-depends
This port requires package(s) "femail-1.0p1 femail-chroot-1.0p2 xz-5.2.1
libiconv-1.14p3 gettext-0.19.5.1 libxml-2.9.2p7 php-5.6.17 
pear-utils-1.9.5p1" to run.
PHP did have -stable updates since 5.8-release, and this is a -stable ports tree I'm using. I'll grab a -release ports tree and see if the run dependency retains 5.6 for me, or reverts to 5.4.
Reply With Quote
  #5   (View Single Post)  
Old 4th February 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

While that checkout of the tree is ongoing, I jumped on to my web server, which runs 5.8-stable. The pear package requires pear-utils, and the pear-utils package requires php-5.6.17. So that's the specific dependency chain.
Reply With Quote
  #6   (View Single Post)  
Old 4th February 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

OK. The -release tree told me that there was a run dependency on php-5.6.11. As I'd expected, 5.4 wasn't mentioned.

As a second test, I installed a 5.8-release (amd64) test machine, and requested an installation of pear from my nearest mirror. 5.6.11 was the PHP version installed. Here's the log:
Code:
# pkg_add pear
quirks-2.114 signed on 2015-08-09T11:57:52Z
quirks-2.114: ok
pear-1.9.5p0:libiconv-1.14p3: ok
pear-1.9.5p0:gettext-0.19.5.1: ok
pear-1.9.5p0:xz-5.2.1: ok
pear-1.9.5p0:libxml-2.9.2p1: ok
pear-1.9.5p0:femail-1.0p1: ok
pear-1.9.5p0:femail-chroot-1.0p2: ok
pear-1.9.5p0:php-5.6.11: ok
pear-1.9.5p0:pear-utils-1.9.5p1: ok
pear-1.9.5p0: ok
Look in /usr/local/share/doc/pkg-readmes for extra documentation.
--- +php-5.6.11 -------------------
To enable the php-5.6 module please create a symbolic link from
/var/www/conf/modules.sample/php-5.6.conf to
/var/www/conf/modules/php.conf. As root:

    ln -sf /var/www/conf/modules.sample/php-5.6.conf /var/www/conf/modules/php.conf

The recommended php configuration has been installed to:
    /etc/php-5.6.ini.
I then removed all packages with pkg_delete -X, and began by explicitly installing php-5.4.43. And then installing pear. 5.6.11 was added as the dependency.

I can only make vague guess why you have this apparent dependency. A damaged package file? Doubtful, since the packages are cryptographically signed. Pointing to the wrong release of packages? Doubtful. You wouldn't be able to successfully install much. Damaged package database in /var/db/pkg? Possible. There is a pkg_check(8) consistency checker for that, which will check the database and also compare it to what it finds in /usr/local.

If you like, you could update from -release to -stable. Along with the PHP security updates from 5.6.11 to 5.6.17, the pear packages were rebuilt. An update might eliminate whatever the problem is you've encountered. And it would install security patches that -release does not have, both in the base system, and in any applicable third party packages such as PHP.

The Project does not build -stable packages or -stable systems; they leave that to end-users due to resource constraints. But there is a company that does build -stable systems and -stable packages as a service to the greater OpenBSD community: M:Tier. They have several OpenBSD developers on staff. https://stable.mtier.org.
Reply With Quote
  #7   (View Single Post)  
Old 4th February 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Ah, I see you're using M:Tier already, too.

Do you have any of the pecl-* packages installed?
Reply With Quote
  #8   (View Single Post)  
Old 4th February 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

I downloaded the -release pear-utils package from my nearest mirror. This file is pear-utils-1.9.5p1.tgz. Within, the packing list (the +CONTENTS file) states the following:
Code:
@depend lang/php/5.6,-main:php->=5.6,<5.7:php-5.6.11
I'm now thinking you're not using the correct version of pear and pear-utils package.

Of course, all this thread has really proven is my comprehension is poor. I missed your release, and I later missed you were already using -stable components from M:Tier.
Reply With Quote
  #9   (View Single Post)  
Old 4th February 2016
jkl jkl is offline
dat guy
 
Join Date: Feb 2014
Posts: 106
Default

Well ...

No, I don't have any pecl- package installed. I only need OAuth from PECL and that's not a separate package.

But somehow you're right:

Quote:
> pkg_info pear-utils
Information for http://ftp.spline.de/pub/OpenBSD/5.6/packages/amd64/pear-utils-1.9.4p2.tgz
That's ... weird, because:

Code:
PKG_PATH=http://ftp.eu.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(arch -s)
PKG_PATH=https://stable.mtier.org/updates/$(uname -r)/$(arch -s):${PKG_PATH}
export PKG_PATH
and:

Quote:
> uname -r
5.8
Now I'm lost.
Reply With Quote
Old 4th February 2016
jkl jkl is offline
dat guy
 
Join Date: Feb 2014
Posts: 106
Default

Ha, investigating it further... I had a very, very old(ish) /etc/pkg.conf (whyever) with a very, very old(ish) installpath laying around.

Code:
> pkg_add pear-utils
quirks-2.114 signed on 2015-08-09T11:57:52Z
pear-utils-1.9.5p1: ok
Perfect!

Thank you for helping me to think further, after all.
Reply With Quote
Old 4th February 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Hmmm. The pkg.conf(5) file will only be used if the $PKG_PATH environment variable is unset. So it's possible your PKG_PATH was not set at the time you were running pkg_add(1). That's possible, if you have it set in your unprivilege user's environment and you use doas(1) or security/sudo for privilege escalation. The doas.conf(5) and sudoers(5) configuration files can control environment passing.

Last edited by jggimi; 4th February 2016 at 11:54 AM. Reason: clarity
Reply With Quote
Old 4th February 2016
jkl jkl is offline
dat guy
 
Join Date: Feb 2014
Posts: 106
Default

I keep my PKG_PATH in /root/.profile and usually use su (rarely doas) to perform package operations - is that wrong?

Indeed, echo $PKG_PATH is empty from su.
Reply With Quote
Old 4th February 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

No, there's nothing wrong with using su(1). I was just trying to explain a possibility in the event you happened to have $PKG_PATH provisioned, but were unable to successfully pass it to pkg_add().

You had mentioned having an apparent correctly configured environment variable, but then found pkg_add() using an outdated pkg.conf(5) instead.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AMP + pecl-mailparse. Dazhelpwiz OpenBSD Packages and Ports 7 19th May 2009 04:59 AM


All times are GMT. The time now is 07:31 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick