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-27 12:55:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/logfilegen (Old)
 and      /work/SRC/openSUSE:Factory/.logfilegen.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "logfilegen"

Mon Feb 27 12:55:48 2023 rev:7 rq:1067847 version:2.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/logfilegen/logfilegen.changes    2023-02-24 
18:08:49.785663562 +0100
+++ /work/SRC/openSUSE:Factory/.logfilegen.new.31432/logfilegen.changes 
2023-02-27 12:55:49.419590854 +0100
@@ -1,0 +2,6 @@
+Sun Feb 26 21:31:22 UTC 2023 - Andreas Stieger <andreas.stie...@gmx.de>
+
+- logfilegen 2.2.0:
+  * C++11 compatibility fixes (down from C++17)
+
+-------------------------------------------------------------------

Old:
----
  logfilegen-2.1.0.tar.gz

New:
----
  logfilegen-2.2.0.tar.gz

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

Other differences:
------------------
++++++ logfilegen.spec ++++++
--- /var/tmp/diff_new_pack.zxFzWv/_old  2023-02-27 12:55:49.883593714 +0100
+++ /var/tmp/diff_new_pack.zxFzWv/_new  2023-02-27 12:55:49.887593739 +0100
@@ -18,7 +18,7 @@
 
 
 Name:           logfilegen
-Version:        2.1.0
+Version:        2.2.0
 Release:        0
 Summary:        Log file generator for server log files and user-defined 
formats
 License:        Unlicense

++++++ logfilegen-2.1.0.tar.gz -> logfilegen-2.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.1.0/CMakeLists.txt 
new/logfilegen-2.2.0/CMakeLists.txt
--- old/logfilegen-2.1.0/CMakeLists.txt 2023-02-24 13:43:37.000000000 +0100
+++ new/logfilegen-2.2.0/CMakeLists.txt 2023-02-26 20:23:36.000000000 +0100
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 3.5)
 
-set (CMAKE_CXX_STANDARD 17)
+set (CMAKE_CXX_STANDARD 11)
 
 option(USE_PROMCPP "Use prometheus_cpp" OFF)
 option(USE_STATIC "Static build" OFF)
@@ -17,7 +17,7 @@
 
 
 
-project (logfilegen VERSION 2.1.0 LANGUAGES CXX)
+project (logfilegen VERSION 2.2.0 LANGUAGES CXX)
 
add_definitions(-DVERSION_NUMBER="\\"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}\\"")
 
 
@@ -42,15 +42,10 @@
 
 
 
-#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(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION 
VERSION_LESS 9.1.0)
+#  target_link_libraries(logfilegen -lstdc++fs)
+#endif()
 
 
 
@@ -101,22 +96,5 @@
 endif()
 
 
-#find_package(prometheus-cpp CONFIG)
-
-#if(prometheus-cpp_FOUND)
-
- # message("+ prometheus-cpp support")
-
- # add_definitions(-DUSE_PROM=1)
-
-
- # target_link_libraries(logfilegen PRIVATE prometheus-cpp::pull)
- # target_link_libraries(logfilegen ${prometheus-cpp-core_LIBRARIES} )
- # include_directories(${prometheus-cpp-core_INCLUDE_DIRS})
-
-  # target_link_libraries(logfilegen PRIVATE prometheus-cpp::pull)
-
-#endif()
-
 
 install (TARGETS logfilegen DESTINATION bin)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.1.0/ChangeLog 
new/logfilegen-2.2.0/ChangeLog
--- old/logfilegen-2.1.0/ChangeLog      2023-02-24 13:43:37.000000000 +0100
+++ new/logfilegen-2.2.0/ChangeLog      2023-02-26 20:23:36.000000000 +0100
@@ -1,3 +1,5 @@
++ Min C++ ver is 11 instead of 17
+
 + outdated GCC (< 9.1.0) support
 * console possibly overflow fixes
 * ENV variables now in the UPPER CASE only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.1.0/Makefile 
new/logfilegen-2.2.0/Makefile
--- old/logfilegen-2.1.0/Makefile       2023-02-24 13:43:37.000000000 +0100
+++ new/logfilegen-2.2.0/Makefile       2023-02-26 20:23:36.000000000 +0100
@@ -4,7 +4,7 @@
 
 CXX = g++
 #CXXFLAGS = -Wall -g -O3 -fopenmp
-CXXFLAGS = -Wall -g -O3 -std=c++17 -pthread -lpthread
+CXXFLAGS = -Wall -g -Og -std=c++11 -pthread -lpthread
 #LDFLAGS= -pthread  -lpthread
 
 #add for -lpthread
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.1.0/Makefile.OpenBSD 
new/logfilegen-2.2.0/Makefile.OpenBSD
--- old/logfilegen-2.1.0/Makefile.OpenBSD       2023-02-24 13:43:37.000000000 
+0100
+++ new/logfilegen-2.2.0/Makefile.OpenBSD       2023-02-26 20:23:36.000000000 
+0100
@@ -3,7 +3,7 @@
 .endif
 
 CXX = clang++
-CXXFLAGS = -Wall -g -O3 -std=c++17
+CXXFLAGS = -Wall -g -O3 -std=c++11
 
 all: main.cpp
        $(CXX) $(CXXFLAGS) -o logfilegen utl.cpp params.cpp macro.cpp vars.cpp 
tpl.cpp pairfile.cpp logrot.cpp cycle.cpp main.cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.1.0/Makefile.clang 
new/logfilegen-2.2.0/Makefile.clang
--- old/logfilegen-2.1.0/Makefile.clang 2023-02-24 13:43:37.000000000 +0100
+++ new/logfilegen-2.2.0/Makefile.clang 2023-02-26 20:23:36.000000000 +0100
@@ -3,7 +3,7 @@
 endif
 
 CXX = clang++
-CXXFLAGS = -Wall -g -O3 -std=c++17
+CXXFLAGS = -Wall -g -O3 -std=c++11
 
 all: main.cpp
        $(CXX) $(CXXFLAGS) -o logfilegen utl.cpp params.cpp vars.cpp macro.cpp 
tpl.cpp pairfile.cpp logrot.cpp cycle.cpp main.cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.1.0/Makefile.static 
new/logfilegen-2.2.0/Makefile.static
--- old/logfilegen-2.1.0/Makefile.static        2023-02-24 13:43:37.000000000 
+0100
+++ new/logfilegen-2.2.0/Makefile.static        2023-02-26 20:23:36.000000000 
+0100
@@ -7,7 +7,7 @@
 
 
 all: main.cpp
-       $(CXX) $(CXXFLAGS) -std=c++17 -o logfilegen utl.cpp params.cpp 
macro.cpp vars.cpp tpl.cpp pairfile.cpp cycle.cpp logrot.cpp main.cpp
+       $(CXX) $(CXXFLAGS) -std=c++11 -o logfilegen utl.cpp params.cpp 
macro.cpp vars.cpp tpl.cpp pairfile.cpp cycle.cpp logrot.cpp main.cpp
 
 clean:
        $(RM) logfilegen
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.1.0/NEWS new/logfilegen-2.2.0/NEWS
--- old/logfilegen-2.1.0/NEWS   2023-02-24 13:43:37.000000000 +0100
+++ new/logfilegen-2.2.0/NEWS   2023-02-26 20:23:36.000000000 +0100
@@ -1,4 +1 @@
-+ 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
+This release makes logfilegen possible to build on old compiler versions. Now 
logfilegen needs C++11 instead of C++17.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.1.0/cycle.cpp 
new/logfilegen-2.2.0/cycle.cpp
--- old/logfilegen-2.1.0/cycle.cpp      2023-02-24 13:43:37.000000000 +0100
+++ new/logfilegen-2.2.0/cycle.cpp      2023-02-26 20:23:36.000000000 +0100
@@ -675,7 +675,7 @@
 
 
   auto stop = high_resolution_clock::now();
-  auto duration = duration_cast<microseconds>(stop - start);
+  //auto duration = duration_cast<microseconds>(stop - start);
   auto duration_s = duration_cast<seconds>(stop - start);
 
   if (params->benchmark)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.1.0/docs/index.md 
new/logfilegen-2.2.0/docs/index.md
--- old/logfilegen-2.1.0/docs/index.md  2023-02-24 13:43:37.000000000 +0100
+++ new/logfilegen-2.2.0/docs/index.md  2023-02-26 20:23:36.000000000 +0100
@@ -13,15 +13,9 @@
 
 ## NEWS
 
-***24 february 2023, 2.1.0***
+***26 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
+This release makes logfilegen possible to build on old compiler versions. Now 
logfilegen needs C++11 instead of C++17.
 
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.1.0/main.cpp 
new/logfilegen-2.2.0/main.cpp
--- old/logfilegen-2.1.0/main.cpp       2023-02-24 13:43:37.000000000 +0100
+++ new/logfilegen-2.2.0/main.cpp       2023-02-26 20:23:36.000000000 +0100
@@ -9,8 +9,9 @@
 #include <vector>
 #include <iostream>
 #include <iomanip>
-//#include <filesystem>
 
+//#include <filesystem>
+/*
 #ifndef __has_include
   static_assert(false, "__has_include not supported");
 #else
@@ -22,7 +23,7 @@
      namespace fs = std::experimental::filesystem;
 #  endif
 #endif
-
+*/
 
 
 #include "pairfile.h"
@@ -33,7 +34,7 @@
 
 
 #ifndef VERSION_NUMBER
-#define VERSION_NUMBER "2.1.0"
+#define VERSION_NUMBER "2.2.0"
 #endif
 
 
@@ -112,7 +113,10 @@
 {
 //  cout << "version: " << VERSION_NUMBER << endl;
 
-  std::string tdir = fs::temp_directory_path().string();
+//  std::string tdir = fs::temp_directory_path().string();
+
+   std::string tdir = get_tmp_dir();
+
 
   std::string temp_logfile;
   std::string temp_logfile0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.1.0/utl.cpp new/logfilegen-2.2.0/utl.cpp
--- old/logfilegen-2.1.0/utl.cpp        2023-02-24 13:43:37.000000000 +0100
+++ new/logfilegen-2.2.0/utl.cpp        2023-02-26 20:23:36.000000000 +0100
@@ -3,7 +3,6 @@
  **********************************************************/
 
 
-//#include <sys/statvfs.h>
 #include <sys/stat.h>
 #include <algorithm>
 
@@ -15,6 +14,7 @@
 #endif
 */
 
+/*
 #ifndef __has_include
   static_assert(false, "__has_include not supported");
 #else
@@ -26,6 +26,7 @@
      namespace fs = std::experimental::filesystem;
 #  endif
 #endif
+*/
 
 
 #include <cstdint>
@@ -35,37 +36,38 @@
 #include <fstream>
 #include <unistd.h>
 #include <stdio.h>  // for FILENAME_MAX
+#include <limits>
+#include <unistd.h>
 
 #if defined(_WIN32) || defined(_WIN64)
 
 //#include <pwd.h>
 
-//#else
-
 #include <windows.h>
 #include <Shlobj.h>
-#endif
 
 
-#include "utl.h"
-
+#define GetCurrentDir _getcwd
+#define DIR_SEPARATOR '\\'
 
-#ifdef WINDOWS
-#include <direct.h>
-#define get_cur_dir _getcwd
 #else
-#include <unistd.h>
-#define get_cur_dir getcwd
-#endif
+
+#include <sys/statvfs.h>
 
 
-#ifdef WINDOWS
-#define DIR_SEPARATOR '\\'
-#else
 #define DIR_SEPARATOR '/'
+
+//#define GetCurrentDir getcwd
+
+
 #endif
 
 
+#include "utl.h"
+
+
+
+
 
 using namespace std;
 
@@ -143,16 +145,74 @@
 
   return result;
 
+}
 
+/*
+string current_path()
+{
+  return fs::current_path().string();
 }
+*/
 
 
 string current_path()
 {
-  return fs::current_path().string();
+ std::string result;
+
+ char buff[FILENAME_MAX];
+
+#if defined(_WIN32) || defined(_WIN64)
+
+  if (_getcwd (buff, FILENAME_MAX))
+    result = buff;
+
+
+#else
+
+ if (getcwd (buff, FILENAME_MAX))
+    result = buff;
+
+#endif
+
+ return result;
+
+
 }
 
 
+
+string get_tmp_dir()
+{
+  std::string result;
+
+#if defined(_WIN32) || defined(_WIN64)
+
+
+  TCHAR szPath[MAX_PATH + 1];
+  DWORD d = GetTempPath(MAX_PATH + 1, szPath);
+  if (d != ERROR_SUCCESS)
+     result = "/tmp";
+   else
+        result = szPath;
+
+ #else
+
+
+  char const *d = getenv ("TMPDIR");
+  if (d)
+     result = d;
+  else
+      result = "/tmp";
+
+#endif
+
+  return result;
+}
+
+
+
+
+
 /*
 string current_path()
 {
@@ -165,24 +225,60 @@
   result = path;
   return result;
 }
+
 */
-/*
+
 size_t get_free_space (const string &path)
 {
+  if (path.empty())
+     return 0;
+
+  size_t result = 0;
+
+#if defined(_WIN32) || defined(_WIN64)
+
+
+     BOOL  fResult;
+      unsigned __int64 i64FreeBytesToCaller,
+                       i64TotalBytes,
+                       i64FreeBytes;
+         fResult = GetDiskFreeSpaceEx (path.c_str(),
+                                 (PULARGE_INTEGER)&i64FreeBytesToCaller,
+                                 (PULARGE_INTEGER)&i64TotalBytes,
+                                 (PULARGE_INTEGER)&i64FreeBytes);
+         if (fResult)
+         {
+            result = i64FreeBytesToCaller;
+            /*printf ("\n\nGetDiskFreeSpaceEx reports\n\n");
+            printf ("Available space to caller = %I64u MB\n",
+                    i64FreeBytesToCaller / (1024*1024));
+            printf ("Total space               = %I64u MB\n",
+                    i64TotalBytes / (1024*1024));
+            printf ("Free space on drive       = %I64u MB\n",
+                    i64FreeBytes / (1024*1024));*/
+         }
+   }
+
 
+#else
 
   struct statvfs buf;
 
   int r = statvfs (path.c_str(), &buf);
 
   if (r < 0)
-     return -1;
+     result = 0;
+  else
+  result = buf.f_bavail * buf.f_bsize;
+
+#endif
+
+  return result;
 
-  return buf.f_bavail * buf.f_bsize;
 }
-*/
 
 
+/*
 size_t get_free_space (const string &path)
 {
   if (path.empty())
@@ -192,7 +288,7 @@
   const fs::space_info i = fs::space (p);
   return i.available;
 }
-
+*/
 
 bool file_exists (const string &name)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logfilegen-2.1.0/utl.h new/logfilegen-2.2.0/utl.h
--- old/logfilegen-2.1.0/utl.h  2023-02-24 13:43:37.000000000 +0100
+++ new/logfilegen-2.2.0/utl.h  2023-02-26 20:23:36.000000000 +0100
@@ -23,6 +23,7 @@
 bool is_program_exists (const std::string &appname);
 bool is_path_abs (const std::string &path);
 bool path_exists (const std::string &fname);
+std::string get_tmp_dir();
 
 
 //String utis

Reply via email to