Bug 680811

Summary: EPEL packaging guidelines broken due to ISA-specific commit
Product: [Fedora] Fedora Reporter: Robert Scheck <redhat-bugzilla>
Component: phpAssignee: Joe Orton <jorton>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: fedora, jorton, mcepl, mcepl, rdieter, rpm
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: 2011-03-01 12:00:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Robert Scheck 2011-02-27 21:55:51 UTC
Description of problem:
Unfortunately the last chunk before the last of

  http://pkgs.fedoraproject.org/gitweb/?p=php.git;a=commitdiff;h=5e1621094f91fbd550e422ae310c981d3bc8eba0

breaks the EPEL packaging guidelines

  https://fedoraproject.org/wiki/Packaging:EPEL#PHP_ABI_Check_Handling

regarding PHP, because

  %php_core_api 20090626-x86-64
  %php_zend_api 20090626-x86-64
  %php_pdo_api 20080721-x86-64

causes

  %if 0%{?php_zend_api}

to fail with

  Error: zarafa.spec:490: parseExpressionBoolean returns -1

"20090626-x86-64" is not boolean. Ideas how to get things working again?

Version-Release number of selected component (if applicable):
php-5.3.5-3.fc16

How reproducible:
Everytime, see above.
  
Actual results:
Non-working stuff due to %{?_isa} stuff in macros

Expected results:
Working stuff, again.

Additional info:
I think, the ABI version within the *.spec files should be still integer,
but the Provides: of PHP should provide both (with and without %{?_isa}).
From my point of view, the following patch should be applied, because we
don't care at already buildtime (but only at runtime) whether the ABI is
x86-32 or x86-64, do we?

diff --git a/php.spec b/php.spec
index 1728870..114714d 100644
--- a/php.spec
+++ b/php.spec
@@ -908,9 +908,9 @@ cat files.json files.zip files.curl files.phar files.fileinfo > files.common
 
 # Install the macros file:
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm
-sed -e "s/@PHP_APIVER@/%{apiver}%{isasuffix}/" \
-    -e "s/@PHP_ZENDVER@/%{zendver}%{isasuffix}/" \
-    -e "s/@PHP_PDOVER@/%{pdover}%{isasuffix}/" \
+sed -e "s/@PHP_APIVER@/%{apiver}/" \
+    -e "s/@PHP_ZENDVER@/%{zendver}/" \
+    -e "s/@PHP_PDOVER@/%{pdover}/" \
     < %{SOURCE3} > macros.php
 install -m 644 -c macros.php \
            $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.php

Comment 1 Remi Collet 2011-02-28 15:48:46 UTC
The conditionnal stuff is really easy to fix.

https://fedorahosted.org/fpc/ticket/66

Comment 2 Rex Dieter 2011-02-28 17:02:51 UTC
I would tend to agree with the initial comment here, keep arch'ness out of macros.php , and inject it into the macro usage (like other deps and macros do).  Avoid change of behavior, confusion, and (potential?) multilib conflicts.

Comment 3 Remi Collet 2011-02-28 17:31:15 UTC
(In reply to comment #0)
> I think, the ABI version within the *.spec files should be still integer,

I don't see why an ABI version should be an integer.

If we follow upstream we should also integrated to "NTS" suffixe (which will become mandatory if one day we support the "ZTS" extension)


And for now, AFAIK, there are already some files whit conflict betwwen i686 and x86_64 php-devel package (include and build directory).

@Robert: this solution have been discussed in the fedora-php-devel ML you should probably subscribe to (low traffic) if not already done.

Comment 4 Joe Orton 2011-03-01 12:00:32 UTC
Right, php{,-devel} does not support biarch installs; this is as agreed on the list so further discussion should go there.