Re: php-pear package build problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



05.09.2011 19:17, TASAKA Mamoru wrote:
(Well, as you posted your first mail to fedora devel list, please
 keep sending your reply also to devel list. This type of private
 mails will be very confusing to many people who are also watching mailing
 list because they cannot know what is currently discussed.

 Would you tell me why you replied to my mail privately, although
 I posted to devel list? This time I will mail to you privately, however
 unless you have some special reason next
 time I will want to post my mail also to devel list so that people can
 see current discussion)
Mamoru, thank you very much for the answers. And excuse me - it was mistake. Now I answer in list.

First:
* php-devel is not installed when trying to package srpm from spec and sources. This is
  what koji (build server) always does. i.e. koji tries to package srpm first, at that time
  only minimum buildroot packages are installed. Then after srpm is successfully packaged,
  koji (yum) installs additional packages specified by BuildRequires. After that koji will
  actually try to build binary rpms from the spec file.

No, in this case it was scratch build, so initially srpm was submitted.
  So you must ensure that your srpm can successfully packaged even if none of packages
  in BuildRequires are installed (and only minimum buildroot packages are installed).

* Then looking at your spec file, there are actually two issues which prevents srpm
  from being properly packaged.

1. The line 63

   %if %( php -r 'echo version_compare(PHP_VERSION, "5.3.0", ">=") ? 1 : 0;' )

   cannot be parsed when php is not installed (again, when koji first tries to package
   srpm, BuildRequires rpms are not installed yet). The correct line would be something
   like:

   %if %( which php &>/dev/null && php -r 'echo version_compare(PHP_VERSION, "5.3.0", ">=") ? 1 : 0'|| echo -n 0 )

   However please reconsider if you really want this complicated line.
This line needed and I don't see any problems with it:
which php &>/dev/null && php -r 'echo version_compare(PHP_VERSION, "5.3.0", ">=") ? 1 : 0'|| echo -n 0

always should return with 0 exit status and produce only 0 or 1 as result, even if php not installed.


2. The line 28

   %if %{?php_zend_api}0

   cannot be parsed when %php_zend_api is not integer (and this is actually happening
   currently). The correct line would be something like

   %if 0%{?php_zend_api?1:0}

   however it seems this line is no longer needed on Fedora:
   http://fedoraproject.org/wiki/Packaging:PHP#C_extensions_.28PECL_and_others.29
It stil needed for EPEL http://fedoraproject.org/wiki/Packaging:EPEL#PHP_ABI_Check_Handling and exactly in this form

Regards,
Mamoru

 
  



-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux