Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package inih for openSUSE:Factory checked in at 2022-03-29 18:13:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/inih (Old) and /work/SRC/openSUSE:Factory/.inih.new.1900 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "inih" Tue Mar 29 18:13:47 2022 rev:5 rq:964954 version:55 Changes: -------- --- /work/SRC/openSUSE:Factory/inih/inih.changes 2021-03-18 22:54:15.435486544 +0100 +++ /work/SRC/openSUSE:Factory/.inih.new.1900/inih.changes 2022-03-29 18:13:49.839040470 +0200 @@ -1,0 +2,13 @@ +Fri Mar 25 22:03:32 UTC 2022 - Matthias Bach <[email protected]> - 55 + +- Update to version 55 + * Include proper version in installed pkgconfig files. + +------------------------------------------------------------------- +Fri Mar 25 20:33:09 UTC 2022 - Matthias Bach <[email protected]> - 54 + +- Update to version 54 + * Improve quality of shared objects by explicitly defining symbol + visibility. + +------------------------------------------------------------------- Old: ---- inih-r53.tar.gz New: ---- inih-r55.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ inih.spec ++++++ --- /var/tmp/diff_new_pack.L7aaaZ/_old 2022-03-29 18:13:50.411040997 +0200 +++ /var/tmp/diff_new_pack.L7aaaZ/_new 2022-03-29 18:13:50.419041004 +0200 @@ -1,7 +1,7 @@ # # spec file for package inih # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # Copyright (c) 2020 Matthias Bach <[email protected]> # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ Name: inih -Version: 53 +Version: 55 Release: 0 Summary: Simple .INI file parser in C, good for embedded systems License: BSD-3-Clause ++++++ inih-r53.tar.gz -> inih-r55.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inih-r53/.github/FUNDING.yml new/inih-r55/.github/FUNDING.yml --- old/inih-r53/.github/FUNDING.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/inih-r55/.github/FUNDING.yml 2022-03-25 22:31:24.000000000 +0100 @@ -0,0 +1 @@ +github: benhoyt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inih-r53/.github/workflows/tests.yml new/inih-r55/.github/workflows/tests.yml --- old/inih-r53/.github/workflows/tests.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/inih-r55/.github/workflows/tests.yml 2022-03-25 22:31:24.000000000 +0100 @@ -0,0 +1,22 @@ +name: Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-linux: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Run Diff Tests + run: | + cd tests + ./unittest.sh + cd ../examples + ./cpptest.sh + git diff --exit-code diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inih-r53/.gitignore new/inih-r55/.gitignore --- old/inih-r53/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/inih-r55/.gitignore 2022-03-25 22:31:24.000000000 +0100 @@ -0,0 +1,2 @@ +fuzzing/findings +fuzzing/inihfuzz diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inih-r53/.travis.yml new/inih-r55/.travis.yml --- old/inih-r53/.travis.yml 2021-02-07 21:35:56.000000000 +0100 +++ new/inih-r55/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,17 +0,0 @@ -os: linux -arch: - - amd64 - - ppc64le -language: c - -# Setting sudo access to false will let Travis CI use containers -# rather than VMs to run the tests. For more details see: -# https://docs.travis-ci.com/user/reference/overview/ -sudo: false - -script: - - cd tests - - ./unittest.sh - - cd ../examples - - ./cpptest.sh - - git diff --exit-code diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inih-r53/README.md new/inih-r55/README.md --- old/inih-r53/README.md 2021-02-07 21:35:56.000000000 +0100 +++ new/inih-r55/README.md 2022-03-25 22:31:24.000000000 +0100 @@ -1,6 +1,6 @@ # inih (INI Not Invented Here) -[](https://travis-ci.org/benhoyt/inih) +[](https://github.com/benhoyt/inih/actions/workflows/tests.yml) **inih (INI Not Invented Here)** is a simple [.INI file](http://en.wikipedia.org/wiki/INI_file) parser written in C. It's only a couple of pages of code, and it was designed to be _small and simple_, so it's good for embedded systems. It's also more or less compatible with Python's [ConfigParser](http://docs.python.org/library/configparser.html) style of .INI files, including RFC 822-style multi-line syntax and `name: value` entries. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inih-r53/cpp/INIReader.h new/inih-r55/cpp/INIReader.h --- old/inih-r53/cpp/INIReader.h 2021-02-07 21:35:56.000000000 +0100 +++ new/inih-r55/cpp/INIReader.h 2022-03-25 22:31:24.000000000 +0100 @@ -15,6 +15,27 @@ #include <map> #include <string> +// Visibility symbols, required for Windows DLLs +#ifndef INI_API +#if defined _WIN32 || defined __CYGWIN__ +# ifdef INI_SHARED_LIB +# ifdef INI_SHARED_LIB_BUILDING +# define INI_API __declspec(dllexport) +# else +# define INI_API __declspec(dllimport) +# endif +# else +# define INI_API +# endif +#else +# if defined(__GNUC__) && __GNUC__ >= 4 +# define INI_API __attribute__ ((visibility ("default"))) +# else +# define INI_API +# endif +#endif +#endif + // Read an INI file into easy-to-access name/value pairs. (Note that I've gone // for simplicity here rather than speed, but it should be pretty decent.) class INIReader @@ -22,45 +43,45 @@ public: // Construct INIReader and parse given filename. See ini.h for more info // about the parsing. - explicit INIReader(const std::string& filename); + INI_API explicit INIReader(const std::string& filename); // Construct INIReader and parse given buffer. See ini.h for more info // about the parsing. - explicit INIReader(const char *buffer, size_t buffer_size); + INI_API explicit INIReader(const char *buffer, size_t buffer_size); // Return the result of ini_parse(), i.e., 0 on success, line number of // first error on parse error, or -1 on file open error. - int ParseError() const; + INI_API int ParseError() const; // Get a string value from INI file, returning default_value if not found. - std::string Get(const std::string& section, const std::string& name, + INI_API std::string Get(const std::string& section, const std::string& name, const std::string& default_value) const; // Get a string value from INI file, returning default_value if not found, // empty, or contains only whitespace. - std::string GetString(const std::string& section, const std::string& name, + INI_API std::string GetString(const std::string& section, const std::string& name, const std::string& default_value) const; // Get an integer (long) value from INI file, returning default_value if // not found or not a valid integer (decimal "1234", "-1234", or hex "0x4d2"). - long GetInteger(const std::string& section, const std::string& name, long default_value) const; + INI_API long GetInteger(const std::string& section, const std::string& name, long default_value) const; // Get a real (floating point double) value from INI file, returning // default_value if not found or not a valid floating point value // according to strtod(). - double GetReal(const std::string& section, const std::string& name, double default_value) const; + INI_API double GetReal(const std::string& section, const std::string& name, double default_value) const; // Get a boolean value from INI file, returning default_value if not found or if // not a valid true/false value. Valid true values are "true", "yes", "on", "1", // and valid false values are "false", "no", "off", "0" (not case sensitive). - bool GetBoolean(const std::string& section, const std::string& name, bool default_value) const; + INI_API bool GetBoolean(const std::string& section, const std::string& name, bool default_value) const; // Return true if the given section exists (section must contain at least // one name=value pair). - bool HasSection(const std::string& section) const; + INI_API bool HasSection(const std::string& section) const; // Return true if a value exists with the given section and field names. - bool HasValue(const std::string& section, const std::string& name) const; + INI_API bool HasValue(const std::string& section, const std::string& name) const; private: int _error; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inih-r53/examples/ini_example.c new/inih-r55/examples/ini_example.c --- old/inih-r53/examples/ini_example.c 2021-02-07 21:35:56.000000000 +0100 +++ new/inih-r55/examples/ini_example.c 2022-03-25 22:31:24.000000000 +0100 @@ -33,6 +33,9 @@ int main(int argc, char* argv[]) { configuration config; + config.version = 0; /* set defaults */ + config.name = NULL; + config.email = NULL; if (ini_parse("test.ini", handler, &config) < 0) { printf("Can't load 'test.ini'\n"); @@ -41,8 +44,10 @@ printf("Config loaded from 'test.ini': version=%d, name=%s, email=%s\n", config.version, config.name, config.email); - free((void*)config.name); - free((void*)config.email); + if (config.name) + free((void*)config.name); + if (config.email) + free((void*)config.email); return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inih-r53/fuzzing/build.sh new/inih-r55/fuzzing/build.sh --- old/inih-r53/fuzzing/build.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/inih-r55/fuzzing/build.sh 2022-03-25 22:31:24.000000000 +0100 @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +../../afl-2.52b/afl-gcc inihfuzz.c ../ini.c -o inihfuzz diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inih-r53/fuzzing/fuzz.sh new/inih-r55/fuzzing/fuzz.sh --- old/inih-r53/fuzzing/fuzz.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/inih-r55/fuzzing/fuzz.sh 2022-03-25 22:31:24.000000000 +0100 @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +../../afl-2.52b/afl-fuzz -i testcases -o findings -- ./inihfuzz @@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inih-r53/fuzzing/inihfuzz.c new/inih-r55/fuzzing/inihfuzz.c --- old/inih-r53/fuzzing/inihfuzz.c 1970-01-01 01:00:00.000000000 +0100 +++ new/inih-r55/fuzzing/inihfuzz.c 2022-03-25 22:31:24.000000000 +0100 @@ -0,0 +1,52 @@ +/* This is a slightly tweaked copy of tests/unittest.c for fuzzing */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include "../ini.h" + +int User; +char Prev_section[50]; + +int dumper(void* user, const char* section, const char* name, + const char* value) +{ + User = *((int*)user); + if (!name || strcmp(section, Prev_section)) { + printf("... [%s]\n", section); + strncpy(Prev_section, section, sizeof(Prev_section)); + Prev_section[sizeof(Prev_section) - 1] = '\0'; + } + if (!name) { + return 1; + } + + printf("... %s%s%s;\n", name, value ? "=" : "", value ? value : ""); + + if (!value) { + // Happens when INI_ALLOW_NO_VALUE=1 and line has no value (no '=' or ':') + return 1; + } + + return strcmp(name, "user")==0 && strcmp(value, "parse_error")==0 ? 0 : 1; +} + +void parse(const char* fname) { + static int u = 100; + int e; + + *Prev_section = '\0'; + e = ini_parse(fname, dumper, &u); + printf("%s: e=%d user=%d\n", fname, e, User); + u++; +} + +int main(int argc, char **argv) +{ + if (argc < 2) { + printf("usage: inihfuzz file.ini\n"); + return 1; + } + parse(argv[1]); + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inih-r53/fuzzing/testcases/case1.ini new/inih-r55/fuzzing/testcases/case1.ini --- old/inih-r53/fuzzing/testcases/case1.ini 1970-01-01 01:00:00.000000000 +0100 +++ new/inih-r55/fuzzing/testcases/case1.ini 2022-03-25 22:31:24.000000000 +0100 @@ -0,0 +1,8 @@ +; comment + +[foo] ; section +bar=1 ; name=value + +[bar] +name = Bob +age: 42 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inih-r53/ini.h new/inih-r55/ini.h --- old/inih-r53/ini.h 2021-02-07 21:35:56.000000000 +0100 +++ new/inih-r55/ini.h 2022-03-25 22:31:24.000000000 +0100 @@ -26,6 +26,27 @@ #define INI_HANDLER_LINENO 0 #endif +/* Visibility symbols, required for Windows DLLs */ +#ifndef INI_API +#if defined _WIN32 || defined __CYGWIN__ +# ifdef INI_SHARED_LIB +# ifdef INI_SHARED_LIB_BUILDING +# define INI_API __declspec(dllexport) +# else +# define INI_API __declspec(dllimport) +# endif +# else +# define INI_API +# endif +#else +# if defined(__GNUC__) && __GNUC__ >= 4 +# define INI_API __attribute__ ((visibility ("default"))) +# else +# define INI_API +# endif +#endif +#endif + /* Typedef for prototype of handler function. */ #if INI_HANDLER_LINENO typedef int (*ini_handler)(void* user, const char* section, @@ -52,22 +73,22 @@ stop on first error), -1 on file open error, or -2 on memory allocation error (only when INI_USE_STACK is zero). */ -int ini_parse(const char* filename, ini_handler handler, void* user); +INI_API int ini_parse(const char* filename, ini_handler handler, void* user); /* Same as ini_parse(), but takes a FILE* instead of filename. This doesn't close the file when it's finished -- the caller must do that. */ -int ini_parse_file(FILE* file, ini_handler handler, void* user); +INI_API int ini_parse_file(FILE* file, ini_handler handler, void* user); /* Same as ini_parse(), but takes an ini_reader function pointer instead of filename. Used for implementing custom or string-based I/O (see also ini_parse_string). */ -int ini_parse_stream(ini_reader reader, void* stream, ini_handler handler, +INI_API int ini_parse_stream(ini_reader reader, void* stream, ini_handler handler, void* user); /* Same as ini_parse(), but takes a zero-terminated string with the INI data instead of a file. Useful for parsing INI data from a network socket or already in memory. */ -int ini_parse_string(const char* string, ini_handler handler, void* user); +INI_API int ini_parse_string(const char* string, ini_handler handler, void* user); /* Nonzero to allow multi-line value parsing, in the style of Python's configparser. If allowed, ini_parse() will call the handler with the same diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inih-r53/meson.build new/inih-r55/meson.build --- old/inih-r53/meson.build 2021-02-07 21:35:56.000000000 +0100 +++ new/inih-r55/meson.build 2022-03-25 22:31:24.000000000 +0100 @@ -1,11 +1,13 @@ project('inih', ['c'], license : 'BSD-3-Clause', + version : '55', ) #### options #### arg_static = [] distro_install = get_option('distro_install') +extra_args = [] if distro_install pkg = import('pkgconfig') @@ -55,15 +57,26 @@ endif endif +if host_machine.system() == 'windows' + lib = get_option('default_library') + if lib == 'both' + error('default_library=both is not supported on Windows') + elif lib == 'shared' + extra_args += '-DINI_SHARED_LIB' + add_project_arguments('-DINI_SHARED_LIB_BUILDING', language: ['c', 'cpp']) + endif +endif + #### inih #### inc_inih = include_directories('.') lib_inih = library('inih', ['ini.c'], include_directories : inc_inih, - c_args : arg_static, + c_args : [arg_static, extra_args], install : distro_install, - soversion : '0' + soversion : '0', + gnu_symbol_visibility: 'hidden' ) if distro_install @@ -72,12 +85,13 @@ pkg.generate(lib_inih, name : 'inih', description : 'simple .INI file parser', + extra_cflags : extra_args, ) endif inih_dep = declare_dependency( link_with : lib_inih, - compile_args : arg_static, + compile_args : arg_static + extra_args, include_directories : inc_inih ) @@ -88,10 +102,12 @@ lib_INIReader = library('INIReader', ['cpp/INIReader.cpp'], + cpp_args : extra_args, include_directories : inc_INIReader, dependencies : inih_dep, install : distro_install, - soversion : '0' + soversion : '0', + gnu_symbol_visibility: 'hidden' ) if distro_install @@ -100,11 +116,13 @@ pkg.generate(lib_INIReader, name : 'INIReader', description : 'simple .INI file parser for C++', + extra_cflags : extra_args, ) endif INIReader_dep = declare_dependency( link_with : lib_INIReader, - include_directories : inc_INIReader + include_directories : inc_INIReader, + compile_args : extra_args ) endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inih-r53/tests/unittest.c new/inih-r55/tests/unittest.c --- old/inih-r53/tests/unittest.c 2021-02-07 21:35:56.000000000 +0100 +++ new/inih-r55/tests/unittest.c 2022-03-25 22:31:24.000000000 +0100 @@ -42,6 +42,11 @@ printf("... %s%s%s;\n", name, value ? "=" : "", value ? value : ""); #endif + if (!value) { + // Happens when INI_ALLOW_NO_VALUE=1 and line has no value (no '=' or ':') + return 1; + } + return strcmp(name, "user")==0 && strcmp(value, "parse_error")==0 ? 0 : 1; }
