Bug 1021567 - Unable to access Pear Channel
Summary: Unable to access Pear Channel
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Michal Fojtik
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-21 14:23 UTC by Chris Ryan
Modified: 2015-05-14 23:30 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-23 15:48:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1000223 0 low CLOSED [origin_runtime_169]Show stack trace messages when git push php app with dependencies in deplist.txt 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1004122 0 medium CLOSED php-cli does not handle tilde expansion - PEAR configuration 2021-02-22 00:41:40 UTC

Internal Links: 1000223 1004122

Description Chris Ryan 2013-10-21 14:23:57 UTC
Description of problem:
I am experiencing a problem very similar to bug 827575. I am unable to access the specified external pear channel, either manually in RHCShell or as a dependency. 

Version-Release number of selected component (if applicable):
devenv-stage_518 (ami-c3326faa)

How reproducible:
Always

Steps to Reproduce:
1. Create a new php-5.3 application, add a pear channel to deplist.txt
echo "channel://shupp.github.com/pirum/EZRP-0.2.1" > deplist.txt
2. Git push the app
3. Run pear channel-discover shupp.github.com/pirum inside the app. 

Actual results:
Could not open input file: ~/php/phplib/pear/pear/php/pearcmd.php (when running pear channel-discover inside the gear)

and

no write access to /var/lib/openshift/5265175853ced3e9610004c3//.pearrc!

Expected results:
The dependency should be met.

Additional info:

Comment 1 Xiaoli Tian 2013-10-21 14:25:42 UTC
[phpapp-domstg1.stg.rhcloud.com 5265358a2587c89812000128]\> pear channel-discover pear.drush.org/drush
Discovering channel pear.drush.org/drush over http:// failed with message: channel-add: Cannot open "http://pear.drush.org/drush/channel.xml" (File http://pear.drush.org:80/drush/channel.xml not valid (received: HTTP/1.1 404 Not Found
))
Trying to discover channel pear.drush.org/drush over https:// instead
Discovery of channel "pear.drush.org/drush" failed (channel-add: Cannot open "https://pear.drush.org/drush/channel.xml" (File https://pear.drush.org:443/drush/channel.xml not valid (received: HTTP/1.1 404 Not found
)))

Comment 2 Michal Fojtik 2013-10-21 14:33:40 UTC
The ~/.pearrc file is created during 'install' and locked in PHP cartridge and cannot be overwritten.

 ---
locked_files:
- ~/.pearrc

Comment 3 Michal Fojtik 2013-10-22 16:38:31 UTC
I'll look into this tomorrow, seems like a multiple PHP bugs to me.

Comment 4 Michal Fojtik 2013-10-23 13:56:23 UTC
Cryan:

I was able to reproduce this on latest devenv, but I can open the ~/php/phplib/pear/pear/php/pearcmd.php file (cat ..)
However the 'php' command is denied to see that file for some strange reason. Might be a SELinux problem?

The ~/.pearrc file is generated in install script and I don't think we want to make it unlocked to users, Jhon agree?

Comment 5 Michal Fojtik 2013-10-23 14:02:29 UTC
xiaoli: Are you still able to reproduce the issue? Seems like a temporary failure of drush.org to me.

Comment 6 Michal Fojtik 2013-10-23 14:11:55 UTC
xiaoli, sorry for the noise, I check checked:

~ → curl -v -k https://pear.drush.org/drush/channel.xml
< HTTP/1.1 404 Not found

I discovered that the issue could be solved by upgrading 'pear':

https://drupal.org/node/1322564#comment-5170634

Comment 7 Michal Fojtik 2013-10-23 14:33:48 UTC
So update:

 ~ → curl -I -H "Host: pear.drush.org:80" http://pear.drush.org/channel.xml
HTTP/1.1 200 OK


It seems like they removed the '/drush/' segment from the URL... Also the HTTPS does not work for me at all. Xiali, could you please try:

$ pear channel-discover pear.drush.org

instead of:

$ pear channel-discover pear.drush.org/drush

?

Comment 8 Xiaoli Tian 2013-10-23 14:40:08 UTC
Yeah, it works,  thanks for your time.
[phpap1-domx1.dev.rhcloud.com 5267dcabfd80ab68810000e3]\> pear channel-discover pear.drush.org
Channel "pear.drush.org" is already initialized

After adding it to deplist.txt, it could be installed successfully.

remote: Checking pear: pear.drush.org/drush
remote: 
remote: Attempting to discover channel "pear.drush.org"...
remote: downloading channel.xml ...
remote: Starting to download channel.xml (804 bytes)
remote: ....done: 804 bytes
remote: Auto-discovered channel "pear.drush.org", alias "drush", adding to registry
remote: downloading drush-6.1.0.0.tgz ...
remote: Starting to download drush-6.1.0.0.tgz (504,788 bytes)
remote: ...done: 504,788 bytes
remote: install ok: channel://pear.drush.org/drush-6.1.0.0

Comment 9 Michal Fojtik 2013-10-23 15:48:48 UTC
So to summarize here:

* BUG1: ~/php/phplib/pear/pear/php/pearcmd.php

This is a PEAR bug where we use '~' instead of $HOME. Should be fixed in this bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1000223

* BUG2: no write access to /var/lib/openshift/5265175853ced3e9610004c3//.pearrc!

NOTABUG since the ~/.pearrc file is locked in manifest and we don't allow users to overwrite it.

* BUG3: Discovering channel pear.drush.org/drush over http:// failed

NOTABUG: This was problem on drush.org side, since they removed the /drush/ segment from the URL

In summary, I would close this one as not a bug :-)


Note You need to log in before you can comment on or make changes to this bug.