Bug 551513 - php bundles libzip
Summary: php bundles libzip
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: php
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Joe Orton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: DuplicSysLibsTracker
TreeView+ depends on / blocked
 
Reported: 2009-12-31 01:57 UTC by Kalev Lember
Modified: 2012-11-18 10:48 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-27 15:05:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
PHP Bug Tracker 39388 0 None None None Never
Red Hat Bugzilla 752270 0 unspecified CLOSED php zip 2021-02-22 00:41:40 UTC

Internal Links: 752270

Description Kalev Lember 2009-12-31 01:57:27 UTC
php package bundles its own, slightly modified copy of libzip-0.9 under php-5.3.1/ext/zip/lib/ directory. Since libzip is packaged as a separate library in Fedora, php should use the system copy of libzip instead of using the bundled version.

For rationale why Fedora shouldn't have bundled libraries see:
http://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries

Comment 1 Bug Zapper 2010-03-15 13:43:40 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 13 development cycle.
Changing version to '13'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Joe Orton 2010-11-17 17:16:32 UTC
Doesn't look like upstream want to support that:

"There is no need of it. And no, you should *really* not use an external
library."

Comment 3 Toshio Ernie Kuratomi 2010-11-17 18:21:32 UTC
This is something we'd carry a local patch for and go against upstream's wishes.  however, if you think you can make a case, there is an exception process and we try to work out more standard exceptions from what we learn from each exception granted/not granted.  Take a look at: http://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Standard_questions and add a ticket to https://fedorahosted.org/fpc/ with those and any other details you think would support the case for bundling.

Comment 4 Thom Carlin 2011-02-18 23:13:53 UTC
Joe, any updates on this?

Comment 5 Joe Orton 2011-02-19 11:13:31 UTC
Exception request filed: https://fedorahosted.org/fpc/ticket/62

Comment 6 Thom Carlin 2011-03-14 19:23:42 UTC
Joe, please respond to request by toshio dated 2/19 regarding FPC exception

Comment 7 Joe Orton 2011-03-15 10:33:46 UTC
Disabled zip extension in php-5.3.5-6.fc16 to bring the package in line with policy.  I'll leave this open to track the issue; if anybody has time/energy to go through that list of questions for the FPC please go ahead (I don't in the near future).

Comment 8 Vedran Miletić 2011-08-31 09:42:24 UTC
Hi guys, this seems to break Moodle. I'm using php-5.3.8-1.fc16.x86_64 and pulling Moodle from CVS, but unless it's specifically handled it's probably not different with Fedora packaged Moodle.

Moodle 2.1 reports on installation/upgrade: "The Zip PHP extension is now required by Moodle, info-ZIP binaries or PclZip library are not used anymore."

Comment 9 James Heather 2011-11-09 11:31:52 UTC
Hiya, we now have a serious problem: Moodle as bundled by Fedora just won't work any more. Vedran was pulling it in from CVS, but as of the release of Fedora 16, the Moodle release in the Fedora repo won't work because it needs the PHP zip extension.

Can we please have some sort of workaround for this? We shouldn't have programs distributed with Fedora that don't work with Fedora...

Comment 10 Vedran Miletić 2011-11-09 11:50:21 UTC
I installed the extension manually (from PEAR IIRC) and now it works.

We should probably package that extension and add dependency to moodle package that we ship.

Comment 11 James Heather 2011-11-09 12:03:13 UTC
Aha. Can you give a few more details on how to do that, so that people finding this bug report (e.g., me...) will know how to work around the problem?

But yes, packaging the extension sounds like the right solution.

Thanks!

Comment 12 Remi Collet 2011-11-09 12:11:15 UTC
Packaging the pecl extension could not be the solution

Because the extension (php-pecl-zip which exists in older fedora version) also provides a bundled version of forked libzip.

So same Guidelines issue than main php package.

Comment 13 Andrea V. 2011-11-15 15:34:59 UTC
(In reply to comment #10)
> I installed the extension manually (from PEAR IIRC) and now it works.
> 
> We should probably package that extension and add dependency to moodle package
> that we ship.

I want to use moodle so I tried to bypass the problem installing the pear/zip extension with the following commands:

sudo pear install --alldeps Archive_Zip-0.1.2

sudo pear install --alldeps File_Archive-1.5.4

rebooted the web server;

anyway the moodle upgrade check still complains that the zip extension is missing.

Is there a trick in order to make moodle work?

Comment 14 James Heather 2011-11-15 16:01:09 UTC
(In reply to comment #13)
> Is there a trick in order to make moodle work?

I ran

    pecl install zip

as root, and after that all was well. (I probably had to restart httpd; I can't remember.)

Comment 15 Vedran Miletić 2011-11-15 17:13:37 UTC
Yes, that's the command I ran. PEAR didn't work for me either, so I had to use PECL. Sorry for the misinformation.

I understand the problem with packaging, but we should either work with Moodle upstream or php-pecl-zip upstream; situation as it's now is not very nice towards users.

Comment 16 Claudiu 2011-11-20 18:42:05 UTC
'pecl install zip'
 is not working for me with Fedora 16

ERROR: `phpize' failed

I have php-devel installed.

Comment 17 Donald 2012-02-04 12:05:44 UTC
(In reply to comment #16)
> 'pecl install zip'
>  is not working for me with Fedora 16
> 
> ERROR: `phpize' failed
> 
> I have php-devel installed.

you also need pcre-devel installed.

Comment 18 Claudiu 2012-02-24 09:48:50 UTC
Even with pcre-devel I get that error. I was able to install zip extension from source package.


$# cd /tmp
$# wget http://pecl.php.net/get/zip-1.10.2.tgz
$# tar zxf zip-1.10.2.tgz
$# cd zip-1.10.2
$# phpize
$# ./configure
$# make
$# make install
$# rm -fr /tmp/zip-1.10.2.tgz ; rm -fr /tmp/zip-1.10.2

Then create the file /etc/php.d/zip.ini with this line inside

extension=zip.so

Comment 19 Felix Möller 2012-04-06 10:33:11 UTC
In addition to moodle this is required by owncloud...

"pecl install zip" worked perfectly for me on F16. Thanks.

Comment 20 Remi Collet 2012-04-27 15:05:15 UTC
php 5.3.11 will have zip extension back (in fedora <= 16)

php 5.4.x in fedora >= 17 use system libzip

I close this one.


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