Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 534780

Summary: net-voip/sngrep-1.0.0 - SIP Messages flow viewer
Product: Gentoo Linux Reporter: Kaian <kaian>
Component: New packagesAssignee: Gentoo Netmon project <netmon>
Status: RESOLVED FIXED    
Severity: enhancement Keywords: EBUILD
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/irontec/sngrep
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: sngrep-0.2.0.ebuild
sngrep-0.2.0.ebuild
sngrep-0.2.1.ebuild
sngrep-0.3.0.ebuild
new ebuild for upcoming version.
sngrep-1.0.0.ebuild

Description Kaian 2015-01-05 13:26:57 UTC
Hi!

Please find attached sngrep-0.2.0.ebuild. I recommend the category net-analyzer.

sngrep is a terminal tool that groups SIP (Session Initiation Protocol) Messages by Call-Id, and displays them in arrow flows similar to the used in SIP RFCs.

The aim of this tool is to make easier the process of learnig or debugging SIP.

Features:
* Capture SIP packets from devices or read from PCAP file
* Supports UDP, TCP and TLS (partially) transports
* Allows filtering using BPF (Berkeley Packet Filter)
* Save captured packets to PCAP file

You can see some screenshots at https://github.com/irontec/sngrep/wiki/Screenshots

This ebuild depends on sys-libs/ncurses, net-libs/libpcap and optionally dev-libs/openssl

Kaian
Comment 1 Kaian 2015-01-05 13:28:01 UTC
Created attachment 393230 [details]
sngrep-0.2.0.ebuild
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-06 08:24:25 UTC
Comment on attachment 393230 [details]
sngrep-0.2.0.ebuild

>MY_V="0.2.0"

You don't need $MY_V when it's the same as $PV.

>MY_P="${PN}-${MY_V}"

That's $P.

>DESCRIPTION="SIP Messages flow viewer"
>HOMEPAGE="https://github.com/irontec/sngrep"
>SRC_URI="${HOMEPAGE}/archive/v${MY_V}.tar.gz"

That needs a "SRC_URI arrow": 

SRC_URI="<someURL>/v${PV}.tar.gz - > ${P}.tar.gz"

so that it's stored with a somewhat more unique name in DISTDIR.

>LICENSE="GPL-3+openssl"

There is no such license. With a space in between it would be two valid ones.

>SLOT="0"
>KEYWORDS="amd64 ~arm ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"

You have tested on all those platforms?

>src_install() {
>	emake DESTDIR="${D}" install
>	dodoc ChangeLog COPYING README AUTHORS

You can replace

     emake DESTDIR="${D}" install

with

     default

And if you write DOCS=( ChangeLog COPYING README AUTHORS ) in the global scope, then you don't need to define src_install() at all.
Comment 3 Kaian 2015-01-06 13:02:21 UTC
Hi Jeroen,

Thanks a lot for the support and also filling the bug fields properly. I'm kinda new writing ebuilds, so its based on an existing one.

I have updated the ebuild with the changes you suggested me.

This software can be compiled with SSL support using openssl 0.9.8 or 1.0.0 so I've updated the DEPENDS removing the "-1" from openssl, that I guess refers to the slot number. Is this correct?

Thanks again!
Kaian
Comment 4 Kaian 2015-01-06 13:02:58 UTC
Created attachment 393316 [details]
sngrep-0.2.0.ebuild
Comment 5 Kaian 2015-01-22 12:32:51 UTC
Created attachment 394606 [details]
sngrep-0.2.1.ebuild
Comment 6 Kaian 2015-03-05 15:00:47 UTC
Created attachment 398152 [details]
sngrep-0.3.0.ebuild
Comment 7 Kaian 2015-03-05 15:01:57 UTC
A new version of sngrep has been released so I've updated the ebuild with the new use flags (unicode and pcre).
Comment 8 spacedream 2015-07-14 00:51:23 UTC
Created attachment 406728 [details]
new ebuild for upcoming version.

net-analyzer/sngrep/sngrep-0.4.1.ebuild 
ready to be added to main portage of gentoo. thanks!
Comment 9 Kaian 2015-10-06 18:33:01 UTC
Created attachment 413926 [details]
sngrep-1.0.0.ebuild
Comment 10 Gled 2016-06-09 18:27:54 UTC
Would it be possible to add an optional dependancy to libressl as a choice to replace openssl ?

Thanks !
Comment 11 Kaian 2016-06-09 19:35:58 UTC
(In reply to Gled from comment #10)
> Would it be possible to add an optional dependancy to libressl as a choice
> to replace openssl ?
> 
> Thanks !

Hi!

If we update the ebuild to latest stable version (1.3.1) it would be possible to use openssl or libressl (--with-openssl configure flag) or even gnuTLS (--with-gnutls configure flag), but not both at the same time.

I think It should't be hard to update the ebuild to change versions and dependencies.

Best regards
Comment 12 Kaian 2018-02-20 11:17:37 UTC
Hi Jeroen,

Thanks for including sngrep in the tree. I'm the software developer and also gentoo user, so don't hesitate to request any help or support you would need. We can review any required patches to check if we can include them in upstream if you want.

Regards