could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/packagename.tgz"

Bug #1310552 reported by Omar Chris Eugene
52
This bug affects 8 people
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Description: Ubuntu 14.04 LTS
Release: 14.04

php-pear:
  Installed: 5.5.9+dfsg-1ubuntu4
  Candidate: 5.5.9+dfsg-1ubuntu4

Expexted result:

pear install phing/phing
succeeded

Actual result:
see http://paste.ubuntu.com/7294364/ and http://paste.ubuntu.com/7294327/

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: php-pear 5.5.9+dfsg-1ubuntu4 [modified: usr/share/php/Archive/Tar.php]
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic i686
ApportVersion: 2.14.1-0ubuntu3
Architecture: i386
CurrentDesktop: Unity
Date: Mon Apr 21 13:23:12 2014
InstallationDate: Installed on 2014-04-17 (3 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release i386 (20140417)
PackageArchitecture: all
SourcePackage: php5
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Omar Chris Eugene (xriseugene) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in php5 (Ubuntu):
status: New → Confirmed
Revision history for this message
kolAflash (colaflash) wrote :

Confirming bug on "armv7l" port.

Any workarounds?

Revision history for this message
Omar Chris Eugene (xriseugene) wrote :

none that I know of

Revision history for this message
kolAflash (colaflash) wrote :

Related:
https://bugs.php.net/bug.php?id=67075
http://askubuntu.com/questions/451953/php-pear-is-not-working-after-upgrading-to-ubuntu-14-04

This doesn't helps (actually the mentioned patch seems to be already applied to the Ubuntu files):
http://cweiske.de/tagebuch/pear-php-5.5.htm

This workaround seems to work for me (still playing around with it). It probably also works for "pear install".
========
# First run pear to download the packages. It will probably put the packages into
# /build/buildd/php5-5.5.9+dfsg/pear-build-download/
# but it can't install them.
$ pear upgrade

# Un-Gzip the downloaded packages.
$ gunzip /build/buildd/php5-5.5.9+dfsg/pear-build-download/*.tar

# Now pear should be able to work with the pure tar-files.
$ pear upgrade /build/buildd/php5-5.5.9+dfsg/pear-build-download/*.tar
========

So by this workaround I guess, the bug's reason is something about the gzip compression.

Revision history for this message
Dreamer Panchal (dreamer-panchal) wrote :

Hello,

  Can any one please help me. When this bug is going to solve ?

Revision history for this message
kolAflash (colaflash) wrote :

@dreamer-panchal
Did you try the workaround I suggested? Did it work?

Revision history for this message
Riccardo Mollo (riccardo-mollo) wrote :

Thanks kolAflash, your workaround works great. :D

Revision history for this message
Hugo Vieira (hmmvieira) wrote :

I stumbled on this problem today after a fresh install of Xubuntu 14.04 32 bit.
For some reason, kolAflash's workaround is not working for me...

My investigation led me to /usr/share/php/Archive/Tar.php. This script was unable to open tgz files because line 733 was returning "false" when checking for the existence of function gzopen.

With this information, Google showed me a 5 year old bug (still open) that may be related: https://bugs.launchpad.net/ubuntu/+source/php5/+bug/451405

I really really had to install some pear packages, so my solution was to replace the following in Tar.php:
- Lines 733 and 744 - Replace gzopen with gzopen64
- Line 888: Replace gzseek with gzseek64 and gztell with gztell64

This is not a solution but it may help find the solution (or maybe fix the 5 year old's bug?).

Revision history for this message
Jose (joserobleda) wrote :

Thanks Hugo, that works for me

Revision history for this message
Dashamir Hoxha (dashohoxha) wrote :

The workaround on #5 (by kolAflash) worked for me. I think that it is more safe/stable than the solution on #9, which modifies the code. I do it like this (on a script):

----8<----
pecl install uploadprogress
gunzip /build/buildd/php5-*/pear-build-download/uploadprogress-*
pear upgrade /build/buildd/php5-*/pear-build-download/uploadprogress-*

pear channel-discover pear.drush.org
pear install pear.drush.org/drush-6.2.0.0
gunzip /build/buildd/php5-*/pear-build-download/drush-*
pear upgrade /build/buildd/php5-*/pear-build-download/drush-*
---->8----

Revision history for this message
amine zaine (amine250) wrote :

Hugo's workaround worked for me. I just registered to say thank you ! You're a genius :D

Revision history for this message
Dave Mausner (ak-dave-j0) wrote :

If the build problem is too hard to solve, the gross solution is to modify the PEAR file Tar.php so that each reference to compression type 'gz' also tests for the build's function, like this:

        if ($this->_compress_type == 'gz' && function_exists('gzopen'))
            $this->_file = @gzopen($this->_tarname, "wb9");
        else if ($this->_compress_type == 'gz' && function_exists('gzopen64'))
            $this->_file = @gzopen64($this->_tarname, "wb9");

Revision history for this message
Chingachkuk (win32-ya) wrote :

Here is the code that helped me getting it working. I injected it to /usr/share/php/Archive/Tar.php.
<code>
/**
 * Missing zlib functions.
 */
function gzopen($filename, $mode, $use_include_path = 0) {
  return gzopen64($filename, $mode, $use_include_path);
};
function gzseek($zp, $offset, $whence = SEEK_SET) {
  return gzseek64($zp, $offset, $whence);
}
function gztell($zp) {
  return gztell64($zp);
}
</code>

Revision history for this message
Felix (piela) wrote :

workaround from kolAflash (colaflash) worked for me on a raspberrypi2 with ubuntu 14.04 installed, thanks.

some changes:
files are located in /build/php5-0LI9sl/php5-5.5.9+dfsg/pear-build-download/
original downloads have the ending *.tgz

Revision history for this message
André (alac1984) wrote :

Hugo Vieira (hmmvieira) #9 worked like a charm!

Thanks man, you really helped! :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.