From e3f7acbe691386fdadef2b3bebcf72723162eade711bf8c6053229750ef4e214 Mon Sep 17 00:00:00 2001 From: Stefan Schubert Date: Wed, 18 Sep 2024 14:29:44 +0000 Subject: [PATCH 1/9] - Update to version 0.7.3: * Groups handled in an own list (#218) * Add econftool as dependency of its tests * Simplify snprintf call * Remove unused functions and reduce variable visibility (#213) * Fix typos (#212) OBS-URL: https://build.opensuse.org/package/show/devel:microos/libeconf?expand=0&rev=32 --- .gitattributes | 23 ++ .gitignore | 1 + _multibuild | 4 + _service | 15 + _servicedata | 6 + baselibs.conf | 1 + libeconf-0.7.2.tar.xz | 3 + libeconf-0.7.3.tar.xz | 3 + libeconf.changes | 606 ++++++++++++++++++++++++++++++++++++++++ libeconf.spec | 105 +++++++ python-libeconf.changes | 128 +++++++++ python-libeconf.spec | 68 +++++ 12 files changed, 963 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 _service create mode 100644 _servicedata create mode 100644 baselibs.conf create mode 100644 libeconf-0.7.2.tar.xz create mode 100644 libeconf-0.7.3.tar.xz create mode 100644 libeconf.changes create mode 100644 libeconf.spec create mode 100644 python-libeconf.changes create mode 100644 python-libeconf.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..e250e09 --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + +python-libeconf + + diff --git a/_service b/_service new file mode 100644 index 0000000..cb21d61 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + 0.5.0 + @PARENT_TAG@ + v(\d+\.\d+\.\d+) + https://github.com/openSUSE/libeconf.git + git + enable + + + xz + *.tar + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..88f2559 --- /dev/null +++ b/_servicedata @@ -0,0 +1,6 @@ + + + https://github.com/openSUSE/libeconf.git + d78b86e72b5818b93f06c54b8fb8e19669b45844 + + \ No newline at end of file diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..0f76614 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1 @@ +libeconf0 diff --git a/libeconf-0.7.2.tar.xz b/libeconf-0.7.2.tar.xz new file mode 100644 index 0000000..c53016a --- /dev/null +++ b/libeconf-0.7.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d25ce67bba2541e19f895a51faa7b87dba56426b48789ecbe2c937581ea19424 +size 176696 diff --git a/libeconf-0.7.3.tar.xz b/libeconf-0.7.3.tar.xz new file mode 100644 index 0000000..ba802f0 --- /dev/null +++ b/libeconf-0.7.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae5257fd75ca24f7326d33448d5f4ebe9052b76006e08743731684dec0941bb4 +size 178304 diff --git a/libeconf.changes b/libeconf.changes new file mode 100644 index 0000000..2ea05bb --- /dev/null +++ b/libeconf.changes @@ -0,0 +1,606 @@ +------------------------------------------------------------------- +Wed Sep 18 11:16:34 UTC 2024 - schubi@suse.com + +- Update to version 0.7.3: + * Groups handled in an own list (#218) + * Add econftool as dependency of its tests + * Simplify snprintf call + * Remove unused functions and reduce variable visibility (#213) + * Fix typos (#212) + +------------------------------------------------------------------- +Fri Jun 14 07:26:15 UTC 2024 - schubi@suse.com + +- Update to version 0.7.2: + * Do not check errno while float conversion. This is a false + alarm for S390 and PPC (#210) + +------------------------------------------------------------------- +Mon Jun 10 07:36:06 UTC 2024 - schubi@suse.com + +- Update to version 0.7.1: +* Improved error handling while parsing values with the wrong format. + Added new return value ECONF_VALUE_CONVERSION_ERROR. +* Setting parsing options via econf_file struct. + see econf_newKeyFile_with_options. These options will be used by + econf_readConfig and econf_readConfigWithCallback. + Following options are supported: + JOIN_SAME_ENTRIES (default 0) + Parsed entries with the same name will not be replaces but + will be joined to one entry. + PYTHON_STYLE (default 0) + E.G. Identations will be handled like multiline entries. + PARSING_DIRS (default /usr/etc/:/run:/etc) + List of directories from which the configuration files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g.: "PARSING_DIRS=/usr/etc/:/run:/etc" + CONFIG_DIRS (default ) + List of directory structures (with order) which describes the directories + in which the files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g. with the given list: "CONFIG_DIRS=.conf.d:.d" files in + following directories will be parsed: + "/.conf.d/" + "/.d/" + "//" +* CAUTION: From now on every econf_file element MUST be intialized if + econf_readConfig and econf_readConfigWithCallback is used. + Either with NULL or: + econf_file *key_file = NULL; + if (error = econf_newKeyFile_with_options(&key_file, "PYTHON_STYLE=1")) + { + fprintf (stderr, "ERROR: couldn't create new key file: %s\n", + econf_errString(error)); + return 1; + } + error = econf_readConfig (&key_file, + "foo", + "/usr/lib", + "example", + "conf", + "=", "#"); + +------------------------------------------------------------------- +Tue Jun 04 11:08:28 UTC 2024 - schubi@suse.com + +- Update to version 0.7.0: + * Defining manual parsing directories (#209) + * parsing config files in python style + * econf_readConfig: set usr_subdir to empty string if it is NULL + * Fix static analyzer detected issues (#202) + * comment string can be in the parsed value which is defined with quotes (#207) + * tst-comments2: comment sign in quoted string (#205) + * Setting options via new econf_newKeyFile_with_options. (#206) + +------------------------------------------------------------------- +Fri Apr 12 10:47:39 UTC 2024 - schubi@suse.com + +- Update to version 0.6.3: + * Fix build with musl libc on ppc64le (#198) + * Creating static library with new package libeconf-devel-static. + This is needed for building package util-linux and btrfsprogs. + +------------------------------------------------------------------- +Wed Mar 06 11:02:00 UTC 2024 - schubi@suse.com + +- Update to version 0.6.2: + * version 0.6.2 + * Fix static analyzer detected issues (#196) + +------------------------------------------------------------------- +Mon Jan 22 14:30:16 UTC 2024 - schubi@suse.com + +- Update to version 0.6.1: + * reading lines which have a length greater than BUFSIZE (#195) + * Improved data quote check in read_file (#193) + +------------------------------------------------------------------- +Wed Nov 08 12:20:34 UTC 2023 - schubi@suse.com + +- Update to version 0.6.0: + * Supporting Linux Userspace API (UAPI) Group + chapter "Configuration Files Specification". + See: https://uapi-group.org/specifications/specs/ + configuration_files_specification/ + +------------------------------------------------------------------- +Fri Nov 03 16:44:38 UTC 2023 - schubi@suse.com + +- Update to version 0.5.3: + * Added bindings for python3 and C# + +------------------------------------------------------------------- +Thu Oct 26 14:56:30 UTC 2023 - nico.krapp@suse.com + +- Update to version 0.5.2: + * Add python bindings (#188) + * docu version 0.5.2 + * Fix test (#185) + * Plug memory leak (#186) + +------------------------------------------------------------------- +Wed Sep 6 14:38:13 UTC 2023 - Stefan Schubert + +- Additional info for version 0.5.2: + * Fixed a stack-buffer-overflow vulnerability in "econf_writeFile" + function. (CVE-2023-30078, CVE-2023-32181, bsc#1211078) + * Fixed a stack-buffer-overflow vulnerability in "read_file" + function. (CVE-2023-30079, CVE-2023-22652, bsc#1211078) + +------------------------------------------------------------------- +Fri Mar 24 15:12:18 UTC 2023 - schubi@suse.com + +- Update to version 0.5.2: + * Fixed build for aarch64 and gcc13. + * Making the output verbose when a test fails. + * Fixed a stack-buffer-overflow vulnerability in "econf_writeFile" + function. + * Fixed a stack-buffer-overflow vulnerability in "read_file" + function. + * Added new feature: econf_set_conf_dirs (const char **dir_postfix_list) + Sets a list of directory structures (with order) which describes + the directories in which the files have to be parsed. + E.G. with the given list: {"/conf.d/", ".d/", "/", NULL} files in following + directories will be parsed: + "/..d/" + "//conf.d/" + "/.d/" + "//" + The entry "/..d/" will be added + automatically. + * General code cleanup. + +------------------------------------------------------------------- +Thu Jan 19 15:58:59 UTC 2023 - schubi@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) + +------------------------------------------------------------------- +Fri Dec 02 14:13:24 UTC 2022 - schubi@suse.com + +- Update to version 0.5.0: + * API calls econf_read*WithCallback supporting a general (void *) + argument for user defined data with which the callback function is + called. + * Tagged following functions deprecated: + econf_requireOwner, econf_requireGroup, econf_requirePermissions, + econf_followSymlinks, econf_reset_security_settings + Use one of the econf_read*WithCallback functions instead. + +------------------------------------------------------------------- +Wed Nov 23 14:01:34 UTC 2022 - schubi@suse.com + +- Update to version 0.4.9: + * libeconf.h: added missing sys/types.h header (#171) + * new API calls: econf_readFileWithCallback, + econf_readDirsWithCallback, econf_readDirsHistoryWithCallback (#172) + * Checking NULL comment parameter in the parsing functions. + +------------------------------------------------------------------- +Mon Nov 14 13:47:26 UTC 2022 - schubi@suse.com + +- Update to version 0.4.8+git20221114.7ff7704: + * Parsing files which are containing keys only (#170) + All delimiters are allowed now : "", " =", " ", "=". But the + user should use "" in order to be distinct. + * /usr/etc/shells.d/ will not be parsed if + /etc/shells.d/ is defined too. + * Lto build fixed (#168) + * New calls: econf_comment_tag, econf_delimiter_tag, econf_set_comment_tag, + econf_set_delimiter_tag + * Checking UID,GroupID, permissions,... of the parsed files (#165) + New calls: econf_requireOwner, econf_requireGroup, econf_requirePermissions, + econf_followSymlinks + * Ignoring Group without brackets; Do not hold brackets in the internal data structure. (#164) + * Error handling improved for nums and booleans (#163) + +------------------------------------------------------------------- +Wed Apr 27 22:10:35 UTC 2022 - schubi@suse.com + +- Update to version 0.4.6+git20220427.3016f4e: + * econftool: + ** Parsing error: Reporting file and line nr. + ** --delimeters=spaces Taking all kind of spaces for delimiter + * libeconf: + Fixed bsc#1198165: Parsing files correctly which have space characters + AND none space characters as delimiters. + +------------------------------------------------------------------- +Wed Apr 06 21:23:48 UTC 2022 - schubi@suse.com + +- Update to version 0.4.5+git20220406.c9658f2: + * econftool: + ** New call "syntax" for checking the configuration files only. + Returns an error string with line number if an error occurs. + ** New options "--comment" and "--delimeters" + ** Parsing one file only if needed. + +------------------------------------------------------------------- +Tue Jan 04 11:22:44 UTC 2022 - schubi@suse.com + +- Update to version 0.4.4+git20220104.962774f: + * Fixed i586 build (#158) + +------------------------------------------------------------------- +Tue Jan 04 10:27:32 UTC 2022 - schubi@suse.com + +- Update to version 0.4.2+git20220104.5dfd69d: + * Reading numbers with different bases (e.g. oktal) (bsc#1193632) (#157) + +------------------------------------------------------------------- +Thu Nov 11 14:22:24 UTC 2021 - schubi@suse.com + +- Update to version libeconf-0.4.2+git20211111.c7a2c52: + * CMake fixes regarding document installation. + * Fixed different issues while writing string values to file. + * Writing comments to file too. + * Fixed memory leaks. + * Fixed crash while merging values. + +------------------------------------------------------------------- +Fri Jul 9 07:16:22 UTC 2021 - schubi + +- 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 schubi@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 + +- Update to version 0.4.0+git20210707.537a8a: + * Fixed resource leaks found by Iker Pedrosa. + +------------------------------------------------------------------- +Thu Apr 15 10:31:02 UTC 2021 - schubi@suse.com + +- Removed doxygen from build requires. + +------------------------------------------------------------------- +Tue Apr 13 20:25:40 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210413.fdb8025: + * Installing man pages via meson. (#147) + +------------------------------------------------------------------- +Mon Apr 12 19:10:54 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210412.1513a26: + * Added econftool cat option (#146) + * new API call: econf_readDirsHistory (showing ALL locations) + * new API call: econf_getPath (absolute path of the configuration file) + +------------------------------------------------------------------- +Thu Apr 08 17:10:59 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210408.6d33e5e: + * 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. + +------------------------------------------------------------------- +Thu Oct 22 12:16:36 UTC 2020 - Ludwig Nussel + +- explicitly BuildRequire: pkgconfig for /usr/lib/rpm/pkgconfigdeps.sh + On TW it's pulled in implicitly by libxcrypt-devel which is not the + case on 15.2 + +------------------------------------------------------------------- +Fri Jul 10 21:15:09 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.8+git20200710.5126fff: + * Add CMake build scripts, remove autotools support + * Move C++ ABI compatibility section + +------------------------------------------------------------------- +Fri Jun 05 15:57:26 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.7+git20200605.c67ef9a: + * Fix build on i586 + +------------------------------------------------------------------- +Thu Jun 04 11:05:02 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.6+git20200529.276359f: + * Package meson files with autotools + * Use newer version of actions/checkout + * Add actions for meson + * Create meson.yml + * Use meson source root for tests configuration files + * Add additional compiler warnings + * First useable meson build support including unit tests + * Add global options, build with pie and GNU_SOURCE + * Fix name of library, add example binary + * add support for meson + * Add C++ compatibility + * Add test case for crash with empty value keys + +------------------------------------------------------------------- +Mon Feb 03 16:21:51 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.5+git20200203.3144b69: + * Release version 0.3.5 + * Use float.h instead of obsolete gnuism values.h + * Remove gnuism (strdupa) + * Check for empty value (NULL pointer) before calling strdup. + +------------------------------------------------------------------- +Tue Jan 21 14:53:44 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.4+git20200121.febebf2: + * Release version 0.3.4 + * Fix buffer overflow in econf_readDirs + * Fix parsing of quoted strings, and values starting with delimiters + * tests: add test for quoted strings + * tests: tst-configdirs5: fix config dir paths + +------------------------------------------------------------------- +Mon Oct 28 12:11:12 UTC 2019 - iforster@suse.com + +- Update to version 0.3.3+git20191028.3ac14ce: + * Release version 0.3.3 + * Reset *key_file to NULL after free + +------------------------------------------------------------------- +Thu Sep 26 17:43:54 UTC 2019 - kukuk@suse.com + +- Update to version 0.3.2+git20190926.fea4a03: + * Release version 0.3.2 + * Fix merging an empty file (#105) + * Add test cases for merge function + +------------------------------------------------------------------- +Tue Sep 24 12:52:52 UTC 2019 - rbrown@suse.com + +- Update to version 0.3.1+git20190924.822cf5b: + * release version 0.3.1 + * Set delimiter in readFile + * Change parser interface to store file name and line numbers per key + * Update ccpp.yml + +------------------------------------------------------------------- +Fri Sep 06 10:53:32 UTC 2019 - kukuk@suse.de + +- Update to version 0.3.0+git20190906.0e60a88: + * Ensure LICENSE, README, and TODO are included in the release tarball + * Rewrite set*ValueNum functions to avoid libm usage and add error checking + * Move src/*.c to lib and release version 0.3.0 + +------------------------------------------------------------------- +Thu Sep 05 08:54:20 UTC 2019 - kukuk@suse.de + +- Update to version 0.3.0+git20190905.0ca8fe2: + * Merge doc changes from parlt91 (pull rq#73) + * Implement econf_get*ValueDef functions: if key is not found, a provided default is returned. + * Differentiate between no value provided and empty value provided + * Remove obsolete check for comments + * Enhance and adjust test cases + * Remove obsolete check for comments + +------------------------------------------------------------------- +Wed Sep 04 11:13:09 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.03fa5b4: + * Enhance and adjust test cases + * Update ccpp.yml + * Update ccpp.yml + * Update ccpp.yml + +------------------------------------------------------------------- +Wed Sep 04 10:17:25 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.989df9f: + * Remove debug printf + +------------------------------------------------------------------- +Wed Sep 04 09:58:12 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.c9c1820: + * Implement alternate file parser solving the problems with group entry detection. + * Add new parse error error code + * Bool values read from a config file are not sanitzied, so we need to do that in the getBoolValueNum function, too. + * Only use ..d directories + * Release version 0.2.0 + * Add an explanation about this project. + * Check for NULL pointer arguments + * Fix error return value + * Fix typo in comment + * Add test case for reading login.defs with data from util-linux test suite + +------------------------------------------------------------------- +Mon Sep 02 13:18:01 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190902.dd17c11: + * Fix int64 variables on 32bit architectures + +------------------------------------------------------------------- +Sat Aug 31 18:28:13 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190831.fb7c1bb: + * Rewrite econf_readDirs - don't assume suffix is ".conf" - Read files and directories in correct order + +------------------------------------------------------------------- +Fri Aug 30 09:43:08 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190830.04ba053: + * Make clear that the API and ABI of the three functions econf_newIniFile, econf_newKeyFile, econf_writeFile are not stable yet. + * Fix getGroups argument types and add several test cases for this. + * Fix cppcheck and compiler warnings + +------------------------------------------------------------------- +Thu Aug 29 14:05:38 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190829.a1479b1: + * Make comment argument an array, so that we can support more than one comment character in the future. + * Change the API + * Fix size_t as return value of getc() + +------------------------------------------------------------------- +Thu Aug 29 10:53:04 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190829.209219e: + * Convert all functions to new error API + * Convert econf_newKeyFile provide the error via return code + +------------------------------------------------------------------- +Wed Aug 28 13:42:50 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190828.74eeb32: + * Fix tst-arguments3 and tst-arguments4 and only use error return code. + * Bug fixes for new API + * Change API of econf_get* and econf_set* functions to return error code direct. + * Fix some compiler warnings + * Prevent possible crash when parsing 0xFF + * Add "--enable-compiler-warnings" option to enable much more GCC compiler warnings + * Fix more cppcheck warnings + * Fix github actions build + * Update bin/Makefile.am to work with Asan + * Add missing tst-getconfdirs4-data to EXTRA_DIST + * Fix some cppcheck warnings + * Don't ignore getline return value + * Add free for getStringValue in tst-group1 + * Remove XFAIL for tst-groups1 + * Update example.c to free after getStringValue + * Add addbrackets for getValue functions + * tst-getconfdirs4: make sure, only a file in /etc/ and not in /usr/etc works, too. + +------------------------------------------------------------------- +Tue Aug 27 12:19:45 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.5ed5492: + * Mark all input char pointer as const in the official API + +------------------------------------------------------------------- +Tue Aug 27 11:49:42 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.b243e6c: + * getStringValueNum returns a newly allocated string or NULL in error case. + +------------------------------------------------------------------- +Tue Aug 27 09:47:12 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.8374759: + * Fix missing return + * Remove XFAIL for tst-setgetvalues1 + * Fix representation of float and double values + * Add preliminary test case for group handling + * NULL terminate string returned by addbrackets + * Fix addbrackets function + +------------------------------------------------------------------- +Mon Aug 26 19:09:25 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190826.99b6bf3: + * Add more "const". + * Fix setString and setBoolean + * Add test suite which sets and gets all possible kind of types. Some are failing, so mark this test as XFAIL. + * Start marking some string arguments/results as const + * Optimize some strdup away + * Mark econf_write_key_file as ALPHA as the API is not stable + +------------------------------------------------------------------- +Mon Aug 26 11:43:16 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190826.9e69003: + * Update ccpp.yml + * Add --enable-compiler-checks option to configure, enables AddressSanitizer + * Fix printf format directive + * Rework set*Value functions for error checking and error handling + * Add tst-getconfdirs3: verify we can load original file without local changes + * Error handling for econf_getGroups and econf_getKeys + * More errorreporting changes + * Fix make distcheck/don't mess around with libtool install/uninstall, this breaks to much other stuff. + * Autotools cleanup and fixes + * Fix logindefs1 test case + +------------------------------------------------------------------- +Fri Aug 23 18:56:13 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190823.09a8f2e: + * Fix buffer overlow of realpath + +------------------------------------------------------------------- +Fri Aug 23 15:58:37 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190823.acd8cdf: + * Update ccpp.yml + * Fix crash in strcmp, if strchr returns NULL + * Add error reporting to econf_merge_key_files and adjust the depending code. + * setStringValue return NULL on error/key not found + * Add framework for correct error reporting + * Disable searching through XDG dirs for now + * Add test cases for econf_get_conf_from_dirs + * Update comment setValue -> econf_setValue + * Update test cases to use econf_destroy + * Replace econf_afree with econf_destroy in example + * Add _generic macro to free memory of econf_ functions + * Add tst-merge2 to .gitignore + * Fix pointer arithmetic + * Adjust Makefiles and code to make "make distcheck" working + +------------------------------------------------------------------- +Thu Aug 22 19:33:21 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190822.bb9702b: + * Ignore /usr file if /etc exists when merging + * Add NULL value handling + * Update merge example + * Rework merge_functionality + * Use deep copies instead of pointers for merged files + * Replace [] with KEY_FILE_NULL_VALUE + * Refactor getfilecontent functions + * Remove cmake files + * Fix test cases + * Update libeconf.c + * Change License from LGPL-2.1 to MIT + * libeconf.pc should only be deleted on distclean, not normal clean + * Fix delim argument + * Add more test cases for login.defs and wrong arguments + * Link libeconf against libm, so that it is enough to link an application against libeconf and developers don't need to bother with other dependencies + * Add autogen.sh, which calls autoconf/automake/libtool in the correct order to create the configure script + +------------------------------------------------------------------- +Tue Aug 20 13:04:55 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190820.742af8c: + * Remove accidental .swp file + * Update example with conf.d directory + * Remove regex, replace with strchr(delim, ch) + * Add symbol versioning Don't ignore complete lib directory + * Include all headers in tar archive + * Don't define our own errno + * Remove wrong commit + * Add some basic tests + +------------------------------------------------------------------- +Tue Aug 20 12:59:47 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190807.7aedb57: + * Refactor getfilecontent functions + * Update example file + * Add econf prefix to public API functions + * Add cmake targets for debugging + * Fix build with cmake + * Fix build with autotools + * Move Key_File allocation from the stack to the heap + * Move Key_File create functions to libeconf.c + * Move destroy functions from helpers.c to libeconf.c + * Add macro to set supported types generic. + +------------------------------------------------------------------- +Sat Aug 17 11:53:48 UTC 2019 - Thorsten Kukuk + +- Initial version diff --git a/libeconf.spec b/libeconf.spec new file mode 100644 index 0000000..4413a1e --- /dev/null +++ b/libeconf.spec @@ -0,0 +1,105 @@ +# +# spec file for package libeconf +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define lname libeconf0 +Name: libeconf +Version: 0.7.3 +Release: 0 +Summary: Enhanced config file parser ala systemd +License: LGPL-2.1-or-later +Group: Development/Libraries/C and C++ +URL: https://github.com/openSUSE/libeconf +Source: libeconf-%{version}.tar.xz +Source2: baselibs.conf +BuildRequires: meson +# for /usr/lib/rpm/pkgconfigdeps.sh +BuildRequires: pkgconfig + +%description +Enhanced config file parser, which merges config files placed +in several locations into one. + +%package -n %{lname} +Summary: Enhanced config file parser ala systemd +Group: Development/Libraries/C and C++ + +%description -n %{lname} +Enhanced config file parser, which merges config files placed +in several locations into one. + +%package devel +Summary: Development files for libeconf +Group: Development/Libraries/C and C++ +Requires: %{lname} = %{version} + +%description devel +This package contains all necessary include files and libraries needed +to develop applications that needs to read configuration files from +different locations. + +%package devel-static +Summary: Static library for libeconf +Group: Development/Libraries/C and C++ +Requires: libeconf-devel = %{version} + +%description devel-static +This package contains libeconf.a static library. + +%package utils +Summary: Command line interface for libeconf +Group: System/Base +Requires: %{lname} = %{version} + +%description utils +This package contains tools for handling configuration files in e.g. /usr/etc +and /etc. + +%prep +%setup -q + +%build +%meson +%meson_build + +%install +%meson_install + +%check +%meson_test + +%post -n %{lname} -p /sbin/ldconfig +%postun -n %{lname} -p /sbin/ldconfig + +%files -n %{lname} +%license LICENSE +%{_libdir}/libeconf.so.* + +%files devel-static +%{_libdir}/libeconf.a + +%files devel +%{_includedir}/*.h +%{_libdir}/libeconf.so +%{_libdir}/pkgconfig/libeconf.pc +%{_mandir}/man3/*.3%{?ext_man} + +%files utils +%{_bindir}/econftool +%{_mandir}/man8/econftool.8%{?ext_man} + +%changelog diff --git a/python-libeconf.changes b/python-libeconf.changes new file mode 100644 index 0000000..39ea36b --- /dev/null +++ b/python-libeconf.changes @@ -0,0 +1,128 @@ +------------------------------------------------------------------- +Wed Sep 18 11:16:34 UTC 2024 - schubi@suse.com + +- Update to version 0.7.3: + * Fixed: econf_readDirs crashes if one of the paths is NULL (#211) + * Handle groups correctly which do not have any key entry. + * Added links to man page. E.g. "man econf_readConfig" is working now. + * Simplify snprintf call + * Remove unused functions and reduce variable visibility (#213) + * Fix typos (#212) + +------------------------------------------------------------------- +Fri Jun 14 07:26:15 UTC 2024 - schubi@suse.com + +- Update to version 0.7.2: + * Do not check errno while float conversion. This is a false + alarm for S390 and PPC (#210). + +------------------------------------------------------------------- +Mon Jun 10 07:36:06 UTC 2024 - schubi@suse.com + +- Update to version 0.7.1: +* Improved error handling while parsing values with the wrong format. + Added new return value ECONF_VALUE_CONVERSION_ERROR. +* Setting parsing options via econf_file struct. + see econf_newKeyFile_with_options. These options will be used by + econf_readConfig and econf_readConfigWithCallback. + Following options are supported: + JOIN_SAME_ENTRIES (default 0) + Parsed entries with the same name will not be replaces but + will be joined to one entry. + PYTHON_STYLE (default 0) + E.G. Identations will be handled like multiline entries. + PARSING_DIRS (default /usr/etc/:/run:/etc) + List of directories from which the configuration files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g.: "PARSING_DIRS=/usr/etc/:/run:/etc" + CONFIG_DIRS (default ) + List of directory structures (with order) which describes the directories + in which the files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g. with the given list: "CONFIG_DIRS=.conf.d:.d" files in + following directories will be parsed: + "/.conf.d/" + "/.d/" + "//" +* CAUTION: From now on every econf_file element MUST be intialized if + econf_readConfig and econf_readConfigWithCallback is used. + Either with NULL or: + econf_file *key_file = NULL; + if (error = econf_newKeyFile_with_options(&key_file, "PYTHON_STYLE=1")) + { + fprintf (stderr, "ERROR: couldn't create new key file: %s\n", + econf_errString(error)); + return 1; + } + error = econf_readConfig (&key_file, + "foo", + "/usr/lib", + "example", + "conf", + "=", "#"); + +------------------------------------------------------------------- +Tue Jun 04 11:08:28 UTC 2024 - schubi@suse.com + +- Update to version 0.7.0: + * Defining manual parsing directories (#209) + * parsing config files in python style + * econf_readConfig: set usr_subdir to empty string if it is NULL + * Fix static analyzer detected issues (#202) + * comment string can be in the parsed value which is defined with quotes (#207) + * tst-comments2: comment sign in quoted string (#205) + * Setting options via new econf_newKeyFile_with_options. (#206) + +------------------------------------------------------------------- +Fri Apr 12 10:47:39 UTC 2024 - schubi@suse.com + +- Update to version 0.6.3: + * Fix build with musl libc on ppc64le (#198) + * Creating static library with new package libeconf-devel-static. + This is needed for building package util-linux and btrfsprogs. + +------------------------------------------------------------------- +Wed Mar 06 11:02:00 UTC 2024 - schubi@suse.com + +- Update to version 0.6.2: + * Fix static analyzer detected issues (#196) + +------------------------------------------------------------------- +Mon Jan 22 14:30:16 UTC 2024 - schubi@suse.com + +- Update to version 0.6.1: + * reading lines which have a length greater than BUFSIZE (#195) + * Improved data quote check in read_file (#193) + +------------------------------------------------------------------- +Mon Nov 13 07:55:36 UTC 2023 - Alberto Planas Dominguez + +- Do not requires the library for the documentation + +------------------------------------------------------------------ +Wed Nov 8 12:45:07 UTC 2023 - Alberto Planas Dominguez + +- Fix version comparison operator +- Remove explicit python3-base requirement + +------------------------------------------------------------------- +Fri Nov 03 16:44:38 UTC 2023 - schubi@suse.com + +- Update to version 1.1.1: + * Supporting Linux Userspace API (UAPI) Group + chapter "Configuration Files Specification". + See: https://uapi-group.org/specifications/specs/ + configuration_files_specification/ + +------------------------------------------------------------------- +Fri Nov 3 10:12:29 UTC 2023 - Alberto Planas Dominguez + +- Support only Python >= 3.10. PEP 604 is used for union types + +------------------------------------------------------------------- +Fri Oct 27 08:42:26 UTC 2023 - Nico Krapp + +- Version 1.1.0 + * Added tests + * Support all functions form libeconf 0.5.2 + * Bug fixes diff --git a/python-libeconf.spec b/python-libeconf.spec new file mode 100644 index 0000000..33d67a8 --- /dev/null +++ b/python-libeconf.spec @@ -0,0 +1,68 @@ +# +# spec file for package python-libeconf +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +%define skip_python39 1 +Name: python-libeconf +Version: 0.7.3 +Release: 0 +Summary: Python bindings for libeconf +License: LGPL-2.1-or-later +Group: Development/Languages/Python +URL: https://github.com/openSUSE/libeconf +Source: libeconf-%{version}.tar.xz +BuildArch: noarch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: python-rpm-macros +Requires: libeconf0 = %{version} +Suggests: python-libeconf-doc = %{version} +%python_subpackages + +%description +Python bindings for libeconf + +%package -n python-libeconf-doc +Summary: Man page for python-libeconf + +%description -n python-libeconf-doc +Man page for python-lineconf + +%prep +%autosetup -n libeconf-%{version}/bindings/python3 + +%build +%pyproject_wheel + +%install +%pyproject_install +mkdir -p %{buildroot}/usr/share/man/man3 +cp docs/python-libeconf.3 %{buildroot}%{_mandir}/man3/ + +%files %python_files +%{python_sitelib} +# The cache is not always present +#pycache_only %{python_sitelib}/__pycache__ + +%files -n python-libeconf-doc +%defattr(-,root,root) +%{_mandir}/man3/*python-libeconf* + +%changelog -- 2.51.1 From 1e3c8e79aa3e22766f5dcc24d0de7ffe3c0c955984af8c223554c76585f9efcd Mon Sep 17 00:00:00 2001 From: Stefan Schubert Date: Thu, 26 Sep 2024 11:23:33 +0000 Subject: [PATCH 2/9] - Update to version 0.7.4: * Fixed memory leaks (#219) * Fixed: econf_readDirs crashes if one of the paths is NULL (#211) * Added links to man page. E.g. "man econf_readConfig" is working now. * Handle groups correctly which do not have any key entry. - Update to version 0.7.4: * fixed memory leaks (#219) OBS-URL: https://build.opensuse.org/package/show/devel:microos/libeconf?expand=0&rev=34 --- .gitattributes | 23 ++ .gitignore | 1 + _multibuild | 4 + _service | 15 + _servicedata | 6 + baselibs.conf | 1 + libeconf-0.7.2.tar.xz | 3 + libeconf-0.7.3.tar.xz | 3 + libeconf-0.7.4.tar.xz | 3 + libeconf.changes | 615 ++++++++++++++++++++++++++++++++++++++++ libeconf.spec | 105 +++++++ python-libeconf.changes | 134 +++++++++ python-libeconf.spec | 68 +++++ 13 files changed, 981 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 _service create mode 100644 _servicedata create mode 100644 baselibs.conf create mode 100644 libeconf-0.7.2.tar.xz create mode 100644 libeconf-0.7.3.tar.xz create mode 100644 libeconf-0.7.4.tar.xz create mode 100644 libeconf.changes create mode 100644 libeconf.spec create mode 100644 python-libeconf.changes create mode 100644 python-libeconf.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..e250e09 --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + +python-libeconf + + diff --git a/_service b/_service new file mode 100644 index 0000000..cb21d61 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + 0.5.0 + @PARENT_TAG@ + v(\d+\.\d+\.\d+) + https://github.com/openSUSE/libeconf.git + git + enable + + + xz + *.tar + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..e1ff98c --- /dev/null +++ b/_servicedata @@ -0,0 +1,6 @@ + + + https://github.com/openSUSE/libeconf.git + b66629fe913fe73b90b4408093635787827b6485 + + \ No newline at end of file diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..0f76614 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1 @@ +libeconf0 diff --git a/libeconf-0.7.2.tar.xz b/libeconf-0.7.2.tar.xz new file mode 100644 index 0000000..c53016a --- /dev/null +++ b/libeconf-0.7.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d25ce67bba2541e19f895a51faa7b87dba56426b48789ecbe2c937581ea19424 +size 176696 diff --git a/libeconf-0.7.3.tar.xz b/libeconf-0.7.3.tar.xz new file mode 100644 index 0000000..ba802f0 --- /dev/null +++ b/libeconf-0.7.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae5257fd75ca24f7326d33448d5f4ebe9052b76006e08743731684dec0941bb4 +size 178304 diff --git a/libeconf-0.7.4.tar.xz b/libeconf-0.7.4.tar.xz new file mode 100644 index 0000000..c208899 --- /dev/null +++ b/libeconf-0.7.4.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88096729ff71b9d372ba211bb5a93e4aa934c2484f3fab8adacd90f2adc8f90b +size 178320 diff --git a/libeconf.changes b/libeconf.changes new file mode 100644 index 0000000..b3ec41d --- /dev/null +++ b/libeconf.changes @@ -0,0 +1,615 @@ +------------------------------------------------------------------- +Thu Sep 26 11:08:13 UTC 2024 - schubi@suse.com + +- Update to version 0.7.4: + * Fixed memory leaks (#219) + * Fixed: econf_readDirs crashes if one of the paths is NULL (#211) + * Added links to man page. E.g. "man econf_readConfig" is working now. + * Handle groups correctly which do not have any key entry. + +------------------------------------------------------------------- +Wed Sep 18 11:16:34 UTC 2024 - schubi@suse.com + +- Update to version 0.7.3: + * Groups handled in an own list (#218) + * Add econftool as dependency of its tests + * Simplify snprintf call + * Remove unused functions and reduce variable visibility (#213) + * Fix typos (#212) + +------------------------------------------------------------------- +Fri Jun 14 07:26:15 UTC 2024 - schubi@suse.com + +- Update to version 0.7.2: + * Do not check errno while float conversion. This is a false + alarm for S390 and PPC (#210) + +------------------------------------------------------------------- +Mon Jun 10 07:36:06 UTC 2024 - schubi@suse.com + +- Update to version 0.7.1: +* Improved error handling while parsing values with the wrong format. + Added new return value ECONF_VALUE_CONVERSION_ERROR. +* Setting parsing options via econf_file struct. + see econf_newKeyFile_with_options. These options will be used by + econf_readConfig and econf_readConfigWithCallback. + Following options are supported: + JOIN_SAME_ENTRIES (default 0) + Parsed entries with the same name will not be replaces but + will be joined to one entry. + PYTHON_STYLE (default 0) + E.G. Identations will be handled like multiline entries. + PARSING_DIRS (default /usr/etc/:/run:/etc) + List of directories from which the configuration files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g.: "PARSING_DIRS=/usr/etc/:/run:/etc" + CONFIG_DIRS (default ) + List of directory structures (with order) which describes the directories + in which the files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g. with the given list: "CONFIG_DIRS=.conf.d:.d" files in + following directories will be parsed: + "/.conf.d/" + "/.d/" + "//" +* CAUTION: From now on every econf_file element MUST be intialized if + econf_readConfig and econf_readConfigWithCallback is used. + Either with NULL or: + econf_file *key_file = NULL; + if (error = econf_newKeyFile_with_options(&key_file, "PYTHON_STYLE=1")) + { + fprintf (stderr, "ERROR: couldn't create new key file: %s\n", + econf_errString(error)); + return 1; + } + error = econf_readConfig (&key_file, + "foo", + "/usr/lib", + "example", + "conf", + "=", "#"); + +------------------------------------------------------------------- +Tue Jun 04 11:08:28 UTC 2024 - schubi@suse.com + +- Update to version 0.7.0: + * Defining manual parsing directories (#209) + * parsing config files in python style + * econf_readConfig: set usr_subdir to empty string if it is NULL + * Fix static analyzer detected issues (#202) + * comment string can be in the parsed value which is defined with quotes (#207) + * tst-comments2: comment sign in quoted string (#205) + * Setting options via new econf_newKeyFile_with_options. (#206) + +------------------------------------------------------------------- +Fri Apr 12 10:47:39 UTC 2024 - schubi@suse.com + +- Update to version 0.6.3: + * Fix build with musl libc on ppc64le (#198) + * Creating static library with new package libeconf-devel-static. + This is needed for building package util-linux and btrfsprogs. + +------------------------------------------------------------------- +Wed Mar 06 11:02:00 UTC 2024 - schubi@suse.com + +- Update to version 0.6.2: + * version 0.6.2 + * Fix static analyzer detected issues (#196) + +------------------------------------------------------------------- +Mon Jan 22 14:30:16 UTC 2024 - schubi@suse.com + +- Update to version 0.6.1: + * reading lines which have a length greater than BUFSIZE (#195) + * Improved data quote check in read_file (#193) + +------------------------------------------------------------------- +Wed Nov 08 12:20:34 UTC 2023 - schubi@suse.com + +- Update to version 0.6.0: + * Supporting Linux Userspace API (UAPI) Group + chapter "Configuration Files Specification". + See: https://uapi-group.org/specifications/specs/ + configuration_files_specification/ + +------------------------------------------------------------------- +Fri Nov 03 16:44:38 UTC 2023 - schubi@suse.com + +- Update to version 0.5.3: + * Added bindings for python3 and C# + +------------------------------------------------------------------- +Thu Oct 26 14:56:30 UTC 2023 - nico.krapp@suse.com + +- Update to version 0.5.2: + * Add python bindings (#188) + * docu version 0.5.2 + * Fix test (#185) + * Plug memory leak (#186) + +------------------------------------------------------------------- +Wed Sep 6 14:38:13 UTC 2023 - Stefan Schubert + +- Additional info for version 0.5.2: + * Fixed a stack-buffer-overflow vulnerability in "econf_writeFile" + function. (CVE-2023-30078, CVE-2023-32181, bsc#1211078) + * Fixed a stack-buffer-overflow vulnerability in "read_file" + function. (CVE-2023-30079, CVE-2023-22652, bsc#1211078) + +------------------------------------------------------------------- +Fri Mar 24 15:12:18 UTC 2023 - schubi@suse.com + +- Update to version 0.5.2: + * Fixed build for aarch64 and gcc13. + * Making the output verbose when a test fails. + * Fixed a stack-buffer-overflow vulnerability in "econf_writeFile" + function. + * Fixed a stack-buffer-overflow vulnerability in "read_file" + function. + * Added new feature: econf_set_conf_dirs (const char **dir_postfix_list) + Sets a list of directory structures (with order) which describes + the directories in which the files have to be parsed. + E.G. with the given list: {"/conf.d/", ".d/", "/", NULL} files in following + directories will be parsed: + "/..d/" + "//conf.d/" + "/.d/" + "//" + The entry "/..d/" will be added + automatically. + * General code cleanup. + +------------------------------------------------------------------- +Thu Jan 19 15:58:59 UTC 2023 - schubi@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) + +------------------------------------------------------------------- +Fri Dec 02 14:13:24 UTC 2022 - schubi@suse.com + +- Update to version 0.5.0: + * API calls econf_read*WithCallback supporting a general (void *) + argument for user defined data with which the callback function is + called. + * Tagged following functions deprecated: + econf_requireOwner, econf_requireGroup, econf_requirePermissions, + econf_followSymlinks, econf_reset_security_settings + Use one of the econf_read*WithCallback functions instead. + +------------------------------------------------------------------- +Wed Nov 23 14:01:34 UTC 2022 - schubi@suse.com + +- Update to version 0.4.9: + * libeconf.h: added missing sys/types.h header (#171) + * new API calls: econf_readFileWithCallback, + econf_readDirsWithCallback, econf_readDirsHistoryWithCallback (#172) + * Checking NULL comment parameter in the parsing functions. + +------------------------------------------------------------------- +Mon Nov 14 13:47:26 UTC 2022 - schubi@suse.com + +- Update to version 0.4.8+git20221114.7ff7704: + * Parsing files which are containing keys only (#170) + All delimiters are allowed now : "", " =", " ", "=". But the + user should use "" in order to be distinct. + * /usr/etc/shells.d/ will not be parsed if + /etc/shells.d/ is defined too. + * Lto build fixed (#168) + * New calls: econf_comment_tag, econf_delimiter_tag, econf_set_comment_tag, + econf_set_delimiter_tag + * Checking UID,GroupID, permissions,... of the parsed files (#165) + New calls: econf_requireOwner, econf_requireGroup, econf_requirePermissions, + econf_followSymlinks + * Ignoring Group without brackets; Do not hold brackets in the internal data structure. (#164) + * Error handling improved for nums and booleans (#163) + +------------------------------------------------------------------- +Wed Apr 27 22:10:35 UTC 2022 - schubi@suse.com + +- Update to version 0.4.6+git20220427.3016f4e: + * econftool: + ** Parsing error: Reporting file and line nr. + ** --delimeters=spaces Taking all kind of spaces for delimiter + * libeconf: + Fixed bsc#1198165: Parsing files correctly which have space characters + AND none space characters as delimiters. + +------------------------------------------------------------------- +Wed Apr 06 21:23:48 UTC 2022 - schubi@suse.com + +- Update to version 0.4.5+git20220406.c9658f2: + * econftool: + ** New call "syntax" for checking the configuration files only. + Returns an error string with line number if an error occurs. + ** New options "--comment" and "--delimeters" + ** Parsing one file only if needed. + +------------------------------------------------------------------- +Tue Jan 04 11:22:44 UTC 2022 - schubi@suse.com + +- Update to version 0.4.4+git20220104.962774f: + * Fixed i586 build (#158) + +------------------------------------------------------------------- +Tue Jan 04 10:27:32 UTC 2022 - schubi@suse.com + +- Update to version 0.4.2+git20220104.5dfd69d: + * Reading numbers with different bases (e.g. oktal) (bsc#1193632) (#157) + +------------------------------------------------------------------- +Thu Nov 11 14:22:24 UTC 2021 - schubi@suse.com + +- Update to version libeconf-0.4.2+git20211111.c7a2c52: + * CMake fixes regarding document installation. + * Fixed different issues while writing string values to file. + * Writing comments to file too. + * Fixed memory leaks. + * Fixed crash while merging values. + +------------------------------------------------------------------- +Fri Jul 9 07:16:22 UTC 2021 - schubi + +- 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 schubi@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 + +- Update to version 0.4.0+git20210707.537a8a: + * Fixed resource leaks found by Iker Pedrosa. + +------------------------------------------------------------------- +Thu Apr 15 10:31:02 UTC 2021 - schubi@suse.com + +- Removed doxygen from build requires. + +------------------------------------------------------------------- +Tue Apr 13 20:25:40 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210413.fdb8025: + * Installing man pages via meson. (#147) + +------------------------------------------------------------------- +Mon Apr 12 19:10:54 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210412.1513a26: + * Added econftool cat option (#146) + * new API call: econf_readDirsHistory (showing ALL locations) + * new API call: econf_getPath (absolute path of the configuration file) + +------------------------------------------------------------------- +Thu Apr 08 17:10:59 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210408.6d33e5e: + * 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. + +------------------------------------------------------------------- +Thu Oct 22 12:16:36 UTC 2020 - Ludwig Nussel + +- explicitly BuildRequire: pkgconfig for /usr/lib/rpm/pkgconfigdeps.sh + On TW it's pulled in implicitly by libxcrypt-devel which is not the + case on 15.2 + +------------------------------------------------------------------- +Fri Jul 10 21:15:09 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.8+git20200710.5126fff: + * Add CMake build scripts, remove autotools support + * Move C++ ABI compatibility section + +------------------------------------------------------------------- +Fri Jun 05 15:57:26 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.7+git20200605.c67ef9a: + * Fix build on i586 + +------------------------------------------------------------------- +Thu Jun 04 11:05:02 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.6+git20200529.276359f: + * Package meson files with autotools + * Use newer version of actions/checkout + * Add actions for meson + * Create meson.yml + * Use meson source root for tests configuration files + * Add additional compiler warnings + * First useable meson build support including unit tests + * Add global options, build with pie and GNU_SOURCE + * Fix name of library, add example binary + * add support for meson + * Add C++ compatibility + * Add test case for crash with empty value keys + +------------------------------------------------------------------- +Mon Feb 03 16:21:51 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.5+git20200203.3144b69: + * Release version 0.3.5 + * Use float.h instead of obsolete gnuism values.h + * Remove gnuism (strdupa) + * Check for empty value (NULL pointer) before calling strdup. + +------------------------------------------------------------------- +Tue Jan 21 14:53:44 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.4+git20200121.febebf2: + * Release version 0.3.4 + * Fix buffer overflow in econf_readDirs + * Fix parsing of quoted strings, and values starting with delimiters + * tests: add test for quoted strings + * tests: tst-configdirs5: fix config dir paths + +------------------------------------------------------------------- +Mon Oct 28 12:11:12 UTC 2019 - iforster@suse.com + +- Update to version 0.3.3+git20191028.3ac14ce: + * Release version 0.3.3 + * Reset *key_file to NULL after free + +------------------------------------------------------------------- +Thu Sep 26 17:43:54 UTC 2019 - kukuk@suse.com + +- Update to version 0.3.2+git20190926.fea4a03: + * Release version 0.3.2 + * Fix merging an empty file (#105) + * Add test cases for merge function + +------------------------------------------------------------------- +Tue Sep 24 12:52:52 UTC 2019 - rbrown@suse.com + +- Update to version 0.3.1+git20190924.822cf5b: + * release version 0.3.1 + * Set delimiter in readFile + * Change parser interface to store file name and line numbers per key + * Update ccpp.yml + +------------------------------------------------------------------- +Fri Sep 06 10:53:32 UTC 2019 - kukuk@suse.de + +- Update to version 0.3.0+git20190906.0e60a88: + * Ensure LICENSE, README, and TODO are included in the release tarball + * Rewrite set*ValueNum functions to avoid libm usage and add error checking + * Move src/*.c to lib and release version 0.3.0 + +------------------------------------------------------------------- +Thu Sep 05 08:54:20 UTC 2019 - kukuk@suse.de + +- Update to version 0.3.0+git20190905.0ca8fe2: + * Merge doc changes from parlt91 (pull rq#73) + * Implement econf_get*ValueDef functions: if key is not found, a provided default is returned. + * Differentiate between no value provided and empty value provided + * Remove obsolete check for comments + * Enhance and adjust test cases + * Remove obsolete check for comments + +------------------------------------------------------------------- +Wed Sep 04 11:13:09 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.03fa5b4: + * Enhance and adjust test cases + * Update ccpp.yml + * Update ccpp.yml + * Update ccpp.yml + +------------------------------------------------------------------- +Wed Sep 04 10:17:25 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.989df9f: + * Remove debug printf + +------------------------------------------------------------------- +Wed Sep 04 09:58:12 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.c9c1820: + * Implement alternate file parser solving the problems with group entry detection. + * Add new parse error error code + * Bool values read from a config file are not sanitzied, so we need to do that in the getBoolValueNum function, too. + * Only use ..d directories + * Release version 0.2.0 + * Add an explanation about this project. + * Check for NULL pointer arguments + * Fix error return value + * Fix typo in comment + * Add test case for reading login.defs with data from util-linux test suite + +------------------------------------------------------------------- +Mon Sep 02 13:18:01 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190902.dd17c11: + * Fix int64 variables on 32bit architectures + +------------------------------------------------------------------- +Sat Aug 31 18:28:13 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190831.fb7c1bb: + * Rewrite econf_readDirs - don't assume suffix is ".conf" - Read files and directories in correct order + +------------------------------------------------------------------- +Fri Aug 30 09:43:08 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190830.04ba053: + * Make clear that the API and ABI of the three functions econf_newIniFile, econf_newKeyFile, econf_writeFile are not stable yet. + * Fix getGroups argument types and add several test cases for this. + * Fix cppcheck and compiler warnings + +------------------------------------------------------------------- +Thu Aug 29 14:05:38 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190829.a1479b1: + * Make comment argument an array, so that we can support more than one comment character in the future. + * Change the API + * Fix size_t as return value of getc() + +------------------------------------------------------------------- +Thu Aug 29 10:53:04 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190829.209219e: + * Convert all functions to new error API + * Convert econf_newKeyFile provide the error via return code + +------------------------------------------------------------------- +Wed Aug 28 13:42:50 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190828.74eeb32: + * Fix tst-arguments3 and tst-arguments4 and only use error return code. + * Bug fixes for new API + * Change API of econf_get* and econf_set* functions to return error code direct. + * Fix some compiler warnings + * Prevent possible crash when parsing 0xFF + * Add "--enable-compiler-warnings" option to enable much more GCC compiler warnings + * Fix more cppcheck warnings + * Fix github actions build + * Update bin/Makefile.am to work with Asan + * Add missing tst-getconfdirs4-data to EXTRA_DIST + * Fix some cppcheck warnings + * Don't ignore getline return value + * Add free for getStringValue in tst-group1 + * Remove XFAIL for tst-groups1 + * Update example.c to free after getStringValue + * Add addbrackets for getValue functions + * tst-getconfdirs4: make sure, only a file in /etc/ and not in /usr/etc works, too. + +------------------------------------------------------------------- +Tue Aug 27 12:19:45 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.5ed5492: + * Mark all input char pointer as const in the official API + +------------------------------------------------------------------- +Tue Aug 27 11:49:42 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.b243e6c: + * getStringValueNum returns a newly allocated string or NULL in error case. + +------------------------------------------------------------------- +Tue Aug 27 09:47:12 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.8374759: + * Fix missing return + * Remove XFAIL for tst-setgetvalues1 + * Fix representation of float and double values + * Add preliminary test case for group handling + * NULL terminate string returned by addbrackets + * Fix addbrackets function + +------------------------------------------------------------------- +Mon Aug 26 19:09:25 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190826.99b6bf3: + * Add more "const". + * Fix setString and setBoolean + * Add test suite which sets and gets all possible kind of types. Some are failing, so mark this test as XFAIL. + * Start marking some string arguments/results as const + * Optimize some strdup away + * Mark econf_write_key_file as ALPHA as the API is not stable + +------------------------------------------------------------------- +Mon Aug 26 11:43:16 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190826.9e69003: + * Update ccpp.yml + * Add --enable-compiler-checks option to configure, enables AddressSanitizer + * Fix printf format directive + * Rework set*Value functions for error checking and error handling + * Add tst-getconfdirs3: verify we can load original file without local changes + * Error handling for econf_getGroups and econf_getKeys + * More errorreporting changes + * Fix make distcheck/don't mess around with libtool install/uninstall, this breaks to much other stuff. + * Autotools cleanup and fixes + * Fix logindefs1 test case + +------------------------------------------------------------------- +Fri Aug 23 18:56:13 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190823.09a8f2e: + * Fix buffer overlow of realpath + +------------------------------------------------------------------- +Fri Aug 23 15:58:37 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190823.acd8cdf: + * Update ccpp.yml + * Fix crash in strcmp, if strchr returns NULL + * Add error reporting to econf_merge_key_files and adjust the depending code. + * setStringValue return NULL on error/key not found + * Add framework for correct error reporting + * Disable searching through XDG dirs for now + * Add test cases for econf_get_conf_from_dirs + * Update comment setValue -> econf_setValue + * Update test cases to use econf_destroy + * Replace econf_afree with econf_destroy in example + * Add _generic macro to free memory of econf_ functions + * Add tst-merge2 to .gitignore + * Fix pointer arithmetic + * Adjust Makefiles and code to make "make distcheck" working + +------------------------------------------------------------------- +Thu Aug 22 19:33:21 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190822.bb9702b: + * Ignore /usr file if /etc exists when merging + * Add NULL value handling + * Update merge example + * Rework merge_functionality + * Use deep copies instead of pointers for merged files + * Replace [] with KEY_FILE_NULL_VALUE + * Refactor getfilecontent functions + * Remove cmake files + * Fix test cases + * Update libeconf.c + * Change License from LGPL-2.1 to MIT + * libeconf.pc should only be deleted on distclean, not normal clean + * Fix delim argument + * Add more test cases for login.defs and wrong arguments + * Link libeconf against libm, so that it is enough to link an application against libeconf and developers don't need to bother with other dependencies + * Add autogen.sh, which calls autoconf/automake/libtool in the correct order to create the configure script + +------------------------------------------------------------------- +Tue Aug 20 13:04:55 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190820.742af8c: + * Remove accidental .swp file + * Update example with conf.d directory + * Remove regex, replace with strchr(delim, ch) + * Add symbol versioning Don't ignore complete lib directory + * Include all headers in tar archive + * Don't define our own errno + * Remove wrong commit + * Add some basic tests + +------------------------------------------------------------------- +Tue Aug 20 12:59:47 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190807.7aedb57: + * Refactor getfilecontent functions + * Update example file + * Add econf prefix to public API functions + * Add cmake targets for debugging + * Fix build with cmake + * Fix build with autotools + * Move Key_File allocation from the stack to the heap + * Move Key_File create functions to libeconf.c + * Move destroy functions from helpers.c to libeconf.c + * Add macro to set supported types generic. + +------------------------------------------------------------------- +Sat Aug 17 11:53:48 UTC 2019 - Thorsten Kukuk + +- Initial version diff --git a/libeconf.spec b/libeconf.spec new file mode 100644 index 0000000..7986139 --- /dev/null +++ b/libeconf.spec @@ -0,0 +1,105 @@ +# +# spec file for package libeconf +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define lname libeconf0 +Name: libeconf +Version: 0.7.4 +Release: 0 +Summary: Enhanced config file parser ala systemd +License: LGPL-2.1-or-later +Group: Development/Libraries/C and C++ +URL: https://github.com/openSUSE/libeconf +Source: libeconf-%{version}.tar.xz +Source2: baselibs.conf +BuildRequires: meson +# for /usr/lib/rpm/pkgconfigdeps.sh +BuildRequires: pkgconfig + +%description +Enhanced config file parser, which merges config files placed +in several locations into one. + +%package -n %{lname} +Summary: Enhanced config file parser ala systemd +Group: Development/Libraries/C and C++ + +%description -n %{lname} +Enhanced config file parser, which merges config files placed +in several locations into one. + +%package devel +Summary: Development files for libeconf +Group: Development/Libraries/C and C++ +Requires: %{lname} = %{version} + +%description devel +This package contains all necessary include files and libraries needed +to develop applications that needs to read configuration files from +different locations. + +%package devel-static +Summary: Static library for libeconf +Group: Development/Libraries/C and C++ +Requires: libeconf-devel = %{version} + +%description devel-static +This package contains libeconf.a static library. + +%package utils +Summary: Command line interface for libeconf +Group: System/Base +Requires: %{lname} = %{version} + +%description utils +This package contains tools for handling configuration files in e.g. /usr/etc +and /etc. + +%prep +%setup -q + +%build +%meson +%meson_build + +%install +%meson_install + +%check +%meson_test + +%post -n %{lname} -p /sbin/ldconfig +%postun -n %{lname} -p /sbin/ldconfig + +%files -n %{lname} +%license LICENSE +%{_libdir}/libeconf.so.* + +%files devel-static +%{_libdir}/libeconf.a + +%files devel +%{_includedir}/*.h +%{_libdir}/libeconf.so +%{_libdir}/pkgconfig/libeconf.pc +%{_mandir}/man3/*.3%{?ext_man} + +%files utils +%{_bindir}/econftool +%{_mandir}/man8/econftool.8%{?ext_man} + +%changelog diff --git a/python-libeconf.changes b/python-libeconf.changes new file mode 100644 index 0000000..c80612c --- /dev/null +++ b/python-libeconf.changes @@ -0,0 +1,134 @@ +------------------------------------------------------------------- +Thu Sep 26 11:08:13 UTC 2024 - schubi@suse.com + +- Update to version 0.7.4: + * fixed memory leaks (#219) + +------------------------------------------------------------------- +Wed Sep 18 11:16:34 UTC 2024 - schubi@suse.com + +- Update to version 0.7.3: + * Fixed: econf_readDirs crashes if one of the paths is NULL (#211) + * Handle groups correctly which do not have any key entry. + * Added links to man page. E.g. "man econf_readConfig" is working now. + * Simplify snprintf call + * Remove unused functions and reduce variable visibility (#213) + * Fix typos (#212) + +------------------------------------------------------------------- +Fri Jun 14 07:26:15 UTC 2024 - schubi@suse.com + +- Update to version 0.7.2: + * Do not check errno while float conversion. This is a false + alarm for S390 and PPC (#210). + +------------------------------------------------------------------- +Mon Jun 10 07:36:06 UTC 2024 - schubi@suse.com + +- Update to version 0.7.1: +* Improved error handling while parsing values with the wrong format. + Added new return value ECONF_VALUE_CONVERSION_ERROR. +* Setting parsing options via econf_file struct. + see econf_newKeyFile_with_options. These options will be used by + econf_readConfig and econf_readConfigWithCallback. + Following options are supported: + JOIN_SAME_ENTRIES (default 0) + Parsed entries with the same name will not be replaces but + will be joined to one entry. + PYTHON_STYLE (default 0) + E.G. Identations will be handled like multiline entries. + PARSING_DIRS (default /usr/etc/:/run:/etc) + List of directories from which the configuration files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g.: "PARSING_DIRS=/usr/etc/:/run:/etc" + CONFIG_DIRS (default ) + List of directory structures (with order) which describes the directories + in which the files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g. with the given list: "CONFIG_DIRS=.conf.d:.d" files in + following directories will be parsed: + "/.conf.d/" + "/.d/" + "//" +* CAUTION: From now on every econf_file element MUST be intialized if + econf_readConfig and econf_readConfigWithCallback is used. + Either with NULL or: + econf_file *key_file = NULL; + if (error = econf_newKeyFile_with_options(&key_file, "PYTHON_STYLE=1")) + { + fprintf (stderr, "ERROR: couldn't create new key file: %s\n", + econf_errString(error)); + return 1; + } + error = econf_readConfig (&key_file, + "foo", + "/usr/lib", + "example", + "conf", + "=", "#"); + +------------------------------------------------------------------- +Tue Jun 04 11:08:28 UTC 2024 - schubi@suse.com + +- Update to version 0.7.0: + * Defining manual parsing directories (#209) + * parsing config files in python style + * econf_readConfig: set usr_subdir to empty string if it is NULL + * Fix static analyzer detected issues (#202) + * comment string can be in the parsed value which is defined with quotes (#207) + * tst-comments2: comment sign in quoted string (#205) + * Setting options via new econf_newKeyFile_with_options. (#206) + +------------------------------------------------------------------- +Fri Apr 12 10:47:39 UTC 2024 - schubi@suse.com + +- Update to version 0.6.3: + * Fix build with musl libc on ppc64le (#198) + * Creating static library with new package libeconf-devel-static. + This is needed for building package util-linux and btrfsprogs. + +------------------------------------------------------------------- +Wed Mar 06 11:02:00 UTC 2024 - schubi@suse.com + +- Update to version 0.6.2: + * Fix static analyzer detected issues (#196) + +------------------------------------------------------------------- +Mon Jan 22 14:30:16 UTC 2024 - schubi@suse.com + +- Update to version 0.6.1: + * reading lines which have a length greater than BUFSIZE (#195) + * Improved data quote check in read_file (#193) + +------------------------------------------------------------------- +Mon Nov 13 07:55:36 UTC 2023 - Alberto Planas Dominguez + +- Do not requires the library for the documentation + +------------------------------------------------------------------ +Wed Nov 8 12:45:07 UTC 2023 - Alberto Planas Dominguez + +- Fix version comparison operator +- Remove explicit python3-base requirement + +------------------------------------------------------------------- +Fri Nov 03 16:44:38 UTC 2023 - schubi@suse.com + +- Update to version 1.1.1: + * Supporting Linux Userspace API (UAPI) Group + chapter "Configuration Files Specification". + See: https://uapi-group.org/specifications/specs/ + configuration_files_specification/ + +------------------------------------------------------------------- +Fri Nov 3 10:12:29 UTC 2023 - Alberto Planas Dominguez + +- Support only Python >= 3.10. PEP 604 is used for union types + +------------------------------------------------------------------- +Fri Oct 27 08:42:26 UTC 2023 - Nico Krapp + +- Version 1.1.0 + * Added tests + * Support all functions form libeconf 0.5.2 + * Bug fixes diff --git a/python-libeconf.spec b/python-libeconf.spec new file mode 100644 index 0000000..ff8e1f8 --- /dev/null +++ b/python-libeconf.spec @@ -0,0 +1,68 @@ +# +# spec file for package python-libeconf +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +%define skip_python39 1 +Name: python-libeconf +Version: 0.7.4 +Release: 0 +Summary: Python bindings for libeconf +License: LGPL-2.1-or-later +Group: Development/Languages/Python +URL: https://github.com/openSUSE/libeconf +Source: libeconf-%{version}.tar.xz +BuildArch: noarch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: python-rpm-macros +Requires: libeconf0 = %{version} +Suggests: python-libeconf-doc = %{version} +%python_subpackages + +%description +Python bindings for libeconf + +%package -n python-libeconf-doc +Summary: Man page for python-libeconf + +%description -n python-libeconf-doc +Man page for python-lineconf + +%prep +%autosetup -n libeconf-%{version}/bindings/python3 + +%build +%pyproject_wheel + +%install +%pyproject_install +mkdir -p %{buildroot}/usr/share/man/man3 +cp docs/python-libeconf.3 %{buildroot}%{_mandir}/man3/ + +%files %python_files +%{python_sitelib} +# The cache is not always present +#pycache_only %{python_sitelib}/__pycache__ + +%files -n python-libeconf-doc +%defattr(-,root,root) +%{_mandir}/man3/*python-libeconf* + +%changelog -- 2.51.1 From 6912dd6db468e5847d58573cfed7888e35ab4b5d3a3ca0f67fca1a208b57fa38 Mon Sep 17 00:00:00 2001 From: Stefan Schubert Date: Wed, 2 Oct 2024 07:24:35 +0000 Subject: [PATCH 3/9] - Updated license in the spec file to MIT. OBS-URL: https://build.opensuse.org/package/show/devel:microos/libeconf?expand=0&rev=36 --- libeconf.changes | 5 +++++ libeconf.spec | 2 +- python-libeconf.changes | 5 +++++ python-libeconf.spec | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/libeconf.changes b/libeconf.changes index b3ec41d..cdbd8b5 100644 --- a/libeconf.changes +++ b/libeconf.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 2 07:08:25 UTC 2024 - Stefan Schubert + +- Updated license in the spec file to MIT. + ------------------------------------------------------------------- Thu Sep 26 11:08:13 UTC 2024 - schubi@suse.com diff --git a/libeconf.spec b/libeconf.spec index 7986139..29e1746 100644 --- a/libeconf.spec +++ b/libeconf.spec @@ -21,7 +21,7 @@ Name: libeconf Version: 0.7.4 Release: 0 Summary: Enhanced config file parser ala systemd -License: LGPL-2.1-or-later +License: MIT Group: Development/Libraries/C and C++ URL: https://github.com/openSUSE/libeconf Source: libeconf-%{version}.tar.xz diff --git a/python-libeconf.changes b/python-libeconf.changes index c80612c..f0bc485 100644 --- a/python-libeconf.changes +++ b/python-libeconf.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 2 07:09:19 UTC 2024 - Stefan Schubert + +- Updated license in the spec file to MIT. + ------------------------------------------------------------------- Thu Sep 26 11:08:13 UTC 2024 - schubi@suse.com diff --git a/python-libeconf.spec b/python-libeconf.spec index ff8e1f8..fec8e1a 100644 --- a/python-libeconf.spec +++ b/python-libeconf.spec @@ -22,7 +22,7 @@ Name: python-libeconf Version: 0.7.4 Release: 0 Summary: Python bindings for libeconf -License: LGPL-2.1-or-later +License: MIT Group: Development/Languages/Python URL: https://github.com/openSUSE/libeconf Source: libeconf-%{version}.tar.xz -- 2.51.1 From 634558c1bc0a043e038d161cba680dec638dac8e65103bfd446a5f989291a719 Mon Sep 17 00:00:00 2001 From: Stefan Schubert Date: Mon, 9 Dec 2024 16:55:18 +0000 Subject: [PATCH 4/9] - Update to version 0.7.5: * Removed PATH_MAX (Issue #220) * Add ROOT_PREFIX as option to replace TESTSDIR hack * CI: valgrind doesn't work together with sanitizers * econf_readConfig: don't allocate econf_file in error case * tests: use cleanup to free key_file for some tests * libeconf: don't allocate array from size 0 * libeconf: fix use of uninitialized stat result if file does not exist * econftool: dynamically allocate xdg_config_dir * Disable clang <= 17, enable valgrind * Disable whitespace check * Disable deprecation warning for econftool and example * Add new CI with different compilers and valgrind * Test econf_readConfig() * Disable deprecation warning for tests * Implement econf_*freep functions for automatic cleanup * Cleanup *free functions - Update to version 0.7.5: * Removed PATH_MAX (Issue #220) * Add ROOT_PREFIX as option to replace TESTSDIR hack * CI: valgrind doesn't work together with sanitizers * econf_readConfig: don't allocate econf_file in error case * tests: use cleanup to free key_file for some tests * libeconf: don't allocate array from size 0 * libeconf: fix use of uninitialized stat result if file does not exist * econftool: dynamically allocate xdg_config_dir * Disable clang <= 17, enable valgrind * Disable whitespace check * Disable deprecation warning for econftool and example * Add new CI with different compilers and valgrind * Test econf_readConfig() * Disable deprecation warning for tests * Implement econf_*freep functions for automatic cleanup * Cleanup *free functions OBS-URL: https://build.opensuse.org/package/show/devel:microos/libeconf?expand=0&rev=38 --- .gitattributes | 23 ++ .gitignore | 1 + _multibuild | 4 + _service | 15 + _servicedata | 6 + baselibs.conf | 1 + libeconf-0.7.2.tar.xz | 3 + libeconf-0.7.3.tar.xz | 3 + libeconf-0.7.4.tar.xz | 3 + libeconf-0.7.5.tar.xz | 3 + libeconf.changes | 641 ++++++++++++++++++++++++++++++++++++++++ libeconf.spec | 105 +++++++ python-libeconf.changes | 160 ++++++++++ python-libeconf.spec | 68 +++++ 14 files changed, 1036 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 _service create mode 100644 _servicedata create mode 100644 baselibs.conf create mode 100644 libeconf-0.7.2.tar.xz create mode 100644 libeconf-0.7.3.tar.xz create mode 100644 libeconf-0.7.4.tar.xz create mode 100644 libeconf-0.7.5.tar.xz create mode 100644 libeconf.changes create mode 100644 libeconf.spec create mode 100644 python-libeconf.changes create mode 100644 python-libeconf.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..e250e09 --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + +python-libeconf + + diff --git a/_service b/_service new file mode 100644 index 0000000..cb21d61 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + 0.5.0 + @PARENT_TAG@ + v(\d+\.\d+\.\d+) + https://github.com/openSUSE/libeconf.git + git + enable + + + xz + *.tar + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..b40227f --- /dev/null +++ b/_servicedata @@ -0,0 +1,6 @@ + + + https://github.com/openSUSE/libeconf.git + 55395fda6890603ca5061cd15a32dfb2d6817928 + + \ No newline at end of file diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..0f76614 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1 @@ +libeconf0 diff --git a/libeconf-0.7.2.tar.xz b/libeconf-0.7.2.tar.xz new file mode 100644 index 0000000..c53016a --- /dev/null +++ b/libeconf-0.7.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d25ce67bba2541e19f895a51faa7b87dba56426b48789ecbe2c937581ea19424 +size 176696 diff --git a/libeconf-0.7.3.tar.xz b/libeconf-0.7.3.tar.xz new file mode 100644 index 0000000..ba802f0 --- /dev/null +++ b/libeconf-0.7.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae5257fd75ca24f7326d33448d5f4ebe9052b76006e08743731684dec0941bb4 +size 178304 diff --git a/libeconf-0.7.4.tar.xz b/libeconf-0.7.4.tar.xz new file mode 100644 index 0000000..c208899 --- /dev/null +++ b/libeconf-0.7.4.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88096729ff71b9d372ba211bb5a93e4aa934c2484f3fab8adacd90f2adc8f90b +size 178320 diff --git a/libeconf-0.7.5.tar.xz b/libeconf-0.7.5.tar.xz new file mode 100644 index 0000000..b8e5413 --- /dev/null +++ b/libeconf-0.7.5.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81051f98e905e909953b96fcfab74ba5edaf9c51991c6627a526bc808a471e5f +size 180648 diff --git a/libeconf.changes b/libeconf.changes new file mode 100644 index 0000000..d8b3e49 --- /dev/null +++ b/libeconf.changes @@ -0,0 +1,641 @@ +------------------------------------------------------------------- +Mon Dec 09 16:33:49 UTC 2024 - schubi@suse.com + +- Update to version 0.7.5: + * Removed PATH_MAX (Issue #220) + * Add ROOT_PREFIX as option to replace TESTSDIR hack + * CI: valgrind doesn't work together with sanitizers + * econf_readConfig: don't allocate econf_file in error case + * tests: use cleanup to free key_file for some tests + * libeconf: don't allocate array from size 0 + * libeconf: fix use of uninitialized stat result if file does not exist + * econftool: dynamically allocate xdg_config_dir + * Disable clang <= 17, enable valgrind + * Disable whitespace check + * Disable deprecation warning for econftool and example + * Add new CI with different compilers and valgrind + * Test econf_readConfig() + * Disable deprecation warning for tests + * Implement econf_*freep functions for automatic cleanup + * Cleanup *free functions + +------------------------------------------------------------------- +Wed Oct 2 07:08:25 UTC 2024 - Stefan Schubert + +- Updated license in the spec file to MIT. + +------------------------------------------------------------------- +Thu Sep 26 11:08:13 UTC 2024 - schubi@suse.com + +- Update to version 0.7.4: + * Fixed memory leaks (#219) + * Fixed: econf_readDirs crashes if one of the paths is NULL (#211) + * Added links to man page. E.g. "man econf_readConfig" is working now. + * Handle groups correctly which do not have any key entry. + +------------------------------------------------------------------- +Wed Sep 18 11:16:34 UTC 2024 - schubi@suse.com + +- Update to version 0.7.3: + * Groups handled in an own list (#218) + * Add econftool as dependency of its tests + * Simplify snprintf call + * Remove unused functions and reduce variable visibility (#213) + * Fix typos (#212) + +------------------------------------------------------------------- +Fri Jun 14 07:26:15 UTC 2024 - schubi@suse.com + +- Update to version 0.7.2: + * Do not check errno while float conversion. This is a false + alarm for S390 and PPC (#210) + +------------------------------------------------------------------- +Mon Jun 10 07:36:06 UTC 2024 - schubi@suse.com + +- Update to version 0.7.1: +* Improved error handling while parsing values with the wrong format. + Added new return value ECONF_VALUE_CONVERSION_ERROR. +* Setting parsing options via econf_file struct. + see econf_newKeyFile_with_options. These options will be used by + econf_readConfig and econf_readConfigWithCallback. + Following options are supported: + JOIN_SAME_ENTRIES (default 0) + Parsed entries with the same name will not be replaces but + will be joined to one entry. + PYTHON_STYLE (default 0) + E.G. Identations will be handled like multiline entries. + PARSING_DIRS (default /usr/etc/:/run:/etc) + List of directories from which the configuration files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g.: "PARSING_DIRS=/usr/etc/:/run:/etc" + CONFIG_DIRS (default ) + List of directory structures (with order) which describes the directories + in which the files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g. with the given list: "CONFIG_DIRS=.conf.d:.d" files in + following directories will be parsed: + "/.conf.d/" + "/.d/" + "//" +* CAUTION: From now on every econf_file element MUST be intialized if + econf_readConfig and econf_readConfigWithCallback is used. + Either with NULL or: + econf_file *key_file = NULL; + if (error = econf_newKeyFile_with_options(&key_file, "PYTHON_STYLE=1")) + { + fprintf (stderr, "ERROR: couldn't create new key file: %s\n", + econf_errString(error)); + return 1; + } + error = econf_readConfig (&key_file, + "foo", + "/usr/lib", + "example", + "conf", + "=", "#"); + +------------------------------------------------------------------- +Tue Jun 04 11:08:28 UTC 2024 - schubi@suse.com + +- Update to version 0.7.0: + * Defining manual parsing directories (#209) + * parsing config files in python style + * econf_readConfig: set usr_subdir to empty string if it is NULL + * Fix static analyzer detected issues (#202) + * comment string can be in the parsed value which is defined with quotes (#207) + * tst-comments2: comment sign in quoted string (#205) + * Setting options via new econf_newKeyFile_with_options. (#206) + +------------------------------------------------------------------- +Fri Apr 12 10:47:39 UTC 2024 - schubi@suse.com + +- Update to version 0.6.3: + * Fix build with musl libc on ppc64le (#198) + * Creating static library with new package libeconf-devel-static. + This is needed for building package util-linux and btrfsprogs. + +------------------------------------------------------------------- +Wed Mar 06 11:02:00 UTC 2024 - schubi@suse.com + +- Update to version 0.6.2: + * version 0.6.2 + * Fix static analyzer detected issues (#196) + +------------------------------------------------------------------- +Mon Jan 22 14:30:16 UTC 2024 - schubi@suse.com + +- Update to version 0.6.1: + * reading lines which have a length greater than BUFSIZE (#195) + * Improved data quote check in read_file (#193) + +------------------------------------------------------------------- +Wed Nov 08 12:20:34 UTC 2023 - schubi@suse.com + +- Update to version 0.6.0: + * Supporting Linux Userspace API (UAPI) Group + chapter "Configuration Files Specification". + See: https://uapi-group.org/specifications/specs/ + configuration_files_specification/ + +------------------------------------------------------------------- +Fri Nov 03 16:44:38 UTC 2023 - schubi@suse.com + +- Update to version 0.5.3: + * Added bindings for python3 and C# + +------------------------------------------------------------------- +Thu Oct 26 14:56:30 UTC 2023 - nico.krapp@suse.com + +- Update to version 0.5.2: + * Add python bindings (#188) + * docu version 0.5.2 + * Fix test (#185) + * Plug memory leak (#186) + +------------------------------------------------------------------- +Wed Sep 6 14:38:13 UTC 2023 - Stefan Schubert + +- Additional info for version 0.5.2: + * Fixed a stack-buffer-overflow vulnerability in "econf_writeFile" + function. (CVE-2023-30078, CVE-2023-32181, bsc#1211078) + * Fixed a stack-buffer-overflow vulnerability in "read_file" + function. (CVE-2023-30079, CVE-2023-22652, bsc#1211078) + +------------------------------------------------------------------- +Fri Mar 24 15:12:18 UTC 2023 - schubi@suse.com + +- Update to version 0.5.2: + * Fixed build for aarch64 and gcc13. + * Making the output verbose when a test fails. + * Fixed a stack-buffer-overflow vulnerability in "econf_writeFile" + function. + * Fixed a stack-buffer-overflow vulnerability in "read_file" + function. + * Added new feature: econf_set_conf_dirs (const char **dir_postfix_list) + Sets a list of directory structures (with order) which describes + the directories in which the files have to be parsed. + E.G. with the given list: {"/conf.d/", ".d/", "/", NULL} files in following + directories will be parsed: + "/..d/" + "//conf.d/" + "/.d/" + "//" + The entry "/..d/" will be added + automatically. + * General code cleanup. + +------------------------------------------------------------------- +Thu Jan 19 15:58:59 UTC 2023 - schubi@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) + +------------------------------------------------------------------- +Fri Dec 02 14:13:24 UTC 2022 - schubi@suse.com + +- Update to version 0.5.0: + * API calls econf_read*WithCallback supporting a general (void *) + argument for user defined data with which the callback function is + called. + * Tagged following functions deprecated: + econf_requireOwner, econf_requireGroup, econf_requirePermissions, + econf_followSymlinks, econf_reset_security_settings + Use one of the econf_read*WithCallback functions instead. + +------------------------------------------------------------------- +Wed Nov 23 14:01:34 UTC 2022 - schubi@suse.com + +- Update to version 0.4.9: + * libeconf.h: added missing sys/types.h header (#171) + * new API calls: econf_readFileWithCallback, + econf_readDirsWithCallback, econf_readDirsHistoryWithCallback (#172) + * Checking NULL comment parameter in the parsing functions. + +------------------------------------------------------------------- +Mon Nov 14 13:47:26 UTC 2022 - schubi@suse.com + +- Update to version 0.4.8+git20221114.7ff7704: + * Parsing files which are containing keys only (#170) + All delimiters are allowed now : "", " =", " ", "=". But the + user should use "" in order to be distinct. + * /usr/etc/shells.d/ will not be parsed if + /etc/shells.d/ is defined too. + * Lto build fixed (#168) + * New calls: econf_comment_tag, econf_delimiter_tag, econf_set_comment_tag, + econf_set_delimiter_tag + * Checking UID,GroupID, permissions,... of the parsed files (#165) + New calls: econf_requireOwner, econf_requireGroup, econf_requirePermissions, + econf_followSymlinks + * Ignoring Group without brackets; Do not hold brackets in the internal data structure. (#164) + * Error handling improved for nums and booleans (#163) + +------------------------------------------------------------------- +Wed Apr 27 22:10:35 UTC 2022 - schubi@suse.com + +- Update to version 0.4.6+git20220427.3016f4e: + * econftool: + ** Parsing error: Reporting file and line nr. + ** --delimeters=spaces Taking all kind of spaces for delimiter + * libeconf: + Fixed bsc#1198165: Parsing files correctly which have space characters + AND none space characters as delimiters. + +------------------------------------------------------------------- +Wed Apr 06 21:23:48 UTC 2022 - schubi@suse.com + +- Update to version 0.4.5+git20220406.c9658f2: + * econftool: + ** New call "syntax" for checking the configuration files only. + Returns an error string with line number if an error occurs. + ** New options "--comment" and "--delimeters" + ** Parsing one file only if needed. + +------------------------------------------------------------------- +Tue Jan 04 11:22:44 UTC 2022 - schubi@suse.com + +- Update to version 0.4.4+git20220104.962774f: + * Fixed i586 build (#158) + +------------------------------------------------------------------- +Tue Jan 04 10:27:32 UTC 2022 - schubi@suse.com + +- Update to version 0.4.2+git20220104.5dfd69d: + * Reading numbers with different bases (e.g. oktal) (bsc#1193632) (#157) + +------------------------------------------------------------------- +Thu Nov 11 14:22:24 UTC 2021 - schubi@suse.com + +- Update to version libeconf-0.4.2+git20211111.c7a2c52: + * CMake fixes regarding document installation. + * Fixed different issues while writing string values to file. + * Writing comments to file too. + * Fixed memory leaks. + * Fixed crash while merging values. + +------------------------------------------------------------------- +Fri Jul 9 07:16:22 UTC 2021 - schubi + +- 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 schubi@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 + +- Update to version 0.4.0+git20210707.537a8a: + * Fixed resource leaks found by Iker Pedrosa. + +------------------------------------------------------------------- +Thu Apr 15 10:31:02 UTC 2021 - schubi@suse.com + +- Removed doxygen from build requires. + +------------------------------------------------------------------- +Tue Apr 13 20:25:40 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210413.fdb8025: + * Installing man pages via meson. (#147) + +------------------------------------------------------------------- +Mon Apr 12 19:10:54 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210412.1513a26: + * Added econftool cat option (#146) + * new API call: econf_readDirsHistory (showing ALL locations) + * new API call: econf_getPath (absolute path of the configuration file) + +------------------------------------------------------------------- +Thu Apr 08 17:10:59 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210408.6d33e5e: + * 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. + +------------------------------------------------------------------- +Thu Oct 22 12:16:36 UTC 2020 - Ludwig Nussel + +- explicitly BuildRequire: pkgconfig for /usr/lib/rpm/pkgconfigdeps.sh + On TW it's pulled in implicitly by libxcrypt-devel which is not the + case on 15.2 + +------------------------------------------------------------------- +Fri Jul 10 21:15:09 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.8+git20200710.5126fff: + * Add CMake build scripts, remove autotools support + * Move C++ ABI compatibility section + +------------------------------------------------------------------- +Fri Jun 05 15:57:26 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.7+git20200605.c67ef9a: + * Fix build on i586 + +------------------------------------------------------------------- +Thu Jun 04 11:05:02 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.6+git20200529.276359f: + * Package meson files with autotools + * Use newer version of actions/checkout + * Add actions for meson + * Create meson.yml + * Use meson source root for tests configuration files + * Add additional compiler warnings + * First useable meson build support including unit tests + * Add global options, build with pie and GNU_SOURCE + * Fix name of library, add example binary + * add support for meson + * Add C++ compatibility + * Add test case for crash with empty value keys + +------------------------------------------------------------------- +Mon Feb 03 16:21:51 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.5+git20200203.3144b69: + * Release version 0.3.5 + * Use float.h instead of obsolete gnuism values.h + * Remove gnuism (strdupa) + * Check for empty value (NULL pointer) before calling strdup. + +------------------------------------------------------------------- +Tue Jan 21 14:53:44 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.4+git20200121.febebf2: + * Release version 0.3.4 + * Fix buffer overflow in econf_readDirs + * Fix parsing of quoted strings, and values starting with delimiters + * tests: add test for quoted strings + * tests: tst-configdirs5: fix config dir paths + +------------------------------------------------------------------- +Mon Oct 28 12:11:12 UTC 2019 - iforster@suse.com + +- Update to version 0.3.3+git20191028.3ac14ce: + * Release version 0.3.3 + * Reset *key_file to NULL after free + +------------------------------------------------------------------- +Thu Sep 26 17:43:54 UTC 2019 - kukuk@suse.com + +- Update to version 0.3.2+git20190926.fea4a03: + * Release version 0.3.2 + * Fix merging an empty file (#105) + * Add test cases for merge function + +------------------------------------------------------------------- +Tue Sep 24 12:52:52 UTC 2019 - rbrown@suse.com + +- Update to version 0.3.1+git20190924.822cf5b: + * release version 0.3.1 + * Set delimiter in readFile + * Change parser interface to store file name and line numbers per key + * Update ccpp.yml + +------------------------------------------------------------------- +Fri Sep 06 10:53:32 UTC 2019 - kukuk@suse.de + +- Update to version 0.3.0+git20190906.0e60a88: + * Ensure LICENSE, README, and TODO are included in the release tarball + * Rewrite set*ValueNum functions to avoid libm usage and add error checking + * Move src/*.c to lib and release version 0.3.0 + +------------------------------------------------------------------- +Thu Sep 05 08:54:20 UTC 2019 - kukuk@suse.de + +- Update to version 0.3.0+git20190905.0ca8fe2: + * Merge doc changes from parlt91 (pull rq#73) + * Implement econf_get*ValueDef functions: if key is not found, a provided default is returned. + * Differentiate between no value provided and empty value provided + * Remove obsolete check for comments + * Enhance and adjust test cases + * Remove obsolete check for comments + +------------------------------------------------------------------- +Wed Sep 04 11:13:09 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.03fa5b4: + * Enhance and adjust test cases + * Update ccpp.yml + * Update ccpp.yml + * Update ccpp.yml + +------------------------------------------------------------------- +Wed Sep 04 10:17:25 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.989df9f: + * Remove debug printf + +------------------------------------------------------------------- +Wed Sep 04 09:58:12 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.c9c1820: + * Implement alternate file parser solving the problems with group entry detection. + * Add new parse error error code + * Bool values read from a config file are not sanitzied, so we need to do that in the getBoolValueNum function, too. + * Only use ..d directories + * Release version 0.2.0 + * Add an explanation about this project. + * Check for NULL pointer arguments + * Fix error return value + * Fix typo in comment + * Add test case for reading login.defs with data from util-linux test suite + +------------------------------------------------------------------- +Mon Sep 02 13:18:01 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190902.dd17c11: + * Fix int64 variables on 32bit architectures + +------------------------------------------------------------------- +Sat Aug 31 18:28:13 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190831.fb7c1bb: + * Rewrite econf_readDirs - don't assume suffix is ".conf" - Read files and directories in correct order + +------------------------------------------------------------------- +Fri Aug 30 09:43:08 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190830.04ba053: + * Make clear that the API and ABI of the three functions econf_newIniFile, econf_newKeyFile, econf_writeFile are not stable yet. + * Fix getGroups argument types and add several test cases for this. + * Fix cppcheck and compiler warnings + +------------------------------------------------------------------- +Thu Aug 29 14:05:38 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190829.a1479b1: + * Make comment argument an array, so that we can support more than one comment character in the future. + * Change the API + * Fix size_t as return value of getc() + +------------------------------------------------------------------- +Thu Aug 29 10:53:04 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190829.209219e: + * Convert all functions to new error API + * Convert econf_newKeyFile provide the error via return code + +------------------------------------------------------------------- +Wed Aug 28 13:42:50 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190828.74eeb32: + * Fix tst-arguments3 and tst-arguments4 and only use error return code. + * Bug fixes for new API + * Change API of econf_get* and econf_set* functions to return error code direct. + * Fix some compiler warnings + * Prevent possible crash when parsing 0xFF + * Add "--enable-compiler-warnings" option to enable much more GCC compiler warnings + * Fix more cppcheck warnings + * Fix github actions build + * Update bin/Makefile.am to work with Asan + * Add missing tst-getconfdirs4-data to EXTRA_DIST + * Fix some cppcheck warnings + * Don't ignore getline return value + * Add free for getStringValue in tst-group1 + * Remove XFAIL for tst-groups1 + * Update example.c to free after getStringValue + * Add addbrackets for getValue functions + * tst-getconfdirs4: make sure, only a file in /etc/ and not in /usr/etc works, too. + +------------------------------------------------------------------- +Tue Aug 27 12:19:45 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.5ed5492: + * Mark all input char pointer as const in the official API + +------------------------------------------------------------------- +Tue Aug 27 11:49:42 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.b243e6c: + * getStringValueNum returns a newly allocated string or NULL in error case. + +------------------------------------------------------------------- +Tue Aug 27 09:47:12 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.8374759: + * Fix missing return + * Remove XFAIL for tst-setgetvalues1 + * Fix representation of float and double values + * Add preliminary test case for group handling + * NULL terminate string returned by addbrackets + * Fix addbrackets function + +------------------------------------------------------------------- +Mon Aug 26 19:09:25 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190826.99b6bf3: + * Add more "const". + * Fix setString and setBoolean + * Add test suite which sets and gets all possible kind of types. Some are failing, so mark this test as XFAIL. + * Start marking some string arguments/results as const + * Optimize some strdup away + * Mark econf_write_key_file as ALPHA as the API is not stable + +------------------------------------------------------------------- +Mon Aug 26 11:43:16 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190826.9e69003: + * Update ccpp.yml + * Add --enable-compiler-checks option to configure, enables AddressSanitizer + * Fix printf format directive + * Rework set*Value functions for error checking and error handling + * Add tst-getconfdirs3: verify we can load original file without local changes + * Error handling for econf_getGroups and econf_getKeys + * More errorreporting changes + * Fix make distcheck/don't mess around with libtool install/uninstall, this breaks to much other stuff. + * Autotools cleanup and fixes + * Fix logindefs1 test case + +------------------------------------------------------------------- +Fri Aug 23 18:56:13 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190823.09a8f2e: + * Fix buffer overlow of realpath + +------------------------------------------------------------------- +Fri Aug 23 15:58:37 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190823.acd8cdf: + * Update ccpp.yml + * Fix crash in strcmp, if strchr returns NULL + * Add error reporting to econf_merge_key_files and adjust the depending code. + * setStringValue return NULL on error/key not found + * Add framework for correct error reporting + * Disable searching through XDG dirs for now + * Add test cases for econf_get_conf_from_dirs + * Update comment setValue -> econf_setValue + * Update test cases to use econf_destroy + * Replace econf_afree with econf_destroy in example + * Add _generic macro to free memory of econf_ functions + * Add tst-merge2 to .gitignore + * Fix pointer arithmetic + * Adjust Makefiles and code to make "make distcheck" working + +------------------------------------------------------------------- +Thu Aug 22 19:33:21 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190822.bb9702b: + * Ignore /usr file if /etc exists when merging + * Add NULL value handling + * Update merge example + * Rework merge_functionality + * Use deep copies instead of pointers for merged files + * Replace [] with KEY_FILE_NULL_VALUE + * Refactor getfilecontent functions + * Remove cmake files + * Fix test cases + * Update libeconf.c + * Change License from LGPL-2.1 to MIT + * libeconf.pc should only be deleted on distclean, not normal clean + * Fix delim argument + * Add more test cases for login.defs and wrong arguments + * Link libeconf against libm, so that it is enough to link an application against libeconf and developers don't need to bother with other dependencies + * Add autogen.sh, which calls autoconf/automake/libtool in the correct order to create the configure script + +------------------------------------------------------------------- +Tue Aug 20 13:04:55 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190820.742af8c: + * Remove accidental .swp file + * Update example with conf.d directory + * Remove regex, replace with strchr(delim, ch) + * Add symbol versioning Don't ignore complete lib directory + * Include all headers in tar archive + * Don't define our own errno + * Remove wrong commit + * Add some basic tests + +------------------------------------------------------------------- +Tue Aug 20 12:59:47 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190807.7aedb57: + * Refactor getfilecontent functions + * Update example file + * Add econf prefix to public API functions + * Add cmake targets for debugging + * Fix build with cmake + * Fix build with autotools + * Move Key_File allocation from the stack to the heap + * Move Key_File create functions to libeconf.c + * Move destroy functions from helpers.c to libeconf.c + * Add macro to set supported types generic. + +------------------------------------------------------------------- +Sat Aug 17 11:53:48 UTC 2019 - Thorsten Kukuk + +- Initial version diff --git a/libeconf.spec b/libeconf.spec new file mode 100644 index 0000000..58c591d --- /dev/null +++ b/libeconf.spec @@ -0,0 +1,105 @@ +# +# spec file for package libeconf +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define lname libeconf0 +Name: libeconf +Version: 0.7.5 +Release: 0 +Summary: Enhanced config file parser ala systemd +License: MIT +Group: Development/Libraries/C and C++ +URL: https://github.com/openSUSE/libeconf +Source: libeconf-%{version}.tar.xz +Source2: baselibs.conf +BuildRequires: meson +# for /usr/lib/rpm/pkgconfigdeps.sh +BuildRequires: pkgconfig + +%description +Enhanced config file parser, which merges config files placed +in several locations into one. + +%package -n %{lname} +Summary: Enhanced config file parser ala systemd +Group: Development/Libraries/C and C++ + +%description -n %{lname} +Enhanced config file parser, which merges config files placed +in several locations into one. + +%package devel +Summary: Development files for libeconf +Group: Development/Libraries/C and C++ +Requires: %{lname} = %{version} + +%description devel +This package contains all necessary include files and libraries needed +to develop applications that needs to read configuration files from +different locations. + +%package devel-static +Summary: Static library for libeconf +Group: Development/Libraries/C and C++ +Requires: libeconf-devel = %{version} + +%description devel-static +This package contains libeconf.a static library. + +%package utils +Summary: Command line interface for libeconf +Group: System/Base +Requires: %{lname} = %{version} + +%description utils +This package contains tools for handling configuration files in e.g. /usr/etc +and /etc. + +%prep +%setup -q + +%build +%meson +%meson_build + +%install +%meson_install + +%check +%meson_test + +%post -n %{lname} -p /sbin/ldconfig +%postun -n %{lname} -p /sbin/ldconfig + +%files -n %{lname} +%license LICENSE +%{_libdir}/libeconf.so.* + +%files devel-static +%{_libdir}/libeconf.a + +%files devel +%{_includedir}/*.h +%{_libdir}/libeconf.so +%{_libdir}/pkgconfig/libeconf.pc +%{_mandir}/man3/*.3%{?ext_man} + +%files utils +%{_bindir}/econftool +%{_mandir}/man8/econftool.8%{?ext_man} + +%changelog diff --git a/python-libeconf.changes b/python-libeconf.changes new file mode 100644 index 0000000..994e63a --- /dev/null +++ b/python-libeconf.changes @@ -0,0 +1,160 @@ +------------------------------------------------------------------- +Mon Dec 09 16:33:49 UTC 2024 - schubi@suse.com + +- Update to version 0.7.5: + * Removed PATH_MAX (Issue #220) + * Add ROOT_PREFIX as option to replace TESTSDIR hack + * CI: valgrind doesn't work together with sanitizers + * econf_readConfig: don't allocate econf_file in error case + * tests: use cleanup to free key_file for some tests + * libeconf: don't allocate array from size 0 + * libeconf: fix use of uninitialized stat result if file does not exist + * econftool: dynamically allocate xdg_config_dir + * Disable clang <= 17, enable valgrind + * Disable whitespace check + * Disable deprecation warning for econftool and example + * Add new CI with different compilers and valgrind + * Test econf_readConfig() + * Disable deprecation warning for tests + * Implement econf_*freep functions for automatic cleanup + * Cleanup *free functions + +------------------------------------------------------------------- +Wed Oct 2 07:09:19 UTC 2024 - Stefan Schubert + +- Updated license in the spec file to MIT. + +------------------------------------------------------------------- +Thu Sep 26 11:08:13 UTC 2024 - schubi@suse.com + +- Update to version 0.7.4: + * fixed memory leaks (#219) + +------------------------------------------------------------------- +Wed Sep 18 11:16:34 UTC 2024 - schubi@suse.com + +- Update to version 0.7.3: + * Fixed: econf_readDirs crashes if one of the paths is NULL (#211) + * Handle groups correctly which do not have any key entry. + * Added links to man page. E.g. "man econf_readConfig" is working now. + * Simplify snprintf call + * Remove unused functions and reduce variable visibility (#213) + * Fix typos (#212) + +------------------------------------------------------------------- +Fri Jun 14 07:26:15 UTC 2024 - schubi@suse.com + +- Update to version 0.7.2: + * Do not check errno while float conversion. This is a false + alarm for S390 and PPC (#210). + +------------------------------------------------------------------- +Mon Jun 10 07:36:06 UTC 2024 - schubi@suse.com + +- Update to version 0.7.1: +* Improved error handling while parsing values with the wrong format. + Added new return value ECONF_VALUE_CONVERSION_ERROR. +* Setting parsing options via econf_file struct. + see econf_newKeyFile_with_options. These options will be used by + econf_readConfig and econf_readConfigWithCallback. + Following options are supported: + JOIN_SAME_ENTRIES (default 0) + Parsed entries with the same name will not be replaces but + will be joined to one entry. + PYTHON_STYLE (default 0) + E.G. Identations will be handled like multiline entries. + PARSING_DIRS (default /usr/etc/:/run:/etc) + List of directories from which the configuration files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g.: "PARSING_DIRS=/usr/etc/:/run:/etc" + CONFIG_DIRS (default ) + List of directory structures (with order) which describes the directories + in which the files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g. with the given list: "CONFIG_DIRS=.conf.d:.d" files in + following directories will be parsed: + "/.conf.d/" + "/.d/" + "//" +* CAUTION: From now on every econf_file element MUST be intialized if + econf_readConfig and econf_readConfigWithCallback is used. + Either with NULL or: + econf_file *key_file = NULL; + if (error = econf_newKeyFile_with_options(&key_file, "PYTHON_STYLE=1")) + { + fprintf (stderr, "ERROR: couldn't create new key file: %s\n", + econf_errString(error)); + return 1; + } + error = econf_readConfig (&key_file, + "foo", + "/usr/lib", + "example", + "conf", + "=", "#"); + +------------------------------------------------------------------- +Tue Jun 04 11:08:28 UTC 2024 - schubi@suse.com + +- Update to version 0.7.0: + * Defining manual parsing directories (#209) + * parsing config files in python style + * econf_readConfig: set usr_subdir to empty string if it is NULL + * Fix static analyzer detected issues (#202) + * comment string can be in the parsed value which is defined with quotes (#207) + * tst-comments2: comment sign in quoted string (#205) + * Setting options via new econf_newKeyFile_with_options. (#206) + +------------------------------------------------------------------- +Fri Apr 12 10:47:39 UTC 2024 - schubi@suse.com + +- Update to version 0.6.3: + * Fix build with musl libc on ppc64le (#198) + * Creating static library with new package libeconf-devel-static. + This is needed for building package util-linux and btrfsprogs. + +------------------------------------------------------------------- +Wed Mar 06 11:02:00 UTC 2024 - schubi@suse.com + +- Update to version 0.6.2: + * Fix static analyzer detected issues (#196) + +------------------------------------------------------------------- +Mon Jan 22 14:30:16 UTC 2024 - schubi@suse.com + +- Update to version 0.6.1: + * reading lines which have a length greater than BUFSIZE (#195) + * Improved data quote check in read_file (#193) + +------------------------------------------------------------------- +Mon Nov 13 07:55:36 UTC 2023 - Alberto Planas Dominguez + +- Do not requires the library for the documentation + +------------------------------------------------------------------ +Wed Nov 8 12:45:07 UTC 2023 - Alberto Planas Dominguez + +- Fix version comparison operator +- Remove explicit python3-base requirement + +------------------------------------------------------------------- +Fri Nov 03 16:44:38 UTC 2023 - schubi@suse.com + +- Update to version 1.1.1: + * Supporting Linux Userspace API (UAPI) Group + chapter "Configuration Files Specification". + See: https://uapi-group.org/specifications/specs/ + configuration_files_specification/ + +------------------------------------------------------------------- +Fri Nov 3 10:12:29 UTC 2023 - Alberto Planas Dominguez + +- Support only Python >= 3.10. PEP 604 is used for union types + +------------------------------------------------------------------- +Fri Oct 27 08:42:26 UTC 2023 - Nico Krapp + +- Version 1.1.0 + * Added tests + * Support all functions form libeconf 0.5.2 + * Bug fixes diff --git a/python-libeconf.spec b/python-libeconf.spec new file mode 100644 index 0000000..6e1bb80 --- /dev/null +++ b/python-libeconf.spec @@ -0,0 +1,68 @@ +# +# spec file for package python-libeconf +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +%define skip_python39 1 +Name: python-libeconf +Version: 0.7.5 +Release: 0 +Summary: Python bindings for libeconf +License: MIT +Group: Development/Languages/Python +URL: https://github.com/openSUSE/libeconf +Source: libeconf-%{version}.tar.xz +BuildArch: noarch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: python-rpm-macros +Requires: libeconf0 = %{version} +Suggests: python-libeconf-doc = %{version} +%python_subpackages + +%description +Python bindings for libeconf + +%package -n python-libeconf-doc +Summary: Man page for python-libeconf + +%description -n python-libeconf-doc +Man page for python-lineconf + +%prep +%autosetup -n libeconf-%{version}/bindings/python3 + +%build +%pyproject_wheel + +%install +%pyproject_install +mkdir -p %{buildroot}/usr/share/man/man3 +cp docs/python-libeconf.3 %{buildroot}%{_mandir}/man3/ + +%files %python_files +%{python_sitelib} +# The cache is not always present +#pycache_only %{python_sitelib}/__pycache__ + +%files -n python-libeconf-doc +%defattr(-,root,root) +%{_mandir}/man3/*python-libeconf* + +%changelog -- 2.51.1 From ce65708f4f641d5267f6a8175359b36cbc4f4a24512f2e3857845e37bb6d6b0b Mon Sep 17 00:00:00 2001 From: Stefan Schubert Date: Fri, 13 Dec 2024 13:39:14 +0000 Subject: [PATCH 5/9] Accepting request 1230799 from home:schubi2 - Update to version 0.7.6: * Do not try to parse files with name like ".." and "." (#227) * using econf_readConfig in econftool - Update to version 0.7.6: * Do not try to parse files with name like ".." and "." (#227) * using econf_readConfig in econftool OBS-URL: https://build.opensuse.org/request/show/1230799 OBS-URL: https://build.opensuse.org/package/show/devel:microos/libeconf?expand=0&rev=40 --- .gitattributes | 23 ++ .gitignore | 1 + _multibuild | 4 + _service | 15 + _servicedata | 6 + baselibs.conf | 1 + libeconf-0.7.2.tar.xz | 3 + libeconf-0.7.3.tar.xz | 3 + libeconf-0.7.4.tar.xz | 3 + libeconf-0.7.5.tar.xz | 3 + libeconf-0.7.6.tar.xz | 3 + libeconf.changes | 648 ++++++++++++++++++++++++++++++++++++++++ libeconf.spec | 105 +++++++ python-libeconf.changes | 167 +++++++++++ python-libeconf.spec | 68 +++++ 15 files changed, 1053 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 _service create mode 100644 _servicedata create mode 100644 baselibs.conf create mode 100644 libeconf-0.7.2.tar.xz create mode 100644 libeconf-0.7.3.tar.xz create mode 100644 libeconf-0.7.4.tar.xz create mode 100644 libeconf-0.7.5.tar.xz create mode 100644 libeconf-0.7.6.tar.xz create mode 100644 libeconf.changes create mode 100644 libeconf.spec create mode 100644 python-libeconf.changes create mode 100644 python-libeconf.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..e250e09 --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + +python-libeconf + + diff --git a/_service b/_service new file mode 100644 index 0000000..cb21d61 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + 0.5.0 + @PARENT_TAG@ + v(\d+\.\d+\.\d+) + https://github.com/openSUSE/libeconf.git + git + enable + + + xz + *.tar + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..efced2d --- /dev/null +++ b/_servicedata @@ -0,0 +1,6 @@ + + + https://github.com/openSUSE/libeconf.git + acbf7e06de84ea289fd4d3dd189d7e36c49c09ae + + \ No newline at end of file diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..0f76614 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1 @@ +libeconf0 diff --git a/libeconf-0.7.2.tar.xz b/libeconf-0.7.2.tar.xz new file mode 100644 index 0000000..c53016a --- /dev/null +++ b/libeconf-0.7.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d25ce67bba2541e19f895a51faa7b87dba56426b48789ecbe2c937581ea19424 +size 176696 diff --git a/libeconf-0.7.3.tar.xz b/libeconf-0.7.3.tar.xz new file mode 100644 index 0000000..ba802f0 --- /dev/null +++ b/libeconf-0.7.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae5257fd75ca24f7326d33448d5f4ebe9052b76006e08743731684dec0941bb4 +size 178304 diff --git a/libeconf-0.7.4.tar.xz b/libeconf-0.7.4.tar.xz new file mode 100644 index 0000000..c208899 --- /dev/null +++ b/libeconf-0.7.4.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88096729ff71b9d372ba211bb5a93e4aa934c2484f3fab8adacd90f2adc8f90b +size 178320 diff --git a/libeconf-0.7.5.tar.xz b/libeconf-0.7.5.tar.xz new file mode 100644 index 0000000..b8e5413 --- /dev/null +++ b/libeconf-0.7.5.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81051f98e905e909953b96fcfab74ba5edaf9c51991c6627a526bc808a471e5f +size 180648 diff --git a/libeconf-0.7.6.tar.xz b/libeconf-0.7.6.tar.xz new file mode 100644 index 0000000..a535046 --- /dev/null +++ b/libeconf-0.7.6.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43c99736271818daaf9c5de50dc7c254a7d094dd64206763253e88f2ebca2b27 +size 181060 diff --git a/libeconf.changes b/libeconf.changes new file mode 100644 index 0000000..ac21140 --- /dev/null +++ b/libeconf.changes @@ -0,0 +1,648 @@ +------------------------------------------------------------------- +Fri Dec 13 13:03:47 UTC 2024 - schubi@suse.com + +- Update to version 0.7.6: + * Do not try to parse files with name like ".." and "." (#227) + * using econf_readConfig in econftool + +------------------------------------------------------------------- +Mon Dec 09 16:33:49 UTC 2024 - schubi@suse.com + +- Update to version 0.7.5: + * Removed PATH_MAX (Issue #220) + * Add ROOT_PREFIX as option to replace TESTSDIR hack + * CI: valgrind doesn't work together with sanitizers + * econf_readConfig: don't allocate econf_file in error case + * tests: use cleanup to free key_file for some tests + * libeconf: don't allocate array from size 0 + * libeconf: fix use of uninitialized stat result if file does not exist + * econftool: dynamically allocate xdg_config_dir + * Disable clang <= 17, enable valgrind + * Disable whitespace check + * Disable deprecation warning for econftool and example + * Add new CI with different compilers and valgrind + * Test econf_readConfig() + * Disable deprecation warning for tests + * Implement econf_*freep functions for automatic cleanup + * Cleanup *free functions + +------------------------------------------------------------------- +Wed Oct 2 07:08:25 UTC 2024 - Stefan Schubert + +- Updated license in the spec file to MIT. + +------------------------------------------------------------------- +Thu Sep 26 11:08:13 UTC 2024 - schubi@suse.com + +- Update to version 0.7.4: + * Fixed memory leaks (#219) + * Fixed: econf_readDirs crashes if one of the paths is NULL (#211) + * Added links to man page. E.g. "man econf_readConfig" is working now. + * Handle groups correctly which do not have any key entry. + +------------------------------------------------------------------- +Wed Sep 18 11:16:34 UTC 2024 - schubi@suse.com + +- Update to version 0.7.3: + * Groups handled in an own list (#218) + * Add econftool as dependency of its tests + * Simplify snprintf call + * Remove unused functions and reduce variable visibility (#213) + * Fix typos (#212) + +------------------------------------------------------------------- +Fri Jun 14 07:26:15 UTC 2024 - schubi@suse.com + +- Update to version 0.7.2: + * Do not check errno while float conversion. This is a false + alarm for S390 and PPC (#210) + +------------------------------------------------------------------- +Mon Jun 10 07:36:06 UTC 2024 - schubi@suse.com + +- Update to version 0.7.1: +* Improved error handling while parsing values with the wrong format. + Added new return value ECONF_VALUE_CONVERSION_ERROR. +* Setting parsing options via econf_file struct. + see econf_newKeyFile_with_options. These options will be used by + econf_readConfig and econf_readConfigWithCallback. + Following options are supported: + JOIN_SAME_ENTRIES (default 0) + Parsed entries with the same name will not be replaces but + will be joined to one entry. + PYTHON_STYLE (default 0) + E.G. Identations will be handled like multiline entries. + PARSING_DIRS (default /usr/etc/:/run:/etc) + List of directories from which the configuration files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g.: "PARSING_DIRS=/usr/etc/:/run:/etc" + CONFIG_DIRS (default ) + List of directory structures (with order) which describes the directories + in which the files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g. with the given list: "CONFIG_DIRS=.conf.d:.d" files in + following directories will be parsed: + "/.conf.d/" + "/.d/" + "//" +* CAUTION: From now on every econf_file element MUST be intialized if + econf_readConfig and econf_readConfigWithCallback is used. + Either with NULL or: + econf_file *key_file = NULL; + if (error = econf_newKeyFile_with_options(&key_file, "PYTHON_STYLE=1")) + { + fprintf (stderr, "ERROR: couldn't create new key file: %s\n", + econf_errString(error)); + return 1; + } + error = econf_readConfig (&key_file, + "foo", + "/usr/lib", + "example", + "conf", + "=", "#"); + +------------------------------------------------------------------- +Tue Jun 04 11:08:28 UTC 2024 - schubi@suse.com + +- Update to version 0.7.0: + * Defining manual parsing directories (#209) + * parsing config files in python style + * econf_readConfig: set usr_subdir to empty string if it is NULL + * Fix static analyzer detected issues (#202) + * comment string can be in the parsed value which is defined with quotes (#207) + * tst-comments2: comment sign in quoted string (#205) + * Setting options via new econf_newKeyFile_with_options. (#206) + +------------------------------------------------------------------- +Fri Apr 12 10:47:39 UTC 2024 - schubi@suse.com + +- Update to version 0.6.3: + * Fix build with musl libc on ppc64le (#198) + * Creating static library with new package libeconf-devel-static. + This is needed for building package util-linux and btrfsprogs. + +------------------------------------------------------------------- +Wed Mar 06 11:02:00 UTC 2024 - schubi@suse.com + +- Update to version 0.6.2: + * version 0.6.2 + * Fix static analyzer detected issues (#196) + +------------------------------------------------------------------- +Mon Jan 22 14:30:16 UTC 2024 - schubi@suse.com + +- Update to version 0.6.1: + * reading lines which have a length greater than BUFSIZE (#195) + * Improved data quote check in read_file (#193) + +------------------------------------------------------------------- +Wed Nov 08 12:20:34 UTC 2023 - schubi@suse.com + +- Update to version 0.6.0: + * Supporting Linux Userspace API (UAPI) Group + chapter "Configuration Files Specification". + See: https://uapi-group.org/specifications/specs/ + configuration_files_specification/ + +------------------------------------------------------------------- +Fri Nov 03 16:44:38 UTC 2023 - schubi@suse.com + +- Update to version 0.5.3: + * Added bindings for python3 and C# + +------------------------------------------------------------------- +Thu Oct 26 14:56:30 UTC 2023 - nico.krapp@suse.com + +- Update to version 0.5.2: + * Add python bindings (#188) + * docu version 0.5.2 + * Fix test (#185) + * Plug memory leak (#186) + +------------------------------------------------------------------- +Wed Sep 6 14:38:13 UTC 2023 - Stefan Schubert + +- Additional info for version 0.5.2: + * Fixed a stack-buffer-overflow vulnerability in "econf_writeFile" + function. (CVE-2023-30078, CVE-2023-32181, bsc#1211078) + * Fixed a stack-buffer-overflow vulnerability in "read_file" + function. (CVE-2023-30079, CVE-2023-22652, bsc#1211078) + +------------------------------------------------------------------- +Fri Mar 24 15:12:18 UTC 2023 - schubi@suse.com + +- Update to version 0.5.2: + * Fixed build for aarch64 and gcc13. + * Making the output verbose when a test fails. + * Fixed a stack-buffer-overflow vulnerability in "econf_writeFile" + function. + * Fixed a stack-buffer-overflow vulnerability in "read_file" + function. + * Added new feature: econf_set_conf_dirs (const char **dir_postfix_list) + Sets a list of directory structures (with order) which describes + the directories in which the files have to be parsed. + E.G. with the given list: {"/conf.d/", ".d/", "/", NULL} files in following + directories will be parsed: + "/..d/" + "//conf.d/" + "/.d/" + "//" + The entry "/..d/" will be added + automatically. + * General code cleanup. + +------------------------------------------------------------------- +Thu Jan 19 15:58:59 UTC 2023 - schubi@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) + +------------------------------------------------------------------- +Fri Dec 02 14:13:24 UTC 2022 - schubi@suse.com + +- Update to version 0.5.0: + * API calls econf_read*WithCallback supporting a general (void *) + argument for user defined data with which the callback function is + called. + * Tagged following functions deprecated: + econf_requireOwner, econf_requireGroup, econf_requirePermissions, + econf_followSymlinks, econf_reset_security_settings + Use one of the econf_read*WithCallback functions instead. + +------------------------------------------------------------------- +Wed Nov 23 14:01:34 UTC 2022 - schubi@suse.com + +- Update to version 0.4.9: + * libeconf.h: added missing sys/types.h header (#171) + * new API calls: econf_readFileWithCallback, + econf_readDirsWithCallback, econf_readDirsHistoryWithCallback (#172) + * Checking NULL comment parameter in the parsing functions. + +------------------------------------------------------------------- +Mon Nov 14 13:47:26 UTC 2022 - schubi@suse.com + +- Update to version 0.4.8+git20221114.7ff7704: + * Parsing files which are containing keys only (#170) + All delimiters are allowed now : "", " =", " ", "=". But the + user should use "" in order to be distinct. + * /usr/etc/shells.d/ will not be parsed if + /etc/shells.d/ is defined too. + * Lto build fixed (#168) + * New calls: econf_comment_tag, econf_delimiter_tag, econf_set_comment_tag, + econf_set_delimiter_tag + * Checking UID,GroupID, permissions,... of the parsed files (#165) + New calls: econf_requireOwner, econf_requireGroup, econf_requirePermissions, + econf_followSymlinks + * Ignoring Group without brackets; Do not hold brackets in the internal data structure. (#164) + * Error handling improved for nums and booleans (#163) + +------------------------------------------------------------------- +Wed Apr 27 22:10:35 UTC 2022 - schubi@suse.com + +- Update to version 0.4.6+git20220427.3016f4e: + * econftool: + ** Parsing error: Reporting file and line nr. + ** --delimeters=spaces Taking all kind of spaces for delimiter + * libeconf: + Fixed bsc#1198165: Parsing files correctly which have space characters + AND none space characters as delimiters. + +------------------------------------------------------------------- +Wed Apr 06 21:23:48 UTC 2022 - schubi@suse.com + +- Update to version 0.4.5+git20220406.c9658f2: + * econftool: + ** New call "syntax" for checking the configuration files only. + Returns an error string with line number if an error occurs. + ** New options "--comment" and "--delimeters" + ** Parsing one file only if needed. + +------------------------------------------------------------------- +Tue Jan 04 11:22:44 UTC 2022 - schubi@suse.com + +- Update to version 0.4.4+git20220104.962774f: + * Fixed i586 build (#158) + +------------------------------------------------------------------- +Tue Jan 04 10:27:32 UTC 2022 - schubi@suse.com + +- Update to version 0.4.2+git20220104.5dfd69d: + * Reading numbers with different bases (e.g. oktal) (bsc#1193632) (#157) + +------------------------------------------------------------------- +Thu Nov 11 14:22:24 UTC 2021 - schubi@suse.com + +- Update to version libeconf-0.4.2+git20211111.c7a2c52: + * CMake fixes regarding document installation. + * Fixed different issues while writing string values to file. + * Writing comments to file too. + * Fixed memory leaks. + * Fixed crash while merging values. + +------------------------------------------------------------------- +Fri Jul 9 07:16:22 UTC 2021 - schubi + +- 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 schubi@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 + +- Update to version 0.4.0+git20210707.537a8a: + * Fixed resource leaks found by Iker Pedrosa. + +------------------------------------------------------------------- +Thu Apr 15 10:31:02 UTC 2021 - schubi@suse.com + +- Removed doxygen from build requires. + +------------------------------------------------------------------- +Tue Apr 13 20:25:40 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210413.fdb8025: + * Installing man pages via meson. (#147) + +------------------------------------------------------------------- +Mon Apr 12 19:10:54 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210412.1513a26: + * Added econftool cat option (#146) + * new API call: econf_readDirsHistory (showing ALL locations) + * new API call: econf_getPath (absolute path of the configuration file) + +------------------------------------------------------------------- +Thu Apr 08 17:10:59 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210408.6d33e5e: + * 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. + +------------------------------------------------------------------- +Thu Oct 22 12:16:36 UTC 2020 - Ludwig Nussel + +- explicitly BuildRequire: pkgconfig for /usr/lib/rpm/pkgconfigdeps.sh + On TW it's pulled in implicitly by libxcrypt-devel which is not the + case on 15.2 + +------------------------------------------------------------------- +Fri Jul 10 21:15:09 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.8+git20200710.5126fff: + * Add CMake build scripts, remove autotools support + * Move C++ ABI compatibility section + +------------------------------------------------------------------- +Fri Jun 05 15:57:26 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.7+git20200605.c67ef9a: + * Fix build on i586 + +------------------------------------------------------------------- +Thu Jun 04 11:05:02 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.6+git20200529.276359f: + * Package meson files with autotools + * Use newer version of actions/checkout + * Add actions for meson + * Create meson.yml + * Use meson source root for tests configuration files + * Add additional compiler warnings + * First useable meson build support including unit tests + * Add global options, build with pie and GNU_SOURCE + * Fix name of library, add example binary + * add support for meson + * Add C++ compatibility + * Add test case for crash with empty value keys + +------------------------------------------------------------------- +Mon Feb 03 16:21:51 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.5+git20200203.3144b69: + * Release version 0.3.5 + * Use float.h instead of obsolete gnuism values.h + * Remove gnuism (strdupa) + * Check for empty value (NULL pointer) before calling strdup. + +------------------------------------------------------------------- +Tue Jan 21 14:53:44 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.4+git20200121.febebf2: + * Release version 0.3.4 + * Fix buffer overflow in econf_readDirs + * Fix parsing of quoted strings, and values starting with delimiters + * tests: add test for quoted strings + * tests: tst-configdirs5: fix config dir paths + +------------------------------------------------------------------- +Mon Oct 28 12:11:12 UTC 2019 - iforster@suse.com + +- Update to version 0.3.3+git20191028.3ac14ce: + * Release version 0.3.3 + * Reset *key_file to NULL after free + +------------------------------------------------------------------- +Thu Sep 26 17:43:54 UTC 2019 - kukuk@suse.com + +- Update to version 0.3.2+git20190926.fea4a03: + * Release version 0.3.2 + * Fix merging an empty file (#105) + * Add test cases for merge function + +------------------------------------------------------------------- +Tue Sep 24 12:52:52 UTC 2019 - rbrown@suse.com + +- Update to version 0.3.1+git20190924.822cf5b: + * release version 0.3.1 + * Set delimiter in readFile + * Change parser interface to store file name and line numbers per key + * Update ccpp.yml + +------------------------------------------------------------------- +Fri Sep 06 10:53:32 UTC 2019 - kukuk@suse.de + +- Update to version 0.3.0+git20190906.0e60a88: + * Ensure LICENSE, README, and TODO are included in the release tarball + * Rewrite set*ValueNum functions to avoid libm usage and add error checking + * Move src/*.c to lib and release version 0.3.0 + +------------------------------------------------------------------- +Thu Sep 05 08:54:20 UTC 2019 - kukuk@suse.de + +- Update to version 0.3.0+git20190905.0ca8fe2: + * Merge doc changes from parlt91 (pull rq#73) + * Implement econf_get*ValueDef functions: if key is not found, a provided default is returned. + * Differentiate between no value provided and empty value provided + * Remove obsolete check for comments + * Enhance and adjust test cases + * Remove obsolete check for comments + +------------------------------------------------------------------- +Wed Sep 04 11:13:09 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.03fa5b4: + * Enhance and adjust test cases + * Update ccpp.yml + * Update ccpp.yml + * Update ccpp.yml + +------------------------------------------------------------------- +Wed Sep 04 10:17:25 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.989df9f: + * Remove debug printf + +------------------------------------------------------------------- +Wed Sep 04 09:58:12 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.c9c1820: + * Implement alternate file parser solving the problems with group entry detection. + * Add new parse error error code + * Bool values read from a config file are not sanitzied, so we need to do that in the getBoolValueNum function, too. + * Only use ..d directories + * Release version 0.2.0 + * Add an explanation about this project. + * Check for NULL pointer arguments + * Fix error return value + * Fix typo in comment + * Add test case for reading login.defs with data from util-linux test suite + +------------------------------------------------------------------- +Mon Sep 02 13:18:01 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190902.dd17c11: + * Fix int64 variables on 32bit architectures + +------------------------------------------------------------------- +Sat Aug 31 18:28:13 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190831.fb7c1bb: + * Rewrite econf_readDirs - don't assume suffix is ".conf" - Read files and directories in correct order + +------------------------------------------------------------------- +Fri Aug 30 09:43:08 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190830.04ba053: + * Make clear that the API and ABI of the three functions econf_newIniFile, econf_newKeyFile, econf_writeFile are not stable yet. + * Fix getGroups argument types and add several test cases for this. + * Fix cppcheck and compiler warnings + +------------------------------------------------------------------- +Thu Aug 29 14:05:38 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190829.a1479b1: + * Make comment argument an array, so that we can support more than one comment character in the future. + * Change the API + * Fix size_t as return value of getc() + +------------------------------------------------------------------- +Thu Aug 29 10:53:04 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190829.209219e: + * Convert all functions to new error API + * Convert econf_newKeyFile provide the error via return code + +------------------------------------------------------------------- +Wed Aug 28 13:42:50 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190828.74eeb32: + * Fix tst-arguments3 and tst-arguments4 and only use error return code. + * Bug fixes for new API + * Change API of econf_get* and econf_set* functions to return error code direct. + * Fix some compiler warnings + * Prevent possible crash when parsing 0xFF + * Add "--enable-compiler-warnings" option to enable much more GCC compiler warnings + * Fix more cppcheck warnings + * Fix github actions build + * Update bin/Makefile.am to work with Asan + * Add missing tst-getconfdirs4-data to EXTRA_DIST + * Fix some cppcheck warnings + * Don't ignore getline return value + * Add free for getStringValue in tst-group1 + * Remove XFAIL for tst-groups1 + * Update example.c to free after getStringValue + * Add addbrackets for getValue functions + * tst-getconfdirs4: make sure, only a file in /etc/ and not in /usr/etc works, too. + +------------------------------------------------------------------- +Tue Aug 27 12:19:45 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.5ed5492: + * Mark all input char pointer as const in the official API + +------------------------------------------------------------------- +Tue Aug 27 11:49:42 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.b243e6c: + * getStringValueNum returns a newly allocated string or NULL in error case. + +------------------------------------------------------------------- +Tue Aug 27 09:47:12 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.8374759: + * Fix missing return + * Remove XFAIL for tst-setgetvalues1 + * Fix representation of float and double values + * Add preliminary test case for group handling + * NULL terminate string returned by addbrackets + * Fix addbrackets function + +------------------------------------------------------------------- +Mon Aug 26 19:09:25 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190826.99b6bf3: + * Add more "const". + * Fix setString and setBoolean + * Add test suite which sets and gets all possible kind of types. Some are failing, so mark this test as XFAIL. + * Start marking some string arguments/results as const + * Optimize some strdup away + * Mark econf_write_key_file as ALPHA as the API is not stable + +------------------------------------------------------------------- +Mon Aug 26 11:43:16 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190826.9e69003: + * Update ccpp.yml + * Add --enable-compiler-checks option to configure, enables AddressSanitizer + * Fix printf format directive + * Rework set*Value functions for error checking and error handling + * Add tst-getconfdirs3: verify we can load original file without local changes + * Error handling for econf_getGroups and econf_getKeys + * More errorreporting changes + * Fix make distcheck/don't mess around with libtool install/uninstall, this breaks to much other stuff. + * Autotools cleanup and fixes + * Fix logindefs1 test case + +------------------------------------------------------------------- +Fri Aug 23 18:56:13 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190823.09a8f2e: + * Fix buffer overlow of realpath + +------------------------------------------------------------------- +Fri Aug 23 15:58:37 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190823.acd8cdf: + * Update ccpp.yml + * Fix crash in strcmp, if strchr returns NULL + * Add error reporting to econf_merge_key_files and adjust the depending code. + * setStringValue return NULL on error/key not found + * Add framework for correct error reporting + * Disable searching through XDG dirs for now + * Add test cases for econf_get_conf_from_dirs + * Update comment setValue -> econf_setValue + * Update test cases to use econf_destroy + * Replace econf_afree with econf_destroy in example + * Add _generic macro to free memory of econf_ functions + * Add tst-merge2 to .gitignore + * Fix pointer arithmetic + * Adjust Makefiles and code to make "make distcheck" working + +------------------------------------------------------------------- +Thu Aug 22 19:33:21 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190822.bb9702b: + * Ignore /usr file if /etc exists when merging + * Add NULL value handling + * Update merge example + * Rework merge_functionality + * Use deep copies instead of pointers for merged files + * Replace [] with KEY_FILE_NULL_VALUE + * Refactor getfilecontent functions + * Remove cmake files + * Fix test cases + * Update libeconf.c + * Change License from LGPL-2.1 to MIT + * libeconf.pc should only be deleted on distclean, not normal clean + * Fix delim argument + * Add more test cases for login.defs and wrong arguments + * Link libeconf against libm, so that it is enough to link an application against libeconf and developers don't need to bother with other dependencies + * Add autogen.sh, which calls autoconf/automake/libtool in the correct order to create the configure script + +------------------------------------------------------------------- +Tue Aug 20 13:04:55 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190820.742af8c: + * Remove accidental .swp file + * Update example with conf.d directory + * Remove regex, replace with strchr(delim, ch) + * Add symbol versioning Don't ignore complete lib directory + * Include all headers in tar archive + * Don't define our own errno + * Remove wrong commit + * Add some basic tests + +------------------------------------------------------------------- +Tue Aug 20 12:59:47 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190807.7aedb57: + * Refactor getfilecontent functions + * Update example file + * Add econf prefix to public API functions + * Add cmake targets for debugging + * Fix build with cmake + * Fix build with autotools + * Move Key_File allocation from the stack to the heap + * Move Key_File create functions to libeconf.c + * Move destroy functions from helpers.c to libeconf.c + * Add macro to set supported types generic. + +------------------------------------------------------------------- +Sat Aug 17 11:53:48 UTC 2019 - Thorsten Kukuk + +- Initial version diff --git a/libeconf.spec b/libeconf.spec new file mode 100644 index 0000000..5df39f4 --- /dev/null +++ b/libeconf.spec @@ -0,0 +1,105 @@ +# +# spec file for package libeconf +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define lname libeconf0 +Name: libeconf +Version: 0.7.6 +Release: 0 +Summary: Enhanced config file parser ala systemd +License: MIT +Group: Development/Libraries/C and C++ +URL: https://github.com/openSUSE/libeconf +Source: libeconf-%{version}.tar.xz +Source2: baselibs.conf +BuildRequires: meson +# for /usr/lib/rpm/pkgconfigdeps.sh +BuildRequires: pkgconfig + +%description +Enhanced config file parser, which merges config files placed +in several locations into one. + +%package -n %{lname} +Summary: Enhanced config file parser ala systemd +Group: Development/Libraries/C and C++ + +%description -n %{lname} +Enhanced config file parser, which merges config files placed +in several locations into one. + +%package devel +Summary: Development files for libeconf +Group: Development/Libraries/C and C++ +Requires: %{lname} = %{version} + +%description devel +This package contains all necessary include files and libraries needed +to develop applications that needs to read configuration files from +different locations. + +%package devel-static +Summary: Static library for libeconf +Group: Development/Libraries/C and C++ +Requires: libeconf-devel = %{version} + +%description devel-static +This package contains libeconf.a static library. + +%package utils +Summary: Command line interface for libeconf +Group: System/Base +Requires: %{lname} = %{version} + +%description utils +This package contains tools for handling configuration files in e.g. /usr/etc +and /etc. + +%prep +%setup -q + +%build +%meson +%meson_build + +%install +%meson_install + +%check +%meson_test + +%post -n %{lname} -p /sbin/ldconfig +%postun -n %{lname} -p /sbin/ldconfig + +%files -n %{lname} +%license LICENSE +%{_libdir}/libeconf.so.* + +%files devel-static +%{_libdir}/libeconf.a + +%files devel +%{_includedir}/*.h +%{_libdir}/libeconf.so +%{_libdir}/pkgconfig/libeconf.pc +%{_mandir}/man3/*.3%{?ext_man} + +%files utils +%{_bindir}/econftool +%{_mandir}/man8/econftool.8%{?ext_man} + +%changelog diff --git a/python-libeconf.changes b/python-libeconf.changes new file mode 100644 index 0000000..2e4559a --- /dev/null +++ b/python-libeconf.changes @@ -0,0 +1,167 @@ +------------------------------------------------------------------- +Fri Dec 13 13:03:47 UTC 2024 - schubi@suse.com + +- Update to version 0.7.6: + * Do not try to parse files with name like ".." and "." (#227) + * using econf_readConfig in econftool + +------------------------------------------------------------------- +Mon Dec 09 16:33:49 UTC 2024 - schubi@suse.com + +- Update to version 0.7.5: + * Removed PATH_MAX (Issue #220) + * Add ROOT_PREFIX as option to replace TESTSDIR hack + * CI: valgrind doesn't work together with sanitizers + * econf_readConfig: don't allocate econf_file in error case + * tests: use cleanup to free key_file for some tests + * libeconf: don't allocate array from size 0 + * libeconf: fix use of uninitialized stat result if file does not exist + * econftool: dynamically allocate xdg_config_dir + * Disable clang <= 17, enable valgrind + * Disable whitespace check + * Disable deprecation warning for econftool and example + * Add new CI with different compilers and valgrind + * Test econf_readConfig() + * Disable deprecation warning for tests + * Implement econf_*freep functions for automatic cleanup + * Cleanup *free functions + +------------------------------------------------------------------- +Wed Oct 2 07:09:19 UTC 2024 - Stefan Schubert + +- Updated license in the spec file to MIT. + +------------------------------------------------------------------- +Thu Sep 26 11:08:13 UTC 2024 - schubi@suse.com + +- Update to version 0.7.4: + * fixed memory leaks (#219) + +------------------------------------------------------------------- +Wed Sep 18 11:16:34 UTC 2024 - schubi@suse.com + +- Update to version 0.7.3: + * Fixed: econf_readDirs crashes if one of the paths is NULL (#211) + * Handle groups correctly which do not have any key entry. + * Added links to man page. E.g. "man econf_readConfig" is working now. + * Simplify snprintf call + * Remove unused functions and reduce variable visibility (#213) + * Fix typos (#212) + +------------------------------------------------------------------- +Fri Jun 14 07:26:15 UTC 2024 - schubi@suse.com + +- Update to version 0.7.2: + * Do not check errno while float conversion. This is a false + alarm for S390 and PPC (#210). + +------------------------------------------------------------------- +Mon Jun 10 07:36:06 UTC 2024 - schubi@suse.com + +- Update to version 0.7.1: +* Improved error handling while parsing values with the wrong format. + Added new return value ECONF_VALUE_CONVERSION_ERROR. +* Setting parsing options via econf_file struct. + see econf_newKeyFile_with_options. These options will be used by + econf_readConfig and econf_readConfigWithCallback. + Following options are supported: + JOIN_SAME_ENTRIES (default 0) + Parsed entries with the same name will not be replaces but + will be joined to one entry. + PYTHON_STYLE (default 0) + E.G. Identations will be handled like multiline entries. + PARSING_DIRS (default /usr/etc/:/run:/etc) + List of directories from which the configuration files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g.: "PARSING_DIRS=/usr/etc/:/run:/etc" + CONFIG_DIRS (default ) + List of directory structures (with order) which describes the directories + in which the files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g. with the given list: "CONFIG_DIRS=.conf.d:.d" files in + following directories will be parsed: + "/.conf.d/" + "/.d/" + "//" +* CAUTION: From now on every econf_file element MUST be intialized if + econf_readConfig and econf_readConfigWithCallback is used. + Either with NULL or: + econf_file *key_file = NULL; + if (error = econf_newKeyFile_with_options(&key_file, "PYTHON_STYLE=1")) + { + fprintf (stderr, "ERROR: couldn't create new key file: %s\n", + econf_errString(error)); + return 1; + } + error = econf_readConfig (&key_file, + "foo", + "/usr/lib", + "example", + "conf", + "=", "#"); + +------------------------------------------------------------------- +Tue Jun 04 11:08:28 UTC 2024 - schubi@suse.com + +- Update to version 0.7.0: + * Defining manual parsing directories (#209) + * parsing config files in python style + * econf_readConfig: set usr_subdir to empty string if it is NULL + * Fix static analyzer detected issues (#202) + * comment string can be in the parsed value which is defined with quotes (#207) + * tst-comments2: comment sign in quoted string (#205) + * Setting options via new econf_newKeyFile_with_options. (#206) + +------------------------------------------------------------------- +Fri Apr 12 10:47:39 UTC 2024 - schubi@suse.com + +- Update to version 0.6.3: + * Fix build with musl libc on ppc64le (#198) + * Creating static library with new package libeconf-devel-static. + This is needed for building package util-linux and btrfsprogs. + +------------------------------------------------------------------- +Wed Mar 06 11:02:00 UTC 2024 - schubi@suse.com + +- Update to version 0.6.2: + * Fix static analyzer detected issues (#196) + +------------------------------------------------------------------- +Mon Jan 22 14:30:16 UTC 2024 - schubi@suse.com + +- Update to version 0.6.1: + * reading lines which have a length greater than BUFSIZE (#195) + * Improved data quote check in read_file (#193) + +------------------------------------------------------------------- +Mon Nov 13 07:55:36 UTC 2023 - Alberto Planas Dominguez + +- Do not requires the library for the documentation + +------------------------------------------------------------------ +Wed Nov 8 12:45:07 UTC 2023 - Alberto Planas Dominguez + +- Fix version comparison operator +- Remove explicit python3-base requirement + +------------------------------------------------------------------- +Fri Nov 03 16:44:38 UTC 2023 - schubi@suse.com + +- Update to version 1.1.1: + * Supporting Linux Userspace API (UAPI) Group + chapter "Configuration Files Specification". + See: https://uapi-group.org/specifications/specs/ + configuration_files_specification/ + +------------------------------------------------------------------- +Fri Nov 3 10:12:29 UTC 2023 - Alberto Planas Dominguez + +- Support only Python >= 3.10. PEP 604 is used for union types + +------------------------------------------------------------------- +Fri Oct 27 08:42:26 UTC 2023 - Nico Krapp + +- Version 1.1.0 + * Added tests + * Support all functions form libeconf 0.5.2 + * Bug fixes diff --git a/python-libeconf.spec b/python-libeconf.spec new file mode 100644 index 0000000..8fd6792 --- /dev/null +++ b/python-libeconf.spec @@ -0,0 +1,68 @@ +# +# spec file for package python-libeconf +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +%define skip_python39 1 +Name: python-libeconf +Version: 0.7.6 +Release: 0 +Summary: Python bindings for libeconf +License: MIT +Group: Development/Languages/Python +URL: https://github.com/openSUSE/libeconf +Source: libeconf-%{version}.tar.xz +BuildArch: noarch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: python-rpm-macros +Requires: libeconf0 = %{version} +Suggests: python-libeconf-doc = %{version} +%python_subpackages + +%description +Python bindings for libeconf + +%package -n python-libeconf-doc +Summary: Man page for python-libeconf + +%description -n python-libeconf-doc +Man page for python-lineconf + +%prep +%autosetup -n libeconf-%{version}/bindings/python3 + +%build +%pyproject_wheel + +%install +%pyproject_install +mkdir -p %{buildroot}/usr/share/man/man3 +cp docs/python-libeconf.3 %{buildroot}%{_mandir}/man3/ + +%files %python_files +%{python_sitelib} +# The cache is not always present +#pycache_only %{python_sitelib}/__pycache__ + +%files -n python-libeconf-doc +%defattr(-,root,root) +%{_mandir}/man3/*python-libeconf* + +%changelog -- 2.51.1 From 42b5c61198af18680d9f3bd8b7f5e21e3832124425dd5d7b402d78bac1c05bbf Mon Sep 17 00:00:00 2001 From: Stefan Schubert Date: Mon, 13 Jan 2025 09:53:19 +0000 Subject: [PATCH 6/9] - Update to version 0.7.7: * Additional fix for parsing empty config files (bsc#1234405). OBS-URL: https://build.opensuse.org/package/show/devel:microos/libeconf?expand=0&rev=42 --- _servicedata | 2 +- libeconf-0.7.6.tar.xz | 3 --- libeconf-0.7.7.tar.xz | 3 +++ libeconf.changes | 6 ++++++ libeconf.spec | 4 ++-- python-libeconf.changes | 6 ++++++ python-libeconf.spec | 4 ++-- 7 files changed, 20 insertions(+), 8 deletions(-) delete mode 100644 libeconf-0.7.6.tar.xz create mode 100644 libeconf-0.7.7.tar.xz diff --git a/_servicedata b/_servicedata index efced2d..0d97ed9 100644 --- a/_servicedata +++ b/_servicedata @@ -1,6 +1,6 @@ https://github.com/openSUSE/libeconf.git - acbf7e06de84ea289fd4d3dd189d7e36c49c09ae + 8d6e8917bc359823862225816a181f9f322a8d99 \ No newline at end of file diff --git a/libeconf-0.7.6.tar.xz b/libeconf-0.7.6.tar.xz deleted file mode 100644 index a535046..0000000 --- a/libeconf-0.7.6.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:43c99736271818daaf9c5de50dc7c254a7d094dd64206763253e88f2ebca2b27 -size 181060 diff --git a/libeconf-0.7.7.tar.xz b/libeconf-0.7.7.tar.xz new file mode 100644 index 0000000..a624e8f --- /dev/null +++ b/libeconf-0.7.7.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b741f2f6e90e83c5ad4a71eb384c717836e91b9a705d3624f91492df4e8e67cf +size 181444 diff --git a/libeconf.changes b/libeconf.changes index ac21140..75081d1 100644 --- a/libeconf.changes +++ b/libeconf.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 13 09:44:55 UTC 2025 - schubi@suse.com + +- Update to version 0.7.7: + * Additional fix for parsing empty config files (bsc#1234405). + ------------------------------------------------------------------- Fri Dec 13 13:03:47 UTC 2024 - schubi@suse.com diff --git a/libeconf.spec b/libeconf.spec index 5df39f4..577a663 100644 --- a/libeconf.spec +++ b/libeconf.spec @@ -1,7 +1,7 @@ # # spec file for package libeconf # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 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.7.6 +Version: 0.7.7 Release: 0 Summary: Enhanced config file parser ala systemd License: MIT diff --git a/python-libeconf.changes b/python-libeconf.changes index 2e4559a..ffbf01d 100644 --- a/python-libeconf.changes +++ b/python-libeconf.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 13 09:44:55 UTC 2025 - schubi@suse.com + +- Update to version 0.7.7: + * Additional fix for parsing empty config files (bsc#1234405). + ------------------------------------------------------------------- Fri Dec 13 13:03:47 UTC 2024 - schubi@suse.com diff --git a/python-libeconf.spec b/python-libeconf.spec index 8fd6792..16d5f61 100644 --- a/python-libeconf.spec +++ b/python-libeconf.spec @@ -1,7 +1,7 @@ # # spec file for package python-libeconf # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %{?sle15_python_module_pythons} %define skip_python39 1 Name: python-libeconf -Version: 0.7.6 +Version: 0.7.7 Release: 0 Summary: Python bindings for libeconf License: MIT -- 2.51.1 From b2218b1e971afd0e3cc90a2eca5284e997713311bfbfff3383e8d53cf5ffb498 Mon Sep 17 00:00:00 2001 From: Stefan Schubert Date: Fri, 25 Apr 2025 08:45:28 +0000 Subject: [PATCH 7/9] - Update to version 0.7.8: * Fix memory access if there are a comment character inside a comment. OBS-URL: https://build.opensuse.org/package/show/devel:microos/libeconf?expand=0&rev=44 --- .gitattributes | 23 ++ .gitignore | 1 + _multibuild | 4 + _service | 15 + _servicedata | 6 + baselibs.conf | 1 + libeconf-0.7.2.tar.xz | 3 + libeconf-0.7.3.tar.xz | 3 + libeconf-0.7.4.tar.xz | 3 + libeconf-0.7.5.tar.xz | 3 + libeconf-0.7.7.tar.xz | 3 + libeconf-0.7.8.tar.xz | 3 + libeconf.changes | 660 ++++++++++++++++++++++++++++++++++++++++ libeconf.spec | 105 +++++++ python-libeconf.changes | 179 +++++++++++ python-libeconf.spec | 68 +++++ 16 files changed, 1080 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 _service create mode 100644 _servicedata create mode 100644 baselibs.conf create mode 100644 libeconf-0.7.2.tar.xz create mode 100644 libeconf-0.7.3.tar.xz create mode 100644 libeconf-0.7.4.tar.xz create mode 100644 libeconf-0.7.5.tar.xz create mode 100644 libeconf-0.7.7.tar.xz create mode 100644 libeconf-0.7.8.tar.xz create mode 100644 libeconf.changes create mode 100644 libeconf.spec create mode 100644 python-libeconf.changes create mode 100644 python-libeconf.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..e250e09 --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + +python-libeconf + + diff --git a/_service b/_service new file mode 100644 index 0000000..cb21d61 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + 0.5.0 + @PARENT_TAG@ + v(\d+\.\d+\.\d+) + https://github.com/openSUSE/libeconf.git + git + enable + + + xz + *.tar + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..b56e181 --- /dev/null +++ b/_servicedata @@ -0,0 +1,6 @@ + + + https://github.com/openSUSE/libeconf.git + 37d288b97e0c882bf6ee671d75fbf9718c375386 + + \ No newline at end of file diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..0f76614 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1 @@ +libeconf0 diff --git a/libeconf-0.7.2.tar.xz b/libeconf-0.7.2.tar.xz new file mode 100644 index 0000000..c53016a --- /dev/null +++ b/libeconf-0.7.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d25ce67bba2541e19f895a51faa7b87dba56426b48789ecbe2c937581ea19424 +size 176696 diff --git a/libeconf-0.7.3.tar.xz b/libeconf-0.7.3.tar.xz new file mode 100644 index 0000000..ba802f0 --- /dev/null +++ b/libeconf-0.7.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae5257fd75ca24f7326d33448d5f4ebe9052b76006e08743731684dec0941bb4 +size 178304 diff --git a/libeconf-0.7.4.tar.xz b/libeconf-0.7.4.tar.xz new file mode 100644 index 0000000..c208899 --- /dev/null +++ b/libeconf-0.7.4.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88096729ff71b9d372ba211bb5a93e4aa934c2484f3fab8adacd90f2adc8f90b +size 178320 diff --git a/libeconf-0.7.5.tar.xz b/libeconf-0.7.5.tar.xz new file mode 100644 index 0000000..b8e5413 --- /dev/null +++ b/libeconf-0.7.5.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81051f98e905e909953b96fcfab74ba5edaf9c51991c6627a526bc808a471e5f +size 180648 diff --git a/libeconf-0.7.7.tar.xz b/libeconf-0.7.7.tar.xz new file mode 100644 index 0000000..a624e8f --- /dev/null +++ b/libeconf-0.7.7.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b741f2f6e90e83c5ad4a71eb384c717836e91b9a705d3624f91492df4e8e67cf +size 181444 diff --git a/libeconf-0.7.8.tar.xz b/libeconf-0.7.8.tar.xz new file mode 100644 index 0000000..592c437 --- /dev/null +++ b/libeconf-0.7.8.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b717532442fc77ac16ee5e763ccb04826d7e6fe9541a1f7d46320cc1afd15fe8 +size 181840 diff --git a/libeconf.changes b/libeconf.changes new file mode 100644 index 0000000..67d9738 --- /dev/null +++ b/libeconf.changes @@ -0,0 +1,660 @@ +------------------------------------------------------------------- +Fri Apr 25 08:25:57 UTC 2025 - schubi@suse.com + +- Update to version 0.7.8: + * Fix memory access if there are a comment character inside a comment. + +------------------------------------------------------------------- +Mon Jan 13 09:44:55 UTC 2025 - schubi@suse.com + +- Update to version 0.7.7: + * Additional fix for parsing empty config files (bsc#1234405). + +------------------------------------------------------------------- +Fri Dec 13 13:03:47 UTC 2024 - schubi@suse.com + +- Update to version 0.7.6: + * Do not try to parse files with name like ".." and "." (#227) + * using econf_readConfig in econftool + +------------------------------------------------------------------- +Mon Dec 09 16:33:49 UTC 2024 - schubi@suse.com + +- Update to version 0.7.5: + * Removed PATH_MAX (Issue #220) + * Add ROOT_PREFIX as option to replace TESTSDIR hack + * CI: valgrind doesn't work together with sanitizers + * econf_readConfig: don't allocate econf_file in error case + * tests: use cleanup to free key_file for some tests + * libeconf: don't allocate array from size 0 + * libeconf: fix use of uninitialized stat result if file does not exist + * econftool: dynamically allocate xdg_config_dir + * Disable clang <= 17, enable valgrind + * Disable whitespace check + * Disable deprecation warning for econftool and example + * Add new CI with different compilers and valgrind + * Test econf_readConfig() + * Disable deprecation warning for tests + * Implement econf_*freep functions for automatic cleanup + * Cleanup *free functions + +------------------------------------------------------------------- +Wed Oct 2 07:08:25 UTC 2024 - Stefan Schubert + +- Updated license in the spec file to MIT. + +------------------------------------------------------------------- +Thu Sep 26 11:08:13 UTC 2024 - schubi@suse.com + +- Update to version 0.7.4: + * Fixed memory leaks (#219) + * Fixed: econf_readDirs crashes if one of the paths is NULL (#211) + * Added links to man page. E.g. "man econf_readConfig" is working now. + * Handle groups correctly which do not have any key entry. + +------------------------------------------------------------------- +Wed Sep 18 11:16:34 UTC 2024 - schubi@suse.com + +- Update to version 0.7.3: + * Groups handled in an own list (#218) + * Add econftool as dependency of its tests + * Simplify snprintf call + * Remove unused functions and reduce variable visibility (#213) + * Fix typos (#212) + +------------------------------------------------------------------- +Fri Jun 14 07:26:15 UTC 2024 - schubi@suse.com + +- Update to version 0.7.2: + * Do not check errno while float conversion. This is a false + alarm for S390 and PPC (#210) + +------------------------------------------------------------------- +Mon Jun 10 07:36:06 UTC 2024 - schubi@suse.com + +- Update to version 0.7.1: +* Improved error handling while parsing values with the wrong format. + Added new return value ECONF_VALUE_CONVERSION_ERROR. +* Setting parsing options via econf_file struct. + see econf_newKeyFile_with_options. These options will be used by + econf_readConfig and econf_readConfigWithCallback. + Following options are supported: + JOIN_SAME_ENTRIES (default 0) + Parsed entries with the same name will not be replaces but + will be joined to one entry. + PYTHON_STYLE (default 0) + E.G. Identations will be handled like multiline entries. + PARSING_DIRS (default /usr/etc/:/run:/etc) + List of directories from which the configuration files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g.: "PARSING_DIRS=/usr/etc/:/run:/etc" + CONFIG_DIRS (default ) + List of directory structures (with order) which describes the directories + in which the files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g. with the given list: "CONFIG_DIRS=.conf.d:.d" files in + following directories will be parsed: + "/.conf.d/" + "/.d/" + "//" +* CAUTION: From now on every econf_file element MUST be intialized if + econf_readConfig and econf_readConfigWithCallback is used. + Either with NULL or: + econf_file *key_file = NULL; + if (error = econf_newKeyFile_with_options(&key_file, "PYTHON_STYLE=1")) + { + fprintf (stderr, "ERROR: couldn't create new key file: %s\n", + econf_errString(error)); + return 1; + } + error = econf_readConfig (&key_file, + "foo", + "/usr/lib", + "example", + "conf", + "=", "#"); + +------------------------------------------------------------------- +Tue Jun 04 11:08:28 UTC 2024 - schubi@suse.com + +- Update to version 0.7.0: + * Defining manual parsing directories (#209) + * parsing config files in python style + * econf_readConfig: set usr_subdir to empty string if it is NULL + * Fix static analyzer detected issues (#202) + * comment string can be in the parsed value which is defined with quotes (#207) + * tst-comments2: comment sign in quoted string (#205) + * Setting options via new econf_newKeyFile_with_options. (#206) + +------------------------------------------------------------------- +Fri Apr 12 10:47:39 UTC 2024 - schubi@suse.com + +- Update to version 0.6.3: + * Fix build with musl libc on ppc64le (#198) + * Creating static library with new package libeconf-devel-static. + This is needed for building package util-linux and btrfsprogs. + +------------------------------------------------------------------- +Wed Mar 06 11:02:00 UTC 2024 - schubi@suse.com + +- Update to version 0.6.2: + * version 0.6.2 + * Fix static analyzer detected issues (#196) + +------------------------------------------------------------------- +Mon Jan 22 14:30:16 UTC 2024 - schubi@suse.com + +- Update to version 0.6.1: + * reading lines which have a length greater than BUFSIZE (#195) + * Improved data quote check in read_file (#193) + +------------------------------------------------------------------- +Wed Nov 08 12:20:34 UTC 2023 - schubi@suse.com + +- Update to version 0.6.0: + * Supporting Linux Userspace API (UAPI) Group + chapter "Configuration Files Specification". + See: https://uapi-group.org/specifications/specs/ + configuration_files_specification/ + +------------------------------------------------------------------- +Fri Nov 03 16:44:38 UTC 2023 - schubi@suse.com + +- Update to version 0.5.3: + * Added bindings for python3 and C# + +------------------------------------------------------------------- +Thu Oct 26 14:56:30 UTC 2023 - nico.krapp@suse.com + +- Update to version 0.5.2: + * Add python bindings (#188) + * docu version 0.5.2 + * Fix test (#185) + * Plug memory leak (#186) + +------------------------------------------------------------------- +Wed Sep 6 14:38:13 UTC 2023 - Stefan Schubert + +- Additional info for version 0.5.2: + * Fixed a stack-buffer-overflow vulnerability in "econf_writeFile" + function. (CVE-2023-30078, CVE-2023-32181, bsc#1211078) + * Fixed a stack-buffer-overflow vulnerability in "read_file" + function. (CVE-2023-30079, CVE-2023-22652, bsc#1211078) + +------------------------------------------------------------------- +Fri Mar 24 15:12:18 UTC 2023 - schubi@suse.com + +- Update to version 0.5.2: + * Fixed build for aarch64 and gcc13. + * Making the output verbose when a test fails. + * Fixed a stack-buffer-overflow vulnerability in "econf_writeFile" + function. + * Fixed a stack-buffer-overflow vulnerability in "read_file" + function. + * Added new feature: econf_set_conf_dirs (const char **dir_postfix_list) + Sets a list of directory structures (with order) which describes + the directories in which the files have to be parsed. + E.G. with the given list: {"/conf.d/", ".d/", "/", NULL} files in following + directories will be parsed: + "/..d/" + "//conf.d/" + "/.d/" + "//" + The entry "/..d/" will be added + automatically. + * General code cleanup. + +------------------------------------------------------------------- +Thu Jan 19 15:58:59 UTC 2023 - schubi@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) + +------------------------------------------------------------------- +Fri Dec 02 14:13:24 UTC 2022 - schubi@suse.com + +- Update to version 0.5.0: + * API calls econf_read*WithCallback supporting a general (void *) + argument for user defined data with which the callback function is + called. + * Tagged following functions deprecated: + econf_requireOwner, econf_requireGroup, econf_requirePermissions, + econf_followSymlinks, econf_reset_security_settings + Use one of the econf_read*WithCallback functions instead. + +------------------------------------------------------------------- +Wed Nov 23 14:01:34 UTC 2022 - schubi@suse.com + +- Update to version 0.4.9: + * libeconf.h: added missing sys/types.h header (#171) + * new API calls: econf_readFileWithCallback, + econf_readDirsWithCallback, econf_readDirsHistoryWithCallback (#172) + * Checking NULL comment parameter in the parsing functions. + +------------------------------------------------------------------- +Mon Nov 14 13:47:26 UTC 2022 - schubi@suse.com + +- Update to version 0.4.8+git20221114.7ff7704: + * Parsing files which are containing keys only (#170) + All delimiters are allowed now : "", " =", " ", "=". But the + user should use "" in order to be distinct. + * /usr/etc/shells.d/ will not be parsed if + /etc/shells.d/ is defined too. + * Lto build fixed (#168) + * New calls: econf_comment_tag, econf_delimiter_tag, econf_set_comment_tag, + econf_set_delimiter_tag + * Checking UID,GroupID, permissions,... of the parsed files (#165) + New calls: econf_requireOwner, econf_requireGroup, econf_requirePermissions, + econf_followSymlinks + * Ignoring Group without brackets; Do not hold brackets in the internal data structure. (#164) + * Error handling improved for nums and booleans (#163) + +------------------------------------------------------------------- +Wed Apr 27 22:10:35 UTC 2022 - schubi@suse.com + +- Update to version 0.4.6+git20220427.3016f4e: + * econftool: + ** Parsing error: Reporting file and line nr. + ** --delimeters=spaces Taking all kind of spaces for delimiter + * libeconf: + Fixed bsc#1198165: Parsing files correctly which have space characters + AND none space characters as delimiters. + +------------------------------------------------------------------- +Wed Apr 06 21:23:48 UTC 2022 - schubi@suse.com + +- Update to version 0.4.5+git20220406.c9658f2: + * econftool: + ** New call "syntax" for checking the configuration files only. + Returns an error string with line number if an error occurs. + ** New options "--comment" and "--delimeters" + ** Parsing one file only if needed. + +------------------------------------------------------------------- +Tue Jan 04 11:22:44 UTC 2022 - schubi@suse.com + +- Update to version 0.4.4+git20220104.962774f: + * Fixed i586 build (#158) + +------------------------------------------------------------------- +Tue Jan 04 10:27:32 UTC 2022 - schubi@suse.com + +- Update to version 0.4.2+git20220104.5dfd69d: + * Reading numbers with different bases (e.g. oktal) (bsc#1193632) (#157) + +------------------------------------------------------------------- +Thu Nov 11 14:22:24 UTC 2021 - schubi@suse.com + +- Update to version libeconf-0.4.2+git20211111.c7a2c52: + * CMake fixes regarding document installation. + * Fixed different issues while writing string values to file. + * Writing comments to file too. + * Fixed memory leaks. + * Fixed crash while merging values. + +------------------------------------------------------------------- +Fri Jul 9 07:16:22 UTC 2021 - schubi + +- 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 schubi@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 + +- Update to version 0.4.0+git20210707.537a8a: + * Fixed resource leaks found by Iker Pedrosa. + +------------------------------------------------------------------- +Thu Apr 15 10:31:02 UTC 2021 - schubi@suse.com + +- Removed doxygen from build requires. + +------------------------------------------------------------------- +Tue Apr 13 20:25:40 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210413.fdb8025: + * Installing man pages via meson. (#147) + +------------------------------------------------------------------- +Mon Apr 12 19:10:54 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210412.1513a26: + * Added econftool cat option (#146) + * new API call: econf_readDirsHistory (showing ALL locations) + * new API call: econf_getPath (absolute path of the configuration file) + +------------------------------------------------------------------- +Thu Apr 08 17:10:59 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210408.6d33e5e: + * 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. + +------------------------------------------------------------------- +Thu Oct 22 12:16:36 UTC 2020 - Ludwig Nussel + +- explicitly BuildRequire: pkgconfig for /usr/lib/rpm/pkgconfigdeps.sh + On TW it's pulled in implicitly by libxcrypt-devel which is not the + case on 15.2 + +------------------------------------------------------------------- +Fri Jul 10 21:15:09 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.8+git20200710.5126fff: + * Add CMake build scripts, remove autotools support + * Move C++ ABI compatibility section + +------------------------------------------------------------------- +Fri Jun 05 15:57:26 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.7+git20200605.c67ef9a: + * Fix build on i586 + +------------------------------------------------------------------- +Thu Jun 04 11:05:02 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.6+git20200529.276359f: + * Package meson files with autotools + * Use newer version of actions/checkout + * Add actions for meson + * Create meson.yml + * Use meson source root for tests configuration files + * Add additional compiler warnings + * First useable meson build support including unit tests + * Add global options, build with pie and GNU_SOURCE + * Fix name of library, add example binary + * add support for meson + * Add C++ compatibility + * Add test case for crash with empty value keys + +------------------------------------------------------------------- +Mon Feb 03 16:21:51 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.5+git20200203.3144b69: + * Release version 0.3.5 + * Use float.h instead of obsolete gnuism values.h + * Remove gnuism (strdupa) + * Check for empty value (NULL pointer) before calling strdup. + +------------------------------------------------------------------- +Tue Jan 21 14:53:44 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.4+git20200121.febebf2: + * Release version 0.3.4 + * Fix buffer overflow in econf_readDirs + * Fix parsing of quoted strings, and values starting with delimiters + * tests: add test for quoted strings + * tests: tst-configdirs5: fix config dir paths + +------------------------------------------------------------------- +Mon Oct 28 12:11:12 UTC 2019 - iforster@suse.com + +- Update to version 0.3.3+git20191028.3ac14ce: + * Release version 0.3.3 + * Reset *key_file to NULL after free + +------------------------------------------------------------------- +Thu Sep 26 17:43:54 UTC 2019 - kukuk@suse.com + +- Update to version 0.3.2+git20190926.fea4a03: + * Release version 0.3.2 + * Fix merging an empty file (#105) + * Add test cases for merge function + +------------------------------------------------------------------- +Tue Sep 24 12:52:52 UTC 2019 - rbrown@suse.com + +- Update to version 0.3.1+git20190924.822cf5b: + * release version 0.3.1 + * Set delimiter in readFile + * Change parser interface to store file name and line numbers per key + * Update ccpp.yml + +------------------------------------------------------------------- +Fri Sep 06 10:53:32 UTC 2019 - kukuk@suse.de + +- Update to version 0.3.0+git20190906.0e60a88: + * Ensure LICENSE, README, and TODO are included in the release tarball + * Rewrite set*ValueNum functions to avoid libm usage and add error checking + * Move src/*.c to lib and release version 0.3.0 + +------------------------------------------------------------------- +Thu Sep 05 08:54:20 UTC 2019 - kukuk@suse.de + +- Update to version 0.3.0+git20190905.0ca8fe2: + * Merge doc changes from parlt91 (pull rq#73) + * Implement econf_get*ValueDef functions: if key is not found, a provided default is returned. + * Differentiate between no value provided and empty value provided + * Remove obsolete check for comments + * Enhance and adjust test cases + * Remove obsolete check for comments + +------------------------------------------------------------------- +Wed Sep 04 11:13:09 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.03fa5b4: + * Enhance and adjust test cases + * Update ccpp.yml + * Update ccpp.yml + * Update ccpp.yml + +------------------------------------------------------------------- +Wed Sep 04 10:17:25 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.989df9f: + * Remove debug printf + +------------------------------------------------------------------- +Wed Sep 04 09:58:12 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.c9c1820: + * Implement alternate file parser solving the problems with group entry detection. + * Add new parse error error code + * Bool values read from a config file are not sanitzied, so we need to do that in the getBoolValueNum function, too. + * Only use ..d directories + * Release version 0.2.0 + * Add an explanation about this project. + * Check for NULL pointer arguments + * Fix error return value + * Fix typo in comment + * Add test case for reading login.defs with data from util-linux test suite + +------------------------------------------------------------------- +Mon Sep 02 13:18:01 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190902.dd17c11: + * Fix int64 variables on 32bit architectures + +------------------------------------------------------------------- +Sat Aug 31 18:28:13 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190831.fb7c1bb: + * Rewrite econf_readDirs - don't assume suffix is ".conf" - Read files and directories in correct order + +------------------------------------------------------------------- +Fri Aug 30 09:43:08 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190830.04ba053: + * Make clear that the API and ABI of the three functions econf_newIniFile, econf_newKeyFile, econf_writeFile are not stable yet. + * Fix getGroups argument types and add several test cases for this. + * Fix cppcheck and compiler warnings + +------------------------------------------------------------------- +Thu Aug 29 14:05:38 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190829.a1479b1: + * Make comment argument an array, so that we can support more than one comment character in the future. + * Change the API + * Fix size_t as return value of getc() + +------------------------------------------------------------------- +Thu Aug 29 10:53:04 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190829.209219e: + * Convert all functions to new error API + * Convert econf_newKeyFile provide the error via return code + +------------------------------------------------------------------- +Wed Aug 28 13:42:50 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190828.74eeb32: + * Fix tst-arguments3 and tst-arguments4 and only use error return code. + * Bug fixes for new API + * Change API of econf_get* and econf_set* functions to return error code direct. + * Fix some compiler warnings + * Prevent possible crash when parsing 0xFF + * Add "--enable-compiler-warnings" option to enable much more GCC compiler warnings + * Fix more cppcheck warnings + * Fix github actions build + * Update bin/Makefile.am to work with Asan + * Add missing tst-getconfdirs4-data to EXTRA_DIST + * Fix some cppcheck warnings + * Don't ignore getline return value + * Add free for getStringValue in tst-group1 + * Remove XFAIL for tst-groups1 + * Update example.c to free after getStringValue + * Add addbrackets for getValue functions + * tst-getconfdirs4: make sure, only a file in /etc/ and not in /usr/etc works, too. + +------------------------------------------------------------------- +Tue Aug 27 12:19:45 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.5ed5492: + * Mark all input char pointer as const in the official API + +------------------------------------------------------------------- +Tue Aug 27 11:49:42 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.b243e6c: + * getStringValueNum returns a newly allocated string or NULL in error case. + +------------------------------------------------------------------- +Tue Aug 27 09:47:12 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.8374759: + * Fix missing return + * Remove XFAIL for tst-setgetvalues1 + * Fix representation of float and double values + * Add preliminary test case for group handling + * NULL terminate string returned by addbrackets + * Fix addbrackets function + +------------------------------------------------------------------- +Mon Aug 26 19:09:25 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190826.99b6bf3: + * Add more "const". + * Fix setString and setBoolean + * Add test suite which sets and gets all possible kind of types. Some are failing, so mark this test as XFAIL. + * Start marking some string arguments/results as const + * Optimize some strdup away + * Mark econf_write_key_file as ALPHA as the API is not stable + +------------------------------------------------------------------- +Mon Aug 26 11:43:16 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190826.9e69003: + * Update ccpp.yml + * Add --enable-compiler-checks option to configure, enables AddressSanitizer + * Fix printf format directive + * Rework set*Value functions for error checking and error handling + * Add tst-getconfdirs3: verify we can load original file without local changes + * Error handling for econf_getGroups and econf_getKeys + * More errorreporting changes + * Fix make distcheck/don't mess around with libtool install/uninstall, this breaks to much other stuff. + * Autotools cleanup and fixes + * Fix logindefs1 test case + +------------------------------------------------------------------- +Fri Aug 23 18:56:13 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190823.09a8f2e: + * Fix buffer overlow of realpath + +------------------------------------------------------------------- +Fri Aug 23 15:58:37 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190823.acd8cdf: + * Update ccpp.yml + * Fix crash in strcmp, if strchr returns NULL + * Add error reporting to econf_merge_key_files and adjust the depending code. + * setStringValue return NULL on error/key not found + * Add framework for correct error reporting + * Disable searching through XDG dirs for now + * Add test cases for econf_get_conf_from_dirs + * Update comment setValue -> econf_setValue + * Update test cases to use econf_destroy + * Replace econf_afree with econf_destroy in example + * Add _generic macro to free memory of econf_ functions + * Add tst-merge2 to .gitignore + * Fix pointer arithmetic + * Adjust Makefiles and code to make "make distcheck" working + +------------------------------------------------------------------- +Thu Aug 22 19:33:21 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190822.bb9702b: + * Ignore /usr file if /etc exists when merging + * Add NULL value handling + * Update merge example + * Rework merge_functionality + * Use deep copies instead of pointers for merged files + * Replace [] with KEY_FILE_NULL_VALUE + * Refactor getfilecontent functions + * Remove cmake files + * Fix test cases + * Update libeconf.c + * Change License from LGPL-2.1 to MIT + * libeconf.pc should only be deleted on distclean, not normal clean + * Fix delim argument + * Add more test cases for login.defs and wrong arguments + * Link libeconf against libm, so that it is enough to link an application against libeconf and developers don't need to bother with other dependencies + * Add autogen.sh, which calls autoconf/automake/libtool in the correct order to create the configure script + +------------------------------------------------------------------- +Tue Aug 20 13:04:55 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190820.742af8c: + * Remove accidental .swp file + * Update example with conf.d directory + * Remove regex, replace with strchr(delim, ch) + * Add symbol versioning Don't ignore complete lib directory + * Include all headers in tar archive + * Don't define our own errno + * Remove wrong commit + * Add some basic tests + +------------------------------------------------------------------- +Tue Aug 20 12:59:47 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190807.7aedb57: + * Refactor getfilecontent functions + * Update example file + * Add econf prefix to public API functions + * Add cmake targets for debugging + * Fix build with cmake + * Fix build with autotools + * Move Key_File allocation from the stack to the heap + * Move Key_File create functions to libeconf.c + * Move destroy functions from helpers.c to libeconf.c + * Add macro to set supported types generic. + +------------------------------------------------------------------- +Sat Aug 17 11:53:48 UTC 2019 - Thorsten Kukuk + +- Initial version diff --git a/libeconf.spec b/libeconf.spec new file mode 100644 index 0000000..96731b0 --- /dev/null +++ b/libeconf.spec @@ -0,0 +1,105 @@ +# +# spec file for package libeconf +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define lname libeconf0 +Name: libeconf +Version: 0.7.8 +Release: 0 +Summary: Enhanced config file parser ala systemd +License: MIT +Group: Development/Libraries/C and C++ +URL: https://github.com/openSUSE/libeconf +Source: libeconf-%{version}.tar.xz +Source2: baselibs.conf +BuildRequires: meson +# for /usr/lib/rpm/pkgconfigdeps.sh +BuildRequires: pkgconfig + +%description +Enhanced config file parser, which merges config files placed +in several locations into one. + +%package -n %{lname} +Summary: Enhanced config file parser ala systemd +Group: Development/Libraries/C and C++ + +%description -n %{lname} +Enhanced config file parser, which merges config files placed +in several locations into one. + +%package devel +Summary: Development files for libeconf +Group: Development/Libraries/C and C++ +Requires: %{lname} = %{version} + +%description devel +This package contains all necessary include files and libraries needed +to develop applications that needs to read configuration files from +different locations. + +%package devel-static +Summary: Static library for libeconf +Group: Development/Libraries/C and C++ +Requires: libeconf-devel = %{version} + +%description devel-static +This package contains libeconf.a static library. + +%package utils +Summary: Command line interface for libeconf +Group: System/Base +Requires: %{lname} = %{version} + +%description utils +This package contains tools for handling configuration files in e.g. /usr/etc +and /etc. + +%prep +%setup -q + +%build +%meson +%meson_build + +%install +%meson_install + +%check +%meson_test + +%post -n %{lname} -p /sbin/ldconfig +%postun -n %{lname} -p /sbin/ldconfig + +%files -n %{lname} +%license LICENSE +%{_libdir}/libeconf.so.* + +%files devel-static +%{_libdir}/libeconf.a + +%files devel +%{_includedir}/*.h +%{_libdir}/libeconf.so +%{_libdir}/pkgconfig/libeconf.pc +%{_mandir}/man3/*.3%{?ext_man} + +%files utils +%{_bindir}/econftool +%{_mandir}/man8/econftool.8%{?ext_man} + +%changelog diff --git a/python-libeconf.changes b/python-libeconf.changes new file mode 100644 index 0000000..0a2dc09 --- /dev/null +++ b/python-libeconf.changes @@ -0,0 +1,179 @@ +------------------------------------------------------------------- +Fri Apr 25 08:25:57 UTC 2025 - schubi@suse.com + +- Update to version 0.7.8: + * Fix memory access if there are a comment character inside a comment. + +------------------------------------------------------------------- +Mon Jan 13 09:44:55 UTC 2025 - schubi@suse.com + +- Update to version 0.7.7: + * Additional fix for parsing empty config files (bsc#1234405). + +------------------------------------------------------------------- +Fri Dec 13 13:03:47 UTC 2024 - schubi@suse.com + +- Update to version 0.7.6: + * Do not try to parse files with name like ".." and "." (#227) + * using econf_readConfig in econftool + +------------------------------------------------------------------- +Mon Dec 09 16:33:49 UTC 2024 - schubi@suse.com + +- Update to version 0.7.5: + * Removed PATH_MAX (Issue #220) + * Add ROOT_PREFIX as option to replace TESTSDIR hack + * CI: valgrind doesn't work together with sanitizers + * econf_readConfig: don't allocate econf_file in error case + * tests: use cleanup to free key_file for some tests + * libeconf: don't allocate array from size 0 + * libeconf: fix use of uninitialized stat result if file does not exist + * econftool: dynamically allocate xdg_config_dir + * Disable clang <= 17, enable valgrind + * Disable whitespace check + * Disable deprecation warning for econftool and example + * Add new CI with different compilers and valgrind + * Test econf_readConfig() + * Disable deprecation warning for tests + * Implement econf_*freep functions for automatic cleanup + * Cleanup *free functions + +------------------------------------------------------------------- +Wed Oct 2 07:09:19 UTC 2024 - Stefan Schubert + +- Updated license in the spec file to MIT. + +------------------------------------------------------------------- +Thu Sep 26 11:08:13 UTC 2024 - schubi@suse.com + +- Update to version 0.7.4: + * fixed memory leaks (#219) + +------------------------------------------------------------------- +Wed Sep 18 11:16:34 UTC 2024 - schubi@suse.com + +- Update to version 0.7.3: + * Fixed: econf_readDirs crashes if one of the paths is NULL (#211) + * Handle groups correctly which do not have any key entry. + * Added links to man page. E.g. "man econf_readConfig" is working now. + * Simplify snprintf call + * Remove unused functions and reduce variable visibility (#213) + * Fix typos (#212) + +------------------------------------------------------------------- +Fri Jun 14 07:26:15 UTC 2024 - schubi@suse.com + +- Update to version 0.7.2: + * Do not check errno while float conversion. This is a false + alarm for S390 and PPC (#210). + +------------------------------------------------------------------- +Mon Jun 10 07:36:06 UTC 2024 - schubi@suse.com + +- Update to version 0.7.1: +* Improved error handling while parsing values with the wrong format. + Added new return value ECONF_VALUE_CONVERSION_ERROR. +* Setting parsing options via econf_file struct. + see econf_newKeyFile_with_options. These options will be used by + econf_readConfig and econf_readConfigWithCallback. + Following options are supported: + JOIN_SAME_ENTRIES (default 0) + Parsed entries with the same name will not be replaces but + will be joined to one entry. + PYTHON_STYLE (default 0) + E.G. Identations will be handled like multiline entries. + PARSING_DIRS (default /usr/etc/:/run:/etc) + List of directories from which the configuration files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g.: "PARSING_DIRS=/usr/etc/:/run:/etc" + CONFIG_DIRS (default ) + List of directory structures (with order) which describes the directories + in which the files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g. with the given list: "CONFIG_DIRS=.conf.d:.d" files in + following directories will be parsed: + "/.conf.d/" + "/.d/" + "//" +* CAUTION: From now on every econf_file element MUST be intialized if + econf_readConfig and econf_readConfigWithCallback is used. + Either with NULL or: + econf_file *key_file = NULL; + if (error = econf_newKeyFile_with_options(&key_file, "PYTHON_STYLE=1")) + { + fprintf (stderr, "ERROR: couldn't create new key file: %s\n", + econf_errString(error)); + return 1; + } + error = econf_readConfig (&key_file, + "foo", + "/usr/lib", + "example", + "conf", + "=", "#"); + +------------------------------------------------------------------- +Tue Jun 04 11:08:28 UTC 2024 - schubi@suse.com + +- Update to version 0.7.0: + * Defining manual parsing directories (#209) + * parsing config files in python style + * econf_readConfig: set usr_subdir to empty string if it is NULL + * Fix static analyzer detected issues (#202) + * comment string can be in the parsed value which is defined with quotes (#207) + * tst-comments2: comment sign in quoted string (#205) + * Setting options via new econf_newKeyFile_with_options. (#206) + +------------------------------------------------------------------- +Fri Apr 12 10:47:39 UTC 2024 - schubi@suse.com + +- Update to version 0.6.3: + * Fix build with musl libc on ppc64le (#198) + * Creating static library with new package libeconf-devel-static. + This is needed for building package util-linux and btrfsprogs. + +------------------------------------------------------------------- +Wed Mar 06 11:02:00 UTC 2024 - schubi@suse.com + +- Update to version 0.6.2: + * Fix static analyzer detected issues (#196) + +------------------------------------------------------------------- +Mon Jan 22 14:30:16 UTC 2024 - schubi@suse.com + +- Update to version 0.6.1: + * reading lines which have a length greater than BUFSIZE (#195) + * Improved data quote check in read_file (#193) + +------------------------------------------------------------------- +Mon Nov 13 07:55:36 UTC 2023 - Alberto Planas Dominguez + +- Do not requires the library for the documentation + +------------------------------------------------------------------ +Wed Nov 8 12:45:07 UTC 2023 - Alberto Planas Dominguez + +- Fix version comparison operator +- Remove explicit python3-base requirement + +------------------------------------------------------------------- +Fri Nov 03 16:44:38 UTC 2023 - schubi@suse.com + +- Update to version 1.1.1: + * Supporting Linux Userspace API (UAPI) Group + chapter "Configuration Files Specification". + See: https://uapi-group.org/specifications/specs/ + configuration_files_specification/ + +------------------------------------------------------------------- +Fri Nov 3 10:12:29 UTC 2023 - Alberto Planas Dominguez + +- Support only Python >= 3.10. PEP 604 is used for union types + +------------------------------------------------------------------- +Fri Oct 27 08:42:26 UTC 2023 - Nico Krapp + +- Version 1.1.0 + * Added tests + * Support all functions form libeconf 0.5.2 + * Bug fixes diff --git a/python-libeconf.spec b/python-libeconf.spec new file mode 100644 index 0000000..0be56ac --- /dev/null +++ b/python-libeconf.spec @@ -0,0 +1,68 @@ +# +# spec file for package python-libeconf +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +%define skip_python39 1 +Name: python-libeconf +Version: 0.7.8 +Release: 0 +Summary: Python bindings for libeconf +License: MIT +Group: Development/Languages/Python +URL: https://github.com/openSUSE/libeconf +Source: libeconf-%{version}.tar.xz +BuildArch: noarch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: python-rpm-macros +Requires: libeconf0 = %{version} +Suggests: python-libeconf-doc = %{version} +%python_subpackages + +%description +Python bindings for libeconf + +%package -n python-libeconf-doc +Summary: Man page for python-libeconf + +%description -n python-libeconf-doc +Man page for python-lineconf + +%prep +%autosetup -n libeconf-%{version}/bindings/python3 + +%build +%pyproject_wheel + +%install +%pyproject_install +mkdir -p %{buildroot}/usr/share/man/man3 +cp docs/python-libeconf.3 %{buildroot}%{_mandir}/man3/ + +%files %python_files +%{python_sitelib} +# The cache is not always present +#pycache_only %{python_sitelib}/__pycache__ + +%files -n python-libeconf-doc +%defattr(-,root,root) +%{_mandir}/man3/*python-libeconf* + +%changelog -- 2.51.1 From 3482cc58457ac2a771caefe35c17b3e792e9ad9b80144e51b11133844285ba59 Mon Sep 17 00:00:00 2001 From: Stefan Schubert Date: Fri, 9 May 2025 07:42:35 +0000 Subject: [PATCH 8/9] - Update to version 0.7.9: * Comments can include comment character tag multiple time. * Fixed static library declaration in meason * Fixed versioning in cmake - Update to version 0.7.9: * Comments can include comment character tag multiple time. * Fixed static library declaration in meason * Fixed versioning in cmake OBS-URL: https://build.opensuse.org/package/show/devel:microos/libeconf?expand=0&rev=46 --- .gitattributes | 23 ++ .gitignore | 1 + _multibuild | 4 + _service | 15 + _servicedata | 6 + baselibs.conf | 1 + libeconf-0.7.2.tar.xz | 3 + libeconf-0.7.3.tar.xz | 3 + libeconf-0.7.4.tar.xz | 3 + libeconf-0.7.5.tar.xz | 3 + libeconf-0.7.7.tar.xz | 3 + libeconf-0.7.8.tar.xz | 3 + libeconf-0.7.9.tar.xz | 3 + libeconf.changes | 668 ++++++++++++++++++++++++++++++++++++++++ libeconf.spec | 105 +++++++ python-libeconf.changes | 187 +++++++++++ python-libeconf.spec | 68 ++++ 17 files changed, 1099 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 _service create mode 100644 _servicedata create mode 100644 baselibs.conf create mode 100644 libeconf-0.7.2.tar.xz create mode 100644 libeconf-0.7.3.tar.xz create mode 100644 libeconf-0.7.4.tar.xz create mode 100644 libeconf-0.7.5.tar.xz create mode 100644 libeconf-0.7.7.tar.xz create mode 100644 libeconf-0.7.8.tar.xz create mode 100644 libeconf-0.7.9.tar.xz create mode 100644 libeconf.changes create mode 100644 libeconf.spec create mode 100644 python-libeconf.changes create mode 100644 python-libeconf.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..e250e09 --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + +python-libeconf + + diff --git a/_service b/_service new file mode 100644 index 0000000..cb21d61 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + 0.5.0 + @PARENT_TAG@ + v(\d+\.\d+\.\d+) + https://github.com/openSUSE/libeconf.git + git + enable + + + xz + *.tar + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..9957dc0 --- /dev/null +++ b/_servicedata @@ -0,0 +1,6 @@ + + + https://github.com/openSUSE/libeconf.git + 25eb4246560e870c7e9c9a16abfb206566d98979 + + \ No newline at end of file diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..0f76614 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1 @@ +libeconf0 diff --git a/libeconf-0.7.2.tar.xz b/libeconf-0.7.2.tar.xz new file mode 100644 index 0000000..c53016a --- /dev/null +++ b/libeconf-0.7.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d25ce67bba2541e19f895a51faa7b87dba56426b48789ecbe2c937581ea19424 +size 176696 diff --git a/libeconf-0.7.3.tar.xz b/libeconf-0.7.3.tar.xz new file mode 100644 index 0000000..ba802f0 --- /dev/null +++ b/libeconf-0.7.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae5257fd75ca24f7326d33448d5f4ebe9052b76006e08743731684dec0941bb4 +size 178304 diff --git a/libeconf-0.7.4.tar.xz b/libeconf-0.7.4.tar.xz new file mode 100644 index 0000000..c208899 --- /dev/null +++ b/libeconf-0.7.4.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88096729ff71b9d372ba211bb5a93e4aa934c2484f3fab8adacd90f2adc8f90b +size 178320 diff --git a/libeconf-0.7.5.tar.xz b/libeconf-0.7.5.tar.xz new file mode 100644 index 0000000..b8e5413 --- /dev/null +++ b/libeconf-0.7.5.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81051f98e905e909953b96fcfab74ba5edaf9c51991c6627a526bc808a471e5f +size 180648 diff --git a/libeconf-0.7.7.tar.xz b/libeconf-0.7.7.tar.xz new file mode 100644 index 0000000..a624e8f --- /dev/null +++ b/libeconf-0.7.7.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b741f2f6e90e83c5ad4a71eb384c717836e91b9a705d3624f91492df4e8e67cf +size 181444 diff --git a/libeconf-0.7.8.tar.xz b/libeconf-0.7.8.tar.xz new file mode 100644 index 0000000..592c437 --- /dev/null +++ b/libeconf-0.7.8.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b717532442fc77ac16ee5e763ccb04826d7e6fe9541a1f7d46320cc1afd15fe8 +size 181840 diff --git a/libeconf-0.7.9.tar.xz b/libeconf-0.7.9.tar.xz new file mode 100644 index 0000000..085899b --- /dev/null +++ b/libeconf-0.7.9.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46b50c50e943bf2da5f0da0514b6950d40de4379d830a48a7ec45d1dec24d352 +size 181928 diff --git a/libeconf.changes b/libeconf.changes new file mode 100644 index 0000000..0c98cd7 --- /dev/null +++ b/libeconf.changes @@ -0,0 +1,668 @@ +------------------------------------------------------------------- +Thu May 08 14:41:05 UTC 2025 - schubi@suse.com + +- Update to version 0.7.9: + * Comments can include comment character tag multiple time. + * Fixed static library declaration in meason + * Fixed versioning in cmake + +------------------------------------------------------------------- +Fri Apr 25 08:25:57 UTC 2025 - schubi@suse.com + +- Update to version 0.7.8: + * Fix memory access if there are a comment character inside a comment. + +------------------------------------------------------------------- +Mon Jan 13 09:44:55 UTC 2025 - schubi@suse.com + +- Update to version 0.7.7: + * Additional fix for parsing empty config files (bsc#1234405). + +------------------------------------------------------------------- +Fri Dec 13 13:03:47 UTC 2024 - schubi@suse.com + +- Update to version 0.7.6: + * Do not try to parse files with name like ".." and "." (#227) + * using econf_readConfig in econftool + +------------------------------------------------------------------- +Mon Dec 09 16:33:49 UTC 2024 - schubi@suse.com + +- Update to version 0.7.5: + * Removed PATH_MAX (Issue #220) + * Add ROOT_PREFIX as option to replace TESTSDIR hack + * CI: valgrind doesn't work together with sanitizers + * econf_readConfig: don't allocate econf_file in error case + * tests: use cleanup to free key_file for some tests + * libeconf: don't allocate array from size 0 + * libeconf: fix use of uninitialized stat result if file does not exist + * econftool: dynamically allocate xdg_config_dir + * Disable clang <= 17, enable valgrind + * Disable whitespace check + * Disable deprecation warning for econftool and example + * Add new CI with different compilers and valgrind + * Test econf_readConfig() + * Disable deprecation warning for tests + * Implement econf_*freep functions for automatic cleanup + * Cleanup *free functions + +------------------------------------------------------------------- +Wed Oct 2 07:08:25 UTC 2024 - Stefan Schubert + +- Updated license in the spec file to MIT. + +------------------------------------------------------------------- +Thu Sep 26 11:08:13 UTC 2024 - schubi@suse.com + +- Update to version 0.7.4: + * Fixed memory leaks (#219) + * Fixed: econf_readDirs crashes if one of the paths is NULL (#211) + * Added links to man page. E.g. "man econf_readConfig" is working now. + * Handle groups correctly which do not have any key entry. + +------------------------------------------------------------------- +Wed Sep 18 11:16:34 UTC 2024 - schubi@suse.com + +- Update to version 0.7.3: + * Groups handled in an own list (#218) + * Add econftool as dependency of its tests + * Simplify snprintf call + * Remove unused functions and reduce variable visibility (#213) + * Fix typos (#212) + +------------------------------------------------------------------- +Fri Jun 14 07:26:15 UTC 2024 - schubi@suse.com + +- Update to version 0.7.2: + * Do not check errno while float conversion. This is a false + alarm for S390 and PPC (#210) + +------------------------------------------------------------------- +Mon Jun 10 07:36:06 UTC 2024 - schubi@suse.com + +- Update to version 0.7.1: +* Improved error handling while parsing values with the wrong format. + Added new return value ECONF_VALUE_CONVERSION_ERROR. +* Setting parsing options via econf_file struct. + see econf_newKeyFile_with_options. These options will be used by + econf_readConfig and econf_readConfigWithCallback. + Following options are supported: + JOIN_SAME_ENTRIES (default 0) + Parsed entries with the same name will not be replaces but + will be joined to one entry. + PYTHON_STYLE (default 0) + E.G. Identations will be handled like multiline entries. + PARSING_DIRS (default /usr/etc/:/run:/etc) + List of directories from which the configuration files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g.: "PARSING_DIRS=/usr/etc/:/run:/etc" + CONFIG_DIRS (default ) + List of directory structures (with order) which describes the directories + in which the files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g. with the given list: "CONFIG_DIRS=.conf.d:.d" files in + following directories will be parsed: + "/.conf.d/" + "/.d/" + "//" +* CAUTION: From now on every econf_file element MUST be intialized if + econf_readConfig and econf_readConfigWithCallback is used. + Either with NULL or: + econf_file *key_file = NULL; + if (error = econf_newKeyFile_with_options(&key_file, "PYTHON_STYLE=1")) + { + fprintf (stderr, "ERROR: couldn't create new key file: %s\n", + econf_errString(error)); + return 1; + } + error = econf_readConfig (&key_file, + "foo", + "/usr/lib", + "example", + "conf", + "=", "#"); + +------------------------------------------------------------------- +Tue Jun 04 11:08:28 UTC 2024 - schubi@suse.com + +- Update to version 0.7.0: + * Defining manual parsing directories (#209) + * parsing config files in python style + * econf_readConfig: set usr_subdir to empty string if it is NULL + * Fix static analyzer detected issues (#202) + * comment string can be in the parsed value which is defined with quotes (#207) + * tst-comments2: comment sign in quoted string (#205) + * Setting options via new econf_newKeyFile_with_options. (#206) + +------------------------------------------------------------------- +Fri Apr 12 10:47:39 UTC 2024 - schubi@suse.com + +- Update to version 0.6.3: + * Fix build with musl libc on ppc64le (#198) + * Creating static library with new package libeconf-devel-static. + This is needed for building package util-linux and btrfsprogs. + +------------------------------------------------------------------- +Wed Mar 06 11:02:00 UTC 2024 - schubi@suse.com + +- Update to version 0.6.2: + * version 0.6.2 + * Fix static analyzer detected issues (#196) + +------------------------------------------------------------------- +Mon Jan 22 14:30:16 UTC 2024 - schubi@suse.com + +- Update to version 0.6.1: + * reading lines which have a length greater than BUFSIZE (#195) + * Improved data quote check in read_file (#193) + +------------------------------------------------------------------- +Wed Nov 08 12:20:34 UTC 2023 - schubi@suse.com + +- Update to version 0.6.0: + * Supporting Linux Userspace API (UAPI) Group + chapter "Configuration Files Specification". + See: https://uapi-group.org/specifications/specs/ + configuration_files_specification/ + +------------------------------------------------------------------- +Fri Nov 03 16:44:38 UTC 2023 - schubi@suse.com + +- Update to version 0.5.3: + * Added bindings for python3 and C# + +------------------------------------------------------------------- +Thu Oct 26 14:56:30 UTC 2023 - nico.krapp@suse.com + +- Update to version 0.5.2: + * Add python bindings (#188) + * docu version 0.5.2 + * Fix test (#185) + * Plug memory leak (#186) + +------------------------------------------------------------------- +Wed Sep 6 14:38:13 UTC 2023 - Stefan Schubert + +- Additional info for version 0.5.2: + * Fixed a stack-buffer-overflow vulnerability in "econf_writeFile" + function. (CVE-2023-30078, CVE-2023-32181, bsc#1211078) + * Fixed a stack-buffer-overflow vulnerability in "read_file" + function. (CVE-2023-30079, CVE-2023-22652, bsc#1211078) + +------------------------------------------------------------------- +Fri Mar 24 15:12:18 UTC 2023 - schubi@suse.com + +- Update to version 0.5.2: + * Fixed build for aarch64 and gcc13. + * Making the output verbose when a test fails. + * Fixed a stack-buffer-overflow vulnerability in "econf_writeFile" + function. + * Fixed a stack-buffer-overflow vulnerability in "read_file" + function. + * Added new feature: econf_set_conf_dirs (const char **dir_postfix_list) + Sets a list of directory structures (with order) which describes + the directories in which the files have to be parsed. + E.G. with the given list: {"/conf.d/", ".d/", "/", NULL} files in following + directories will be parsed: + "/..d/" + "//conf.d/" + "/.d/" + "//" + The entry "/..d/" will be added + automatically. + * General code cleanup. + +------------------------------------------------------------------- +Thu Jan 19 15:58:59 UTC 2023 - schubi@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) + +------------------------------------------------------------------- +Fri Dec 02 14:13:24 UTC 2022 - schubi@suse.com + +- Update to version 0.5.0: + * API calls econf_read*WithCallback supporting a general (void *) + argument for user defined data with which the callback function is + called. + * Tagged following functions deprecated: + econf_requireOwner, econf_requireGroup, econf_requirePermissions, + econf_followSymlinks, econf_reset_security_settings + Use one of the econf_read*WithCallback functions instead. + +------------------------------------------------------------------- +Wed Nov 23 14:01:34 UTC 2022 - schubi@suse.com + +- Update to version 0.4.9: + * libeconf.h: added missing sys/types.h header (#171) + * new API calls: econf_readFileWithCallback, + econf_readDirsWithCallback, econf_readDirsHistoryWithCallback (#172) + * Checking NULL comment parameter in the parsing functions. + +------------------------------------------------------------------- +Mon Nov 14 13:47:26 UTC 2022 - schubi@suse.com + +- Update to version 0.4.8+git20221114.7ff7704: + * Parsing files which are containing keys only (#170) + All delimiters are allowed now : "", " =", " ", "=". But the + user should use "" in order to be distinct. + * /usr/etc/shells.d/ will not be parsed if + /etc/shells.d/ is defined too. + * Lto build fixed (#168) + * New calls: econf_comment_tag, econf_delimiter_tag, econf_set_comment_tag, + econf_set_delimiter_tag + * Checking UID,GroupID, permissions,... of the parsed files (#165) + New calls: econf_requireOwner, econf_requireGroup, econf_requirePermissions, + econf_followSymlinks + * Ignoring Group without brackets; Do not hold brackets in the internal data structure. (#164) + * Error handling improved for nums and booleans (#163) + +------------------------------------------------------------------- +Wed Apr 27 22:10:35 UTC 2022 - schubi@suse.com + +- Update to version 0.4.6+git20220427.3016f4e: + * econftool: + ** Parsing error: Reporting file and line nr. + ** --delimeters=spaces Taking all kind of spaces for delimiter + * libeconf: + Fixed bsc#1198165: Parsing files correctly which have space characters + AND none space characters as delimiters. + +------------------------------------------------------------------- +Wed Apr 06 21:23:48 UTC 2022 - schubi@suse.com + +- Update to version 0.4.5+git20220406.c9658f2: + * econftool: + ** New call "syntax" for checking the configuration files only. + Returns an error string with line number if an error occurs. + ** New options "--comment" and "--delimeters" + ** Parsing one file only if needed. + +------------------------------------------------------------------- +Tue Jan 04 11:22:44 UTC 2022 - schubi@suse.com + +- Update to version 0.4.4+git20220104.962774f: + * Fixed i586 build (#158) + +------------------------------------------------------------------- +Tue Jan 04 10:27:32 UTC 2022 - schubi@suse.com + +- Update to version 0.4.2+git20220104.5dfd69d: + * Reading numbers with different bases (e.g. oktal) (bsc#1193632) (#157) + +------------------------------------------------------------------- +Thu Nov 11 14:22:24 UTC 2021 - schubi@suse.com + +- Update to version libeconf-0.4.2+git20211111.c7a2c52: + * CMake fixes regarding document installation. + * Fixed different issues while writing string values to file. + * Writing comments to file too. + * Fixed memory leaks. + * Fixed crash while merging values. + +------------------------------------------------------------------- +Fri Jul 9 07:16:22 UTC 2021 - schubi + +- 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 schubi@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 + +- Update to version 0.4.0+git20210707.537a8a: + * Fixed resource leaks found by Iker Pedrosa. + +------------------------------------------------------------------- +Thu Apr 15 10:31:02 UTC 2021 - schubi@suse.com + +- Removed doxygen from build requires. + +------------------------------------------------------------------- +Tue Apr 13 20:25:40 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210413.fdb8025: + * Installing man pages via meson. (#147) + +------------------------------------------------------------------- +Mon Apr 12 19:10:54 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210412.1513a26: + * Added econftool cat option (#146) + * new API call: econf_readDirsHistory (showing ALL locations) + * new API call: econf_getPath (absolute path of the configuration file) + +------------------------------------------------------------------- +Thu Apr 08 17:10:59 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210408.6d33e5e: + * 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. + +------------------------------------------------------------------- +Thu Oct 22 12:16:36 UTC 2020 - Ludwig Nussel + +- explicitly BuildRequire: pkgconfig for /usr/lib/rpm/pkgconfigdeps.sh + On TW it's pulled in implicitly by libxcrypt-devel which is not the + case on 15.2 + +------------------------------------------------------------------- +Fri Jul 10 21:15:09 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.8+git20200710.5126fff: + * Add CMake build scripts, remove autotools support + * Move C++ ABI compatibility section + +------------------------------------------------------------------- +Fri Jun 05 15:57:26 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.7+git20200605.c67ef9a: + * Fix build on i586 + +------------------------------------------------------------------- +Thu Jun 04 11:05:02 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.6+git20200529.276359f: + * Package meson files with autotools + * Use newer version of actions/checkout + * Add actions for meson + * Create meson.yml + * Use meson source root for tests configuration files + * Add additional compiler warnings + * First useable meson build support including unit tests + * Add global options, build with pie and GNU_SOURCE + * Fix name of library, add example binary + * add support for meson + * Add C++ compatibility + * Add test case for crash with empty value keys + +------------------------------------------------------------------- +Mon Feb 03 16:21:51 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.5+git20200203.3144b69: + * Release version 0.3.5 + * Use float.h instead of obsolete gnuism values.h + * Remove gnuism (strdupa) + * Check for empty value (NULL pointer) before calling strdup. + +------------------------------------------------------------------- +Tue Jan 21 14:53:44 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.4+git20200121.febebf2: + * Release version 0.3.4 + * Fix buffer overflow in econf_readDirs + * Fix parsing of quoted strings, and values starting with delimiters + * tests: add test for quoted strings + * tests: tst-configdirs5: fix config dir paths + +------------------------------------------------------------------- +Mon Oct 28 12:11:12 UTC 2019 - iforster@suse.com + +- Update to version 0.3.3+git20191028.3ac14ce: + * Release version 0.3.3 + * Reset *key_file to NULL after free + +------------------------------------------------------------------- +Thu Sep 26 17:43:54 UTC 2019 - kukuk@suse.com + +- Update to version 0.3.2+git20190926.fea4a03: + * Release version 0.3.2 + * Fix merging an empty file (#105) + * Add test cases for merge function + +------------------------------------------------------------------- +Tue Sep 24 12:52:52 UTC 2019 - rbrown@suse.com + +- Update to version 0.3.1+git20190924.822cf5b: + * release version 0.3.1 + * Set delimiter in readFile + * Change parser interface to store file name and line numbers per key + * Update ccpp.yml + +------------------------------------------------------------------- +Fri Sep 06 10:53:32 UTC 2019 - kukuk@suse.de + +- Update to version 0.3.0+git20190906.0e60a88: + * Ensure LICENSE, README, and TODO are included in the release tarball + * Rewrite set*ValueNum functions to avoid libm usage and add error checking + * Move src/*.c to lib and release version 0.3.0 + +------------------------------------------------------------------- +Thu Sep 05 08:54:20 UTC 2019 - kukuk@suse.de + +- Update to version 0.3.0+git20190905.0ca8fe2: + * Merge doc changes from parlt91 (pull rq#73) + * Implement econf_get*ValueDef functions: if key is not found, a provided default is returned. + * Differentiate between no value provided and empty value provided + * Remove obsolete check for comments + * Enhance and adjust test cases + * Remove obsolete check for comments + +------------------------------------------------------------------- +Wed Sep 04 11:13:09 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.03fa5b4: + * Enhance and adjust test cases + * Update ccpp.yml + * Update ccpp.yml + * Update ccpp.yml + +------------------------------------------------------------------- +Wed Sep 04 10:17:25 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.989df9f: + * Remove debug printf + +------------------------------------------------------------------- +Wed Sep 04 09:58:12 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.c9c1820: + * Implement alternate file parser solving the problems with group entry detection. + * Add new parse error error code + * Bool values read from a config file are not sanitzied, so we need to do that in the getBoolValueNum function, too. + * Only use ..d directories + * Release version 0.2.0 + * Add an explanation about this project. + * Check for NULL pointer arguments + * Fix error return value + * Fix typo in comment + * Add test case for reading login.defs with data from util-linux test suite + +------------------------------------------------------------------- +Mon Sep 02 13:18:01 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190902.dd17c11: + * Fix int64 variables on 32bit architectures + +------------------------------------------------------------------- +Sat Aug 31 18:28:13 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190831.fb7c1bb: + * Rewrite econf_readDirs - don't assume suffix is ".conf" - Read files and directories in correct order + +------------------------------------------------------------------- +Fri Aug 30 09:43:08 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190830.04ba053: + * Make clear that the API and ABI of the three functions econf_newIniFile, econf_newKeyFile, econf_writeFile are not stable yet. + * Fix getGroups argument types and add several test cases for this. + * Fix cppcheck and compiler warnings + +------------------------------------------------------------------- +Thu Aug 29 14:05:38 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190829.a1479b1: + * Make comment argument an array, so that we can support more than one comment character in the future. + * Change the API + * Fix size_t as return value of getc() + +------------------------------------------------------------------- +Thu Aug 29 10:53:04 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190829.209219e: + * Convert all functions to new error API + * Convert econf_newKeyFile provide the error via return code + +------------------------------------------------------------------- +Wed Aug 28 13:42:50 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190828.74eeb32: + * Fix tst-arguments3 and tst-arguments4 and only use error return code. + * Bug fixes for new API + * Change API of econf_get* and econf_set* functions to return error code direct. + * Fix some compiler warnings + * Prevent possible crash when parsing 0xFF + * Add "--enable-compiler-warnings" option to enable much more GCC compiler warnings + * Fix more cppcheck warnings + * Fix github actions build + * Update bin/Makefile.am to work with Asan + * Add missing tst-getconfdirs4-data to EXTRA_DIST + * Fix some cppcheck warnings + * Don't ignore getline return value + * Add free for getStringValue in tst-group1 + * Remove XFAIL for tst-groups1 + * Update example.c to free after getStringValue + * Add addbrackets for getValue functions + * tst-getconfdirs4: make sure, only a file in /etc/ and not in /usr/etc works, too. + +------------------------------------------------------------------- +Tue Aug 27 12:19:45 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.5ed5492: + * Mark all input char pointer as const in the official API + +------------------------------------------------------------------- +Tue Aug 27 11:49:42 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.b243e6c: + * getStringValueNum returns a newly allocated string or NULL in error case. + +------------------------------------------------------------------- +Tue Aug 27 09:47:12 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.8374759: + * Fix missing return + * Remove XFAIL for tst-setgetvalues1 + * Fix representation of float and double values + * Add preliminary test case for group handling + * NULL terminate string returned by addbrackets + * Fix addbrackets function + +------------------------------------------------------------------- +Mon Aug 26 19:09:25 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190826.99b6bf3: + * Add more "const". + * Fix setString and setBoolean + * Add test suite which sets and gets all possible kind of types. Some are failing, so mark this test as XFAIL. + * Start marking some string arguments/results as const + * Optimize some strdup away + * Mark econf_write_key_file as ALPHA as the API is not stable + +------------------------------------------------------------------- +Mon Aug 26 11:43:16 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190826.9e69003: + * Update ccpp.yml + * Add --enable-compiler-checks option to configure, enables AddressSanitizer + * Fix printf format directive + * Rework set*Value functions for error checking and error handling + * Add tst-getconfdirs3: verify we can load original file without local changes + * Error handling for econf_getGroups and econf_getKeys + * More errorreporting changes + * Fix make distcheck/don't mess around with libtool install/uninstall, this breaks to much other stuff. + * Autotools cleanup and fixes + * Fix logindefs1 test case + +------------------------------------------------------------------- +Fri Aug 23 18:56:13 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190823.09a8f2e: + * Fix buffer overlow of realpath + +------------------------------------------------------------------- +Fri Aug 23 15:58:37 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190823.acd8cdf: + * Update ccpp.yml + * Fix crash in strcmp, if strchr returns NULL + * Add error reporting to econf_merge_key_files and adjust the depending code. + * setStringValue return NULL on error/key not found + * Add framework for correct error reporting + * Disable searching through XDG dirs for now + * Add test cases for econf_get_conf_from_dirs + * Update comment setValue -> econf_setValue + * Update test cases to use econf_destroy + * Replace econf_afree with econf_destroy in example + * Add _generic macro to free memory of econf_ functions + * Add tst-merge2 to .gitignore + * Fix pointer arithmetic + * Adjust Makefiles and code to make "make distcheck" working + +------------------------------------------------------------------- +Thu Aug 22 19:33:21 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190822.bb9702b: + * Ignore /usr file if /etc exists when merging + * Add NULL value handling + * Update merge example + * Rework merge_functionality + * Use deep copies instead of pointers for merged files + * Replace [] with KEY_FILE_NULL_VALUE + * Refactor getfilecontent functions + * Remove cmake files + * Fix test cases + * Update libeconf.c + * Change License from LGPL-2.1 to MIT + * libeconf.pc should only be deleted on distclean, not normal clean + * Fix delim argument + * Add more test cases for login.defs and wrong arguments + * Link libeconf against libm, so that it is enough to link an application against libeconf and developers don't need to bother with other dependencies + * Add autogen.sh, which calls autoconf/automake/libtool in the correct order to create the configure script + +------------------------------------------------------------------- +Tue Aug 20 13:04:55 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190820.742af8c: + * Remove accidental .swp file + * Update example with conf.d directory + * Remove regex, replace with strchr(delim, ch) + * Add symbol versioning Don't ignore complete lib directory + * Include all headers in tar archive + * Don't define our own errno + * Remove wrong commit + * Add some basic tests + +------------------------------------------------------------------- +Tue Aug 20 12:59:47 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190807.7aedb57: + * Refactor getfilecontent functions + * Update example file + * Add econf prefix to public API functions + * Add cmake targets for debugging + * Fix build with cmake + * Fix build with autotools + * Move Key_File allocation from the stack to the heap + * Move Key_File create functions to libeconf.c + * Move destroy functions from helpers.c to libeconf.c + * Add macro to set supported types generic. + +------------------------------------------------------------------- +Sat Aug 17 11:53:48 UTC 2019 - Thorsten Kukuk + +- Initial version diff --git a/libeconf.spec b/libeconf.spec new file mode 100644 index 0000000..fadad8a --- /dev/null +++ b/libeconf.spec @@ -0,0 +1,105 @@ +# +# spec file for package libeconf +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define lname libeconf0 +Name: libeconf +Version: 0.7.9 +Release: 0 +Summary: Enhanced config file parser ala systemd +License: MIT +Group: Development/Libraries/C and C++ +URL: https://github.com/openSUSE/libeconf +Source: libeconf-%{version}.tar.xz +Source2: baselibs.conf +BuildRequires: meson +# for /usr/lib/rpm/pkgconfigdeps.sh +BuildRequires: pkgconfig + +%description +Enhanced config file parser, which merges config files placed +in several locations into one. + +%package -n %{lname} +Summary: Enhanced config file parser ala systemd +Group: Development/Libraries/C and C++ + +%description -n %{lname} +Enhanced config file parser, which merges config files placed +in several locations into one. + +%package devel +Summary: Development files for libeconf +Group: Development/Libraries/C and C++ +Requires: %{lname} = %{version} + +%description devel +This package contains all necessary include files and libraries needed +to develop applications that needs to read configuration files from +different locations. + +%package devel-static +Summary: Static library for libeconf +Group: Development/Libraries/C and C++ +Requires: libeconf-devel = %{version} + +%description devel-static +This package contains libeconf.a static library. + +%package utils +Summary: Command line interface for libeconf +Group: System/Base +Requires: %{lname} = %{version} + +%description utils +This package contains tools for handling configuration files in e.g. /usr/etc +and /etc. + +%prep +%setup -q + +%build +%meson -Ddefault_library=both +%meson_build + +%install +%meson_install + +%check +%meson_test + +%post -n %{lname} -p /sbin/ldconfig +%postun -n %{lname} -p /sbin/ldconfig + +%files -n %{lname} +%license LICENSE +%{_libdir}/libeconf.so.* + +%files devel-static +%{_libdir}/libeconf.a + +%files devel +%{_includedir}/*.h +%{_libdir}/libeconf.so +%{_libdir}/pkgconfig/libeconf.pc +%{_mandir}/man3/*.3%{?ext_man} + +%files utils +%{_bindir}/econftool +%{_mandir}/man8/econftool.8%{?ext_man} + +%changelog diff --git a/python-libeconf.changes b/python-libeconf.changes new file mode 100644 index 0000000..4341ec1 --- /dev/null +++ b/python-libeconf.changes @@ -0,0 +1,187 @@ +------------------------------------------------------------------- +Thu May 08 14:41:05 UTC 2025 - schubi@suse.com + +- Update to version 0.7.9: + * Comments can include comment character tag multiple time. + * Fixed static library declaration in meason + * Fixed versioning in cmake + +------------------------------------------------------------------- +Fri Apr 25 08:25:57 UTC 2025 - schubi@suse.com + +- Update to version 0.7.8: + * Fix memory access if there are a comment character inside a comment. + +------------------------------------------------------------------- +Mon Jan 13 09:44:55 UTC 2025 - schubi@suse.com + +- Update to version 0.7.7: + * Additional fix for parsing empty config files (bsc#1234405). + +------------------------------------------------------------------- +Fri Dec 13 13:03:47 UTC 2024 - schubi@suse.com + +- Update to version 0.7.6: + * Do not try to parse files with name like ".." and "." (#227) + * using econf_readConfig in econftool + +------------------------------------------------------------------- +Mon Dec 09 16:33:49 UTC 2024 - schubi@suse.com + +- Update to version 0.7.5: + * Removed PATH_MAX (Issue #220) + * Add ROOT_PREFIX as option to replace TESTSDIR hack + * CI: valgrind doesn't work together with sanitizers + * econf_readConfig: don't allocate econf_file in error case + * tests: use cleanup to free key_file for some tests + * libeconf: don't allocate array from size 0 + * libeconf: fix use of uninitialized stat result if file does not exist + * econftool: dynamically allocate xdg_config_dir + * Disable clang <= 17, enable valgrind + * Disable whitespace check + * Disable deprecation warning for econftool and example + * Add new CI with different compilers and valgrind + * Test econf_readConfig() + * Disable deprecation warning for tests + * Implement econf_*freep functions for automatic cleanup + * Cleanup *free functions + +------------------------------------------------------------------- +Wed Oct 2 07:09:19 UTC 2024 - Stefan Schubert + +- Updated license in the spec file to MIT. + +------------------------------------------------------------------- +Thu Sep 26 11:08:13 UTC 2024 - schubi@suse.com + +- Update to version 0.7.4: + * fixed memory leaks (#219) + +------------------------------------------------------------------- +Wed Sep 18 11:16:34 UTC 2024 - schubi@suse.com + +- Update to version 0.7.3: + * Fixed: econf_readDirs crashes if one of the paths is NULL (#211) + * Handle groups correctly which do not have any key entry. + * Added links to man page. E.g. "man econf_readConfig" is working now. + * Simplify snprintf call + * Remove unused functions and reduce variable visibility (#213) + * Fix typos (#212) + +------------------------------------------------------------------- +Fri Jun 14 07:26:15 UTC 2024 - schubi@suse.com + +- Update to version 0.7.2: + * Do not check errno while float conversion. This is a false + alarm for S390 and PPC (#210). + +------------------------------------------------------------------- +Mon Jun 10 07:36:06 UTC 2024 - schubi@suse.com + +- Update to version 0.7.1: +* Improved error handling while parsing values with the wrong format. + Added new return value ECONF_VALUE_CONVERSION_ERROR. +* Setting parsing options via econf_file struct. + see econf_newKeyFile_with_options. These options will be used by + econf_readConfig and econf_readConfigWithCallback. + Following options are supported: + JOIN_SAME_ENTRIES (default 0) + Parsed entries with the same name will not be replaces but + will be joined to one entry. + PYTHON_STYLE (default 0) + E.G. Identations will be handled like multiline entries. + PARSING_DIRS (default /usr/etc/:/run:/etc) + List of directories from which the configuration files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g.: "PARSING_DIRS=/usr/etc/:/run:/etc" + CONFIG_DIRS (default ) + List of directory structures (with order) which describes the directories + in which the files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g. with the given list: "CONFIG_DIRS=.conf.d:.d" files in + following directories will be parsed: + "/.conf.d/" + "/.d/" + "//" +* CAUTION: From now on every econf_file element MUST be intialized if + econf_readConfig and econf_readConfigWithCallback is used. + Either with NULL or: + econf_file *key_file = NULL; + if (error = econf_newKeyFile_with_options(&key_file, "PYTHON_STYLE=1")) + { + fprintf (stderr, "ERROR: couldn't create new key file: %s\n", + econf_errString(error)); + return 1; + } + error = econf_readConfig (&key_file, + "foo", + "/usr/lib", + "example", + "conf", + "=", "#"); + +------------------------------------------------------------------- +Tue Jun 04 11:08:28 UTC 2024 - schubi@suse.com + +- Update to version 0.7.0: + * Defining manual parsing directories (#209) + * parsing config files in python style + * econf_readConfig: set usr_subdir to empty string if it is NULL + * Fix static analyzer detected issues (#202) + * comment string can be in the parsed value which is defined with quotes (#207) + * tst-comments2: comment sign in quoted string (#205) + * Setting options via new econf_newKeyFile_with_options. (#206) + +------------------------------------------------------------------- +Fri Apr 12 10:47:39 UTC 2024 - schubi@suse.com + +- Update to version 0.6.3: + * Fix build with musl libc on ppc64le (#198) + * Creating static library with new package libeconf-devel-static. + This is needed for building package util-linux and btrfsprogs. + +------------------------------------------------------------------- +Wed Mar 06 11:02:00 UTC 2024 - schubi@suse.com + +- Update to version 0.6.2: + * Fix static analyzer detected issues (#196) + +------------------------------------------------------------------- +Mon Jan 22 14:30:16 UTC 2024 - schubi@suse.com + +- Update to version 0.6.1: + * reading lines which have a length greater than BUFSIZE (#195) + * Improved data quote check in read_file (#193) + +------------------------------------------------------------------- +Mon Nov 13 07:55:36 UTC 2023 - Alberto Planas Dominguez + +- Do not requires the library for the documentation + +------------------------------------------------------------------ +Wed Nov 8 12:45:07 UTC 2023 - Alberto Planas Dominguez + +- Fix version comparison operator +- Remove explicit python3-base requirement + +------------------------------------------------------------------- +Fri Nov 03 16:44:38 UTC 2023 - schubi@suse.com + +- Update to version 1.1.1: + * Supporting Linux Userspace API (UAPI) Group + chapter "Configuration Files Specification". + See: https://uapi-group.org/specifications/specs/ + configuration_files_specification/ + +------------------------------------------------------------------- +Fri Nov 3 10:12:29 UTC 2023 - Alberto Planas Dominguez + +- Support only Python >= 3.10. PEP 604 is used for union types + +------------------------------------------------------------------- +Fri Oct 27 08:42:26 UTC 2023 - Nico Krapp + +- Version 1.1.0 + * Added tests + * Support all functions form libeconf 0.5.2 + * Bug fixes diff --git a/python-libeconf.spec b/python-libeconf.spec new file mode 100644 index 0000000..2890b3e --- /dev/null +++ b/python-libeconf.spec @@ -0,0 +1,68 @@ +# +# spec file for package python-libeconf +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +%define skip_python39 1 +Name: python-libeconf +Version: 0.7.9 +Release: 0 +Summary: Python bindings for libeconf +License: MIT +Group: Development/Languages/Python +URL: https://github.com/openSUSE/libeconf +Source: libeconf-%{version}.tar.xz +BuildArch: noarch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: python-rpm-macros +Requires: libeconf0 = %{version} +Suggests: python-libeconf-doc = %{version} +%python_subpackages + +%description +Python bindings for libeconf + +%package -n python-libeconf-doc +Summary: Man page for python-libeconf + +%description -n python-libeconf-doc +Man page for python-lineconf + +%prep +%autosetup -n libeconf-%{version}/bindings/python3 + +%build +%pyproject_wheel + +%install +%pyproject_install +mkdir -p %{buildroot}/usr/share/man/man3 +cp docs/python-libeconf.3 %{buildroot}%{_mandir}/man3/ + +%files %python_files +%{python_sitelib} +# The cache is not always present +#pycache_only %{python_sitelib}/__pycache__ + +%files -n python-libeconf-doc +%defattr(-,root,root) +%{_mandir}/man3/*python-libeconf* + +%changelog -- 2.51.1 From 9956f45aeddc63c79bdb081e88240c1eb6d6d58e5be2fe550a14da8bdc6ef854 Mon Sep 17 00:00:00 2001 From: Stefan Schubert Date: Thu, 31 Jul 2025 09:58:21 +0000 Subject: [PATCH 9/9] - Update to version 0.7.10: * cmake: Fix .pc file with absolute CMAKE_INSTALL_ (#237) * Add build options for the CMake build (#230) * check NULL for default string (bnc#1247107) - Update to version 0.7.10: * cmake: Fix .pc file with absolute CMAKE_INSTALL_ (#237) * Add build options for the CMake build (#230) * check NULL for default string (bnc#1247107) OBS-URL: https://build.opensuse.org/package/show/devel:microos/libeconf?expand=0&rev=48 --- .gitattributes | 23 ++ .gitignore | 1 + _multibuild | 4 + _service | 15 + _servicedata | 6 + baselibs.conf | 1 + libeconf-0.7.10.tar.xz | 3 + libeconf-0.7.2.tar.xz | 3 + libeconf-0.7.3.tar.xz | 3 + libeconf-0.7.4.tar.xz | 3 + libeconf-0.7.5.tar.xz | 3 + libeconf-0.7.7.tar.xz | 3 + libeconf-0.7.8.tar.xz | 3 + libeconf-0.7.9.tar.xz | 3 + libeconf.changes | 676 ++++++++++++++++++++++++++++++++++++++++ libeconf.spec | 105 +++++++ python-libeconf.changes | 195 ++++++++++++ python-libeconf.spec | 68 ++++ 18 files changed, 1118 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 _service create mode 100644 _servicedata create mode 100644 baselibs.conf create mode 100644 libeconf-0.7.10.tar.xz create mode 100644 libeconf-0.7.2.tar.xz create mode 100644 libeconf-0.7.3.tar.xz create mode 100644 libeconf-0.7.4.tar.xz create mode 100644 libeconf-0.7.5.tar.xz create mode 100644 libeconf-0.7.7.tar.xz create mode 100644 libeconf-0.7.8.tar.xz create mode 100644 libeconf-0.7.9.tar.xz create mode 100644 libeconf.changes create mode 100644 libeconf.spec create mode 100644 python-libeconf.changes create mode 100644 python-libeconf.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..e250e09 --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + +python-libeconf + + diff --git a/_service b/_service new file mode 100644 index 0000000..cb21d61 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + 0.5.0 + @PARENT_TAG@ + v(\d+\.\d+\.\d+) + https://github.com/openSUSE/libeconf.git + git + enable + + + xz + *.tar + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..e0c2e6d --- /dev/null +++ b/_servicedata @@ -0,0 +1,6 @@ + + + https://github.com/openSUSE/libeconf.git + 433ebd7316df7cd67c2b0f6e85be7292a2149a87 + + \ No newline at end of file diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..0f76614 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1 @@ +libeconf0 diff --git a/libeconf-0.7.10.tar.xz b/libeconf-0.7.10.tar.xz new file mode 100644 index 0000000..b72d96f --- /dev/null +++ b/libeconf-0.7.10.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a4d69867b8e2334740136526b77479f2bfc212a2663b9c444d1722ac7a91c8d +size 182028 diff --git a/libeconf-0.7.2.tar.xz b/libeconf-0.7.2.tar.xz new file mode 100644 index 0000000..c53016a --- /dev/null +++ b/libeconf-0.7.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d25ce67bba2541e19f895a51faa7b87dba56426b48789ecbe2c937581ea19424 +size 176696 diff --git a/libeconf-0.7.3.tar.xz b/libeconf-0.7.3.tar.xz new file mode 100644 index 0000000..ba802f0 --- /dev/null +++ b/libeconf-0.7.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae5257fd75ca24f7326d33448d5f4ebe9052b76006e08743731684dec0941bb4 +size 178304 diff --git a/libeconf-0.7.4.tar.xz b/libeconf-0.7.4.tar.xz new file mode 100644 index 0000000..c208899 --- /dev/null +++ b/libeconf-0.7.4.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88096729ff71b9d372ba211bb5a93e4aa934c2484f3fab8adacd90f2adc8f90b +size 178320 diff --git a/libeconf-0.7.5.tar.xz b/libeconf-0.7.5.tar.xz new file mode 100644 index 0000000..b8e5413 --- /dev/null +++ b/libeconf-0.7.5.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81051f98e905e909953b96fcfab74ba5edaf9c51991c6627a526bc808a471e5f +size 180648 diff --git a/libeconf-0.7.7.tar.xz b/libeconf-0.7.7.tar.xz new file mode 100644 index 0000000..a624e8f --- /dev/null +++ b/libeconf-0.7.7.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b741f2f6e90e83c5ad4a71eb384c717836e91b9a705d3624f91492df4e8e67cf +size 181444 diff --git a/libeconf-0.7.8.tar.xz b/libeconf-0.7.8.tar.xz new file mode 100644 index 0000000..592c437 --- /dev/null +++ b/libeconf-0.7.8.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b717532442fc77ac16ee5e763ccb04826d7e6fe9541a1f7d46320cc1afd15fe8 +size 181840 diff --git a/libeconf-0.7.9.tar.xz b/libeconf-0.7.9.tar.xz new file mode 100644 index 0000000..085899b --- /dev/null +++ b/libeconf-0.7.9.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46b50c50e943bf2da5f0da0514b6950d40de4379d830a48a7ec45d1dec24d352 +size 181928 diff --git a/libeconf.changes b/libeconf.changes new file mode 100644 index 0000000..be24788 --- /dev/null +++ b/libeconf.changes @@ -0,0 +1,676 @@ +------------------------------------------------------------------- +Thu Jul 31 09:33:19 UTC 2025 - schubi@suse.com + +- Update to version 0.7.10: + * cmake: Fix .pc file with absolute CMAKE_INSTALL_ (#237) + * Add build options for the CMake build (#230) + * check NULL for default string (bnc#1247107) + +------------------------------------------------------------------- +Thu May 08 14:41:05 UTC 2025 - schubi@suse.com + +- Update to version 0.7.9: + * Comments can include comment character tag multiple time. + * Fixed static library declaration in meason + * Fixed versioning in cmake + +------------------------------------------------------------------- +Fri Apr 25 08:25:57 UTC 2025 - schubi@suse.com + +- Update to version 0.7.8: + * Fix memory access if there are a comment character inside a comment. + +------------------------------------------------------------------- +Mon Jan 13 09:44:55 UTC 2025 - schubi@suse.com + +- Update to version 0.7.7: + * Additional fix for parsing empty config files (bsc#1234405). + +------------------------------------------------------------------- +Fri Dec 13 13:03:47 UTC 2024 - schubi@suse.com + +- Update to version 0.7.6: + * Do not try to parse files with name like ".." and "." (#227) + * using econf_readConfig in econftool + +------------------------------------------------------------------- +Mon Dec 09 16:33:49 UTC 2024 - schubi@suse.com + +- Update to version 0.7.5: + * Removed PATH_MAX (Issue #220) + * Add ROOT_PREFIX as option to replace TESTSDIR hack + * CI: valgrind doesn't work together with sanitizers + * econf_readConfig: don't allocate econf_file in error case + * tests: use cleanup to free key_file for some tests + * libeconf: don't allocate array from size 0 + * libeconf: fix use of uninitialized stat result if file does not exist + * econftool: dynamically allocate xdg_config_dir + * Disable clang <= 17, enable valgrind + * Disable whitespace check + * Disable deprecation warning for econftool and example + * Add new CI with different compilers and valgrind + * Test econf_readConfig() + * Disable deprecation warning for tests + * Implement econf_*freep functions for automatic cleanup + * Cleanup *free functions + +------------------------------------------------------------------- +Wed Oct 2 07:08:25 UTC 2024 - Stefan Schubert + +- Updated license in the spec file to MIT. + +------------------------------------------------------------------- +Thu Sep 26 11:08:13 UTC 2024 - schubi@suse.com + +- Update to version 0.7.4: + * Fixed memory leaks (#219) + * Fixed: econf_readDirs crashes if one of the paths is NULL (#211) + * Added links to man page. E.g. "man econf_readConfig" is working now. + * Handle groups correctly which do not have any key entry. + +------------------------------------------------------------------- +Wed Sep 18 11:16:34 UTC 2024 - schubi@suse.com + +- Update to version 0.7.3: + * Groups handled in an own list (#218) + * Add econftool as dependency of its tests + * Simplify snprintf call + * Remove unused functions and reduce variable visibility (#213) + * Fix typos (#212) + +------------------------------------------------------------------- +Fri Jun 14 07:26:15 UTC 2024 - schubi@suse.com + +- Update to version 0.7.2: + * Do not check errno while float conversion. This is a false + alarm for S390 and PPC (#210) + +------------------------------------------------------------------- +Mon Jun 10 07:36:06 UTC 2024 - schubi@suse.com + +- Update to version 0.7.1: +* Improved error handling while parsing values with the wrong format. + Added new return value ECONF_VALUE_CONVERSION_ERROR. +* Setting parsing options via econf_file struct. + see econf_newKeyFile_with_options. These options will be used by + econf_readConfig and econf_readConfigWithCallback. + Following options are supported: + JOIN_SAME_ENTRIES (default 0) + Parsed entries with the same name will not be replaces but + will be joined to one entry. + PYTHON_STYLE (default 0) + E.G. Identations will be handled like multiline entries. + PARSING_DIRS (default /usr/etc/:/run:/etc) + List of directories from which the configuration files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g.: "PARSING_DIRS=/usr/etc/:/run:/etc" + CONFIG_DIRS (default ) + List of directory structures (with order) which describes the directories + in which the files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g. with the given list: "CONFIG_DIRS=.conf.d:.d" files in + following directories will be parsed: + "/.conf.d/" + "/.d/" + "//" +* CAUTION: From now on every econf_file element MUST be intialized if + econf_readConfig and econf_readConfigWithCallback is used. + Either with NULL or: + econf_file *key_file = NULL; + if (error = econf_newKeyFile_with_options(&key_file, "PYTHON_STYLE=1")) + { + fprintf (stderr, "ERROR: couldn't create new key file: %s\n", + econf_errString(error)); + return 1; + } + error = econf_readConfig (&key_file, + "foo", + "/usr/lib", + "example", + "conf", + "=", "#"); + +------------------------------------------------------------------- +Tue Jun 04 11:08:28 UTC 2024 - schubi@suse.com + +- Update to version 0.7.0: + * Defining manual parsing directories (#209) + * parsing config files in python style + * econf_readConfig: set usr_subdir to empty string if it is NULL + * Fix static analyzer detected issues (#202) + * comment string can be in the parsed value which is defined with quotes (#207) + * tst-comments2: comment sign in quoted string (#205) + * Setting options via new econf_newKeyFile_with_options. (#206) + +------------------------------------------------------------------- +Fri Apr 12 10:47:39 UTC 2024 - schubi@suse.com + +- Update to version 0.6.3: + * Fix build with musl libc on ppc64le (#198) + * Creating static library with new package libeconf-devel-static. + This is needed for building package util-linux and btrfsprogs. + +------------------------------------------------------------------- +Wed Mar 06 11:02:00 UTC 2024 - schubi@suse.com + +- Update to version 0.6.2: + * version 0.6.2 + * Fix static analyzer detected issues (#196) + +------------------------------------------------------------------- +Mon Jan 22 14:30:16 UTC 2024 - schubi@suse.com + +- Update to version 0.6.1: + * reading lines which have a length greater than BUFSIZE (#195) + * Improved data quote check in read_file (#193) + +------------------------------------------------------------------- +Wed Nov 08 12:20:34 UTC 2023 - schubi@suse.com + +- Update to version 0.6.0: + * Supporting Linux Userspace API (UAPI) Group + chapter "Configuration Files Specification". + See: https://uapi-group.org/specifications/specs/ + configuration_files_specification/ + +------------------------------------------------------------------- +Fri Nov 03 16:44:38 UTC 2023 - schubi@suse.com + +- Update to version 0.5.3: + * Added bindings for python3 and C# + +------------------------------------------------------------------- +Thu Oct 26 14:56:30 UTC 2023 - nico.krapp@suse.com + +- Update to version 0.5.2: + * Add python bindings (#188) + * docu version 0.5.2 + * Fix test (#185) + * Plug memory leak (#186) + +------------------------------------------------------------------- +Wed Sep 6 14:38:13 UTC 2023 - Stefan Schubert + +- Additional info for version 0.5.2: + * Fixed a stack-buffer-overflow vulnerability in "econf_writeFile" + function. (CVE-2023-30078, CVE-2023-32181, bsc#1211078) + * Fixed a stack-buffer-overflow vulnerability in "read_file" + function. (CVE-2023-30079, CVE-2023-22652, bsc#1211078) + +------------------------------------------------------------------- +Fri Mar 24 15:12:18 UTC 2023 - schubi@suse.com + +- Update to version 0.5.2: + * Fixed build for aarch64 and gcc13. + * Making the output verbose when a test fails. + * Fixed a stack-buffer-overflow vulnerability in "econf_writeFile" + function. + * Fixed a stack-buffer-overflow vulnerability in "read_file" + function. + * Added new feature: econf_set_conf_dirs (const char **dir_postfix_list) + Sets a list of directory structures (with order) which describes + the directories in which the files have to be parsed. + E.G. with the given list: {"/conf.d/", ".d/", "/", NULL} files in following + directories will be parsed: + "/..d/" + "//conf.d/" + "/.d/" + "//" + The entry "/..d/" will be added + automatically. + * General code cleanup. + +------------------------------------------------------------------- +Thu Jan 19 15:58:59 UTC 2023 - schubi@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) + +------------------------------------------------------------------- +Fri Dec 02 14:13:24 UTC 2022 - schubi@suse.com + +- Update to version 0.5.0: + * API calls econf_read*WithCallback supporting a general (void *) + argument for user defined data with which the callback function is + called. + * Tagged following functions deprecated: + econf_requireOwner, econf_requireGroup, econf_requirePermissions, + econf_followSymlinks, econf_reset_security_settings + Use one of the econf_read*WithCallback functions instead. + +------------------------------------------------------------------- +Wed Nov 23 14:01:34 UTC 2022 - schubi@suse.com + +- Update to version 0.4.9: + * libeconf.h: added missing sys/types.h header (#171) + * new API calls: econf_readFileWithCallback, + econf_readDirsWithCallback, econf_readDirsHistoryWithCallback (#172) + * Checking NULL comment parameter in the parsing functions. + +------------------------------------------------------------------- +Mon Nov 14 13:47:26 UTC 2022 - schubi@suse.com + +- Update to version 0.4.8+git20221114.7ff7704: + * Parsing files which are containing keys only (#170) + All delimiters are allowed now : "", " =", " ", "=". But the + user should use "" in order to be distinct. + * /usr/etc/shells.d/ will not be parsed if + /etc/shells.d/ is defined too. + * Lto build fixed (#168) + * New calls: econf_comment_tag, econf_delimiter_tag, econf_set_comment_tag, + econf_set_delimiter_tag + * Checking UID,GroupID, permissions,... of the parsed files (#165) + New calls: econf_requireOwner, econf_requireGroup, econf_requirePermissions, + econf_followSymlinks + * Ignoring Group without brackets; Do not hold brackets in the internal data structure. (#164) + * Error handling improved for nums and booleans (#163) + +------------------------------------------------------------------- +Wed Apr 27 22:10:35 UTC 2022 - schubi@suse.com + +- Update to version 0.4.6+git20220427.3016f4e: + * econftool: + ** Parsing error: Reporting file and line nr. + ** --delimeters=spaces Taking all kind of spaces for delimiter + * libeconf: + Fixed bsc#1198165: Parsing files correctly which have space characters + AND none space characters as delimiters. + +------------------------------------------------------------------- +Wed Apr 06 21:23:48 UTC 2022 - schubi@suse.com + +- Update to version 0.4.5+git20220406.c9658f2: + * econftool: + ** New call "syntax" for checking the configuration files only. + Returns an error string with line number if an error occurs. + ** New options "--comment" and "--delimeters" + ** Parsing one file only if needed. + +------------------------------------------------------------------- +Tue Jan 04 11:22:44 UTC 2022 - schubi@suse.com + +- Update to version 0.4.4+git20220104.962774f: + * Fixed i586 build (#158) + +------------------------------------------------------------------- +Tue Jan 04 10:27:32 UTC 2022 - schubi@suse.com + +- Update to version 0.4.2+git20220104.5dfd69d: + * Reading numbers with different bases (e.g. oktal) (bsc#1193632) (#157) + +------------------------------------------------------------------- +Thu Nov 11 14:22:24 UTC 2021 - schubi@suse.com + +- Update to version libeconf-0.4.2+git20211111.c7a2c52: + * CMake fixes regarding document installation. + * Fixed different issues while writing string values to file. + * Writing comments to file too. + * Fixed memory leaks. + * Fixed crash while merging values. + +------------------------------------------------------------------- +Fri Jul 9 07:16:22 UTC 2021 - schubi + +- 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 schubi@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 + +- Update to version 0.4.0+git20210707.537a8a: + * Fixed resource leaks found by Iker Pedrosa. + +------------------------------------------------------------------- +Thu Apr 15 10:31:02 UTC 2021 - schubi@suse.com + +- Removed doxygen from build requires. + +------------------------------------------------------------------- +Tue Apr 13 20:25:40 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210413.fdb8025: + * Installing man pages via meson. (#147) + +------------------------------------------------------------------- +Mon Apr 12 19:10:54 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210412.1513a26: + * Added econftool cat option (#146) + * new API call: econf_readDirsHistory (showing ALL locations) + * new API call: econf_getPath (absolute path of the configuration file) + +------------------------------------------------------------------- +Thu Apr 08 17:10:59 UTC 2021 - schubi@suse.com + +- Update to version 0.4.0+git20210408.6d33e5e: + * 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. + +------------------------------------------------------------------- +Thu Oct 22 12:16:36 UTC 2020 - Ludwig Nussel + +- explicitly BuildRequire: pkgconfig for /usr/lib/rpm/pkgconfigdeps.sh + On TW it's pulled in implicitly by libxcrypt-devel which is not the + case on 15.2 + +------------------------------------------------------------------- +Fri Jul 10 21:15:09 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.8+git20200710.5126fff: + * Add CMake build scripts, remove autotools support + * Move C++ ABI compatibility section + +------------------------------------------------------------------- +Fri Jun 05 15:57:26 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.7+git20200605.c67ef9a: + * Fix build on i586 + +------------------------------------------------------------------- +Thu Jun 04 11:05:02 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.6+git20200529.276359f: + * Package meson files with autotools + * Use newer version of actions/checkout + * Add actions for meson + * Create meson.yml + * Use meson source root for tests configuration files + * Add additional compiler warnings + * First useable meson build support including unit tests + * Add global options, build with pie and GNU_SOURCE + * Fix name of library, add example binary + * add support for meson + * Add C++ compatibility + * Add test case for crash with empty value keys + +------------------------------------------------------------------- +Mon Feb 03 16:21:51 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.5+git20200203.3144b69: + * Release version 0.3.5 + * Use float.h instead of obsolete gnuism values.h + * Remove gnuism (strdupa) + * Check for empty value (NULL pointer) before calling strdup. + +------------------------------------------------------------------- +Tue Jan 21 14:53:44 UTC 2020 - rbrown@suse.com + +- Update to version 0.3.4+git20200121.febebf2: + * Release version 0.3.4 + * Fix buffer overflow in econf_readDirs + * Fix parsing of quoted strings, and values starting with delimiters + * tests: add test for quoted strings + * tests: tst-configdirs5: fix config dir paths + +------------------------------------------------------------------- +Mon Oct 28 12:11:12 UTC 2019 - iforster@suse.com + +- Update to version 0.3.3+git20191028.3ac14ce: + * Release version 0.3.3 + * Reset *key_file to NULL after free + +------------------------------------------------------------------- +Thu Sep 26 17:43:54 UTC 2019 - kukuk@suse.com + +- Update to version 0.3.2+git20190926.fea4a03: + * Release version 0.3.2 + * Fix merging an empty file (#105) + * Add test cases for merge function + +------------------------------------------------------------------- +Tue Sep 24 12:52:52 UTC 2019 - rbrown@suse.com + +- Update to version 0.3.1+git20190924.822cf5b: + * release version 0.3.1 + * Set delimiter in readFile + * Change parser interface to store file name and line numbers per key + * Update ccpp.yml + +------------------------------------------------------------------- +Fri Sep 06 10:53:32 UTC 2019 - kukuk@suse.de + +- Update to version 0.3.0+git20190906.0e60a88: + * Ensure LICENSE, README, and TODO are included in the release tarball + * Rewrite set*ValueNum functions to avoid libm usage and add error checking + * Move src/*.c to lib and release version 0.3.0 + +------------------------------------------------------------------- +Thu Sep 05 08:54:20 UTC 2019 - kukuk@suse.de + +- Update to version 0.3.0+git20190905.0ca8fe2: + * Merge doc changes from parlt91 (pull rq#73) + * Implement econf_get*ValueDef functions: if key is not found, a provided default is returned. + * Differentiate between no value provided and empty value provided + * Remove obsolete check for comments + * Enhance and adjust test cases + * Remove obsolete check for comments + +------------------------------------------------------------------- +Wed Sep 04 11:13:09 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.03fa5b4: + * Enhance and adjust test cases + * Update ccpp.yml + * Update ccpp.yml + * Update ccpp.yml + +------------------------------------------------------------------- +Wed Sep 04 10:17:25 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.989df9f: + * Remove debug printf + +------------------------------------------------------------------- +Wed Sep 04 09:58:12 UTC 2019 - kukuk@suse.de + +- Update to version 0.2.0+git20190904.c9c1820: + * Implement alternate file parser solving the problems with group entry detection. + * Add new parse error error code + * Bool values read from a config file are not sanitzied, so we need to do that in the getBoolValueNum function, too. + * Only use ..d directories + * Release version 0.2.0 + * Add an explanation about this project. + * Check for NULL pointer arguments + * Fix error return value + * Fix typo in comment + * Add test case for reading login.defs with data from util-linux test suite + +------------------------------------------------------------------- +Mon Sep 02 13:18:01 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190902.dd17c11: + * Fix int64 variables on 32bit architectures + +------------------------------------------------------------------- +Sat Aug 31 18:28:13 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190831.fb7c1bb: + * Rewrite econf_readDirs - don't assume suffix is ".conf" - Read files and directories in correct order + +------------------------------------------------------------------- +Fri Aug 30 09:43:08 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190830.04ba053: + * Make clear that the API and ABI of the three functions econf_newIniFile, econf_newKeyFile, econf_writeFile are not stable yet. + * Fix getGroups argument types and add several test cases for this. + * Fix cppcheck and compiler warnings + +------------------------------------------------------------------- +Thu Aug 29 14:05:38 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190829.a1479b1: + * Make comment argument an array, so that we can support more than one comment character in the future. + * Change the API + * Fix size_t as return value of getc() + +------------------------------------------------------------------- +Thu Aug 29 10:53:04 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190829.209219e: + * Convert all functions to new error API + * Convert econf_newKeyFile provide the error via return code + +------------------------------------------------------------------- +Wed Aug 28 13:42:50 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190828.74eeb32: + * Fix tst-arguments3 and tst-arguments4 and only use error return code. + * Bug fixes for new API + * Change API of econf_get* and econf_set* functions to return error code direct. + * Fix some compiler warnings + * Prevent possible crash when parsing 0xFF + * Add "--enable-compiler-warnings" option to enable much more GCC compiler warnings + * Fix more cppcheck warnings + * Fix github actions build + * Update bin/Makefile.am to work with Asan + * Add missing tst-getconfdirs4-data to EXTRA_DIST + * Fix some cppcheck warnings + * Don't ignore getline return value + * Add free for getStringValue in tst-group1 + * Remove XFAIL for tst-groups1 + * Update example.c to free after getStringValue + * Add addbrackets for getValue functions + * tst-getconfdirs4: make sure, only a file in /etc/ and not in /usr/etc works, too. + +------------------------------------------------------------------- +Tue Aug 27 12:19:45 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.5ed5492: + * Mark all input char pointer as const in the official API + +------------------------------------------------------------------- +Tue Aug 27 11:49:42 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.b243e6c: + * getStringValueNum returns a newly allocated string or NULL in error case. + +------------------------------------------------------------------- +Tue Aug 27 09:47:12 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190827.8374759: + * Fix missing return + * Remove XFAIL for tst-setgetvalues1 + * Fix representation of float and double values + * Add preliminary test case for group handling + * NULL terminate string returned by addbrackets + * Fix addbrackets function + +------------------------------------------------------------------- +Mon Aug 26 19:09:25 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190826.99b6bf3: + * Add more "const". + * Fix setString and setBoolean + * Add test suite which sets and gets all possible kind of types. Some are failing, so mark this test as XFAIL. + * Start marking some string arguments/results as const + * Optimize some strdup away + * Mark econf_write_key_file as ALPHA as the API is not stable + +------------------------------------------------------------------- +Mon Aug 26 11:43:16 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190826.9e69003: + * Update ccpp.yml + * Add --enable-compiler-checks option to configure, enables AddressSanitizer + * Fix printf format directive + * Rework set*Value functions for error checking and error handling + * Add tst-getconfdirs3: verify we can load original file without local changes + * Error handling for econf_getGroups and econf_getKeys + * More errorreporting changes + * Fix make distcheck/don't mess around with libtool install/uninstall, this breaks to much other stuff. + * Autotools cleanup and fixes + * Fix logindefs1 test case + +------------------------------------------------------------------- +Fri Aug 23 18:56:13 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190823.09a8f2e: + * Fix buffer overlow of realpath + +------------------------------------------------------------------- +Fri Aug 23 15:58:37 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190823.acd8cdf: + * Update ccpp.yml + * Fix crash in strcmp, if strchr returns NULL + * Add error reporting to econf_merge_key_files and adjust the depending code. + * setStringValue return NULL on error/key not found + * Add framework for correct error reporting + * Disable searching through XDG dirs for now + * Add test cases for econf_get_conf_from_dirs + * Update comment setValue -> econf_setValue + * Update test cases to use econf_destroy + * Replace econf_afree with econf_destroy in example + * Add _generic macro to free memory of econf_ functions + * Add tst-merge2 to .gitignore + * Fix pointer arithmetic + * Adjust Makefiles and code to make "make distcheck" working + +------------------------------------------------------------------- +Thu Aug 22 19:33:21 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190822.bb9702b: + * Ignore /usr file if /etc exists when merging + * Add NULL value handling + * Update merge example + * Rework merge_functionality + * Use deep copies instead of pointers for merged files + * Replace [] with KEY_FILE_NULL_VALUE + * Refactor getfilecontent functions + * Remove cmake files + * Fix test cases + * Update libeconf.c + * Change License from LGPL-2.1 to MIT + * libeconf.pc should only be deleted on distclean, not normal clean + * Fix delim argument + * Add more test cases for login.defs and wrong arguments + * Link libeconf against libm, so that it is enough to link an application against libeconf and developers don't need to bother with other dependencies + * Add autogen.sh, which calls autoconf/automake/libtool in the correct order to create the configure script + +------------------------------------------------------------------- +Tue Aug 20 13:04:55 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190820.742af8c: + * Remove accidental .swp file + * Update example with conf.d directory + * Remove regex, replace with strchr(delim, ch) + * Add symbol versioning Don't ignore complete lib directory + * Include all headers in tar archive + * Don't define our own errno + * Remove wrong commit + * Add some basic tests + +------------------------------------------------------------------- +Tue Aug 20 12:59:47 UTC 2019 - kukuk@suse.de + +- Update to version 0.0.0+git20190807.7aedb57: + * Refactor getfilecontent functions + * Update example file + * Add econf prefix to public API functions + * Add cmake targets for debugging + * Fix build with cmake + * Fix build with autotools + * Move Key_File allocation from the stack to the heap + * Move Key_File create functions to libeconf.c + * Move destroy functions from helpers.c to libeconf.c + * Add macro to set supported types generic. + +------------------------------------------------------------------- +Sat Aug 17 11:53:48 UTC 2019 - Thorsten Kukuk + +- Initial version diff --git a/libeconf.spec b/libeconf.spec new file mode 100644 index 0000000..d0e250a --- /dev/null +++ b/libeconf.spec @@ -0,0 +1,105 @@ +# +# spec file for package libeconf +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define lname libeconf0 +Name: libeconf +Version: 0.7.10 +Release: 0 +Summary: Enhanced config file parser ala systemd +License: MIT +Group: Development/Libraries/C and C++ +URL: https://github.com/openSUSE/libeconf +Source: libeconf-%{version}.tar.xz +Source2: baselibs.conf +BuildRequires: meson +# for /usr/lib/rpm/pkgconfigdeps.sh +BuildRequires: pkgconfig + +%description +Enhanced config file parser, which merges config files placed +in several locations into one. + +%package -n %{lname} +Summary: Enhanced config file parser ala systemd +Group: Development/Libraries/C and C++ + +%description -n %{lname} +Enhanced config file parser, which merges config files placed +in several locations into one. + +%package devel +Summary: Development files for libeconf +Group: Development/Libraries/C and C++ +Requires: %{lname} = %{version} + +%description devel +This package contains all necessary include files and libraries needed +to develop applications that needs to read configuration files from +different locations. + +%package devel-static +Summary: Static library for libeconf +Group: Development/Libraries/C and C++ +Requires: libeconf-devel = %{version} + +%description devel-static +This package contains libeconf.a static library. + +%package utils +Summary: Command line interface for libeconf +Group: System/Base +Requires: %{lname} = %{version} + +%description utils +This package contains tools for handling configuration files in e.g. /usr/etc +and /etc. + +%prep +%setup -q + +%build +%meson -Ddefault_library=both +%meson_build + +%install +%meson_install + +%check +%meson_test + +%post -n %{lname} -p /sbin/ldconfig +%postun -n %{lname} -p /sbin/ldconfig + +%files -n %{lname} +%license LICENSE +%{_libdir}/libeconf.so.* + +%files devel-static +%{_libdir}/libeconf.a + +%files devel +%{_includedir}/*.h +%{_libdir}/libeconf.so +%{_libdir}/pkgconfig/libeconf.pc +%{_mandir}/man3/*.3%{?ext_man} + +%files utils +%{_bindir}/econftool +%{_mandir}/man8/econftool.8%{?ext_man} + +%changelog diff --git a/python-libeconf.changes b/python-libeconf.changes new file mode 100644 index 0000000..546c5b5 --- /dev/null +++ b/python-libeconf.changes @@ -0,0 +1,195 @@ +------------------------------------------------------------------- +Thu Jul 31 09:33:19 UTC 2025 - schubi@suse.com + +- Update to version 0.7.10: + * cmake: Fix .pc file with absolute CMAKE_INSTALL_ (#237) + * Add build options for the CMake build (#230) + * check NULL for default string (bnc#1247107) + +------------------------------------------------------------------- +Thu May 08 14:41:05 UTC 2025 - schubi@suse.com + +- Update to version 0.7.9: + * Comments can include comment character tag multiple time. + * Fixed static library declaration in meason + * Fixed versioning in cmake + +------------------------------------------------------------------- +Fri Apr 25 08:25:57 UTC 2025 - schubi@suse.com + +- Update to version 0.7.8: + * Fix memory access if there are a comment character inside a comment. + +------------------------------------------------------------------- +Mon Jan 13 09:44:55 UTC 2025 - schubi@suse.com + +- Update to version 0.7.7: + * Additional fix for parsing empty config files (bsc#1234405). + +------------------------------------------------------------------- +Fri Dec 13 13:03:47 UTC 2024 - schubi@suse.com + +- Update to version 0.7.6: + * Do not try to parse files with name like ".." and "." (#227) + * using econf_readConfig in econftool + +------------------------------------------------------------------- +Mon Dec 09 16:33:49 UTC 2024 - schubi@suse.com + +- Update to version 0.7.5: + * Removed PATH_MAX (Issue #220) + * Add ROOT_PREFIX as option to replace TESTSDIR hack + * CI: valgrind doesn't work together with sanitizers + * econf_readConfig: don't allocate econf_file in error case + * tests: use cleanup to free key_file for some tests + * libeconf: don't allocate array from size 0 + * libeconf: fix use of uninitialized stat result if file does not exist + * econftool: dynamically allocate xdg_config_dir + * Disable clang <= 17, enable valgrind + * Disable whitespace check + * Disable deprecation warning for econftool and example + * Add new CI with different compilers and valgrind + * Test econf_readConfig() + * Disable deprecation warning for tests + * Implement econf_*freep functions for automatic cleanup + * Cleanup *free functions + +------------------------------------------------------------------- +Wed Oct 2 07:09:19 UTC 2024 - Stefan Schubert + +- Updated license in the spec file to MIT. + +------------------------------------------------------------------- +Thu Sep 26 11:08:13 UTC 2024 - schubi@suse.com + +- Update to version 0.7.4: + * fixed memory leaks (#219) + +------------------------------------------------------------------- +Wed Sep 18 11:16:34 UTC 2024 - schubi@suse.com + +- Update to version 0.7.3: + * Fixed: econf_readDirs crashes if one of the paths is NULL (#211) + * Handle groups correctly which do not have any key entry. + * Added links to man page. E.g. "man econf_readConfig" is working now. + * Simplify snprintf call + * Remove unused functions and reduce variable visibility (#213) + * Fix typos (#212) + +------------------------------------------------------------------- +Fri Jun 14 07:26:15 UTC 2024 - schubi@suse.com + +- Update to version 0.7.2: + * Do not check errno while float conversion. This is a false + alarm for S390 and PPC (#210). + +------------------------------------------------------------------- +Mon Jun 10 07:36:06 UTC 2024 - schubi@suse.com + +- Update to version 0.7.1: +* Improved error handling while parsing values with the wrong format. + Added new return value ECONF_VALUE_CONVERSION_ERROR. +* Setting parsing options via econf_file struct. + see econf_newKeyFile_with_options. These options will be used by + econf_readConfig and econf_readConfigWithCallback. + Following options are supported: + JOIN_SAME_ENTRIES (default 0) + Parsed entries with the same name will not be replaces but + will be joined to one entry. + PYTHON_STYLE (default 0) + E.G. Identations will be handled like multiline entries. + PARSING_DIRS (default /usr/etc/:/run:/etc) + List of directories from which the configuration files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g.: "PARSING_DIRS=/usr/etc/:/run:/etc" + CONFIG_DIRS (default ) + List of directory structures (with order) which describes the directories + in which the files have to be parsed. + The list is a string, divides by ":". The last entry has the highest + priority. E.g. with the given list: "CONFIG_DIRS=.conf.d:.d" files in + following directories will be parsed: + "/.conf.d/" + "/.d/" + "//" +* CAUTION: From now on every econf_file element MUST be intialized if + econf_readConfig and econf_readConfigWithCallback is used. + Either with NULL or: + econf_file *key_file = NULL; + if (error = econf_newKeyFile_with_options(&key_file, "PYTHON_STYLE=1")) + { + fprintf (stderr, "ERROR: couldn't create new key file: %s\n", + econf_errString(error)); + return 1; + } + error = econf_readConfig (&key_file, + "foo", + "/usr/lib", + "example", + "conf", + "=", "#"); + +------------------------------------------------------------------- +Tue Jun 04 11:08:28 UTC 2024 - schubi@suse.com + +- Update to version 0.7.0: + * Defining manual parsing directories (#209) + * parsing config files in python style + * econf_readConfig: set usr_subdir to empty string if it is NULL + * Fix static analyzer detected issues (#202) + * comment string can be in the parsed value which is defined with quotes (#207) + * tst-comments2: comment sign in quoted string (#205) + * Setting options via new econf_newKeyFile_with_options. (#206) + +------------------------------------------------------------------- +Fri Apr 12 10:47:39 UTC 2024 - schubi@suse.com + +- Update to version 0.6.3: + * Fix build with musl libc on ppc64le (#198) + * Creating static library with new package libeconf-devel-static. + This is needed for building package util-linux and btrfsprogs. + +------------------------------------------------------------------- +Wed Mar 06 11:02:00 UTC 2024 - schubi@suse.com + +- Update to version 0.6.2: + * Fix static analyzer detected issues (#196) + +------------------------------------------------------------------- +Mon Jan 22 14:30:16 UTC 2024 - schubi@suse.com + +- Update to version 0.6.1: + * reading lines which have a length greater than BUFSIZE (#195) + * Improved data quote check in read_file (#193) + +------------------------------------------------------------------- +Mon Nov 13 07:55:36 UTC 2023 - Alberto Planas Dominguez + +- Do not requires the library for the documentation + +------------------------------------------------------------------ +Wed Nov 8 12:45:07 UTC 2023 - Alberto Planas Dominguez + +- Fix version comparison operator +- Remove explicit python3-base requirement + +------------------------------------------------------------------- +Fri Nov 03 16:44:38 UTC 2023 - schubi@suse.com + +- Update to version 1.1.1: + * Supporting Linux Userspace API (UAPI) Group + chapter "Configuration Files Specification". + See: https://uapi-group.org/specifications/specs/ + configuration_files_specification/ + +------------------------------------------------------------------- +Fri Nov 3 10:12:29 UTC 2023 - Alberto Planas Dominguez + +- Support only Python >= 3.10. PEP 604 is used for union types + +------------------------------------------------------------------- +Fri Oct 27 08:42:26 UTC 2023 - Nico Krapp + +- Version 1.1.0 + * Added tests + * Support all functions form libeconf 0.5.2 + * Bug fixes diff --git a/python-libeconf.spec b/python-libeconf.spec new file mode 100644 index 0000000..d61be90 --- /dev/null +++ b/python-libeconf.spec @@ -0,0 +1,68 @@ +# +# spec file for package python-libeconf +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +%define skip_python39 1 +Name: python-libeconf +Version: 0.7.10 +Release: 0 +Summary: Python bindings for libeconf +License: MIT +Group: Development/Languages/Python +URL: https://github.com/openSUSE/libeconf +Source: libeconf-%{version}.tar.xz +BuildArch: noarch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: python-rpm-macros +Requires: libeconf0 = %{version} +Suggests: python-libeconf-doc = %{version} +%python_subpackages + +%description +Python bindings for libeconf + +%package -n python-libeconf-doc +Summary: Man page for python-libeconf + +%description -n python-libeconf-doc +Man page for python-lineconf + +%prep +%autosetup -n libeconf-%{version}/bindings/python3 + +%build +%pyproject_wheel + +%install +%pyproject_install +mkdir -p %{buildroot}/usr/share/man/man3 +cp docs/python-libeconf.3 %{buildroot}%{_mandir}/man3/ + +%files %python_files +%{python_sitelib} +# The cache is not always present +#pycache_only %{python_sitelib}/__pycache__ + +%files -n python-libeconf-doc +%defattr(-,root,root) +%{_mandir}/man3/*python-libeconf* + +%changelog -- 2.51.1