From: <abe...@us...> - 2016-12-09 17:38:57
|
Revision: 8029 http://sourceforge.net/p/astlinux/code/8029 Author: abelbeck Date: 2016-12-09 17:38:55 +0000 (Fri, 09 Dec 2016) Log Message: ----------- chrony, version bump to 3.0-pre1 Modified Paths: -------------- branches/1.0/package/chrony/chrony.mk Removed Paths: ------------- branches/1.0/package/chrony/chrony-0001-add-timeout-option.patch branches/1.0/package/chrony/chrony-0100-chronyc-tab-completion.patch Deleted: branches/1.0/package/chrony/chrony-0001-add-timeout-option.patch =================================================================== --- branches/1.0/package/chrony/chrony-0001-add-timeout-option.patch 2016-12-09 14:03:53 UTC (rev 8028) +++ branches/1.0/package/chrony/chrony-0001-add-timeout-option.patch 2016-12-09 17:38:55 UTC (rev 8029) @@ -1,69 +0,0 @@ -From 35134848524fe06e3c87cf685eb1a4cb886625a8 Mon Sep 17 00:00:00 2001 -From: Miroslav Lichvar <mli...@re...> -Date: Thu, 1 Dec 2016 15:57:39 +0100 -Subject: main: add -t option to chronyd - -This option sets a timeout (in seconds) after which chronyd will exit. -If the clock is not synchronised, it will exit with a non-zero status. -This is useful with the -q or -Q option to shorten the maximum time -waiting for measurements, or with the -r option to limit the time when -chronyd is running, but still allow it to adjust the frequency of the -system clock. ---- - main.c | 19 ++++++++++++++++++- - 2 files changed, 25 insertions(+), 1 deletion(-) - -diff --git a/main.c b/main.c -index 71916fa..63d9cdc 100644 ---- a/main.c -+++ b/main.c -@@ -144,6 +144,16 @@ signal_cleanup(int x) - /* ================================================== */ - - static void -+quit_timeout(void *arg) -+{ -+ /* Return with non-zero status if the clock is not synchronised */ -+ exit_status = REF_GetOurStratum() >= NTP_MAX_STRATUM; -+ SCH_QuitProgram(); -+} -+ -+/* ================================================== */ -+ -+static void - ntp_source_resolving_end(void) - { - NSR_SetSourceResolvingEndHandler(NULL); -@@ -359,7 +369,7 @@ int main - char *user = NULL; - struct passwd *pw; - int debug = 0, nofork = 0, address_family = IPADDR_UNSPEC; -- int do_init_rtc = 0, restarted = 0; -+ int do_init_rtc = 0, restarted = 0, timeout = 0; - int other_pid; - int scfilter_level = 0, lock_memory = 0, sched_priority = 0; - int system_log = 1; -@@ -417,6 +427,10 @@ int main - ref_mode = REF_ModePrintOnce; - nofork = 1; - system_log = 0; -+ } else if (!strcmp("-t", *argv)) { -+ ++argv, --argc; -+ if (argc == 0 || sscanf(*argv, "%d", &timeout) != 1 || timeout <= 0) -+ LOG_FATAL(LOGF_Main, "Bad timeout"); - } else if (!strcmp("-4", *argv)) { - address_family = IPADDR_INET4; - } else if (!strcmp("-6", *argv)) { -@@ -545,6 +559,9 @@ int main - REF_SetModeEndHandler(reference_mode_end); - REF_SetMode(ref_mode); - -+ if (timeout) -+ SCH_AddTimeoutByDelay(timeout, quit_timeout, NULL); -+ - if (do_init_rtc) { - RTC_TimeInit(post_init_rtc_hook, NULL); - } else { --- -cgit v0.12 - Deleted: branches/1.0/package/chrony/chrony-0100-chronyc-tab-completion.patch =================================================================== --- branches/1.0/package/chrony/chrony-0100-chronyc-tab-completion.patch 2016-12-09 14:03:53 UTC (rev 8028) +++ branches/1.0/package/chrony/chrony-0100-chronyc-tab-completion.patch 2016-12-09 17:38:55 UTC (rev 8029) @@ -1,89 +0,0 @@ -From 3156e5a29364304a2c8c1a857f63c9b28ee1e53f Mon Sep 17 00:00:00 2001 -From: Lonnie Abelbeck <lo...@ab...> -Date: Thu, 8 Dec 2016 07:24:14 -0600 -Subject: client: add tab-completion with libedit/readline - ---- - client.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 53 insertions(+) - -diff --git a/client.c b/client.c -index 03e7790..ba3111a 100644 ---- a/client.c -+++ b/client.c -@@ -97,6 +97,10 @@ void LOG_Message(LOG_Severity severity, - /* Read a single line of commands from standard input. Eventually we - might want to use the GNU readline library. */ - -+#ifdef FEAT_READLINE -+static char **command_name_completion(const char *text, int start, int end); -+#endif -+ - static char * - read_line(void) - { -@@ -107,6 +111,9 @@ read_line(void) - #ifdef FEAT_READLINE - char *cmd; - -+ rl_attempted_completion_function = command_name_completion; -+ rl_basic_word_break_characters = "\t\n\r"; -+ - /* save line only if not empty */ - cmd = readline(prompt); - if( cmd == NULL ) return( NULL ); -@@ -1275,6 +1282,52 @@ give_help(void) - } - - /* ================================================== */ -+/* Tab-completion when editline/readline is available */ -+ -+#ifdef FEAT_READLINE -+static char * -+command_name_generator(const char *text, int state) -+{ -+ const char *name, *names[] = { -+ "accheck", "activity", "add peer", "add server", "allow", "burst", -+ "clients", "cmdaccheck", "cmdallow", "cmddeny", "cyclelogs", "delete", -+ "deny", "dns", "dump", "exit", "help", "keygen", "local", "makestep", -+ "manual on", "manual off", "manual delete", "manual list", "manual reset", -+ "maxdelay", "maxdelaydevratio", "maxdelayratio", "maxpoll", -+ "maxupdateskew", "minpoll", "minstratum", "offline", "online", -+ "polltarget", "quit", "refresh", "rekey", "reselect", "reselectdist", -+ "retries", "rtcdata", "serverstats", "settime", "smoothing", "smoothtime", -+ "sources", "sources -v", "sourcestats", "sourcestats -v", "timeout", -+ "tracking", "trimrtc", "waitsync", "writertc", -+ NULL -+ }; -+ static int list_index, len; -+ -+ if (!state) { -+ list_index = 0; -+ len = strlen(text); -+ } -+ -+ while ((name = names[list_index++])) { -+ if (strncmp(name, text, len) == 0) { -+ return strdup(name); -+ } -+ } -+ -+ return NULL; -+} -+ -+/* ================================================== */ -+ -+static char ** -+command_name_completion(const char *text, int start, int end) -+{ -+ rl_attempted_completion_over = 1; -+ return rl_completion_matches(text, command_name_generator); -+} -+#endif -+ -+/* ================================================== */ - - static unsigned long sequence = 0; - static int max_retries = 2; --- -cgit v0.12 Modified: branches/1.0/package/chrony/chrony.mk =================================================================== --- branches/1.0/package/chrony/chrony.mk 2016-12-09 14:03:53 UTC (rev 8028) +++ branches/1.0/package/chrony/chrony.mk 2016-12-09 17:38:55 UTC (rev 8029) @@ -4,7 +4,7 @@ # ################################################################################ -CHRONY_VERSION = 2.4.1 +CHRONY_VERSION = 3.0-pre1 CHRONY_SITE = http://download.tuxfamily.org/chrony CHRONY_DEPENDENCIES = libcap This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |