Bug 127616

Summary: security/py-xmlsec misconstrues CFLAGS from xmlsec on 64 bit platforms
Product: Ports & Packages Reporter: Tom Evans <tevans.uk>
Component: Individual Port(s)Assignee: freebsd-python (Nobody) <python>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Tom Evans 2008-09-24 17:40:03 UTC
py-xmlsec uses pkg-config to retrieve the CFLAGS required for compiling against libxmlsec1. It then marshalls them into an array for distutils.core.Extension to build and install the python module.

However, it has a bug where by py-xmlsec's setup.py reads in a CFLAG define present on 64bit configurations of xmlsec1, which is only specified as "-DXMLSEC_NO_SIZE_T" by xmlsec1's pkg-config. It passes this to distutils as the tuple '(XMLSEC_NO_SIZE_T)', which is interpreted by distutils as being a CFLAG undefine, and is passed into the build phase as "-UXMLSEC_NO_SIZE_T". This causes missized structures to be passed between the two, leading very quickly to a seg fault.

Fix: Replace security/py-xmlsec/files/patch-setup.py with attached patch (I hate patches of patches!)

Patch attached with submission follows:
How-To-Repeat: (on amd64)
cd /usr/ports/security/py-xmlsec
make clean all install
echo -e "import xmlsec\nprint xmlsec.keyDataRsaId().getName()" | python -
Segmentation fault: 11 (core dumped)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-09-24 17:40:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-python

freebsd-python@ wants this port PRs (via the GNATS Auto Assign Tool)
Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2009-01-11 14:56:20 UTC
State Changed
From-To: open->closed

Committed, thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2009-01-11 15:03:42 UTC
pav         2009-01-11 15:03:34 UTC

  FreeBSD ports repository

  Modified files:
    security/py-xmlsec   Makefile 
    security/py-xmlsec/files patch-setup.py 
  Log:
  - Fix runtime crash on 64 bit platforms
  
  PR:             ports/127616
  Submitted by:   Tom Evans <tevans.uk@googlemail.com>
  
  Revision  Changes    Path
  1.8       +1 -0      ports/security/py-xmlsec/Makefile
  1.2       +12 -0     ports/security/py-xmlsec/files/patch-setup.py
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"