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-02-24 18:08:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/logfilegen (Old)
 and      /work/SRC/openSUSE:Factory/.logfilegen.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "logfilegen"

Fri Feb 24 18:08:44 2023 rev:6 rq:1067624 version:2.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/logfilegen/logfilegen.changes    2023-02-23 
16:53:18.773103321 +0100
+++ /work/SRC/openSUSE:Factory/.logfilegen.new.31432/logfilegen.changes 
2023-02-24 18:08:49.785663562 +0100
@@ -1,0 +2,7 @@
+Fri Feb 24 15:36:57 UTC 2023 - Andreas Stieger <andreas.stie...@gmx.de>
+
+- logfilegen 2.1.0:
+  * fix console overflow
+  * ENV variables now in the UPPER CASE only
+
+-------------------------------------------------------------------

Old:
----
  logfilegen-2.0.0.tar.gz

New:
----
  logfilegen-2.1.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ logfilegen.spec ++++++
--- /var/tmp/diff_new_pack.XCEwHD/_old  2023-02-24 18:08:50.277666494 +0100
+++ /var/tmp/diff_new_pack.XCEwHD/_new  2023-02-24 18:08:50.281666517 +0100
@@ -18,7 +18,7 @@
 
 
 Name:           logfilegen
-Version:        2.0.0
+Version:        2.1.0
 Release:        0
 Summary:        Log file generator for server log files and user-defined 
formats
 License:        Unlicense
@@ -26,9 +26,6 @@
 Source:         
https://github.com/psemiletov/logfilegen/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
 BuildRequires:  c++_compiler
 BuildRequires:  cmake
-%if 0%{?suse_version} < 1599
-BuildRequires:  gcc12-c++
-%endif
 
 %description
 Logfilegen is a tool to generate common server (nginx, etc) or user-defined
@@ -43,9 +40,6 @@
 %build
 %cmake \
        -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-%if 0%{?suse_version} < 1599
-       -DCMAKE_CXX_COMPILER=g++-12 \
-%endif
        %{nil}
 %make_build
 

++++++ logfilegen-2.0.0.tar.gz -> logfilegen-2.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.0.0/.github/workflows/release.yml 
new/logfilegen-2.1.0/.github/workflows/release.yml
--- old/logfilegen-2.0.0/.github/workflows/release.yml  2023-02-22 
16:18:00.000000000 +0100
+++ new/logfilegen-2.1.0/.github/workflows/release.yml  2023-02-24 
13:43:37.000000000 +0100
@@ -6,11 +6,11 @@
 #  push:
     #tags:
 #      - '*'
-  workflow_dispatch:
-    inputs:
-      tag:
-        description: Release tag
-        required: false
+  # workflow_dispatch:
+  #   inputs:
+  #     tag:
+  #       description: Release tag
+  #       required: false
 
 
 jobs:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.0.0/CMakeLists.txt 
new/logfilegen-2.1.0/CMakeLists.txt
--- old/logfilegen-2.0.0/CMakeLists.txt 2023-02-22 16:18:00.000000000 +0100
+++ new/logfilegen-2.1.0/CMakeLists.txt 2023-02-24 13:43:37.000000000 +0100
@@ -5,6 +5,8 @@
 option(USE_PROMCPP "Use prometheus_cpp" OFF)
 option(USE_STATIC "Static build" OFF)
 option(USE_CLANG "Build with Clang" OFF)
+#option(USE_OPENSUSE "Build with OpenSUSE" OFF)
+
 
 
 if(USE_CLANG)
@@ -14,7 +16,8 @@
 endif(USE_CLANG)
 
 
-project (logfilegen VERSION 2.0.0 LANGUAGES CXX)
+
+project (logfilegen VERSION 2.1.0 LANGUAGES CXX)
 
add_definitions(-DVERSION_NUMBER="\\"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}\\"")
 
 
@@ -34,6 +37,23 @@
 
 add_executable (logfilegen ${SOURCES})
 
+#set(CMAKE_EXE_LINKER_FLAGS "-pthread -lpthread")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
+
+
+
+#if(USE_OPENSUSE)
+#  target_link_libraries(logfilegen -lstdc++fs)
+#   add_definitions(-DUSE_OPENSUSE=1)
+#endif(USE_OPENSUSE)
+
+
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION 
VERSION_LESS 9.1.0)
+  target_link_libraries(logfilegen -lstdc++fs)
+endif()
+
+
+
 if(USE_STATIC)
   message("+ static build")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.0.0/ChangeLog 
new/logfilegen-2.1.0/ChangeLog
--- old/logfilegen-2.0.0/ChangeLog      2023-02-22 16:18:00.000000000 +0100
+++ new/logfilegen-2.1.0/ChangeLog      2023-02-24 13:43:37.000000000 +0100
@@ -1,3 +1,8 @@
++ outdated GCC (< 9.1.0) support
+* console possibly overflow fixes
+* ENV variables now in the UPPER CASE only
+
+
 + --metrics
 + --results
 + --results_template
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.0.0/NEWS new/logfilegen-2.1.0/NEWS
--- old/logfilegen-2.0.0/NEWS   2023-02-22 16:18:00.000000000 +0100
+++ new/logfilegen-2.1.0/NEWS   2023-02-24 13:43:37.000000000 +0100
@@ -1,5 +1,4 @@
-+ Metrics support. logfilegen can expose metrics, turned on by default. Get 
the metrics in Prometheus format at localhost:8080/metrics, and see the 
self-hosted statistics page at localhost:8080 (via http).
-+ Results support. logfilegen can write final statistics to the file or stdout 
(--results=filename), in a given format (--resuilts_string=format string).
-* Cmake support improvements (Clang, static build, etc).
-* A lot of fixes.
-* Documentation update.
++ outdated GCC (< 9.1.0) support (CMake)
+* console possibly overflow fixes
+* ENV variables now in the UPPER CASE only
+* CMake is preferrable way to build logfilegen
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.0.0/README.md 
new/logfilegen-2.1.0/README.md
--- old/logfilegen-2.0.0/README.md      2023-02-22 16:18:00.000000000 +0100
+++ new/logfilegen-2.1.0/README.md      2023-02-24 13:43:37.000000000 +0100
@@ -2,7 +2,7 @@
 
 The server log file generator
 
-[![Release](../../actions/workflows/release.yml/badge.svg)](../../actions/workflows/release.yml)
+[![Release](../../actions/workflows/release_cmake.yml/badge.svg)](../../actions/workflows/release_cmake.yml)
 
[![Tests](../../actions/workflows/tests.yml/badge.svg)](../../actions/workflows/tests.yml)
 
 
[![Docker](../../actions/workflows/docker.yml/badge.svg)](../../actions/workflows/docker.yml)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.0.0/cycle.cpp 
new/logfilegen-2.1.0/cycle.cpp
--- old/logfilegen-2.0.0/cycle.cpp      2023-02-22 16:18:00.000000000 +0100
+++ new/logfilegen-2.1.0/cycle.cpp      2023-02-24 13:43:37.000000000 +0100
@@ -5,9 +5,16 @@
 #include <string.h>
 #include <csignal>
 #include <fstream>
-
 #include <unistd.h>
 
+
+#ifdef _WIN32
+#define clrscr() system("cls")
+#else
+#include <stdio.h>
+#define clrscr() printf("\e[1;1H\e[2J")
+#endif
+
 #ifndef PROM
 //#include <arpa/inet.h>
 #endif
@@ -482,8 +489,15 @@
 
 
              if (params->bstdout)
+                {
+                 if (lines_counter % 24 == 0)
+                   //system ("clear");
+                    clrscr();
+
                  std::cout << log_string << "\n";
 
+                }
+
              if (! file_out_error && ! no_free_space)
                  {
                   file_out << log_string << "\n";
@@ -625,7 +639,14 @@
 
 
               if (params->bstdout)
-                 std::cout << log_string << "\n";
+                 {
+                  if (lines_counter % 24 == 0)
+                  //   system ("clear");
+                     clrscr();
+
+                  std::cout << log_string << "\n";
+                 }
+
 
               if (! file_out_error && ! no_free_space)
                  {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.0.0/docs/config.md 
new/logfilegen-2.1.0/docs/config.md
--- old/logfilegen-2.0.0/docs/config.md 2023-02-22 16:18:00.000000000 +0100
+++ new/logfilegen-2.1.0/docs/config.md 2023-02-24 13:43:37.000000000 +0100
@@ -110,9 +110,9 @@
 
 ## Environment variables
 
-All variables can be also set via enviromnent variables using ```export 
KEY=VALUE```
+All variables can be also set via enviromnent variables using ```export 
KEY=VALUE```, with the UPPER-CASED key name.
 
-In thos case, the usual variable name must be prefixed with ```LFG``` 
(shortened from logfilegen), for example **LFG_DURATION** or **lfg_duration** 
to set **duration**.
+The usual variable name must be prefixed with ```LFG_``` (shortened from 
logfilegen), for example **LFG_DURATION** sets **duration** variable.
 
 Example:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.0.0/docs/index.md 
new/logfilegen-2.1.0/docs/index.md
--- old/logfilegen-2.0.0/docs/index.md  2023-02-22 16:18:00.000000000 +0100
+++ new/logfilegen-2.1.0/docs/index.md  2023-02-24 13:43:37.000000000 +0100
@@ -13,12 +13,17 @@
 
 ## NEWS
 
-***08 february 2023, 1.2.0*** - This release adds a new, simplifier version of 
the benchmark: --test
+***24 february 2023, 2.1.0***
+
++ outdated GCC (< 9.1.0) support (CMake)
+
+* console possibly overflow fixes
+
+* ENV variables now in the UPPER CASE only
+
+* CMake is preferrable way to build logfilegen
 
-A some sort of quick benchmark at full speed, using the default template for 
the current mode (nginx by default), one step of the log rotation; output to 
the temporary file at system's temporary directory (the output log will be 
deleted after all is done). Result, in lines per second, may vary depended on 
the randomizer engine work and use of gzip.
-Useful to run on the clean installation, when we have no configs and templates 
yet.
 
-Fixes: log rotation queue minimal length is 1 now, i.e. one log file + at 
least one rotation file, if needed.
 
 ## MANUAL
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.0.0/docs/inst.md 
new/logfilegen-2.1.0/docs/inst.md
--- old/logfilegen-2.0.0/docs/inst.md   2023-02-22 16:18:00.000000000 +0100
+++ new/logfilegen-2.1.0/docs/inst.md   2023-02-24 13:43:37.000000000 +0100
@@ -1,12 +1,69 @@
 ## Installation
 
+To compile logfilegen from the source you need GCC/g++ or Clang with C++17 
version support. If you did not compiled programs before, install GCC/g++ or 
Clang, **cmake** and **make** utility to your system.
+
+Use the tarball with the [latest 
release](https://github.com/psemiletov/logfilegen/releases/latest), it is 
always stable. Altough logfilegen has several manually written makefiles, the 
prefered way to compile logfilegen is CMake/make pair. For example, with CMake 
you can compile logfilegen with outdated GCC versions, or easily use Clang 
instead of GCC.
+
+
+### Build the source with CMake/Make
+
+Unpack the source, go to the logfilegen source dir, and, as root or with sudo, 
run:
+
+
+#### Default, build with GCC
+
+
+```
+mkdir b
+cd b
+cmake ..
+make
+make install
+```
+
+#### Default, build with Clang++
+
+
+```
+mkdir b
+cd b
+cmake -DUSE_CLANG ..
+make
+make install
+```
+
+#### Static build
+
+
+```
+mkdir b
+cd b
+cmake -DUSE_STATIC=ON ..
+make
+make install
+```
+
+
+#### With prometheus_cpp support
+
+logfilegen has support for Prometheus/OpenMetrics format metrics exposion via 
built-in server code or, as an optional and experimatal feature, via 
[prometheus-cpp](https://github.com/jupp0r/prometheus-cpp) library. Currently, 
the built-in server code works faster. But if you want to play around with 
prometheus_cpp:
+
+
+```
+mkdir b
+cd b
+cmake -DUSE_PROMCPP=ON ..
+make
+make install
+```
+
+
+
 ### From the source with plain Make
 
-To compile logfilegen from the source you need GCC/g++ or Clang with C++17 
version support. If you did not compiled programs before, install g++ or Clang, 
and **make** utility to your system.
 
-logfilegen has support for Prometheus/OpenMetrics format metrics exposion via 
built-in server code or, as an optional and experimatal feature, via 
[prometheus-cpp](https://github.com/jupp0r/prometheus-cpp) library. See the 
CMake section for turning the last one on, but currently the built-in server 
code works faster.
+More simple, but less powerful and less flexlible way to compile logfilegen, 
is the use on manual written Makefiles:
 
-First of all, download the tarball from [latest 
release](https://github.com/psemiletov/logfilegen/releases/latest), unpack it, 
and, if you are already familiar with compilation tools, go to the logfilegen 
source dir, and, as root or with sudo, run:
 
 ```console
 make
@@ -19,7 +76,8 @@
 make uninstall
 ```
 
-There are some ready-to-use examples below to build logfilegen on some systems 
or distros:
+There are some ready-to-use examples below to build logfilegen with Makefiles 
on some systems or distros:
+
 
 
 #### Ubuntu 22.04
@@ -77,54 +135,6 @@
 ```
 
 
-### From the source with CMake/Make
-
-
-#### Default, build with GCC
-
-
-```
-mkdir b
-cd b
-cmake ..
-make
-make install
-```
-
-#### Default, build with Clang++
-
-
-```
-mkdir b
-cd b
-cmake -DUSE_CLANG ..
-make
-make install
-```
-
-#### Static build
-
-
-```
-mkdir b
-cd b
-cmake -DUSE_STATIC=ON ..
-make
-make install
-```
-
-
-#### With prometheus_cpp support
-
-
-```
-mkdir b
-cd b
-cmake -DUSE_PROMCPP=ON ..
-make
-make install
-```
-
 
 ### READ MORE
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.0.0/main.cpp 
new/logfilegen-2.1.0/main.cpp
--- old/logfilegen-2.0.0/main.cpp       2023-02-22 16:18:00.000000000 +0100
+++ new/logfilegen-2.1.0/main.cpp       2023-02-24 13:43:37.000000000 +0100
@@ -2,14 +2,26 @@
  *   this code by Peter Semiletov is Public Domain         *
  **********************************************************/
 
-#undef _HAS_STD_BYTE
+//#undef _HAS_STD_BYTE
 
 #include <cstdint>
 #include <cstdlib>
 #include <vector>
 #include <iostream>
 #include <iomanip>
-#include <filesystem>
+//#include <filesystem>
+
+#ifndef __has_include
+  static_assert(false, "__has_include not supported");
+#else
+#  if __cplusplus >= 201703L && __has_include(<filesystem>)
+#    include <filesystem>
+     namespace fs = std::filesystem;
+#  elif __has_include(<experimental/filesystem>)
+#    include <experimental/filesystem>
+     namespace fs = std::experimental::filesystem;
+#  endif
+#endif
 
 
 
@@ -21,7 +33,7 @@
 
 
 #ifndef VERSION_NUMBER
-#define VERSION_NUMBER "2.0.0"
+#define VERSION_NUMBER "2.1.0"
 #endif
 
 
@@ -100,7 +112,7 @@
 {
 //  cout << "version: " << VERSION_NUMBER << endl;
 
-  std::string tdir = std::filesystem::temp_directory_path().string();
+  std::string tdir = fs::temp_directory_path().string();
 
   std::string temp_logfile;
   std::string temp_logfile0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.0.0/pairfile.cpp 
new/logfilegen-2.1.0/pairfile.cpp
--- old/logfilegen-2.0.0/pairfile.cpp   2023-02-22 16:18:00.000000000 +0100
+++ new/logfilegen-2.1.0/pairfile.cpp   2023-02-24 13:43:37.000000000 +0100
@@ -251,7 +251,7 @@
 
 CPairFile::CPairFile (vector <string> envars)
 {
-  stringstream st;
+//  stringstream st;
 
   for (size_t i = 0; i < envars.size(); i++)
       {
@@ -270,10 +270,14 @@
 
            string value = env_p;
 
-           st << param << "=" << value << endl;
+           //st << param << "=" << value << endl;
+
+           values[param] = value;
+
+          // std::cout << "param: " << param << " value: " << value << endl;
          }
      }
-
+/*
   string line;
 
   while (getline (st, line))
@@ -294,7 +298,7 @@
          string b = line.substr (pos + 1, line.size() - pos);
          values[a] = b;
         }
-
+*/
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.0.0/utl.cpp new/logfilegen-2.1.0/utl.cpp
--- old/logfilegen-2.0.0/utl.cpp        2023-02-22 16:18:00.000000000 +0100
+++ new/logfilegen-2.1.0/utl.cpp        2023-02-24 13:43:37.000000000 +0100
@@ -6,7 +6,28 @@
 //#include <sys/statvfs.h>
 #include <sys/stat.h>
 #include <algorithm>
+
+/*
+#ifndef USE_OPENSUSE
 #include <filesystem>
+#else
+#include <experimental/filesystem>
+#endif
+*/
+
+#ifndef __has_include
+  static_assert(false, "__has_include not supported");
+#else
+#  if __cplusplus >= 201703L && __has_include(<filesystem>)
+#    include <filesystem>
+     namespace fs = std::filesystem;
+#  elif __has_include(<experimental/filesystem>)
+#    include <experimental/filesystem>
+     namespace fs = std::experimental::filesystem;
+#  endif
+#endif
+
+
 #include <cstdint>
 #include <cstdlib>
 #include <vector>
@@ -128,7 +149,7 @@
 
 string current_path()
 {
-  return std::filesystem::current_path().string();
+  return fs::current_path().string();
 }
 
 
@@ -167,8 +188,8 @@
   if (path.empty())
      return 0;
 
-  std::filesystem::path p (path);
-  const std::filesystem::space_info i = std::filesystem::space (p);
+  fs::path p (path);
+  const fs::space_info i = fs::space (p);
   return i.available;
 }
 

Reply via email to