Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package logfilegen for openSUSE:Factory checked in at 2023-04-20 15:14:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/logfilegen (Old) and /work/SRC/openSUSE:Factory/.logfilegen.new.2023 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "logfilegen" Thu Apr 20 15:14:55 2023 rev:12 rq:1080761 version:3.0.3 Changes: -------- --- /work/SRC/openSUSE:Factory/logfilegen/logfilegen.changes 2023-04-10 20:34:26.711084199 +0200 +++ /work/SRC/openSUSE:Factory/.logfilegen.new.2023/logfilegen.changes 2023-04-20 15:16:02.058497073 +0200 @@ -1,0 +2,6 @@ +Thu Apr 20 09:58:18 UTC 2023 - Andreas Stieger <andreas.stie...@gmx.de> + +- logfilegen 3.0.3 + * seq macros fix, including syntax change + +------------------------------------------------------------------- Old: ---- logfilegen-3.0.2.tar.gz New: ---- logfilegen-3.0.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ logfilegen.spec ++++++ --- /var/tmp/diff_new_pack.wYDlnY/_old 2023-04-20 15:16:02.570500547 +0200 +++ /var/tmp/diff_new_pack.wYDlnY/_new 2023-04-20 15:16:02.574500574 +0200 @@ -18,7 +18,7 @@ Name: logfilegen -Version: 3.0.2 +Version: 3.0.3 Release: 0 Summary: Log file generator for server log files and user-defined formats License: Unlicense ++++++ logfilegen-3.0.2.tar.gz -> logfilegen-3.0.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logfilegen-3.0.2/CMakeLists.txt new/logfilegen-3.0.3/CMakeLists.txt --- old/logfilegen-3.0.2/CMakeLists.txt 2023-04-10 10:53:29.000000000 +0200 +++ new/logfilegen-3.0.3/CMakeLists.txt 2023-04-17 11:32:03.000000000 +0200 @@ -13,7 +13,7 @@ endif(USE_CLANG) -project (logfilegen VERSION 3.0.2 LANGUAGES CXX) +project (logfilegen VERSION 3.0.3 LANGUAGES CXX) add_definitions(-DVERSION_NUMBER="\\"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}\\"") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logfilegen-3.0.2/ChangeLog new/logfilegen-3.0.3/ChangeLog --- old/logfilegen-3.0.2/ChangeLog 2023-04-10 10:53:29.000000000 +0200 +++ new/logfilegen-3.0.3/ChangeLog 2023-04-17 11:32:03.000000000 +0200 @@ -1,5 +1,10 @@ +3.0.3 +* @seq macro fix. Syntax change! +Was: @seq:param1|param2|etc +Now: @seq:param1^param2^etc + 3.0.2 -* @seq macros fix. Syntax change! +* @seq macro fix. Syntax change! Was: @seq:param1:param2:etc Now: @seq:param1|param2|etc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logfilegen-3.0.2/NEWS new/logfilegen-3.0.3/NEWS --- old/logfilegen-3.0.2/NEWS 2023-04-10 10:53:29.000000000 +0200 +++ new/logfilegen-3.0.3/NEWS 2023-04-17 11:32:03.000000000 +0200 @@ -1,11 +1,11 @@ -logfilegen 3.0.0 +logfilegen 3.0.3 This release introduces the multithread support (performance improved), fixes mac and win building, and many more. upd 3.0.1 * @meta macro fixes * randomizer code has been rewritten -upd 3.0.2 +upd 3.0.3 * @seq macros fix. Syntax change! -Was: @seq:param1:param2:etc -Now: @seq:param1|param2|etc +Was: @seq:param1|param2|etc +Now: @seq:param1^param2^etc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logfilegen-3.0.2/docs/templates.md new/logfilegen-3.0.3/docs/templates.md --- old/logfilegen-3.0.2/docs/templates.md 2023-04-10 10:53:29.000000000 +0200 +++ new/logfilegen-3.0.3/docs/templates.md 2023-04-17 11:32:03.000000000 +0200 @@ -267,14 +267,14 @@ #### @seq -Works like **sequence** variable values. Each value is separated by ```|```. +Works like **sequence** variable values. Each value is separated by ```^```. -Syntax: ```@seq:param1|param2|etc``` +Syntax: ```@seq:param1^param2^etc``` Example: ``` -$test=@seq:GET|PUT +$test=@seq:GET^PUT $logstring=hello, $test ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logfilegen-3.0.2/macro.cpp new/logfilegen-3.0.3/macro.cpp --- old/logfilegen-3.0.2/macro.cpp 2023-04-10 10:53:29.000000000 +0200 +++ new/logfilegen-3.0.3/macro.cpp 2023-04-17 11:32:03.000000000 +0200 @@ -486,6 +486,43 @@ } +vector <string> split_string_to_vector_simple (const string &s, char delimeter) +{ + vector <string> result; + + size_t a = 0; + size_t b = 0; + + while (b < s.size()) + { + if (b + 1 == s.size()) + { + string t = s.substr (a + 1, b - a); + result.push_back (t); + } + + if (s[b] == delimeter) + // if (b + 1 != s.size()) + // if (s[b + 1] != aware) + { + string t; + + if (a == 0) + t = s.substr (a, b - a); + else + t = s.substr (a + 1, b - a - 1); + + result.push_back (t); + a = b; + } + + b++; + } + + return result; +} + + void CMacroSeq::parse (const string &s) { // cout << "void CMacroSeq::parse: " << s << endl; @@ -495,22 +532,23 @@ length = 0; text = ""; - size_t pos = s.find_first_of ("|"); - if (pos == std::string::npos) - return; -// vt = split_string_to_vector_a (s, ':', '/'); - pos = s.find_first_of (":"); + size_t pos = s.find_first_of (":"); if (pos == std::string::npos) return; - std::string t = s.substr (pos); + std::string t = s.substr (pos + 1); + + // cout << "t: " << t << endl; + + + // vt = split_string_to_vector_simple (t, '^'); + vt = split_string_to_vector (t, "^"); - // cout << "t: " << t << endl; - vt = split_string_to_vector (t, "|"); +// vt = split_string_to_vector (t, "|"); // vt = split_string_to_vector (s, ":"); } @@ -525,7 +563,7 @@ if (vt.size() == 0) return string(); - size_t i = get_rnd (1, vt.size() - 1); + size_t i = get_rnd (0, vt.size() - 1); // cout << "CMacroSeq::process() 2:" << i << endl; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logfilegen-3.0.2/main.cpp new/logfilegen-3.0.3/main.cpp --- old/logfilegen-3.0.2/main.cpp 2023-04-10 10:53:29.000000000 +0200 +++ new/logfilegen-3.0.3/main.cpp 2023-04-17 11:32:03.000000000 +0200 @@ -41,7 +41,7 @@ #ifndef VERSION_NUMBER -#define VERSION_NUMBER "3.0.2" +#define VERSION_NUMBER "3.0.3" #endif @@ -79,7 +79,7 @@ void show_version() { - std::cout << "logfilegen v." << VERSION_NUMBER << std::endl; + std::cout << "logfilegen v" << VERSION_NUMBER << std::endl; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logfilegen-3.0.2/tpl.cpp new/logfilegen-3.0.3/tpl.cpp --- old/logfilegen-3.0.2/tpl.cpp 2023-04-10 10:53:29.000000000 +0200 +++ new/logfilegen-3.0.3/tpl.cpp 2023-04-17 11:32:03.000000000 +0200 @@ -88,7 +88,7 @@ vars.insert (std::make_pair ("%t", new CVar ("%t", "@datetime:%d/%b/%Y:%H:%M:%S %z"))); //$request $uri $protocol - vars.insert (std::make_pair ("%r", new CVar ("%r", "@meta:(@seq:/GET|/PUT) (@path:1:5:3) (@seq:HTTP/1.1|/HTTP/2.0)"))); + vars.insert (std::make_pair ("%r", new CVar ("%r", "@meta:(@seq:/GET^/PUT) (@path:1:5:3) (@seq:HTTP/1.1^/HTTP/2.0)"))); vars.insert (std::make_pair ("%>s", new CVar ("%>s", "200|400"))); vars.insert (std::make_pair ("%b", new CVar ("%b", "1..9999")));