Bug 136793 - Update port: security/luasec - Link against OpenSSL from ports
Summary: Update port: security/luasec - Link against OpenSSL from ports
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-15 15:30 UTC by Andrew Lewis
Modified: 2009-07-20 18:00 UTC (History)
0 users

See Also:


Attachments
file.shar (3.22 KB, text/plain)
2009-07-15 15:30 UTC, Andrew Lewis
no flags Details
luasec.Makefile.patch.txt (350 bytes, text/plain; charset="UTF-8")
2009-07-15 18:25 UTC, Andrew Lewis
no flags Details
patch-src-Makefile (369 bytes, text/x-patch; charset="UTF-8")
2009-07-15 18:25 UTC, Andrew Lewis
no flags Details
patch-src-ssl.c (791 bytes, text/x-csrc; charset="UTF-8")
2009-07-15 18:25 UTC, Andrew Lewis
no flags Details
luasec.Makefile.patch.txt (350 bytes, text/plain; charset="UTF-8")
2009-07-15 19:37 UTC, Andrew Lewis
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Lewis 2009-07-15 15:30:02 UTC
Update security/luasec to link against OpenSSL from ports so that it works on older versions of FreeBSD, and to respect $CC and $CFLAGS per handbook.

Fix: Patch attached with submission follows:
Comment 1 Dmitry Marakasov freebsd_committer freebsd_triage 2009-07-15 16:00:43 UTC
Responsible Changed
From-To: freebsd-ports-bugs->amdmi3

I'll take it.
Comment 2 Dmitry Marakasov freebsd_committer freebsd_triage 2009-07-15 16:02:23 UTC
State Changed
From-To: open->feedback

Could you please send an update as a patch. Also, won't it make sence to 
define USE_OPENSSL_PORT conditionally only for older FreeBSD versions? 
Afair there were some problems building ports when openssl is installed 
from ports as well.
Comment 3 Andrew Lewis 2009-07-15 18:25:48 UTC
Attached:

luasec.Makefile.patch.txt: Patch for security/luasec to use OpenSSL from ports 
- for older versions of FreeBSD only as suggested.

patch-src-Makefile: To go in 'files', patch to luasec Makefile to respect CC, 
CFLAGS

patch-src-ssl.c: To go in 'files', patch from Matthew Wild to fix a bug in 
luasec.

[10:30:51] <MattJ> Without the patch the tests fail about 1/3 of the time
[10:31:14] <MattJ> with it, I've run it in a loop for some time and still not 
had the error
[10:32:18] <Nick> sounds promising
[10:51:06] <MattJ> Nick, http://prosody.im/patches/luasec-clear-error-
queue.patch [prosody.im]
[10:52:05] <Nick> that simple, eh? :D
[10:52:14] <MattJ> That simple :)
[10:52:29] <MattJ> It turns out that an OpenSSL API call can return multiple 
errors
[10:52:36] <MattJ> they are on a kind of stack
[10:52:57] <MattJ> I suspect that some internal function sometimes adds an 
extra error
[10:53:07] <MattJ> But LuaSec only pops the first error from the stack
[10:53:33] <MattJ> The OpenSSL docs say you should ensure the error stack is 
empty before entering an API call
[10:53:48] <MattJ> otherwise SSL_get_error() which LuaSec uses will not work 
properly
[10:55:20] <Nick> mm, seems reasonable
Comment 4 Jon Kelly Hays 2009-07-15 18:45:32 UTC
I think any FreeBSD version 700024 or later should work with the base
OpenSSL.
Kelly
Comment 5 Andrew Lewis 2009-07-15 19:37:05 UTC
> luasec.Makefile.patch.txt: Patch for security/luasec to use OpenSSL from
> ports - for older versions of FreeBSD only as suggested.

Updated.
Comment 6 Dmitry Marakasov freebsd_committer freebsd_triage 2009-07-20 17:53:26 UTC
State Changed
From-To: feedback->closed

Committed, with minor changes. Thanks!
Comment 7 dfilter service freebsd_committer freebsd_triage 2009-07-20 17:53:26 UTC
amdmi3      2009-07-20 16:53:17 UTC

  FreeBSD ports repository

  Modified files:
    security/luasec      Makefile 
  Added files:
    security/luasec/files patch-Makefile patch-src-Makefile 
                          patch-src-ssl.c 
  Log:
  - Respect CC/CFLAGS
  - Use openssl from ports for older FreeBSD versions
  - Add a patch to handle openssl errors properly
  - While here, fix building with custom PREFIX/LOCALBASE
  
  PR:             136793
  Submitted by:   Andrew Lewis <freeghb@gmail.com> (maintainer)
  
  Revision  Changes    Path
  1.3       +13 -1     ports/security/luasec/Makefile
  1.1       +11 -0     ports/security/luasec/files/patch-Makefile (new)
  1.1       +27 -0     ports/security/luasec/files/patch-src-Makefile (new)
  1.1       +26 -0     ports/security/luasec/files/patch-src-ssl.c (new)
_______________________________________________
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"