Bug 14972 - new requires in php-pear-HTML_Template_Flexy brings in php-gtk2 causing scriptlet errors
Summary: new requires in php-pear-HTML_Template_Flexy brings in php-gtk2 causing scrip...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thomas Spuhler
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-07 00:35 CET by David Walser
Modified: 2015-01-08 19:54 CET (History)
1 user (show)

See Also:
Source RPM: php-pear-HTML_QuickForm-3.2.14-3.mga5.src.rpm
CVE:
Status comment:


Attachments

Description David Walser 2015-01-07 00:35:30 CET
Seen while upgrading from Mageia 4 (live system with urpmi).  Not sure the exact cause of the error.

HTML_QuickForm requires HTML_Template_Flexy (it didn't in Mageia 4), which requires Gtk_VarDump, which requires php-gtk2.

Is the added requires necessary?

As a result (I suppose), you see this at the end of every transaction installing php packages:

PHP Fatal error: php-gtk: Could not open display in Unknown on line 0

Also, not sure whether it's related or not, you see post scriplet errors like this for several packages (always having the previous error right above it):

warning: %post(php-pear-HTML_Template_Sigma-1.3.0-3.mga5.noarch) scriplet failed, exit status 1
ERROR: 'script' failed for php-pear-HTML_Template_Sigma-1.3.0-3.mga5.noarch:

And then the same thing for php-pear-HTML_Template_Flexy and php-pear-HTML_QuickForm, as well as php-pear-Log, php-pear-Net_Vpopmaild, php-pear-OLE, php-pear-Spreadsheet_Excel_Writer, php-pear-HTML_QuickForm_Renderer_Tableless, php-pear-PHP_Fork, php-pear-Auth_SASL, php-pear-CAS, php-pear-HTML_QuickForm_DHTMLRulesTableless, php-pear-HTTP_WebDAV_Server.

For php-pear-Net_POP3, I actually saw:

sh: line 1:  7771 Segmentation fault      /usr/bin/pear install --nodeps --soft --force --register-only /usr/share/pear/packages/Net_POP3.xml > /dev/null

And then the same thing for php-pear-Auth, php-pear-Auth_RADIUS, php-pear-File_SMBPasswd.

For php-pear-Net_GeoIP it looked slightly different, kind of a combination:

/var/tmp/rpm-tmp.RzInNV: line 1:  8290 Segmentation fault      pear install --nodeps --soft --force --register-only /var/lib/pear/Net_GeoIP.xml
warning: %post(php-pear-Net-GeoIP-1.0.0-7.mga5.noarch) scriptlet failed, exit status 139
ERROR: 'script' failed for php-pear-Net_GeoIP-1.0.0-7.mga5.noarch:

Also, I believe you already know that php-apc causes segfaults in Cauldron.  I don't know if that's related to any of this.

Reproducible: 

Steps to Reproduce:
Comment 1 David Walser 2015-01-07 01:08:09 CET
Just a note that HTML_QuickForm seems to work as well as it did before even after I remove HTML_Template_Flexy, Gtk_VarDump, and php-gtk2, so I don't think the requirement is needed.
Comment 2 Thomas Spuhler 2015-01-07 01:34:36 CET
Can we fix php-gtk2. It has to be removed from the box when building any pear programs
Comment 3 David Walser 2015-01-07 01:40:51 CET
It would certainly be nice to fix it.  It'd also be nice to not have it installed when it doesn't need to be.

CC: (none) => oe

Comment 4 Thomas Spuhler 2015-01-08 18:24:14 CET
Gtk_VarDump doesn't need the php-gtk2, but if it is installed it needs to patch Gtk_VarDump (which is a hassle on pear pacakges) has this code:
        if (!extension_loaded('php-gtk')) {
             dl('php_gtk.' .PHP_SHLIB_SUFFIX    );

and needs to be         
         if (!extension_loaded('php-gtk')) {
             dl('php_gtk2.' .PHP_SHLIB_SUFFIX    );
                        ^

I would love to drop php-gtk2 as technically we would need to add a "buildconflicts" to each pear package. But there is another pacakge that needs it:

$ urpmq --whatrequires php-gtk2
phoronix-test-suite  (maint nobody)
php-gtk2
php-pear-Gtk_MDB_Designer 
php-pear-Gtk_VarDump

php-pear-Gtk_MDB_Designer doesn't need it either but als needs the patch if php-gtk2 is installed

Status: NEW => ASSIGNED

Comment 5 David Walser 2015-01-08 18:26:59 CET
We can drop phoronix-test-suite in Cauldron since it's unmaintained.

It'd also be nice if the php-pear-HTML_QuickForm requires on php-pear-HTML_Template_Flexy would be dropped, because it's not needed.
Comment 6 David Walser 2015-01-08 18:35:13 CET
Also, in phoronix-test-suite, I only see gtk2 in some xml files, not in any php code.  I wonder if it's really needed.  Anyway, the easiest thing would probably be to just drop it and php-gtk2.
Comment 7 Thomas Spuhler 2015-01-08 18:35:49 CET
phoronix-test-suite
From Changelog in tar
Phoronix Test Suite 3.0 Alpha 1
9 November 2010
- pts-core: Temporarily drop the GTK2 GUI until it's been rewritten to be compliant with the PTS3 architecture

Fedora doesn't have it as a Requires either
Comment 8 Thomas Spuhler 2015-01-08 18:37:35 CET
(In reply to David Walser from comment #5)
> We can drop phoronix-test-suite in Cauldron since it's unmaintained.
> 
> It'd also be nice if the php-pear-HTML_QuickForm requires on
> php-pear-HTML_Template_Flexy would be dropped, because it's not needed.

I will check it. It's easy with pear packages
Comment 9 Thomas Spuhler 2015-01-08 18:39:09 CET
How are we going to drop php-gtk2? Add it to task-obsolete. There is no package that replaces it.
Comment 10 David Walser 2015-01-08 18:41:38 CET
(In reply to Thomas Spuhler from comment #9)
> How are we going to drop php-gtk2? Add it to task-obsolete. There is no
> package that replaces it.

Yes.
Comment 11 Thomas Spuhler 2015-01-08 19:40:37 CET
(In reply to Thomas Spuhler from comment #8)
> (In reply to David Walser from comment #5)
> > We can drop phoronix-test-suite in Cauldron since it's unmaintained.
> > 
> > It'd also be nice if the php-pear-HTML_QuickForm requires on
> > php-pear-HTML_Template_Flexy would be dropped, because it's not needed.
> 
> I will check it. It's easy with pear packages

It's an Autorequires. Have you tested it w/o  php-pear-HTML_Template_Flexy?
Comment 12 David Walser 2015-01-08 19:51:54 CET
(In reply to Thomas Spuhler from comment #11)
> (In reply to Thomas Spuhler from comment #8)
> > (In reply to David Walser from comment #5)
> > > We can drop phoronix-test-suite in Cauldron since it's unmaintained.
> > > 
> > > It'd also be nice if the php-pear-HTML_QuickForm requires on
> > > php-pear-HTML_Template_Flexy would be dropped, because it's not needed.
> > 
> > I will check it. It's easy with pear packages
> 
> It's an Autorequires. Have you tested it w/o  php-pear-HTML_Template_Flexy?

Yes, through Moodle, which uses HTML_QuickForm.  It works just fine without HTML_Template_Flexy.
Comment 13 Thomas Spuhler 2015-01-08 19:52:27 CET
added an "%global __requires_exclude pear\\(HTML/Template/Flexy.php\\)"

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED

Comment 14 David Walser 2015-01-08 19:54:04 CET
Thanks!

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