Skip to contentSkip to conversation

sngrep: fix dependency and configuration issues.

PATCH New Adam Duskett 2 participants 2 messages Jan 26, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sngrep: fix dependency and configuration issues.

With the changes applied by thomas I noticed that sngrep will now fail to configure if both openssl and gnutls are selected (both can't be enabled at the same time.) I set openssl to take precidence over gnutls, mainly because it's the larger of the two dependencies, and if the user has selected it they probably want to use it.

I also noticed that sngrep will complain if libgcrypt isn't compiled as well. Not sure why I didn't notice this issue to begin with, but I added it as a dependency and select it in the Config.in file now.

---
 package/sngrep/Config.in |  1 +
 package/sngrep/sngrep.mk | 13 +++++--------
 2 files changed, 6 insertions(+), 8 deletions(-)
package/sngrep/Config.in +1 -0
index 4d0d80c..c3b8469 100644
@@ -6,6 +6,7 @@ config BR2_PACKAGE_SNGREP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_PACKAGE_NCURSES
 	select BR2_PACKAGE_LIBPCAP
+	select BR2_PACKAGE_LIBGCRYPT
 	help
 	  sngrep is a tool for displaying SIP calls message flows from
 	  terminal.  It supports live capture to display realtime SIP
package/sngrep/sngrep.mk +5 -8
index f504771..e168bb1 100644
@@ -9,22 +9,19 @@ SNGREP_SITE = $(call github,irontec,sngrep,$(SNGREP_VERSION))
 SNGREP_LICENSE = GPLv3+
 SNGREP_LICENSE_FILES = LICENSE
 SNGREP_AUTORECONF = YES
-SNGREP_DEPENDENCIES = libpcap ncurses
+SNGREP_DEPENDENCIES = libpcap ncurses libgcrypt
 
 # our ncurses wchar support is not properly detected
 SNGREP_CONF_OPTS += --disable-unicode
 
-ifeq ($(BR2_PACKAGE_GNUTLS),y)
-SNGREP_DEPENDENCIES += gnutls
-SNGREP_CONF_OPTS += --with-gnutls
-else
-SNGREP_CONF_OPTS += --without-gnutls
-endif
-
+# openssl and gnutls can't be enable at the same time.
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 SNGREP_DEPENDENCIES += openssl
 SNGREP_CONF_OPTS += --with-openssl
+SNGREP_CONF_OPTS += --without-gnutls
 else
+SNGREP_DEPENDENCIES += gnutls
+SNGREP_CONF_OPTS += --with-gnutls
 SNGREP_CONF_OPTS += --without-openssl
 endif
 
Signature · 1 line
2.9.3
#1 lore raw

PATCH 1/1 sngrep: fix dependency and configuration issues.

Hi Adam,

Quoted 10 lines · Adam Duskett

With the changes applied by thomas I noticed that sngrep will now fail to configure if both openssl and gnutls are selected (both can't be enabled at the same time.) I set openssl to take precidence over gnutls, mainly because it's the larger of the two dependencies, and if the user has selected it they probably want to use it.

I also noticed that sngrep will complain if libgcrypt isn't compiled as well. Not sure why I didn't notice this issue to begin with, but I added it as a dependency and select it in the Config.in file now.

This change should be in an separate patch.

Quoted 11 lines
---
 package/sngrep/Config.in |  1 +
 package/sngrep/sngrep.mk | 13 +++++--------
 2 files changed, 6 insertions(+), 8 deletions(-)
package/sngrep/Config.in +0 -0
index 4d0d80c..c3b8469 100644

package/sngrep/Config.in config BR2_PACKAGE_SNGREP · line 9

Quoted 4 lines
package/sngrep/Config.in +1 -0
@@ -6,6 +6,7 @@ config BR2_PACKAGE_SNGREP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_PACKAGE_NCURSES
 	select BR2_PACKAGE_LIBPCAP
+	select BR2_PACKAGE_LIBGCRYPT

The dependency of BR2_PACKAGE_LIBGCRYPT is required here, namely BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS.

Quoted 20 lines
package/sngrep/Config.in +0 -0
 	help
 	  sngrep is a tool for displaying SIP calls message flows from
 	  terminal.  It supports live capture to display realtime SIP
package/sngrep/sngrep.mk +1 -4
index f504771..e168bb1 100644
@@ -9,22 +9,19 @@ SNGREP_SITE = $(call github,irontec,sngrep,$(SNGREP_VERSION))
 SNGREP_LICENSE = GPLv3+
 SNGREP_LICENSE_FILES = LICENSE
 SNGREP_AUTORECONF = YES
-SNGREP_DEPENDENCIES = libpcap ncurses
+SNGREP_DEPENDENCIES = libpcap ncurses libgcrypt
 
 # our ncurses wchar support is not properly detected
 SNGREP_CONF_OPTS += --disable-unicode
 
-ifeq ($(BR2_PACKAGE_GNUTLS),y)
-SNGREP_DEPENDENCIES += gnutls
-SNGREP_CONF_OPTS += --with-gnutls

package/sngrep/sngrep.mk SNGREP_SITE = $(call github,irontec,sngrep,$(SNGREP_VERSION)) · line 22

Quoted 10 lines
package/sngrep/sngrep.mk +2 -4
-else
-SNGREP_CONF_OPTS += --without-gnutls
-endif
-
+# openssl and gnutls can't be enable at the same time.
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 SNGREP_DEPENDENCIES += openssl
 SNGREP_CONF_OPTS += --with-openssl
+SNGREP_CONF_OPTS += --without-gnutls
 else

Should be 'else ifeq ($(BR2_PACKAGE_GNUTLS),y)'.

package/sngrep/sngrep.mk SNGREP_SITE = $(call github,irontec,sngrep,$(SNGREP_VERSION)) · line 26

Quoted 4 lines
package/sngrep/sngrep.mk +2 -0
+SNGREP_DEPENDENCIES += gnutls
+SNGREP_CONF_OPTS += --with-gnutls
 SNGREP_CONF_OPTS += --without-openssl
 endif

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -