Re: bitpim binary modules breaks Gentoo QA policies
Mike Frysinger <[email protected]>
| Newsgroups | gmane.comp.mobile.bitpim.devel |
|---|---|
| Organization | wh0rd.org |
| Message-ID | <[email protected]> |
On Friday 03 March 2006 02:02, Roger Binns wrote: > <snip> i wont address this because i have no idea what bitpim is let alone try and take over maintenance for it :) > > TEXTREL usr/lib/bitpim-0.8.08/native.usb._libusb.so this fix is simple ... just change build.sh to pass -fPIC to gcc libusb-pic-love.patch > > TEXTREL usr/lib/bitpim-0.8.08/apsw.so hmm, i'll have to do some research to figure out what's wrong with this, but i would guess that it's as simple as the fix for libusb.so ... > > executable stacks > > RWX --- --- usr/lib/bitpim-0.8.08/helpers/bmp2avi.lbin > > These are built on Redhat 9. Yadda yadda yadda. To fix the > first one would require BitPim to be compiled on Gentoo. hmm, what version of binutils does your Redhat 9 box have ? see if the version of ld on it supports exec stack markings (i havent the foggiest when support was first integrated into binutils for it): $ ld --help | grep execstack if you do get stuff back, i'd simply ask you rebuild these programs by passing -Wl,-z,noexecstack to `gcc`: gcc foo.c -o foo -Wl,-z,noexecstack > > RWX --- --- usr/lib/bitpim-0.8.08/helpers/pngtopnm.lbin > > RWX --- --- usr/lib/bitpim-0.8.08/helpers/pnmtopng.lbin > > RWX --- --- usr/lib/bitpim-0.8.08/helpers/ppmquant.lbin > > The bottom three are from netpbm. The code could be changed > to look in the helpers directory, and if they are not there > then look on the system and then have netpbm listed as a > dependency. i maintain netpbm and make sure that it stays up-to-date ... so the proposed idea seems like it'll work just dandy ... ive attached a patch, but some warnings: - i dont really know python - i dont know bitpim at all - patch is totally untested :) bitpim-search-path-for-helpers.patch -mike
libusb-pic-love.patch
(text/x-diff, 466 B)
Index: src/native/usb/build.sh =================================================================== --- src/native/usb/build.sh (revision 2853) +++ src/native/usb/build.sh (working copy) @@ -3,5 +3,5 @@ swig -python -I/usr/include libusb.i -gcc -Wall -fno-strict-aliasing -O2 -g -shared -I $INCLUDEDIR -o _libusb.so libusb_wrap.c -lusb +gcc -fPIC -Wall -fno-strict-aliasing -O2 -g -shared -I $INCLUDEDIR -o _libusb.so libusb_wrap.c -lusb strip _libusb.so
bitpim-search-path-for-helpers.patch
(text/x-diff, 810 B)
Index: src/conversions.py
===================================================================
--- src/conversions.py (revision 2853)
+++ src/conversions.py (working copy)
@@ -49,7 +49,14 @@
f=shortfilename(f)
except:
# this craps out if the helper does not exist!
- raise common.HelperBinaryNotFound(basename, basename+osext, [helperdir])
+ # see if we can't find it in the system path instead ...
+ try:
+ for path in os.getenv("PATH", "").split(":"):
+ f = path+"/"+basename+osext
+ if os.access(f, os.X_OK) and os.path.isfile(f):
+ return f
+ except:
+ raise common.HelperBinaryNotFound(basename, basename+osext, [helperdir])
if not os.path.isfile(f):
raise common.HelperBinaryNotFound(basename, basename+osext, [helperdir])
return f