Bug 504857
Summary: | curl .spec file portability addition at 7.19.5-1 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | R P Herrold <herrold> |
Component: | curl | Assignee: | Kamil Dudka <kdudka> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | rawhide | CC: | jnovy, kdudka, paul |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | curl-7.19.5-2.fc12 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2009-06-10 13:25:57 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
R P Herrold
2009-06-09 18:50:06 UTC
Yup, agreed. It will fail on older systems with older rpm installed (without defined __isa_bits). Please apply the proposed change. Thanks both of you. Built as curl-7.19.5-2.fc12. Builds for F-11 and F-10 will follow. curl-7.19.4-9.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/curl-7.19.4-9.fc11 curl-7.19.4-6.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/curl-7.19.4-6.fc10 Alternative approach that supports 64-bit builds on older systems: define __isa_bits if it isn't defined already: # Define %{__isa_bits} for old releases %{!?__isa_bits: %global __isa_bits %((echo '#include <bits/wordsize.h>'; echo __WORDSIZE) | %{__cpp} - | %{__grep} -Ex '32|64')} Thanks for advice. I'll try it on next build. Similarly, a slightly neater solution to the multi-arch header problem is to include this curlbuild.h file as Source1: #include <bits/wordsize.h> #if __WORDSIZE == 32 #include "curlbuild-32.h" #elif __WORDSIZE == 64 #include "curlbuild-64.h" #else #error "Unknown word size" #endif and then the spec file snippet for dealing with it reduces down to: # Make libcurl-devel multilib-clean (#488922) %if %{__isa_bits} == 64 mv $RPM_BUILD_ROOT%{_includedir}/curl/curlbuild{,-64}.h %else mv $RPM_BUILD_ROOT%{_includedir}/curl/curlbuild{,-32}.h %endif install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_includedir}/curl Yes, it makes sense to me. Paul, Kamil The problem with the solution from comments 5 on is that it puts the load in the wrong place -- A non-compatible rpmrc macro change has been made, not publiced well, and is in place in the owning package. To drill in special purpose code here (and is all other like affected packages) is to hide the poor (non back-compat) changes in that offending package. Please don't use special purpose code to fix what needs a direct fix elsewhere. -- Russ herrold Well, I've only excluded the content of curlbuild.h to separate file and built it as curl-7.19.5-3.fc12. That's not going to work too well since the separate curlbuild.h file contains RPM macros that won't get expanded now that it's not a here document. Oops, fixed in curl-7.19.5-4.fc12. Thanks for pointing this out! curl-7.19.4-6.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report. curl-7.19.4-9.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report. |