Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libeconf for openSUSE:Factory checked in at 2023-01-21 19:09:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libeconf (Old) and /work/SRC/openSUSE:Factory/.libeconf.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libeconf" Sat Jan 21 19:09:35 2023 rev:19 rq:1059911 version:0.5.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libeconf/libeconf.changes 2022-12-07 17:33:07.999937367 +0100 +++ /work/SRC/openSUSE:Factory/.libeconf.new.32243/libeconf.changes 2023-01-21 19:09:36.948632116 +0100 @@ -1,0 +2,7 @@ +Thu Jan 19 15:58:59 UTC 2023 - sch...@suse.com + +- Update to version 0.5.1: + * Reading files in /usr/_vendor_/_example_._suffix_.d/* regardless + there is a /etc/_example_._suffix_ file. (#175) + +------------------------------------------------------------------- Old: ---- libeconf-0.5.0.tar.xz New: ---- libeconf-0.5.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libeconf.spec ++++++ --- /var/tmp/diff_new_pack.74iAcY/_old 2023-01-21 19:09:38.152638989 +0100 +++ /var/tmp/diff_new_pack.74iAcY/_new 2023-01-21 19:09:38.160639035 +0100 @@ -1,7 +1,7 @@ # # spec file for package libeconf # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define lname libeconf0 Name: libeconf -Version: 0.5.0 +Version: 0.5.1 Release: 0 Summary: Enhanced config file parser ala systemd License: LGPL-2.1-or-later ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.74iAcY/_old 2023-01-21 19:09:38.204639286 +0100 +++ /var/tmp/diff_new_pack.74iAcY/_new 2023-01-21 19:09:38.208639309 +0100 @@ -1,7 +1,7 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/openSUSE/libeconf.git</param> - <param name="changesrevision">40d70bbe6ebf992082d8c83df522ec9e36364a1b</param> + <param name="changesrevision">77aa2597aa73b56ab1aa824d443ff9fa5667d71e</param> </service> </servicedata> (No newline at EOF) ++++++ libeconf-0.5.0.tar.xz -> libeconf-0.5.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/CMakeLists.txt new/libeconf-0.5.1/CMakeLists.txt --- old/libeconf-0.5.0/CMakeLists.txt 2022-12-02 14:39:03.000000000 +0100 +++ new/libeconf-0.5.1/CMakeLists.txt 2023-01-19 17:28:02.000000000 +0100 @@ -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.5.0 +project(libeconf VERSION 0.5.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.5.0/NEWS new/libeconf-0.5.1/NEWS --- old/libeconf-0.5.0/NEWS 2022-12-02 14:39:03.000000000 +0100 +++ new/libeconf-0.5.1/NEWS 2023-01-19 17:28:02.000000000 +0100 @@ -1,3 +1,7 @@ +Version 0.5.1 +* Reading files in /usr/_vendor_/_example_._suffix_.d/* regardless + there is a /etc/_example_._suffix_ file. + Version 0.5.0 * API calls econf_read*WithCallback supporting a general (void *) argument for user defined data with which the callback function is diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/README.md new/libeconf-0.5.1/README.md --- old/libeconf-0.5.0/README.md 2022-12-02 14:39:03.000000000 +0100 +++ new/libeconf-0.5.1/README.md 2023-01-19 17:28:02.000000000 +0100 @@ -17,8 +17,8 @@ The first method is useful to override the complete configuration file with an own one, the vendor supplied configuration is ignored. -So, if /etc/_example_._suffix_ exists, /usr/_vendor_/_example_._suffix_ and -/usr/_vendor_/_example_._suffix_.d/*._suffix_ will not be read. +So, if /etc/_example_._suffix_ exists, /usr/_vendor_/_example_._suffix_ +will not be read. The disadvantage is, that changes of the vendor configuration file, due e.g. an package update, are ignored and the user has to manually merge them. @@ -39,6 +39,7 @@ If a /etc/_example_._suffix_ files exists: * /etc/_example_._suffix_ +* /usr/_vendor_/_example_._suffix_.d/*._suffix_ * /etc/_example_._suffix_.d/*._suffix_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/doc/man/libeconf.3 new/libeconf-0.5.1/doc/man/libeconf.3 --- old/libeconf-0.5.0/doc/man/libeconf.3 2022-12-02 14:39:03.000000000 +0100 +++ new/libeconf-0.5.1/doc/man/libeconf.3 2023-01-19 17:28:02.000000000 +0100 @@ -31,8 +31,8 @@ The first method is useful to override the complete configuration file with an own one, the vendor supplied configuration is ignored. -So, if /etc/_example_._suffix_ exists, /usr/_vendor_/_example_._suffix_ and -/usr/_vendor_/_example_._suffix_.d/*._suffix_ will not be read. +So, if /etc/_example_._suffix_ exists, /usr/_vendor_/_example_._suffix_ +will not be read. .br The disadvantage is, that changes of the vendor configuration file, due e.g. an package update, are ignored and the user has to manually merge them. @@ -58,6 +58,8 @@ * /etc/_example_._suffix_ +* /usr/_vendor_/_example_._suffix_.d/*._suffix_ + * /etc/_example_._suffix_.d/*._suffix_ .SS "Example 2" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/lib/libeconf.c new/libeconf-0.5.1/lib/libeconf.c --- old/libeconf-0.5.0/lib/libeconf.c 2022-12-02 14:39:03.000000000 +0100 +++ new/libeconf-0.5.1/lib/libeconf.c 2023-01-19 17:28:02.000000000 +0100 @@ -323,12 +323,10 @@ } if (etcfile && !error) { - /* /etc/<project_name>.<suffix> does exist, ignore /usr */ - default_dirs[0] = etc_conf_dir; + /* /etc/<project_name>.<suffix> does exist, ignore /usr/etc/<project_name>.<suffix> */ *size = 1; } else { - /* /etc/<project_name>.<suffix> does not exist, so read /usr/etc - and merge all *.d files. */ + /* /etc/<project_name>.<suffix> does not exist, so read /usr/etc */ if (distfile) { error = econf_readFileWithCallback(&key_file, distfile, delim, comment, @@ -339,9 +337,6 @@ if (distfile && !error) /* /usr/etc/<project_name>.<suffix> does exist */ *size = 1; - - default_dirs[0] = dist_conf_dir; - default_dirs[1] = etc_conf_dir; } /* XXX Re-add get_default_dirs in a reworked version, which @@ -361,6 +356,9 @@ } int i = 0; + /* merge all *.d files in e.g. /usr/etc and /etc */ + default_dirs[0] = dist_conf_dir; + default_dirs[1] = etc_conf_dir; while (default_dirs[i]) { /* Indicate which directories to look for. The order is: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/meson.build new/libeconf-0.5.1/meson.build --- old/libeconf-0.5.0/meson.build 2022-12-02 14:39:03.000000000 +0100 +++ new/libeconf-0.5.1/meson.build 2023-01-19 17:28:02.000000000 +0100 @@ -7,7 +7,7 @@ 'b_pie=true', 'warning_level=3',], license : 'MIT', - version : '0.5.0', + version : '0.5.1', ) cc = meson.get_compiler('c') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/tests/CMakeLists.txt new/libeconf-0.5.1/tests/CMakeLists.txt --- old/libeconf-0.5.0/tests/CMakeLists.txt 2022-12-02 14:39:03.000000000 +0100 +++ new/libeconf-0.5.1/tests/CMakeLists.txt 2023-01-19 17:28:02.000000000 +0100 @@ -13,6 +13,8 @@ target_compile_options(${TESTNAME} PRIVATE -DTESTSDIR=\"${PROJECT_SOURCE_DIR}/tests/\" -DSUFFIX=\".conf\") elseif (${TESTNAME} STREQUAL "tst-getconfdirs2") target_compile_options(${TESTNAME} PRIVATE -DTESTSDIR=\"${PROJECT_SOURCE_DIR}/tests/\" -DSUFFIX=\"conf\") + elseif (${TESTNAME} STREQUAL "tst-getconfdirs8") + target_compile_options(${TESTNAME} PRIVATE -DTESTSDIR=\"${PROJECT_SOURCE_DIR}/tests/\" -DSUFFIX=\"conf\") else() target_compile_options(${TESTNAME} PRIVATE -DTESTSDIR=\"${PROJECT_SOURCE_DIR}/tests/\") endif() @@ -47,6 +49,7 @@ tst-getconfdirs5 tst-getconfdirs6 tst-getconfdirs7 + tst-getconfdirs8 tst-without-suffix tst-econf_errstring1 tst-setgetvalues1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/tests/meson.build new/libeconf-0.5.1/tests/meson.build --- old/libeconf-0.5.0/tests/meson.build 2022-12-02 14:39:03.000000000 +0100 +++ new/libeconf-0.5.1/tests/meson.build 2023-01-19 17:28:02.000000000 +0100 @@ -68,6 +68,8 @@ test('tst-getconfdirs6', tst_getconfdirs6_exe) tst_getconfdirs7_exe = executable('tst-getconfdirs7', 'tst-getconfdirs7.c', c_args: test_args, dependencies : libeconf_dep) test('tst-getconfdirs7', tst_getconfdirs7_exe) +tst_getconfdirs8_exe = executable('tst-getconfdirs8', 'tst-getconfdirs8.c', c_args: ['-DSUFFIX="conf"', test_args], dependencies : libeconf_dep) +test('tst-getconfdirs8', tst_getconfdirs8_exe) tst_parse_error_exe = executable('tst-parse-error', 'tst-parse-error.c', c_args: test_args, dependencies : libeconf_dep) test('tst-parse-error', tst_parse_error_exe) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/tests/tst-getconfdirs8-data/etc/getconfdir.conf new/libeconf-0.5.1/tests/tst-getconfdirs8-data/etc/getconfdir.conf --- old/libeconf-0.5.0/tests/tst-getconfdirs8-data/etc/getconfdir.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/libeconf-0.5.1/tests/tst-getconfdirs8-data/etc/getconfdir.conf 2023-01-19 17:28:02.000000000 +0100 @@ -0,0 +1,4 @@ +KEY1=etc +ETC=true +KEY2=etc +KEY3=etc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/tests/tst-getconfdirs8-data/etc/getconfdir.conf.d/0-key3.conf new/libeconf-0.5.1/tests/tst-getconfdirs8-data/etc/getconfdir.conf.d/0-key3.conf --- old/libeconf-0.5.0/tests/tst-getconfdirs8-data/etc/getconfdir.conf.d/0-key3.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/libeconf-0.5.1/tests/tst-getconfdirs8-data/etc/getconfdir.conf.d/0-key3.conf 2023-01-19 17:28:02.000000000 +0100 @@ -0,0 +1 @@ +KEY3=etcconfd \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/tests/tst-getconfdirs8-data/etc/getconfdir.conf.d/1-key1.conf new/libeconf-0.5.1/tests/tst-getconfdirs8-data/etc/getconfdir.conf.d/1-key1.conf --- old/libeconf-0.5.0/tests/tst-getconfdirs8-data/etc/getconfdir.conf.d/1-key1.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/libeconf-0.5.1/tests/tst-getconfdirs8-data/etc/getconfdir.conf.d/1-key1.conf 2023-01-19 17:28:02.000000000 +0100 @@ -0,0 +1 @@ +KEY1=etcconfd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/tests/tst-getconfdirs8-data/etc/getconfdir.conf.d/1-key3.conf new/libeconf-0.5.1/tests/tst-getconfdirs8-data/etc/getconfdir.conf.d/1-key3.conf --- old/libeconf-0.5.0/tests/tst-getconfdirs8-data/etc/getconfdir.conf.d/1-key3.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/libeconf-0.5.1/tests/tst-getconfdirs8-data/etc/getconfdir.conf.d/1-key3.conf 2023-01-19 17:28:02.000000000 +0100 @@ -0,0 +1 @@ +KEY3=etcconfd3 \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/tests/tst-getconfdirs8-data/usr/etc/getconfdir.conf new/libeconf-0.5.1/tests/tst-getconfdirs8-data/usr/etc/getconfdir.conf --- old/libeconf-0.5.0/tests/tst-getconfdirs8-data/usr/etc/getconfdir.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/libeconf-0.5.1/tests/tst-getconfdirs8-data/usr/etc/getconfdir.conf 2023-01-19 17:28:02.000000000 +0100 @@ -0,0 +1,4 @@ +KEY1=usretc +USRETC=true +KEY2=usretc +KEY3=usretc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/tests/tst-getconfdirs8-data/usr/etc/getconfdir.conf.d/0-key3.conf new/libeconf-0.5.1/tests/tst-getconfdirs8-data/usr/etc/getconfdir.conf.d/0-key3.conf --- old/libeconf-0.5.0/tests/tst-getconfdirs8-data/usr/etc/getconfdir.conf.d/0-key3.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/libeconf-0.5.1/tests/tst-getconfdirs8-data/usr/etc/getconfdir.conf.d/0-key3.conf 2023-01-19 17:28:02.000000000 +0100 @@ -0,0 +1 @@ +KEY3=usrconfd \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/tests/tst-getconfdirs8-data/usr/etc/getconfdir.conf.d/1-key1.conf new/libeconf-0.5.1/tests/tst-getconfdirs8-data/usr/etc/getconfdir.conf.d/1-key1.conf --- old/libeconf-0.5.0/tests/tst-getconfdirs8-data/usr/etc/getconfdir.conf.d/1-key1.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/libeconf-0.5.1/tests/tst-getconfdirs8-data/usr/etc/getconfdir.conf.d/1-key1.conf 2023-01-19 17:28:02.000000000 +0100 @@ -0,0 +1 @@ +KEY1=usrconfd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/tests/tst-getconfdirs8-data/usr/etc/getconfdir.conf.d/10-key2.conf new/libeconf-0.5.1/tests/tst-getconfdirs8-data/usr/etc/getconfdir.conf.d/10-key2.conf --- old/libeconf-0.5.0/tests/tst-getconfdirs8-data/usr/etc/getconfdir.conf.d/10-key2.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/libeconf-0.5.1/tests/tst-getconfdirs8-data/usr/etc/getconfdir.conf.d/10-key2.conf 2023-01-19 17:28:02.000000000 +0100 @@ -0,0 +1 @@ +KEY2=usrconfd \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/tests/tst-getconfdirs8.c new/libeconf-0.5.1/tests/tst-getconfdirs8.c --- old/libeconf-0.5.0/tests/tst-getconfdirs8.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libeconf-0.5.1/tests/tst-getconfdirs8.c 2023-01-19 17:28:02.000000000 +0100 @@ -0,0 +1,83 @@ +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <stdio.h> +#include <string.h> + +#include "libeconf.h" + +/* Test case: + Test the systemd like behavior: + /usr/etc/getconfdir.conf exists + /etc/getconfdir.conf exists + /etc/getconfidr.conf.d/<files>.conf exists + /usr/etc/getconfidr.conf.d/<files>.conf exists + + libeconf should ignore /usr/etc/getconfdir.conf and should regard + all files in both getconfidr.conf.d directories +*/ + +static int +check_key(econf_file *key_file, char *key, char *expected_val) +{ + char *val = NULL; + econf_err error = econf_getStringValue (key_file, "", key, &val); + if (expected_val == NULL) + { + if (val == NULL) + return 0; + + fprintf (stderr, "ERROR: %s has value \"%s\"\n", key, val); + return 1; + } + if (val == NULL || strlen(val) == 0) + { + fprintf (stderr, "ERROR: %s returns nothing! (%s)\n", key, + econf_errString(error)); + return 1; + } + if (strcmp (val, expected_val) != 0) + { + fprintf (stderr, "ERROR: %s is not \"%s\" but \"%s\" \n", key, expected_val, val); + return 1; + } + + printf("Ok: %s=%s\n", key, val); + free (val); + return 0; +} + +int +main(void) +{ + econf_file *key_file = NULL; + int retval = 0; + econf_err error; + + error = econf_readDirs (&key_file, + TESTSDIR"tst-getconfdirs8-data/usr/etc", + TESTSDIR"tst-getconfdirs8-data/etc", + "getconfdir", SUFFIX, "=", "#"); + if (error) + { + fprintf (stderr, "ERROR: econf_readDirs: %s\n", + econf_errString(error)); + return 1; + } + + if (check_key(key_file, "KEY1", "etcconfd") != 0) + retval = 1; + if (check_key(key_file, "KEY2", "usrconfd") != 0) + retval = 1; + if (check_key(key_file, "KEY3", "etcconfd3") != 0) + retval = 1; + if (check_key(key_file, "USRETC", NULL) != 0) + retval = 1; + if (check_key(key_file, "ETC", "true") != 0) + retval = 1; + + econf_free (key_file); + + return retval; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.5.0/tests/tst-security.c new/libeconf-0.5.1/tests/tst-security.c --- old/libeconf-0.5.0/tests/tst-security.c 2022-12-02 14:39:03.000000000 +0100 +++ new/libeconf-0.5.1/tests/tst-security.c 2023-01-19 17:28:02.000000000 +0100 @@ -55,8 +55,9 @@ /* checking link */ if (symlink(TESTSDIR"tst-arguments-string/etc/arguments.conf", TESTSDIR"tst-arguments-string/etc/link.conf") == -1) { - fprintf (stderr, "ERROR: cannot create sym link: %s\n", TESTSDIR"tst-arguments-string/etc/link.conf"); - return 1; + fprintf (stderr, "WARNING: Cannot create sym link %s for testing.\n", TESTSDIR"tst-arguments-string/etc/link.conf"); + fprintf (stderr, "Exit without reporting an error"); + return 0; } econf_followSymlinks(false); error = econf_readFile (&key_file, TESTSDIR"tst-arguments-string/etc/link.conf", "=", "#");