Summary: | [PATCH] security/broccoli: Fix build with python | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Mathieu Arnold <mat> | ||||||||
Component: | Individual Port(s) | Assignee: | Mathieu Arnold <mat> | ||||||||
Status: | Closed FIXED | ||||||||||
Severity: | Affects Only Me | ||||||||||
Priority: | Normal | ||||||||||
Version: | Latest | ||||||||||
Hardware: | Any | ||||||||||
OS: | Any | ||||||||||
Attachments: |
|
Description
Mathieu Arnold
2013-12-05 15:20:00 UTC
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool) Maintainer of security/broccoli, Please note that PR ports/184519 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/184519 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org Responsible Changed From-To: freebsd-ports-bugs->mat Take Nice patch set. I received a report that I broke the python bindings when I moved broccoli out of the bro port but hadn't had a chance to submit a PR. > - Convert to new OPTIONS framework. This port has always used OptionsNG; your CMAKE changes are definitely nice but something I haven't seen before. > .if defined(BRO_PREFIX) > - @${MKDIR} ${PREFIX} > + @${MKDIR} ${STAGEDIR}${PREFIX} > .endif The mkdir is a workaround. If BRO_PREFIX doesn't already exist, you can't make package: ===> Building package for broccoli-2.2_1 Creating package /var/tmp/broccoli-PR/work/broccoli-2.2_1.tbz Registering depends: python-2.7_1,2 python2-2_1 python27-2.7.6 gettext-0.18.3.1 libiconv-1.14_1 GeoIP-1.4.8_3. pkg_create: couldn't resolve path for prefix: /usr/local/bro-2.2: No such file or directory *** [do-package] Error code 1 Stop in /var/tmp/broccoli-PR. *** [package] Error code 1 Stop in /var/tmp/broccoli-PR. fun 90 % Does the updated/attached patch (includes your changes) make this clearer? Craig Hi, +--On 6 d=C3=A9cembre 2013 22:16:17 -0800 Craig Leres <leres@ee.lbl.gov> = wrote: |> - Convert to new OPTIONS framework. |=20 | This port has always used OptionsNG; your CMAKE changes are definitely | nice but something I haven't seen before. That's why I did not write OptionsNG but new OPTIONS framework :-) |> .if defined(BRO_PREFIX) |> - @${MKDIR} ${PREFIX} |> + @${MKDIR} ${STAGEDIR}${PREFIX} |> .endif |=20 | The mkdir is a workaround. If BRO_PREFIX doesn't already exist, you | can't make package: I don't use pkg_install but pkg, (as should everyone, pkg_install will be unsupported sometime next year.,) so I couldn't have found that one :-) | Does the updated/attached patch (includes your changes) make this = clearer? The thing it, it does not work, because PYTHON_SITELIBDIR is relative to LOCALBASE and not PREFIX, for some reason, so, I get : =3D=3D=3D> Building package for broccoli-2.2_1 pkg-static: lstat(/usr/home/mat/work/tmp/usr/home/mat/work/freebsd/ports/security/brocco= li/work/stage/usr/local/bro/lib/python2.7/site-packages/_broccoli_intern.so)= : No such file or directory pkg-static: lstat(/usr/home/mat/work/tmp/usr/home/mat/work/freebsd/ports/security/brocco= li/work/stage/usr/local/bro/lib/python2.7/site-packages/broccoli.py): No such file or directory pkg-static: lstat(/usr/home/mat/work/tmp/usr/home/mat/work/freebsd/ports/security/brocco= li/work/stage/usr/local/bro/%D/): No such file or directory *** [do-package] Error code 1 but I can fix that by moving stuff around in post-install. I'll send an updated patch :-) --=20 Mathieu Arnold +--On 9 décembre 2013 13:48:38 +0100 Mathieu Arnold <mat@FreeBSD.org> wrote: | but I can fix that by moving stuff around in post-install. I'll send an | updated patch :-) -- Mathieu Arnold On 12/09/13 05:31, Mathieu Arnold wrote:
> but I can fix that by moving stuff around in post-install. I'll send an
> updated patch :-)
That looks good.
Last patch set maintainer approved.
Craig
State Changed From-To: feedback->closed Committed, thanks! Author: mat Date: Fri Dec 13 23:25:36 2013 New Revision: 336382 URL: http://svnweb.freebsd.org/changeset/ports/336382 Log: - Install python bits in a sensible place. - Install ruby bits in a sensible place. - Convert to new OPTIONS framework. - Remove dependency on Perl, nothing in the sources needs it. - Use new LIB_DEPENDS format. PR: ports/184519 Submitted by: mat Approved by: maintainer Modified: head/security/broccoli/Makefile head/security/broccoli/pkg-plist Modified: head/security/broccoli/Makefile ============================================================================== --- head/security/broccoli/Makefile Fri Dec 13 23:25:27 2013 (r336381) +++ head/security/broccoli/Makefile Fri Dec 13 23:25:36 2013 (r336382) @@ -3,6 +3,7 @@ PORTNAME= broccoli PORTVERSION= 2.2 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= http://www.bro.org/downloads/release/ DISTNAME= bro-${PORTVERSION} @@ -14,59 +15,53 @@ LICENSE= BSD BUILD_DEPENDS= bison:${PORTSDIR}/devel/bison \ swig:${PORTSDIR}/devel/swig13 -LIB_DEPENDS= GeoIP:${PORTSDIR}/net/GeoIP +LIB_DEPENDS= libGeoIP.so:${PORTSDIR}/net/GeoIP -EXTRACT_AFTER_ARGS= ${DISTNAME}/aux/broccoli +EXTRACT_AFTER_ARGS= ${DISTNAME}/aux/broccoli -USES= cmake:outsource perl5 +USES= cmake:outsource USE_LDCONFIG= yes -NO_MTREE= yes CMAKE_SOURCE_PATH= ${WRKSRC}/aux/broccoli .if defined(BRO_PREFIX) -PREFIX=${BRO_PREFIX} +PREFIX= ${BRO_PREFIX} PLIST_SUB+= CLEANUP_PREFIX="" +.if ! defined(WITH_PKGNG) && ! exists(${BRO_PREFIX}) NEED_ROOT= yes +.endif +NO_MTREE= yes .else PLIST_SUB+= CLEANUP_PREFIX="@comment " .endif CMAKE_ARGS+= -D CMAKE_INSTALL_PREFIX:PATH=${PREFIX} \ - -D BRO_ETC_INSTALL_DIR:PATH=${PREFIX}/etc \ - -D PY_MOD_INSTALL_DIR:PATH=${PREFIX} + -D BRO_ETC_INSTALL_DIR:PATH=${PREFIX}/etc OPTIONS_DEFINE= DEBUG PYTHON RUBY +OPTIONS_SUB= DEBUG_DESC= Compile in debugging mode PYTHON_DESC= Build python bindings for broccoli RUBY_DESC= Build ruby bindings for broccoli -.include <bsd.port.options.mk> - -.if ${PORT_OPTIONS:MDEBUG} -CMAKE_ARGS+= -D ENABLE_DEBUG:BOOL=true -.endif - -.if ${PORT_OPTIONS:MPYTHON} -USE_PYTHON= yes -PLIST_SUB+= PYTHON="" -.else -CMAKE_ARGS+= -D DISABLE_PYTHON_BINDINGS:BOOL=true -PLIST_SUB+= PYTHON="@comment " -.endif - -.if ${PORT_OPTIONS:MRUBY} -USE_RUBY= yes -PLIST_SUB+= RUBY="" -.else -CMAKE_ARGS+= -D DISABLE_RUBY_BINDINGS:BOOL=true -PLIST_SUB+= RUBY="@comment " -.endif - -post-stage:: -.if defined(BRO_PREFIX) +DEBUG_CMAKE_ON= -D ENABLE_DEBUG:BOOL=true +PYTHON_USE= python=yes +PYTHON_CMAKE_ON= -D PY_MOD_INSTALL_DIR:PATH=${PYTHON_SITELIBDIR} +PYTHON_CMAKE_OFF= -D DISABLE_PYTHON_BINDINGS:BOOL=true +RUBY_USE= ruby=yes +RUBY_CMAKE_ON= -D RB_INSTALL_DIR:PATH=${RUBY_SITELIBDIR} \ + -D RB_ARCH_INSTALL_DIR:PATH=${RUBY_SITEARCHLIBDIR} +RUBY_CMAKE_OFF= -D DISABLE_RUBY_BINDINGS:BOOL=true + +post-install:: +.if defined(BRO_PREFIX) && ! defined(WITH_PKGNG) && ! exists(${BRO_PREFIX}) + # pkg_install needs PREFIX in order to make a package from STAGEDIR/PREFIX. @${MKDIR} ${PREFIX} .endif @${MKDIR} ${STAGEDIR}${PREFIX}/etc - @${INSTALL_SCRIPT} ${WRKSRC}/aux/broccoli/broccoli.conf ${STAGEDIR}${PREFIX}/etc/broccoli.conf.example + @${MV} ${STAGEDIR}${PREFIX}/etc/broccoli.conf ${STAGEDIR}${PREFIX}/etc/broccoli.conf.example +.if defined(BRO_PREFIX) + # bsd.python.mk isn't PREFIX-safe yet. + @${MV} ${STAGEDIR}${PYTHON_LIBDIR} ${STAGEDIR}${PYTHON_LIBDIR:S/${LOCALBASE}/${PREFIX}/} +.endif .include <bsd.port.mk> Modified: head/security/broccoli/pkg-plist ============================================================================== --- head/security/broccoli/pkg-plist Fri Dec 13 23:25:27 2013 (r336381) +++ head/security/broccoli/pkg-plist Fri Dec 13 23:25:36 2013 (r336382) @@ -7,11 +7,23 @@ lib/libbroccoli.a lib/libbroccoli.so lib/libbroccoli.so.5 lib/libbroccoli.so.5.1.0 -%%PYTHON%%lib/python/_broccoli_intern.so -%%PYTHON%%lib/python/broccoli.py -%%RUBY%%lib/ruby/broccoli_ext.so +%%PYTHON%%%%PYTHON_SITELIBDIR%%/_broccoli_intern.so +%%PYTHON%%%%PYTHON_SITELIBDIR%%/broccoli.py +%%RUBY%%%%RUBY_SITELIBDIR%%/Broccoli/connection.rb +%%RUBY%%%%RUBY_SITELIBDIR%%/Broccoli/event.rb +%%RUBY%%%%RUBY_SITELIBDIR%%/Broccoli/record.rb +%%RUBY%%%%RUBY_SITELIBDIR%%/broccoli.rb +%%RUBY%%%%RUBY_SITEARCHLIBDIR%%/broccoli_ext.so +%%RUBY%%@dirrmtry %%RUBY_SITELIBDIR%%/Broccoli +%%CLEANUP_PREFIX%%%%PORTDOCS%%@dirrmtry share +%%CLEANUP_PREFIX%%%%RUBY%%@dirrmtry lib/ruby/site_ruby/1.9/i386-freebsd9 +%%CLEANUP_PREFIX%%%%RUBY%%@dirrmtry lib/ruby/site_ruby/1.9 +%%CLEANUP_PREFIX%%%%RUBY%%@dirrmtry lib/ruby/site_ruby +%%CLEANUP_PREFIX%%%%RUBY%%@dirrmtry lib/ruby +%%CLEANUP_PREFIX%%%%PYTHON%%@dirrmtry lib/python2.7/site-packages +%%CLEANUP_PREFIX%%%%PYTHON%%@dirrmtry lib/python2.7 %%CLEANUP_PREFIX%%@dirrmtry lib %%CLEANUP_PREFIX%%@dirrmtry include %%CLEANUP_PREFIX%%@dirrmtry etc %%CLEANUP_PREFIX%%@dirrmtry bin -%%CLEANUP_PREFIX%%@dirrmtry %D +%%CLEANUP_PREFIX%%@unexec rmdir %D || : _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org" |