Bug 1126873

Summary: Pear is not configurable for the user because .pearrc is read only
Product: OpenShift Online Reporter: Balazs Varga <bvarga>
Component: ImageAssignee: Maciej Szulik <maszulik>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.xCC: jokerman, mfojtik, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-13 10:13:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Balazs Varga 2014-08-05 13:50:46 UTC
Description of problem:
Currently the user can't add new (potentially his own private) pear channels and/or configure his pear becuase .pearrc is a locked file in the manifest.

There is also a warning about expired channel metadata which we update when install a PHP cartridge (Bug #1094007). Pear channel updates should be in the build script, before downloading dependencies but for that, we should be able to write the .pearrc.

Version-Release number of selected component (if applicable):
devenv_5041 (ami-1693457e) / online august of 2014

How reproducible:
always

Steps to Reproduce:
1. ssh into the PHP gear
2. pear channel-discover pear.drush.org

Actual results:
no write access to /var/lib/openshift/53e1134152e14e701900010d//.pearrc!

Expected results:
The user should be able to configure his pear. Even if we generate it from our custom format.

Additional info:

Comment 1 Ben Parees 2014-08-05 14:17:15 UTC
Maciej, talk w/ Balazs about this as he made some comments on IRC about it having implications for scaled and HA apps.

Comment 2 Maciej Szulik 2014-08-13 10:13:21 UTC
Currently openshift allows users to define pear dependencies using 
.openshift/pear.txt file. Sample content for this file might look like 
this:

channel://pear.drush.org/drush-6.2.0.0

Then, when building app pear is fed with those dependencies 
(see [1], build function). It's autodiscovery mechanism registers any 
new channels or update current ones based on suggested alias each
channel provides (see [2]). Additionally user can update channel 
metadata using following commands:

pear update-channels                # updates all channels metadata
pear channel-update <channel_name>  # update single channel


[1] https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-php/bin/control
[2] http://pear.php.net/manual/en/guide.migrating.channels.xml.php