Hi Jamie,
This sounds great!
Did you look at the cpack-produced packages?
Did you give cpack a whirl, or did you just decide to do this on general
principles?
I'm having cpack name the packages assimilation-cma and
assimilation-nanoprobe. You'll install the nanoprobe package many more
times than the CMA package... Naming yours consistently would be nice.
Regarding the location of the libraries... That's an interesting one...
I'll see what I can do to fix that better...
At one time I was reasonably certain (in spite of the paths) that it's
finding the right libraries on my machines - once it's installed.
But maybe I was dreaming...
If you'd like your specfile included as part of the project (which seems
reasonable), then you'll need to sign the contributor agreement:
http://linux-ha.org/source-doc/assimilation/html/_contributing.html
Thanks for your efforts!
On 03/12/2013 07:58 PM, Jamie Nguyen wrote:
> Howdy Alan,
>
> I've had an initial stab at packaging assimilation + deps for Fedora 18
> and EPEL 6. This includes 5 packages that aren't already in the
> repositories:
>
> python-ctypesgen
> python-testify
> python-py2neo
> neo4j
> assimilation
>
>
> The python packages were fairly straight forward. If any Fedora people
> are watching I've posted them for review:
>
> python-ctypesgen
> https://bugzilla.redhat.com/show_bug.cgi?id=919932
>
> python-testify
> https://bugzilla.redhat.com/show_bug.cgi?id=919937
>
> python-py2neo
> https://bugzilla.redhat.com/show_bug.cgi?id=919933
>
>
> The assimilation package (which of course at this pre-alpha "toy" stage
> I don't have any intention to put up for review) can be viewed here:
>
> Spec: http://jamielinux.fedorapeople.org/assimilation/assimilation.spec
> SRPM:
> http://jamielinux.fedorapeople.org/assimilation/SRPMS/assimilation-0.1.0-0.1.20130311hg514.fc18.src.rpm
>
> Note that I decided to call it assimilation, with an
> assimilation-nanoprobe subpackage. The services still retain the names
> assimilation-cma and assimilation-nanoprobe, but I thought it might be
> more intuitive if "yum install assimilation" gets you the main workhorse
> (=cma).
>
> I came across a few issues when building assimilation which I've hacked
> around and listed below. These hacks are quick and dirty and probably
> all wrong, so I'll leave you to fix them properly, assuming of course
> they are actually real problems.
>
> 1) There are two unusual looking lines in cma/AssimCtypes.py:
>
> _libdirs = ['../../bin/clientlib',
> '/home/alanr/monitor/bin/clientlib', '/usr/lib/x86_64-linux-gnu']
>
> add_library_search_dirs(['../../bin/clientlib',
> '/home/alanr/monitor/bin/clientlib', '/usr/lib/x86_64-linux-gnu'])
>
> As high availability as your home directory may be, /usr/sbin/cma can't
> seem to find the shared libraries located there ;) so the current hack
> I'm using looks like the following (where %{_libdir} is /usr/lib on
> i686, or /usr/lib64 on x86_64):
>
> sed -i \
> -e "s|^_libdirs =.*|_libdirs = ['%{_libdir}',
> '%{_libdir}/assimilation']|g" \
> -e
> "s|^add_library_search_dirs.*|add_library_search_dirs(['%{_libdir}',
> '%{_libdir}/assimilation'])|g" \
> cma/AssimCtypes.py
>
>
> 2) It seems /usr/sbin/nanoprobe can't find the shared libraries either,
> and I couldn't mould cmake to my bidding, so I'm symlinking the two
> libraries at /usr/lib64/assimilation/libassimfoo.so to
> /usr/lib64/libassimfoo.so.
>
>
> 3) When building on EPEL 6, I got hit by an "undefined reference to
> clock_gettime" error, which I've hacked around with this patch:
>
> --- a/clientlib/CMakeLists.txt
> +++ b/clientlib/CMakeLists.txt
> @@ -49,6 +49,6 @@
> target_link_libraries(${CLIENTLIB} ${GLIB_LIB})
> target_link_libraries(${CLIENTLIB} ${WS2_LIB})
> ELSE(WIN32)
> - target_link_libraries (${CLIENTLIB} -lpcap -lglib-2.0)
> + target_link_libraries (${CLIENTLIB} -lpcap -lglib-2.0 -lrt)
> ENDIF(WIN32)
> install(TARGETS ${CLIENTLIB} COMPONENT nanoprobe-component LIBRARY
> DESTINATION ${InstallLIBS})
>
>
> 4) When building on 32bit EPEL 6, I get an "integer constant is too
> large for 'unsigned long' type" error, which I've hacked around with
> this patch:
>
> --- a/clientlib/intframe.c
> +++ b/clientlib/intframe.c
> @@ -212,7 +212,7 @@
> guint16 framelength = get_generic_tlv_len(tlvstart, pktend);
> const guint8* framevalue = get_generic_tlv_value(tlvstart, pktend);
> IntFrame * ret = intframe_new(frametype, framelength);
> - guint64 intvalue = 0xffffffffffffffffUL;
> + guint64 intvalue = 0xffffffffffffffffULL;
> g_return_val_if_fail(ret != NULL, NULL);
>
> ret->baseclass.length = framelength;
>
>
> 5) /usr/sbin/cma service seems to run fine as an unprivileged user (ie,
> UID!=0), but /usr/sbin/nanoprobe needs privs for pcap and complains if
> UID!=0. Would it be feasible to allow nanoprobe to drop privs if run as
> root, or to run usefully as an unprivileged user? Even if running as
> root, systemd makes it possible to perform some service hardening.
>
>
> The Fedora RPMS use systemd service files for assimilation-cma,
> assimilation-nanoprobe and neo4j. The EPEL 6 RPMS use custom initscripts
> (not the initscripts shipped with assimilation or neo4j).
>
> Packaging neo4j... well, let's just say Java packaging is comparable to
> gouging one's eyes out with a rusty spoon. The current package is not
> suitable for inclusion into Fedora as there are numerous bundled .jar
> files that need to be packaged separately. Maybe I'll tackle that at a
> later date (later=3months).
>
> Self-inflicted spoon-related eye injuries aside, I've set up a
> repository for Fedora 18 and EPEL 6 that has all of the dependencies.
> For anyone interested, repository instructions are below.
>
> DISCLAIMER: This repository may be discontinued at any time. Do not rely
> on it for anything other than testing assimilation, and even then you're
> probably better off compiling from source. The packages are signed with
> my GPG key, so when your computer explodes I cannot try to pretend it
> wasn't me. And finally, these packages have received barely any testing
> and may be horribly broken, but I need to sleep now :)
>
> Fedora 18:
> http://repos.fedorapeople.org/repos/jamielinux/assimilation/fedora-assimilation.repo
>
> EPEL 6:
> http://repos.fedorapeople.org/repos/jamielinux/assimilation/epel-assimilation.repo
>
>
> Kind regards,
>
--
Alan Robertson <[email protected]> - @OSSAlanR
"Openness is the foundation and preservative of friendship... Let me claim
from you at all times your undisguised opinions." - William Wilberforce
_______________________________________________
Assimilation mailing list - Discovery-Driven Monitoring
[email protected]
http://lists.community.tummy.com/cgi-bin/mailman/listinfo/assimilation
http://assimmon.org/