Bug 178133
Summary: | Remove environ variable in lib/signature.c for IRIX | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | The Written Word <bugzilla> | ||||
Component: | rpm | Assignee: | Paul Nasrat <nobody+pnasrat> | ||||
Status: | CLOSED UPSTREAM | QA Contact: | Mike McLean <mikem> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | rawhide | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | mips32 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2006-01-20 21:06:24 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: | |||||||
Attachments: |
|
Description
The Written Word
2006-01-17 22:52:00 UTC
Created attachment 123339 [details]
Patch
I don't have access to irix, hence am entirely unable to test. Can you supply a patch? Ah yes, saw the patch right after I hit return. Can you supply a better patch that doesn't just rip out otherwise known working code? __GLIBC__ is defined on Linux so the code is never executed. What's more, from system.h: #if !defined(__GLIBC__) && !defined(__LCLINT__) #ifdef __APPLE__ #include <crt_externs.h> #define environ (*_NSGetEnviron()) #else extern char ** environ; #endif /* __APPLE__ */ #endif #endif So, on systems where __GLIBC__ is not defined, you get: extern char ** environ; // system.h char ** environ = NULL; // lib/signature.c I doubt you can decide what the compiler will do in this case. The patch needs to be conditionalized on some non-gcc irix compiler-peculier constants. Private inquiries indicate that an additional ... && (!defined(sgi) || (_COMPILER_VERSION < 0720)) conditioning might do the trick. Can you confirm or suggest a better test? Well, RPM won't build on IRIX out-of-the box. The patch was to fix a problem we found with RPM 4.2.4 that we forward-ported to HEAD (many more patches are required to get RPM building on non-Linux boxes). #if !defined(__GLIBC__) && !defined(__APPLE__) char ** environ = NULL; #endif The pre-processor define __sgi is available to SGI cc and GCC. So, if you really want this code left in, you can: #if !defined(__GLIBC__) && !defined(__APPLE__) && !defined(__sgi) char ** environ = NULL; #endif I cannot imagine any platform where the code above does any good though. We removed it and have RPM 4.2.4 working fine on Solaris, HP-UX, IRIX, Tru64 UNIX, AIX, and Redhat Linux. Thanks, that's the confirmation I needed. I have a dim memory of HPUX? AIX? needing the conditionalizing, but have long since forgoytten the details. BTW, send a ptr to your other platform patches to <rpm-devel.duke.edu> and I will try to integrate into rpm main stream. What stops me is lack of access to the platforms, not anything else. Hmmm, I also don't remember ever releasing rpm-4.2.4, but perhaps I've forgotten ... checking ... yes, there is no rpm-4_2_4-relase tag in rpm cvs at cvs.rpm.org. Oops, I meant 4.2.3. Though, when we made our changes, it was against the rpm-4_2 branch. IRIX was the only platform with the SEGV. However, we disabled the code on all platforms in the previous message. I submitted the IRIX patch to rpm-devel but didn't get any feedback so created this bug report. rpm-devel still the place for non-RH patches. If you have other patcches, I'll try to get them merged into rpm sources. Fixed in CVS, will be in rpm-4.4.5-0.7 when built. |