From: <abe...@us...> - 2017-05-10 20:59:42
|
Revision: 8295 http://sourceforge.net/p/astlinux/code/8295 Author: abelbeck Date: 2017-05-10 20:59:40 +0000 (Wed, 10 May 2017) Log Message: ----------- sngrep, version bump to 1.4.3, enable EEP/HEP support Modified Paths: -------------- branches/1.0/package/sngrep/sngrep.mk Removed Paths: ------------- branches/1.0/package/sngrep/sngrep-0001-upstream-add-SNGREPRC-env-support.patch branches/1.0/package/sngrep/sngrep-0002-upstream-F8-help-text.patch branches/1.0/package/sngrep/sngrep-0003-upstream-getenv-malloc.patch branches/1.0/package/sngrep/sngrep-0004-upstream-silence-clang-warnings.patch Deleted: branches/1.0/package/sngrep/sngrep-0001-upstream-add-SNGREPRC-env-support.patch =================================================================== --- branches/1.0/package/sngrep/sngrep-0001-upstream-add-SNGREPRC-env-support.patch 2017-05-10 17:50:03 UTC (rev 8294) +++ branches/1.0/package/sngrep/sngrep-0001-upstream-add-SNGREPRC-env-support.patch 2017-05-10 20:59:40 UTC (rev 8295) @@ -1,164 +0,0 @@ -diff --git a/src/curses/ui_column_select.c b/src/curses/ui_column_select.c -index 5fe6436..86d7ba1 100644 ---- a/src/curses/ui_column_select.c -+++ b/src/curses/ui_column_select.c -@@ -373,21 +373,24 @@ column_select_save_columns(ui_t *ui) - FILE *fi, *fo; - char columnopt[128]; - char line[1024]; -- char *home = getenv("HOME"); -+ char *rcfile; - char userconf[128], tmpfile[128]; - -- // No home dir... -- if (!home) -+ // Use current $SNGREPRC or $HOME/.sngreprc file -+ if (rcfile = getenv("SNGREPRC")) { -+ sprintf(userconf, "%s", rcfile); -+ sprintf(tmpfile, "%s.old", rcfile); -+ } else if (rcfile = getenv("HOME")) { -+ sprintf(userconf, "%s/.sngreprc", rcfile); -+ sprintf(tmpfile, "%s/.sngreprc.old", rcfile); -+ } else { - return; -- -- // Read current $HOME/.sngreprc file -- sprintf(userconf, "%s/.sngreprc", home); -- sprintf(tmpfile, "%s/.sngreprc.old", home); -+ } - - // Remove old config file - unlink(tmpfile); - -- // Move home file to temporal dir -+ // Move user conf file to temporal file - rename(userconf, tmpfile); - - // Create a new user conf file -@@ -403,7 +406,7 @@ column_select_save_columns(ui_t *ui) - while (fgets(line, 1024, fi) != NULL) { - // Ignore lines starting with set (but keep settings) - if (strncmp(line, "set ", 4) || strncmp(line, "set cl.column", 13)) { -- // Put everyting in new .sngreprc file -+ // Put everyting in new user conf file - fputs(line, fo); - } - } -diff --git a/src/curses/ui_column_select.h b/src/curses/ui_column_select.h -index 4181f33..83600d2 100644 ---- a/src/curses/ui_column_select.h -+++ b/src/curses/ui_column_select.h -@@ -164,7 +164,7 @@ column_select_update_columns(ui_t *ui); - * @brief Save selected columns to user config file - * - * Remove previously configurated columns from user's -- * $HOME/.sngreprc and add new ones -+ * $SNGREPRC or $HOME/.sngreprc and add new ones - * - * @param ui UI structure pointer - */ -diff --git a/src/curses/ui_settings.c b/src/curses/ui_settings.c -index d765f0b..48c9f11 100644 ---- a/src/curses/ui_settings.c -+++ b/src/curses/ui_settings.c -@@ -452,7 +452,7 @@ ui_settings_save(ui_t *ui) - int i; - FILE *fi, *fo; - char line[1024]; -- char *home = getenv("HOME"); -+ char *rcfile; - char userconf[128], tmpfile[128]; - char field_value[180]; - settings_entry_t *entry; -@@ -460,20 +460,22 @@ ui_settings_save(ui_t *ui) - // Get panel information - settings_info_t *info = settings_info(ui); - -- // No home dir... -- if (!home) { -- dialog_run("Unable to save configuration. User has no $HOME dir."); -+ // Use current $SNGREPRC or $HOME/.sngreprc file -+ if (rcfile = getenv("SNGREPRC")) { -+ sprintf(userconf, "%s", rcfile); -+ sprintf(tmpfile, "%s.old", rcfile); -+ } else if (rcfile = getenv("HOME")) { -+ sprintf(userconf, "%s/.sngreprc", rcfile); -+ sprintf(tmpfile, "%s/.sngreprc.old", rcfile); -+ } else { -+ dialog_run("Unable to save configuration. User has no $SNGREPRC or $HOME dir."); - return; - } - -- // Read current $HOME/.sngreprc file -- sprintf(userconf, "%s/.sngreprc", home); -- sprintf(tmpfile, "%s/.sngreprc.old", home); -- - // Remove old config file - unlink(tmpfile); - -- // Move home file to temporal dir -+ // Move user conf file to temporal file - rename(userconf, tmpfile); - - // Create a new user conf file -@@ -487,7 +489,7 @@ ui_settings_save(ui_t *ui) - while (fgets(line, 1024, fi) != NULL) { - // Ignore lines starting with set (but keep set column ones) - if (strncmp(line, "set ", 4) || !strncmp(line, "set cl.column", 13)) { -- // Put everyting in new .sngreprc file -+ // Put everyting in new user conf file - fputs(line, fo); - } - } -diff --git a/src/option.c b/src/option.c -index e6e3145..b1efa08 100644 ---- a/src/option.c -+++ b/src/option.c -@@ -51,7 +51,7 @@ init_options() - { - // Custom user conf file - char userconf[128]; -- char *home = getenv("HOME"); -+ char *rcfile; - char pwd[MAX_SETTING_LEN]; - - // Defualt savepath is current directory -@@ -75,9 +75,11 @@ init_options() - // Read options from configuration files - read_options("/etc/sngreprc"); - read_options("/usr/local/etc/sngreprc"); -- // Get user homedir configuration -- if (home) { -- sprintf(userconf, "%s/.sngreprc", home); -+ // Get user configuration -+ if (rcfile = getenv("SNGREPRC")) { -+ read_options(rcfile); -+ } else if (rcfile = getenv("HOME")) { -+ sprintf(userconf, "%s/.sngreprc", rcfile); - read_options(userconf); - } - -diff --git a/src/option.h b/src/option.h -index 3f8fea4..58d8245 100644 ---- a/src/option.h -+++ b/src/option.h -@@ -32,6 +32,7 @@ - * - Initialization - * - \@sysdir\@/sngreprc - * - $HOME/.sngreprc -+ * - $SNGREPRC - * - * This is a basic approach to configuration, but at least a minimun is required - * for those who can not see all the list columns or want to disable colours in -diff --git a/src/setting.h b/src/setting.h -index 492a9a7..20c197c 100644 ---- a/src/setting.h -+++ b/src/setting.h -@@ -32,6 +32,7 @@ - * - Initialization - * - \@sysdir\@/sngreprc - * - $HOME/.sngreprc -+ * - $SNGREPRC - * - * This is a basic approach to configuration, but at least a minimun is required - * for those who can not see all the list columns or want to disable colours in Deleted: branches/1.0/package/sngrep/sngrep-0002-upstream-F8-help-text.patch =================================================================== --- branches/1.0/package/sngrep/sngrep-0002-upstream-F8-help-text.patch 2017-05-10 17:50:03 UTC (rev 8294) +++ branches/1.0/package/sngrep/sngrep-0002-upstream-F8-help-text.patch 2017-05-10 20:59:40 UTC (rev 8295) @@ -1,13 +0,0 @@ -diff --git a/src/curses/ui_call_list.c b/src/curses/ui_call_list.c -index 9d854fc..043d2d1 100644 ---- a/src/curses/ui_call_list.c -+++ b/src/curses/ui_call_list.c -@@ -933,7 +933,7 @@ call_list_help(ui_t *ui) - mvwprintw(help_win, 17, 2, "F5/Ctrl-L Clear call list (can not be undone!)"); - mvwprintw(help_win, 18, 2, "F6/R Show selected call messages in raw mode"); - mvwprintw(help_win, 19, 2, "F7/F Show filter options"); -- mvwprintw(help_win, 20, 2, "F8/c Turn on/off window colours"); -+ mvwprintw(help_win, 20, 2, "F8/o Show Settings"); - mvwprintw(help_win, 21, 2, "F10/t Select displayed columns"); - mvwprintw(help_win, 22, 2, "i/I Set display filter to invite"); - mvwprintw(help_win, 23, 2, "p Stop/Resume packet capture"); Deleted: branches/1.0/package/sngrep/sngrep-0003-upstream-getenv-malloc.patch =================================================================== --- branches/1.0/package/sngrep/sngrep-0003-upstream-getenv-malloc.patch 2017-05-10 17:50:03 UTC (rev 8294) +++ branches/1.0/package/sngrep/sngrep-0003-upstream-getenv-malloc.patch 2017-05-10 20:59:40 UTC (rev 8295) @@ -1,169 +0,0 @@ -diff --git a/src/curses/ui_column_select.c b/src/curses/ui_column_select.c -index 86d7ba1..d76be47 100644 ---- a/src/curses/ui_column_select.c -+++ b/src/curses/ui_column_select.c -@@ -374,15 +374,34 @@ column_select_save_columns(ui_t *ui) - char columnopt[128]; - char line[1024]; - char *rcfile; -- char userconf[128], tmpfile[128]; -+ char *userconf = NULL; -+ char *tmpfile = NULL; - - // Use current $SNGREPRC or $HOME/.sngreprc file - if (rcfile = getenv("SNGREPRC")) { -- sprintf(userconf, "%s", rcfile); -- sprintf(tmpfile, "%s.old", rcfile); -+ if (userconf = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -+ if (tmpfile = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -+ sprintf(userconf, "%s", rcfile); -+ sprintf(tmpfile, "%s.old", rcfile); -+ } else { -+ sng_free(userconf); -+ return; -+ } -+ } else { -+ return; -+ } - } else if (rcfile = getenv("HOME")) { -- sprintf(userconf, "%s/.sngreprc", rcfile); -- sprintf(tmpfile, "%s/.sngreprc.old", rcfile); -+ if (userconf = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -+ if (tmpfile = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -+ sprintf(userconf, "%s/.sngreprc", rcfile); -+ sprintf(tmpfile, "%s/.sngreprc.old", rcfile); -+ } else { -+ sng_free(userconf); -+ return; -+ } -+ } else { -+ return; -+ } - } else { - return; - } -@@ -396,6 +415,8 @@ column_select_save_columns(ui_t *ui) - // Create a new user conf file - if (!(fo = fopen(userconf, "w"))) { - dialog_run("Unable to open %s: %s", userconf, strerror(errno)); -+ sng_free(userconf); -+ sng_free(tmpfile); - return; - } - -@@ -430,6 +451,9 @@ column_select_save_columns(ui_t *ui) - - // Show a information dialog - dialog_run("Column layout successfully saved to %s", userconf); -+ -+ sng_free(userconf); -+ sng_free(tmpfile); - } - - -diff --git a/src/curses/ui_settings.c b/src/curses/ui_settings.c -index 48c9f11..2c7fe39 100644 ---- a/src/curses/ui_settings.c -+++ b/src/curses/ui_settings.c -@@ -453,7 +453,8 @@ ui_settings_save(ui_t *ui) - FILE *fi, *fo; - char line[1024]; - char *rcfile; -- char userconf[128], tmpfile[128]; -+ char *userconf = NULL; -+ char *tmpfile = NULL; - char field_value[180]; - settings_entry_t *entry; - -@@ -462,11 +463,29 @@ ui_settings_save(ui_t *ui) - - // Use current $SNGREPRC or $HOME/.sngreprc file - if (rcfile = getenv("SNGREPRC")) { -- sprintf(userconf, "%s", rcfile); -- sprintf(tmpfile, "%s.old", rcfile); -+ if (userconf = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -+ if (tmpfile = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -+ sprintf(userconf, "%s", rcfile); -+ sprintf(tmpfile, "%s.old", rcfile); -+ } else { -+ sng_free(userconf); -+ return; -+ } -+ } else { -+ return; -+ } - } else if (rcfile = getenv("HOME")) { -- sprintf(userconf, "%s/.sngreprc", rcfile); -- sprintf(tmpfile, "%s/.sngreprc.old", rcfile); -+ if (userconf = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -+ if (tmpfile = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -+ sprintf(userconf, "%s/.sngreprc", rcfile); -+ sprintf(tmpfile, "%s/.sngreprc.old", rcfile); -+ } else { -+ sng_free(userconf); -+ return; -+ } -+ } else { -+ return; -+ } - } else { - dialog_run("Unable to save configuration. User has no $SNGREPRC or $HOME dir."); - return; -@@ -480,6 +499,8 @@ ui_settings_save(ui_t *ui) - - // Create a new user conf file - if (!(fo = fopen(userconf, "w"))) { -+ sng_free(userconf); -+ sng_free(tmpfile); - return; - } - -@@ -510,4 +531,7 @@ ui_settings_save(ui_t *ui) - fclose(fo); - - dialog_run("Settings successfully saved to %s", userconf); -+ -+ sng_free(userconf); -+ sng_free(tmpfile); - } -diff --git a/src/option.c b/src/option.c -index b1efa08..641321a 100644 ---- a/src/option.c -+++ b/src/option.c -@@ -50,7 +50,7 @@ int - init_options() - { - // Custom user conf file -- char userconf[128]; -+ char *userconf = NULL; - char *rcfile; - char pwd[MAX_SETTING_LEN]; - -@@ -79,8 +79,11 @@ init_options() - if (rcfile = getenv("SNGREPRC")) { - read_options(rcfile); - } else if (rcfile = getenv("HOME")) { -- sprintf(userconf, "%s/.sngreprc", rcfile); -- read_options(userconf); -+ if (userconf = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -+ sprintf(userconf, "%s/.sngreprc", rcfile); -+ read_options(userconf); -+ sng_free(userconf); -+ } - } - - return 0; -diff --git a/src/setting.h b/src/setting.h -index 20c197c..65d7341 100644 ---- a/src/setting.h -+++ b/src/setting.h -@@ -45,6 +45,9 @@ - //! Max setting value - #define MAX_SETTING_LEN 1024 - -+//! Max extra length needed for "/.sngreprc.old" -+#define RCFILE_EXTRA_LEN 16 -+ - //! Shorter declarartion of setting_option struct - typedef struct setting_option setting_t; - Deleted: branches/1.0/package/sngrep/sngrep-0004-upstream-silence-clang-warnings.patch =================================================================== --- branches/1.0/package/sngrep/sngrep-0004-upstream-silence-clang-warnings.patch 2017-05-10 17:50:03 UTC (rev 8294) +++ branches/1.0/package/sngrep/sngrep-0004-upstream-silence-clang-warnings.patch 2017-05-10 20:59:40 UTC (rev 8295) @@ -1,78 +0,0 @@ -diff --git a/src/curses/ui_column_select.c b/src/curses/ui_column_select.c -index d76be47..7bc8e71 100644 ---- a/src/curses/ui_column_select.c -+++ b/src/curses/ui_column_select.c -@@ -378,9 +378,9 @@ column_select_save_columns(ui_t *ui) - char *tmpfile = NULL; - - // Use current $SNGREPRC or $HOME/.sngreprc file -- if (rcfile = getenv("SNGREPRC")) { -- if (userconf = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -- if (tmpfile = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -+ if ((rcfile = getenv("SNGREPRC"))) { -+ if ((userconf = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN))) { -+ if ((tmpfile = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN))) { - sprintf(userconf, "%s", rcfile); - sprintf(tmpfile, "%s.old", rcfile); - } else { -@@ -390,9 +390,9 @@ column_select_save_columns(ui_t *ui) - } else { - return; - } -- } else if (rcfile = getenv("HOME")) { -- if (userconf = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -- if (tmpfile = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -+ } else if ((rcfile = getenv("HOME"))) { -+ if ((userconf = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN))) { -+ if ((tmpfile = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN))) { - sprintf(userconf, "%s/.sngreprc", rcfile); - sprintf(tmpfile, "%s/.sngreprc.old", rcfile); - } else { -diff --git a/src/curses/ui_settings.c b/src/curses/ui_settings.c -index 2c7fe39..3aba988 100644 ---- a/src/curses/ui_settings.c -+++ b/src/curses/ui_settings.c -@@ -462,9 +462,9 @@ ui_settings_save(ui_t *ui) - settings_info_t *info = settings_info(ui); - - // Use current $SNGREPRC or $HOME/.sngreprc file -- if (rcfile = getenv("SNGREPRC")) { -- if (userconf = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -- if (tmpfile = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -+ if ((rcfile = getenv("SNGREPRC"))) { -+ if ((userconf = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN))) { -+ if ((tmpfile = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN))) { - sprintf(userconf, "%s", rcfile); - sprintf(tmpfile, "%s.old", rcfile); - } else { -@@ -474,9 +474,9 @@ ui_settings_save(ui_t *ui) - } else { - return; - } -- } else if (rcfile = getenv("HOME")) { -- if (userconf = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -- if (tmpfile = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -+ } else if ((rcfile = getenv("HOME"))) { -+ if ((userconf = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN))) { -+ if ((tmpfile = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN))) { - sprintf(userconf, "%s/.sngreprc", rcfile); - sprintf(tmpfile, "%s/.sngreprc.old", rcfile); - } else { -diff --git a/src/option.c b/src/option.c -index 641321a..77bdc3b 100644 ---- a/src/option.c -+++ b/src/option.c -@@ -76,10 +76,10 @@ init_options() - read_options("/etc/sngreprc"); - read_options("/usr/local/etc/sngreprc"); - // Get user configuration -- if (rcfile = getenv("SNGREPRC")) { -+ if ((rcfile = getenv("SNGREPRC"))) { - read_options(rcfile); -- } else if (rcfile = getenv("HOME")) { -- if (userconf = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN)) { -+ } else if ((rcfile = getenv("HOME"))) { -+ if ((userconf = sng_malloc(strlen(rcfile) + RCFILE_EXTRA_LEN))) { - sprintf(userconf, "%s/.sngreprc", rcfile); - read_options(userconf); - sng_free(userconf); Modified: branches/1.0/package/sngrep/sngrep.mk =================================================================== --- branches/1.0/package/sngrep/sngrep.mk 2017-05-10 17:50:03 UTC (rev 8294) +++ branches/1.0/package/sngrep/sngrep.mk 2017-05-10 20:59:40 UTC (rev 8295) @@ -4,16 +4,16 @@ # ################################################################################ -SNGREP_VERSION = 1.4.2 +SNGREP_VERSION = 1.4.3 SNGREP_SOURCE = sngrep-$(SNGREP_VERSION).tar.gz -SNGREP_SITE = http://files.astlinux-project.org -#SNGREP_SITE = https://github.com/irontec/sngrep/releases +SNGREP_SITE = https://github.com/irontec/sngrep/releases/download/v$(SNGREP_VERSION) SNGREP_AUTORECONF = YES SNGREP_DEPENDENCIES = libpcap ncurses SNGREP_CONF_OPT = \ --disable-unicode \ - --enable-ipv6 + --enable-ipv6 \ + --enable-eep # openssl and gnutls can't be enabled at the same time. ifeq ($(BR2_PACKAGE_OPENSSL),y) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |