Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libeconf for openSUSE:Factory 
checked in at 2021-07-12 01:24:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libeconf (Old)
 and      /work/SRC/openSUSE:Factory/.libeconf.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libeconf"

Mon Jul 12 01:24:32 2021 rev:11 rq:905185 version:0.4.1+git20210709.cf671f2

Changes:
--------
--- /work/SRC/openSUSE:Factory/libeconf/libeconf.changes        2021-04-19 
21:05:45.336007447 +0200
+++ /work/SRC/openSUSE:Factory/.libeconf.new.2625/libeconf.changes      
2021-07-12 01:24:33.769449858 +0200
@@ -1,0 +2,18 @@
+Fri Jul  9 07:16:22 UTC 2021 - schubi <schubi@localhost>
+
+- Update to version 0.4.1+git20210709.cf671f2:
+  * CMake fixes regarding installation of econftool and man pages.
+
+-------------------------------------------------------------------
+Thu Jul 08 08:49:53 UTC 2021 - Stefan Schubert sch...@suse.com
+
+- Update to version 0.4.0+git20210708.6918ea1:
+  * Fixed covscan FORWARD_NULL_issues warnings
+
+-------------------------------------------------------------------
+Wed Jul  7 12:11:36 UTC 2021 - Stefan Schubert <sch...@suse.com>
+
+- Update to version 0.4.0+git20210707.537a8a:
+  * Fixed resource leaks found by Iker Pedrosa.
+
+-------------------------------------------------------------------

Old:
----
  libeconf-0.4.0+git20210413.fdb8025.tar.xz

New:
----
  libeconf-0.4.1+git20210709.cf671f2.tar.xz

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

Other differences:
------------------
++++++ libeconf.spec ++++++
--- /var/tmp/diff_new_pack.OVPdaE/_old  2021-07-12 01:24:34.521444076 +0200
+++ /var/tmp/diff_new_pack.OVPdaE/_new  2021-07-12 01:24:34.521444076 +0200
@@ -18,7 +18,7 @@
 
 %define lname  libeconf0
 Name:           libeconf
-Version:        0.4.0+git20210413.fdb8025
+Version:        0.4.1+git20210709.cf671f2
 Release:        0
 Summary:        Enhanced config file parser ala systemd
 License:        LGPL-2.1-or-later

++++++ _service ++++++
--- /var/tmp/diff_new_pack.OVPdaE/_old  2021-07-12 01:24:34.557443800 +0200
+++ /var/tmp/diff_new_pack.OVPdaE/_new  2021-07-12 01:24:34.557443800 +0200
@@ -1,7 +1,7 @@
 <services>
   <service name="tar_scm" mode="disabled">
-    <param name="version">0.4.0</param>
-    <param name="versionformat">0.4.0+git%cd.%h</param>
+    <param name="version">0.4.1</param>
+    <param name="versionformat">0.4.1+git%cd.%h</param>
     <param name="url">git://github.com/openSUSE/libeconf.git</param>
     <param name="scm">git</param>
     <param name="changesgenerate">enable</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.OVPdaE/_old  2021-07-12 01:24:34.577443646 +0200
+++ /var/tmp/diff_new_pack.OVPdaE/_new  2021-07-12 01:24:34.581443615 +0200
@@ -1,6 +1,6 @@
 <servicedata>
   <service name="tar_scm">
     <param name="url">git://github.com/openSUSE/libeconf.git</param>
-    <param 
name="changesrevision">fdb8025a4eb202aa34da5e388528288e92298d5b</param>
+    <param 
name="changesrevision">cf671f26a6b4fd6f66b194bd59574c14943c0c82</param>
  </service>
 </servicedata>
\ No newline at end of file

++++++ libeconf-0.4.0+git20210413.fdb8025.tar.xz -> 
libeconf-0.4.1+git20210709.cf671f2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.4.0+git20210413.fdb8025/CMakeLists.txt 
new/libeconf-0.4.1+git20210709.cf671f2/CMakeLists.txt
--- old/libeconf-0.4.0+git20210413.fdb8025/CMakeLists.txt       2021-04-13 
22:25:10.000000000 +0200
+++ new/libeconf-0.4.1+git20210709.cf671f2/CMakeLists.txt       2021-07-09 
09:11:42.000000000 +0200
@@ -3,7 +3,7 @@
 # Ensure built-in policies from CMake are used, (e.g. improved policies for 
macOS)
 cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
 
-project(libeconf VERSION 0.4.0
+project(libeconf VERSION 0.4.1
                  DESCRIPTION "Enhanced config file parser, which merges config 
files placed in several locations into one."
                  LANGUAGES C
                  )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.4.0+git20210413.fdb8025/INSTALL.md 
new/libeconf-0.4.1+git20210709.cf671f2/INSTALL.md
--- old/libeconf-0.4.0+git20210413.fdb8025/INSTALL.md   2021-04-13 
22:25:10.000000000 +0200
+++ new/libeconf-0.4.1+git20210709.cf671f2/INSTALL.md   2021-07-09 
09:11:42.000000000 +0200
@@ -32,3 +32,17 @@
 
 If you want to build with the address sanitizer enabled, add
 `-DCMAKE_BUILD_TYPE=SanitizeAddress` as an argument to `cmake -B build`.
+
+# Tagging new Release
+
+1. Edit NEWS declaring the new version number and making all the changes to it.
+2. Update the version number in CMakeCache.txt and meson.build.
+2. Commit to git.
+3. On https://github.com/openSUSE/libeconf click on releases on the right 
column (or go to https://github.com/openSUSE/libeconf/releases)
+4. 'Draft a new release'.
+5. In 'tag version' write vX.Y.Z matching the new version you declared in your 
NEWS commit.
+6. Write a release title (e.g. "Release Version X.Y.Z")
+7. In the description just copy/paste the NEWS entry.
+8. Publish the release.
+
+This creates a git tag for all the latest commits (hence the NEWS commit being 
important) under the new version number.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.4.0+git20210413.fdb8025/NEWS 
new/libeconf-0.4.1+git20210709.cf671f2/NEWS
--- old/libeconf-0.4.0+git20210413.fdb8025/NEWS 2021-04-13 22:25:10.000000000 
+0200
+++ new/libeconf-0.4.1+git20210709.cf671f2/NEWS 2021-07-09 09:11:42.000000000 
+0200
@@ -1,3 +1,20 @@
+Version 0.4.1
+* CMake fixes regarding installation of econftool and man pages.
+
+Version 0.4.0
+* Man pages libeconf.3 and econftool.8.
+* Handling multiline strings.
+* Added libeconf_ext which returns more information like
+  line_nr, comments, path of the configuration file,...
+* Econftool, an command line interface for handling configuration
+  files.
+* Generating HTML API documentation with doxygen.
+* Improving error handling and semantic file check.
+* Joining entries with the same key to one single entry if
+  env variable ECONF_JOIN_SAME_ENTRIES has been set.
+* new API call: econf_readDirsHistory (showing ALL locations)
+* new API call: econf_getPath (absolute path of the configuration file)
+
 Version 0.3.8
 * Convert the build to include CMake as an option, remove autotools
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libeconf-0.4.0+git20210413.fdb8025/doc/CMakeLists.txt 
new/libeconf-0.4.1+git20210709.cf671f2/doc/CMakeLists.txt
--- old/libeconf-0.4.0+git20210413.fdb8025/doc/CMakeLists.txt   2021-04-13 
22:25:10.000000000 +0200
+++ new/libeconf-0.4.1+git20210709.cf671f2/doc/CMakeLists.txt   2021-07-09 
09:11:42.000000000 +0200
@@ -20,3 +20,6 @@
 
     install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc)
 endif()
+
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man/libeconf.3 DESTINATION 
${CMAKE_INSTALL_MANDIR}/man3)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man/econftool.8 DESTINATION 
${CMAKE_INSTALL_MANDIR}/man8)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.4.0+git20210413.fdb8025/lib/defines.h 
new/libeconf-0.4.1+git20210709.cf671f2/lib/defines.h
--- old/libeconf-0.4.0+git20210413.fdb8025/lib/defines.h        2021-04-13 
22:25:10.000000000 +0200
+++ new/libeconf-0.4.1+git20210709.cf671f2/lib/defines.h        2021-07-09 
09:11:42.000000000 +0200
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2019 LLC
+  Copyright (C) 2019 SUSE LLC
   Author: Pascal Arlt <pa...@suse.com>
 
   Permission is hereby granted, free of charge, to any person obtaining a copy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.4.0+git20210413.fdb8025/lib/helpers.c 
new/libeconf-0.4.1+git20210709.cf671f2/lib/helpers.c
--- old/libeconf-0.4.0+git20210413.fdb8025/lib/helpers.c        2021-04-13 
22:25:10.000000000 +0200
+++ new/libeconf-0.4.1+git20210709.cf671f2/lib/helpers.c        2021-07-09 
09:11:42.000000000 +0200
@@ -106,6 +106,8 @@
   size_t length = strlen(string);
   if (!(*string == '[' && string[length - 1] == ']')) {
     char *buffer = malloc(length + 3);
+    if (buffer == NULL)
+      return NULL;
     char *cp = buffer;
     *cp++ = '[';
     cp = stpcpy (cp, string);
@@ -224,5 +226,6 @@
     copied_fe.comment_after_value = strdup(fe.comment_after_value);
   else
     copied_fe.comment_after_value = NULL;  
+  copied_fe.line_number = fe.line_number;
   return copied_fe;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.4.0+git20210413.fdb8025/lib/libeconf.c 
new/libeconf-0.4.1+git20210709.cf671f2/lib/libeconf.c
--- old/libeconf-0.4.0+git20210413.fdb8025/lib/libeconf.c       2021-04-13 
22:25:10.000000000 +0200
+++ new/libeconf-0.4.1+git20210709.cf671f2/lib/libeconf.c       2021-07-09 
09:11:42.000000000 +0200
@@ -87,10 +87,12 @@
     return ECONF_NOMEM;
   }
 
-  if (comment && *comment)
+  if (*comment)
     (*key_file)->comment = comment[0];
-  else
+  else {
     (*key_file)->comment = '#';
+    comment = "#";
+  }
 
   t_err = read_file(*key_file, absolute_path, delim, comment);
   
@@ -241,8 +243,10 @@
   /* create space to store the econf_files for merging */
   *size = *size+1;
   *key_files = calloc(*size, sizeof(econf_file*));
-  if (*key_files == NULL)
+  if (*key_files == NULL) {
+    econf_freeFile(key_file);
     return ECONF_NOMEM;
+  }
 
   if (*size == 2) {
     key_file->on_merge_delete = 1;
@@ -343,8 +347,10 @@
     return ECONF_NOMEM;
 
   FILE *kf = fopen(save_to, "w");
-  if (kf == NULL)
+  if (kf == NULL) {
+    free(save_to);
     return ECONF_WRITEERROR;
+  }
 
   // Write to file
   for (size_t i = 0; i < key_file->length; i++) {
@@ -401,8 +407,10 @@
     return ECONF_NOGROUP;
   }
   *groups = calloc(tmp + 1, sizeof(char*));
-  if (*groups == NULL)
+  if (*groups == NULL) {
+    free(uniques);
     return ECONF_NOMEM;
+  }
 
   tmp = 0;
   for (size_t i = 0; i < kf->length; i++)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.4.0+git20210413.fdb8025/lib/mergefiles.c 
new/libeconf-0.4.1+git20210709.cf671f2/lib/mergefiles.c
--- old/libeconf-0.4.0+git20210413.fdb8025/lib/mergefiles.c     2021-04-13 
22:25:10.000000000 +0200
+++ new/libeconf-0.4.1+git20210709.cf671f2/lib/mergefiles.c     2021-07-09 
09:11:42.000000000 +0200
@@ -35,10 +35,12 @@
 // group specified
 size_t insert_nogroup(struct file_entry **fe, econf_file *ef) {
   size_t etc_start = 0;
-  while (etc_start < ef->length &&
-         !strcmp(ef->file_entry[etc_start].group, KEY_FILE_NULL_VALUE)) {
-    (*fe)[etc_start] = cpy_file_entry(ef->file_entry[etc_start]);
-    etc_start++;
+  if (ef) {
+    while (etc_start < ef->length &&
+          !strcmp(ef->file_entry[etc_start].group, KEY_FILE_NULL_VALUE)) {
+      (*fe)[etc_start] = cpy_file_entry(ef->file_entry[etc_start]);
+      etc_start++;
+    }
   }
   return etc_start;
 }
@@ -49,34 +51,36 @@
                              const size_t etc_start) {
   char new_key;
   size_t merge_length = etc_start, tmp = etc_start, added_keys = etc_start;
-  for (size_t i = 0; i <= uf->length; i++) {
-    // Check if the group has changed in the last iteration
-    if (i == uf->length ||
-        (i && strcmp(uf->file_entry[i].group, uf->file_entry[i - 1].group))) {
-      for (size_t j = etc_start; j < ef->length; j++) {
-        // Check for matching groups
-        if (!strcmp(uf->file_entry[i - 1].group, ef->file_entry[j].group)) {
-          new_key = 1;
-          for (size_t k = merge_length; k < i + tmp; k++) {
-            // If an existing key is found in ef take the value from ef
-            if (!strcmp((*fe)[k].key, ef->file_entry[j].key)) {
-              free((*fe)[k].value);
-              (*fe)[k].value = strdup(ef->file_entry[j].value);
-              new_key = 0;
-              break;
-            }
-          }
-          // If a new key is found for an existing group append it to the group
-          if (new_key)
-            (*fe)[i + added_keys++] = cpy_file_entry(ef->file_entry[j]);
-        }
+  if (uf && ef) {
+    for (size_t i = 0; i <= uf->length; i++) {
+      // Check if the group has changed in the last iteration
+      if (i == uf->length ||
+         (i && strcmp(uf->file_entry[i].group, uf->file_entry[i - 1].group))) {
+       for (size_t j = etc_start; j < ef->length; j++) {
+         // Check for matching groups
+         if (!strcmp(uf->file_entry[i - 1].group, ef->file_entry[j].group)) {
+           new_key = 1;
+           for (size_t k = merge_length; k < i + tmp; k++) {
+             // If an existing key is found in ef take the value from ef
+             if (!strcmp((*fe)[k].key, ef->file_entry[j].key)) {
+               free((*fe)[k].value);
+               (*fe)[k].value = strdup(ef->file_entry[j].value);
+               new_key = 0;
+               break;
+             }
+           }
+           // If a new key is found for an existing group append it to the 
group
+           if (new_key)
+             (*fe)[i + added_keys++] = cpy_file_entry(ef->file_entry[j]);
+         }
+       }
+       merge_length = i + added_keys;
+       // Temporary value to reduce amount of iterations in inner for loop
+       tmp = added_keys;
       }
-      merge_length = i + added_keys;
-      // Temporary value to reduce amount of iterations in inner for loop
-      tmp = added_keys;
+      if (i != uf->length)
+       (*fe)[i + added_keys] = cpy_file_entry(uf->file_entry[i]);
     }
-    if (i != uf->length)
-      (*fe)[i + added_keys] = cpy_file_entry(uf->file_entry[i]);
   }
   return merge_length;
 }
@@ -86,20 +90,22 @@
                       const size_t merge_length) {
   size_t added_keys = merge_length;
   char new_key;
-  for (size_t i = 0; i < ef->length; i++) {
-    if (!strcmp(ef->file_entry[i].group, KEY_FILE_NULL_VALUE))
-      continue;
-    new_key = 1;
-    for (size_t j = 0; j < uf->length; j++) {
-      if (!strcmp(uf->file_entry[j].group, ef->file_entry[i].group)) {
-        new_key = 0;
-        break;
+  if (uf && ef) {
+    for (size_t i = 0; i < ef->length; i++) {
+      if (!strcmp(ef->file_entry[i].group, KEY_FILE_NULL_VALUE))
+       continue;
+      new_key = 1;
+      for (size_t j = 0; j < uf->length; j++) {
+       if (!strcmp(uf->file_entry[j].group, ef->file_entry[i].group)) {
+         new_key = 0;
+         break;
+       }
       }
+      if (new_key)
+       (*fe)[added_keys++] = cpy_file_entry(ef->file_entry[i]);
     }
-    if (new_key)
-      (*fe)[added_keys++] = cpy_file_entry(ef->file_entry[i]);
+    *fe = realloc(*fe, added_keys * sizeof(struct file_entry));
   }
-  *fe = realloc(*fe, added_keys * sizeof(struct file_entry));
   return added_keys;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.4.0+git20210413.fdb8025/meson.build 
new/libeconf-0.4.1+git20210709.cf671f2/meson.build
--- old/libeconf-0.4.0+git20210413.fdb8025/meson.build  2021-04-13 
22:25:10.000000000 +0200
+++ new/libeconf-0.4.1+git20210709.cf671f2/meson.build  2021-07-09 
09:11:42.000000000 +0200
@@ -7,7 +7,7 @@
                  'b_pie=true',
                  'warning_level=3',],
   license : 'MIT',
-  version : '0.4.0',
+  version : '0.4.1',
 )
 
 cc = meson.get_compiler('c')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libeconf-0.4.0+git20210413.fdb8025/util/CMakeLists.txt 
new/libeconf-0.4.1+git20210709.cf671f2/util/CMakeLists.txt
--- old/libeconf-0.4.0+git20210413.fdb8025/util/CMakeLists.txt  2021-04-13 
22:25:10.000000000 +0200
+++ new/libeconf-0.4.1+git20210709.cf671f2/util/CMakeLists.txt  2021-07-09 
09:11:42.000000000 +0200
@@ -1,3 +1,7 @@
 # Create the binary/executable
 add_executable(econftool econftool.c)
 target_link_libraries(econftool PRIVATE econf)
+
+install(TARGETS econftool
+  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+)

Reply via email to