Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package tio for openSUSE:Factory checked in at 2022-04-22 21:54:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/tio (Old) and /work/SRC/openSUSE:Factory/.tio.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tio" Fri Apr 22 21:54:27 2022 rev:4 rq:971901 version:1.37 Changes: -------- --- /work/SRC/openSUSE:Factory/tio/tio.changes 2022-03-26 22:31:25.129982622 +0100 +++ /work/SRC/openSUSE:Factory/.tio.new.1538/tio.changes 2022-04-22 21:55:36.390898448 +0200 @@ -1,0 +2,9 @@ +Wed Apr 13 16:13:57 UTC 2022 - Martin Hauke <mar...@gmx.de> + +- Update to version 1.37 + * Make libinih a fallback dependency + * Fix timestamp parsing in INI conf + * Factorize timestamp parsing to be coherent with command line + format in configuration file. + +------------------------------------------------------------------- Old: ---- tio-1.36.tar.xz New: ---- tio-1.37.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ tio.spec ++++++ --- /var/tmp/diff_new_pack.s47OLW/_old 2022-04-22 21:55:36.898899027 +0200 +++ /var/tmp/diff_new_pack.s47OLW/_new 2022-04-22 21:55:36.906899036 +0200 @@ -17,7 +17,7 @@ Name: tio -Version: 1.36 +Version: 1.37 Release: 0 Summary: Simple TTY terminal I/O application License: GPL-2.0-or-later ++++++ tio-1.36.tar.xz -> tio-1.37.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tio-1.36/.gitignore new/tio-1.37/.gitignore --- old/tio-1.36/.gitignore 2022-03-21 10:56:34.000000000 +0100 +++ new/tio-1.37/.gitignore 2022-04-13 18:00:34.000000000 +0200 @@ -1,2 +1,3 @@ /build +/subprojects/libinih *.swp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tio-1.36/ChangeLog new/tio-1.37/ChangeLog --- old/tio-1.36/ChangeLog 2022-03-21 10:56:34.000000000 +0100 +++ new/tio-1.37/ChangeLog 2022-04-13 18:00:34.000000000 +0200 @@ -1,4 +1,22 @@ -=== tio v1.36 === +=== tio v1.37 === + + + +Changes since tio v1.36: + + * Make libinih a fallback dependency + + This means that in case meson does not find libinih it will + automatically clone libinih and include it in the build. + + The libinih library is reconfigured to be statically built so that no + shared object will be installed. + +Sylvain LAFRASSE: + + * Fix timestamp parsing in INI conf + + * Factorize timestamp parsing to be coherent with command line format in configuration file. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tio-1.36/README.md new/tio-1.37/README.md --- old/tio-1.36/README.md 2022-03-21 10:56:34.000000000 +0100 +++ new/tio-1.37/README.md 2022-04-13 18:00:34.000000000 +0200 @@ -58,10 +58,10 @@ provided, tio will exit if the device is not present or an established connection is lost. -Tio features full bash autocompletion support. +Tio supports various in session key commands. Press ctrl-t ? to list the +available key commands. -Tio also supports various key commands. Press ctrl-t ? to list the available -key commands. +Tio also features full bash autocompletion support and configuration via ~/.tiorc. See the tio man page for more details. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tio-1.36/man/tio.1.in new/tio-1.37/man/tio.1.in --- old/tio-1.36/man/tio.1.in 2022-03-21 10:56:34.000000000 +0100 +++ new/tio-1.37/man/tio.1.in 2022-04-13 18:00:34.000000000 +0200 @@ -122,7 +122,6 @@ .BR \-h ", " \-\-help Display help. - .SH "KEYS" .PP .TP 16n @@ -167,6 +166,9 @@ tio will try to match the user input to a section pattern to get the tty and other options. .TP +Options without any section name sets the default options. + +.TP The following configuration file options are available: .IP "\fBpattern" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tio-1.36/meson.build new/tio-1.37/meson.build --- old/tio-1.36/meson.build 2022-03-21 10:56:34.000000000 +0100 +++ new/tio-1.37/meson.build 2022-04-13 18:00:34.000000000 +0200 @@ -1,12 +1,12 @@ project('tio', 'c', - version : '1.36', + version : '1.37', license : [ 'GPL-2'], meson_version : '>= 0.53.2', default_options : [ 'warning_level=2', 'buildtype=release', 'c_std=gnu99' ] ) # The tag date of the project_version(), update when the version bumps. -version_date = '2022-03-21' +version_date = '2022-04-13' # Test for dynamic baudrate configuration interface compiler = meson.get_compiler('c') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tio-1.36/src/configfile.c new/tio-1.37/src/configfile.c --- old/tio-1.36/src/configfile.c 2022-03-21 10:56:34.000000000 +0100 +++ new/tio-1.37/src/configfile.c 2022-04-13 18:00:34.000000000 +0200 @@ -34,6 +34,7 @@ #include <unistd.h> #include <regex.h> #include <ini.h> +#include "options.h" #include "configfile.h" #include "misc.h" #include "options.h" @@ -135,7 +136,7 @@ } else if (!strcmp(name, "timestamp")) { - option.timestamp = atoi(value); + option.timestamp = timestamp_option_parse(value); } else if (!strcmp(name, "log-filename")) { @@ -260,3 +261,15 @@ free(c); } + +void config_file_print() +{ + if (c->path != NULL) + { + tio_printf(" Path: %s", c->path); + if (c->section_name != NULL) + { + tio_printf(" Active config section: %s", c->section_name); + } + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tio-1.36/src/configfile.h new/tio-1.37/src/configfile.h --- old/tio-1.36/src/configfile.h 2022-03-21 10:56:34.000000000 +0100 +++ new/tio-1.37/src/configfile.h 2022-04-13 18:00:34.000000000 +0200 @@ -37,5 +37,6 @@ char *map; }; +void config_file_print(); void config_file_parse(const int argc, char *argv[]); void config_exit(void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tio-1.36/src/meson.build new/tio-1.37/src/meson.build --- old/tio-1.36/src/meson.build 2022-03-21 10:56:34.000000000 +0100 +++ new/tio-1.37/src/meson.build 2022-04-13 18:00:34.000000000 +0200 @@ -15,7 +15,9 @@ 'signals.c' ] -tio_dep = dependency('inih', required: true) +tio_dep = dependency('inih', required: true, + fallback : ['libinih', 'inih_dep'], + default_options: ['default_library=static', 'distro_install=false']) tio_c_args = ['-Wno-unused-result'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tio-1.36/src/options.c new/tio-1.37/src/options.c --- old/tio-1.36/src/options.c 2022-03-21 10:56:34.000000000 +0100 +++ new/tio-1.37/src/options.c 2022-04-13 18:00:34.000000000 +0200 @@ -33,6 +33,7 @@ #include "options.h" #include "error.h" #include "misc.h" +#include "print.h" /* Default options */ struct option_t option = @@ -81,6 +82,73 @@ printf("\n"); } +const char* timestamp_token(enum timestamp_t timestamp) +{ + switch (timestamp) + { + case TIMESTAMP_NONE: + return "none"; + break; + + case TIMESTAMP_24HOUR: + return "24hour"; + break; + + case TIMESTAMP_24HOUR_START: + return "24hour-start"; + break; + + case TIMESTAMP_ISO8601: + return "iso8601"; + break; + + default: + return "unknown"; + break; + } +} + +enum timestamp_t timestamp_option_parse(const char *arg) +{ + enum timestamp_t timestamp = TIMESTAMP_24HOUR; // Default + + if (arg != NULL) + { + if (strcmp(arg, "24hour-start") == 0) + { + return TIMESTAMP_24HOUR_START; + } + else if (strcmp(arg, "iso8601") == 0) + { + return TIMESTAMP_ISO8601; + } + else + { + printf("Warning: Unknown timestamp type, falling back to '24hour' default format\n"); + } + } + + return timestamp; +} + +void options_print() +{ + tio_printf(" TTY device: %s", option.tty_device); + tio_printf(" Baudrate: %u", option.baudrate); + tio_printf(" Databits: %d", option.databits); + tio_printf(" Flow: %s", option.flow); + tio_printf(" Stopbits: %d", option.stopbits); + tio_printf(" Parity: %s", option.parity); + tio_printf(" Local echo: %s", option.local_echo ? "enabled" : "disabled"); + tio_printf(" Timestamps: %s", timestamp_token(option.timestamp)); + tio_printf(" Output delay: %d", option.output_delay); + tio_printf(" Auto connect: %s", option.no_autoconnect ? "disabled" : "enabled"); + if (option.map[0] != 0) + tio_printf(" Map flags: %s", option.map); + if (option.log) + tio_printf(" Log file: %s", option.log_filename); +} + void options_parse(int argc, char *argv[]) { int c; @@ -168,27 +236,7 @@ break; case 't': - option.timestamp = TIMESTAMP_24HOUR; // Default - if (optarg != NULL) - { - if (strcmp(optarg, "24hour") == 0) - { - option.timestamp = TIMESTAMP_24HOUR; - } - else if (strcmp(optarg, "24hour-start") == 0) - { - option.timestamp = TIMESTAMP_24HOUR_START; - } - else if (strcmp(optarg, "iso8601") == 0) - { - option.timestamp = TIMESTAMP_ISO8601; - } - else - { - printf("Error: Unknown timestamp type\n"); - exit(EXIT_FAILURE); - } - } + option.timestamp = timestamp_option_parse(optarg); break; case 'L': @@ -268,7 +316,7 @@ /* Print any remaining command line arguments (unknown options) */ if (optind < argc) { - printf("Error: unknown arguments: "); + printf("Error: Unknown argument "); while (optind < argc) printf("%s ", argv[optind++]); printf("\n"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tio-1.36/src/options.h new/tio-1.37/src/options.h --- old/tio-1.36/src/options.h 2022-03-21 10:56:34.000000000 +0100 +++ new/tio-1.37/src/options.h 2022-04-13 18:00:34.000000000 +0200 @@ -33,6 +33,8 @@ TIMESTAMP_24HOUR_START, TIMESTAMP_ISO8601, }; +const char* timestamp_token(enum timestamp_t timestamp); +enum timestamp_t timestamp_option_parse(const char *arg); /* Options */ struct option_t @@ -56,4 +58,5 @@ extern struct option_t option; +void options_print(); void options_parse(int argc, char *argv[]); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tio-1.36/src/tty.c new/tio-1.37/src/tty.c --- old/tio-1.36/src/tty.c 2022-03-21 10:56:34.000000000 +0100 +++ new/tio-1.37/src/tty.c 2022-04-13 18:00:34.000000000 +0200 @@ -38,6 +38,7 @@ #include <time.h> #include <dirent.h> #include "config.h" +#include "configfile.h" #include "tty.h" #include "print.h" #include "options.h" @@ -163,21 +164,9 @@ break; case KEY_C: - tio_printf("Configuration:"); - tio_printf(" TTY device: %s", option.tty_device); - tio_printf(" Baudrate: %u", option.baudrate); - tio_printf(" Databits: %d", option.databits); - tio_printf(" Flow: %s", option.flow); - tio_printf(" Stopbits: %d", option.stopbits); - tio_printf(" Parity: %s", option.parity); - tio_printf(" Local echo: %s", option.local_echo ? "enabled" : "disabled"); - tio_printf(" Timestamps: %s", option.timestamp ? "enabled" : "disabled"); - tio_printf(" Output delay: %d", option.output_delay); - tio_printf(" Auto connect: %s", option.no_autoconnect ? "disabled" : "enabled"); - if (option.map[0] != 0) - tio_printf(" Map flags: %s", option.map); - if (option.log) - tio_printf(" Log file: %s", option.log_filename); + tio_printf("Configuraiton:"); + config_file_print(); + options_print(); break; case KEY_E: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tio-1.36/subprojects/libinih.wrap new/tio-1.37/subprojects/libinih.wrap --- old/tio-1.36/subprojects/libinih.wrap 1970-01-01 01:00:00.000000000 +0100 +++ new/tio-1.37/subprojects/libinih.wrap 2022-04-13 18:00:34.000000000 +0200 @@ -0,0 +1,4 @@ +[wrap-git] +directory=libinih +url=https://github.com/benhoyt/inih.git +revision=r55