* [gentoo-commits] repo/gentoo:master commit in: dev-libs/iniparser/, dev-libs/iniparser/files/
@ 2016-03-07 18:51 Mike Frysinger
0 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2016-03-07 18:51 UTC (permalink / raw
To: gentoo-commits
commit: 398e6fffa8062592e250a332c6a9e905aea73f31
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 7 18:45:18 2016 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Mar 7 18:51:13 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=398e6fff
dev-libs/iniparser: fix LFS handling #471102
dev-libs/iniparser/files/iniparser-3.0-autotools.patch | 12 ++----------
dev-libs/iniparser/iniparser-4.0.ebuild | 6 +++++-
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/dev-libs/iniparser/files/iniparser-3.0-autotools.patch b/dev-libs/iniparser/files/iniparser-3.0-autotools.patch
index 68eca7e..89c7f63 100644
--- a/dev-libs/iniparser/files/iniparser-3.0-autotools.patch
+++ b/dev-libs/iniparser/files/iniparser-3.0-autotools.patch
@@ -1,9 +1,6 @@
-diff --git Makefile.am Makefile.am
-new file mode 100644
-index 0000000..63ca53b
--- /dev/null
+++ Makefile.am
-@@ -0,0 +1,10 @@
+@@ -0,0 +1,8 @@
+ACLOCAL_AMFLAGS = -I config
+
+lib_LTLIBRARIES = libiniparser.la
@@ -12,11 +9,6 @@ index 0000000..63ca53b
+libiniparser_la_SOURCES = src/dictionary.c src/iniparser.c
+
+include_HEADERS = src/dictionary.h src/iniparser.h
-+
-+
-diff --git configure.ac configure.ac
-new file mode 100644
-index 0000000..1eac717
--- /dev/null
+++ configure.ac
@@ -0,0 +1,24 @@
@@ -31,9 +23,9 @@ index 0000000..1eac717
+SHARED_VERSION_INFO="0"
+AC_SUBST(SHARED_VERSION_INFO)
+
-+
+# Checks for programs.
+AC_PROG_CC
++AC_SYS_LARGEFILE
+
+LT_INIT
+# Checks for header files.
diff --git a/dev-libs/iniparser/iniparser-4.0.ebuild b/dev-libs/iniparser/iniparser-4.0.ebuild
index 2837632..aec1641 100644
--- a/dev-libs/iniparser/iniparser-4.0.ebuild
+++ b/dev-libs/iniparser/iniparser-4.0.ebuild
@@ -4,7 +4,7 @@
EAPI=5
-inherit eutils multilib toolchain-funcs
+inherit eutils multilib toolchain-funcs flag-o-matic
DESCRIPTION="A free stand-alone ini file parsing library"
HOMEPAGE="https://github.com/ndevilla/iniparser"
@@ -40,6 +40,10 @@ src_prepare() {
rm -R html || die
}
+src_configure() {
+ append-lfs-flags
+}
+
src_compile() {
emake CC="$(tc-getCC)" V=1
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/iniparser/, dev-libs/iniparser/files/
@ 2020-03-15 18:13 Sebastian Pipping
0 siblings, 0 replies; 5+ messages in thread
From: Sebastian Pipping @ 2020-03-15 18:13 UTC (permalink / raw
To: gentoo-commits
commit: 8721763f5c744e8eca229edfe1afd52a77cf2842
Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 15 18:08:29 2020 +0000
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Sun Mar 15 18:08:40 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8721763f
dev-libs/iniparser: Fix out-of-bounds read
Bug: https://bugs.gentoo.org/647588
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
Package-Manager: Portage-2.3.92, Repoman-2.3.20
.../files/iniparser-4.0-out-of-bounds-read.patch | 22 ++++++++++
dev-libs/iniparser/iniparser-3.1-r2.ebuild | 47 ++++++++++++++++++++++
2 files changed, 69 insertions(+)
diff --git a/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch b/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch
new file mode 100644
index 00000000000..962566cd5b7
--- /dev/null
+++ b/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch
@@ -0,0 +1,22 @@
+From 4f870752abbb756911d7b11405d49e9769d082bd Mon Sep 17 00:00:00 2001
+From: Emmanuel Leblond <emmanuel.leblond@gmail.com>
+Date: Fri, 8 Apr 2016 22:13:36 +0200
+Subject: [PATCH] Fix #68 when reading file with only \0 char
+
+---
+ src/iniparser.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/iniparser.c b/src/iniparser.c
+index be37fec..fb1b549 100644
+--- a/src/iniparser.c
++++ b/src/iniparser.c
+@@ -678,7 +678,7 @@ dictionary * iniparser_load(const char * ininame)
+ while (fgets(line+last, ASCIILINESZ-last, in)!=NULL) {
+ lineno++ ;
+ len = (int)strlen(line)-1;
+- if (len==0)
++ if (len<=0)
+ continue;
+ /* Safety check against buffer overflows */
+ if (line[len]!='\n' && !feof(in)) {
diff --git a/dev-libs/iniparser/iniparser-3.1-r2.ebuild b/dev-libs/iniparser/iniparser-3.1-r2.ebuild
new file mode 100644
index 00000000000..3d8e93facd0
--- /dev/null
+++ b/dev-libs/iniparser/iniparser-3.1-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils autotools-multilib
+
+DESCRIPTION="A free stand-alone ini file parsing library"
+HOMEPAGE="http://ndevilla.free.fr/iniparser/"
+
+SRC_URI="http://ndevilla.free.fr/iniparser/${P}.tar.gz"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc examples static-libs"
+
+DEPEND="doc? ( app-doc/doxygen )
+ sys-devel/libtool"
+RDEPEND=""
+
+# the tests are rather examples than tests, no point in running them
+RESTRICT="test"
+
+S="${WORKDIR}/${PN}"
+
+DOCS=( AUTHORS README )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0b-cpp.patch"
+ "${FILESDIR}/${PN}-3.0-autotools.patch"
+ "${FILESDIR}/${PN}-4.0-out-of-bounds-read.patch"
+)
+
+src_install() {
+ autotools-multilib_src_install
+
+ if use doc; then
+ emake -C doc
+ dohtml -r html/*
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins test/*.{c,ini,py}
+ fi
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/iniparser/, dev-libs/iniparser/files/
@ 2020-08-29 16:32 David Seifert
0 siblings, 0 replies; 5+ messages in thread
From: David Seifert @ 2020-08-29 16:32 UTC (permalink / raw
To: gentoo-commits
commit: 442ca7e2f4ea1011d26b4ac95f337bda7cd309eb
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 29 16:31:37 2020 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Aug 29 16:31:37 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=442ca7e2
dev-libs/iniparser: Port SLOT=0 to EAPI 7
* Rebase patches
Closes: https://bugs.gentoo.org/739468
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: David Seifert <soap <AT> gentoo.org>
.../iniparser/files/iniparser-3.0-autotools.patch | 4 +-
dev-libs/iniparser/files/iniparser-3.0b-cpp.patch | 30 ++++++-------
.../files/iniparser-4.0-out-of-bounds-read.patch | 15 +------
dev-libs/iniparser/iniparser-3.1-r2.ebuild | 50 +++++++++++++---------
4 files changed, 47 insertions(+), 52 deletions(-)
diff --git a/dev-libs/iniparser/files/iniparser-3.0-autotools.patch b/dev-libs/iniparser/files/iniparser-3.0-autotools.patch
index 89c7f63d29a..361c96a7d4f 100644
--- a/dev-libs/iniparser/files/iniparser-3.0-autotools.patch
+++ b/dev-libs/iniparser/files/iniparser-3.0-autotools.patch
@@ -1,5 +1,5 @@
--- /dev/null
-+++ Makefile.am
++++ b/Makefile.am
@@ -0,0 +1,8 @@
+ACLOCAL_AMFLAGS = -I config
+
@@ -10,7 +10,7 @@
+
+include_HEADERS = src/dictionary.h src/iniparser.h
--- /dev/null
-+++ configure.ac
++++ b/configure.ac
@@ -0,0 +1,24 @@
+AC_PREREQ([2.65])
+AC_INIT([iniparser], [3.0], [ndevilla@free.fr])
diff --git a/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch b/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch
index cb331b81309..b7cd17d2d22 100644
--- a/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch
+++ b/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch
@@ -1,9 +1,8 @@
-diff -ur iniparser3.0b/src/dictionary.c iniparser3.0b-patched/src/dictionary.c
---- iniparser3.0b/src/dictionary.c 2007-11-24 05:39:18.000000000 +0800
-+++ iniparser3.0b-patched/src/dictionary.c 2009-04-01 21:38:09.000000000 +0800
-@@ -38,6 +38,9 @@
+--- a/src/dictionary.c
++++ b/src/dictionary.c
+@@ -32,6 +32,9 @@
/*---------------------------------------------------------------------------
- Private functions
+ Private functions
---------------------------------------------------------------------------*/
+#ifdef __cplusplus
+extern "C" {
@@ -11,9 +10,9 @@ diff -ur iniparser3.0b/src/dictionary.c iniparser3.0b-patched/src/dictionary.c
/* Doubles the allocated size associated to a pointer */
/* 'size' is the current allocated size. */
-@@ -401,5 +404,10 @@
- dictionary_del(d);
- return 0 ;
+@@ -394,5 +397,10 @@
+ dictionary_del(d);
+ return 0 ;
}
+
+#ifdef __cplusplus
@@ -22,12 +21,11 @@ diff -ur iniparser3.0b/src/dictionary.c iniparser3.0b-patched/src/dictionary.c
+
#endif
/* vim: set ts=4 et sw=4 tw=75 */
-diff -ur iniparser3.0b/src/iniparser.h iniparser3.0b-patched/src/iniparser.h
---- iniparser3.0b/src/iniparser.h 2007-11-24 05:38:19.000000000 +0800
-+++ iniparser3.0b-patched/src/iniparser.h 2009-04-01 21:38:02.000000000 +0800
-@@ -41,6 +41,10 @@
- #define iniparser_getstr(d, k) iniparser_getstring(d, k, NULL)
- #define iniparser_setstr iniparser_setstring
+--- a/src/iniparser.h
++++ b/src/iniparser.h
+@@ -49,6 +49,10 @@
+ int iniparser_getnsec(dictionary * d);
+
+#ifdef __cplusplus
+extern "C" {
@@ -35,8 +33,8 @@ diff -ur iniparser3.0b/src/iniparser.h iniparser3.0b-patched/src/iniparser.h
+
/*-------------------------------------------------------------------------*/
/**
- @brief Get number of sections in a dictionary
-@@ -277,4 +281,8 @@
+ @brief Get name for section n in a dictionary.
+@@ -304,4 +308,8 @@
/*--------------------------------------------------------------------------*/
void iniparser_freedict(dictionary * d);
diff --git a/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch b/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch
index 962566cd5b7..f6488810ac1 100644
--- a/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch
+++ b/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch
@@ -1,17 +1,6 @@
-From 4f870752abbb756911d7b11405d49e9769d082bd Mon Sep 17 00:00:00 2001
-From: Emmanuel Leblond <emmanuel.leblond@gmail.com>
-Date: Fri, 8 Apr 2016 22:13:36 +0200
-Subject: [PATCH] Fix #68 when reading file with only \0 char
-
----
- src/iniparser.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/iniparser.c b/src/iniparser.c
-index be37fec..fb1b549 100644
--- a/src/iniparser.c
+++ b/src/iniparser.c
-@@ -678,7 +678,7 @@ dictionary * iniparser_load(const char * ininame)
+@@ -663,7 +663,7 @@
while (fgets(line+last, ASCIILINESZ-last, in)!=NULL) {
lineno++ ;
len = (int)strlen(line)-1;
@@ -19,4 +8,4 @@ index be37fec..fb1b549 100644
+ if (len<=0)
continue;
/* Safety check against buffer overflows */
- if (line[len]!='\n' && !feof(in)) {
+ if (line[len]!='\n') {
diff --git a/dev-libs/iniparser/iniparser-3.1-r2.ebuild b/dev-libs/iniparser/iniparser-3.1-r2.ebuild
index 357f9b4f3b5..5c50f4305ea 100644
--- a/dev-libs/iniparser/iniparser-3.1-r2.ebuild
+++ b/dev-libs/iniparser/iniparser-3.1-r2.ebuild
@@ -1,47 +1,55 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=7
-AUTOTOOLS_AUTORECONF=1
-inherit autotools-utils autotools-multilib
+inherit autotools multilib-minimal
DESCRIPTION="A free stand-alone ini file parsing library"
HOMEPAGE="http://ndevilla.free.fr/iniparser/"
-
SRC_URI="http://ndevilla.free.fr/iniparser/${P}.tar.gz"
+
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc examples static-libs"
-
-DEPEND="doc? ( app-doc/doxygen )
- sys-devel/libtool"
-RDEPEND=""
-
+IUSE="doc examples"
# the tests are rather examples than tests, no point in running them
RESTRICT="test"
-S="${WORKDIR}/${PN}"
+BDEPEND="doc? ( app-doc/doxygen )"
-DOCS=( AUTHORS README )
+S="${WORKDIR}/${PN}"
PATCHES=(
- "${FILESDIR}/${PN}-3.0b-cpp.patch"
- "${FILESDIR}/${PN}-3.0-autotools.patch"
- "${FILESDIR}/${PN}-4.0-out-of-bounds-read.patch"
+ "${FILESDIR}"/${PN}-3.0b-cpp.patch
+ "${FILESDIR}"/${PN}-3.0-autotools.patch
+ "${FILESDIR}"/${PN}-4.0-out-of-bounds-read.patch
)
-src_install() {
- autotools-multilib_src_install
+src_prepare() {
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-static
+}
+multilib_src_install_all() {
if use doc; then
emake -C doc
- dohtml -r html/*
+ HTML_DOCS=( html/. )
fi
- if use examples ; then
- insinto /usr/share/doc/${PF}/examples
- doins test/*.{c,ini,py}
+ einstalldocs
+
+ if use examples; then
+ docinto examples
+ dodoc test/*.{c,ini,py}
+ docompress -x /usr/share/doc/${PF}/examples
fi
+
+ # no static archives
+ find "${ED}" -name '*.la' -delete || die
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/iniparser/, dev-libs/iniparser/files/
@ 2023-06-07 7:42 Fabian Groffen
0 siblings, 0 replies; 5+ messages in thread
From: Fabian Groffen @ 2023-06-07 7:42 UTC (permalink / raw
To: gentoo-commits
commit: 7d0191b1f3430240225b3e6c565f8ab6a9715996
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 7 07:41:05 2023 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Jun 7 07:42:49 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d0191b1
dev-libs/iniparser: add patch for CVE-2023-33461 from upstream
- drop old 3.1-r3
- drop obsolete patches
- add patch from upstream for CVE-2023-33461
- drop my maintainership, portage-utils doesn't use this any more
Bug: https://bugs.gentoo.org/907928
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
dev-libs/iniparser/Manifest | 1 -
.../iniparser/files/iniparser-3.0-autotools.patch | 38 -----------
dev-libs/iniparser/files/iniparser-3.0b-cpp.patch | 45 -------------
.../files/iniparser-4.0-out-of-bounds-read.patch | 11 ----
.../files/iniparser-4.1-CVE-null-getstring.patch | 43 +++++++++++++
dev-libs/iniparser/iniparser-3.1-r3.ebuild | 50 ---------------
dev-libs/iniparser/iniparser-4.1-r1.ebuild | 75 ++++++++++++++++++++++
dev-libs/iniparser/metadata.xml | 4 --
8 files changed, 118 insertions(+), 149 deletions(-)
diff --git a/dev-libs/iniparser/Manifest b/dev-libs/iniparser/Manifest
index f061f9715a2a..80cc71c57966 100644
--- a/dev-libs/iniparser/Manifest
+++ b/dev-libs/iniparser/Manifest
@@ -1,2 +1 @@
-DIST iniparser-3.1.tar.gz 39097 BLAKE2B 4ada36f5bb95476c06deffa7938a750bcdeb0bd5bb817b24274c1e1c588d9abbd23c3a58f3cb3b6f961912f3e12e74aadf224da4cd81863b874e4a84d11c1744 SHA512 8fd8324c5629fdc3e3eff00afb5f0832402ccc760c5b92db82aa29b340ec891419ca2c4fee3a4d4d67cf9bc51c76b095bc0c458e087c2b8e72ac36867c47ae86
DIST iniparser-4.1.tar.gz 44732 BLAKE2B a3480dab512b41eb9635c733b76048ab089a311c2970aae5ce89d103ff6ab1923d5824a5fca3bf445ba213ecd9954018fdef2831fd98c1a43c9ae7d4fb1cb388 SHA512 a8125aaaead1f9dfde380fa1e45bae31ca2312be029f2c53b4072cb3b127d16578a95c7c0aee1e3dda5e7b8db7a865ba6dfe8a1d80eb673061b3babef744e968
diff --git a/dev-libs/iniparser/files/iniparser-3.0-autotools.patch b/dev-libs/iniparser/files/iniparser-3.0-autotools.patch
deleted file mode 100644
index 361c96a7d4fb..000000000000
--- a/dev-libs/iniparser/files/iniparser-3.0-autotools.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- /dev/null
-+++ b/Makefile.am
-@@ -0,0 +1,8 @@
-+ACLOCAL_AMFLAGS = -I config
-+
-+lib_LTLIBRARIES = libiniparser.la
-+
-+libiniparser_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
-+libiniparser_la_SOURCES = src/dictionary.c src/iniparser.c
-+
-+include_HEADERS = src/dictionary.h src/iniparser.h
---- /dev/null
-+++ b/configure.ac
-@@ -0,0 +1,24 @@
-+AC_PREREQ([2.65])
-+AC_INIT([iniparser], [3.0], [ndevilla@free.fr])
-+
-+AC_CONFIG_AUX_DIR(config)
-+AC_CONFIG_MACRO_DIR(config)
-+
-+AM_INIT_AUTOMAKE([1.8 foreign])
-+
-+SHARED_VERSION_INFO="0"
-+AC_SUBST(SHARED_VERSION_INFO)
-+
-+# Checks for programs.
-+AC_PROG_CC
-+AC_SYS_LARGEFILE
-+
-+LT_INIT
-+# Checks for header files.
-+AC_CHECK_HEADERS([ ctype.h stdio.h stdlib.h string.h ])
-+
-+# Checks for library functions.
-+AC_CHECK_FUNCS([strcmp])
-+
-+AC_CONFIG_FILES([Makefile])
-+AC_OUTPUT
diff --git a/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch b/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch
deleted file mode 100644
index b7cd17d2d226..000000000000
--- a/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- a/src/dictionary.c
-+++ b/src/dictionary.c
-@@ -32,6 +32,9 @@
- /*---------------------------------------------------------------------------
- Private functions
- ---------------------------------------------------------------------------*/
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /* Doubles the allocated size associated to a pointer */
- /* 'size' is the current allocated size. */
-@@ -394,5 +397,10 @@
- dictionary_del(d);
- return 0 ;
- }
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
- #endif
- /* vim: set ts=4 et sw=4 tw=75 */
---- a/src/iniparser.h
-+++ b/src/iniparser.h
-@@ -49,6 +49,10 @@
- int iniparser_getnsec(dictionary * d);
-
-
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
- /*-------------------------------------------------------------------------*/
- /**
- @brief Get name for section n in a dictionary.
-@@ -304,4 +308,8 @@
- /*--------------------------------------------------------------------------*/
- void iniparser_freedict(dictionary * d);
-
-+#ifdef __cplusplus
-+}
-+#endif
-+
- #endif
diff --git a/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch b/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch
deleted file mode 100644
index f6488810ac12..000000000000
--- a/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/iniparser.c
-+++ b/src/iniparser.c
-@@ -663,7 +663,7 @@
- while (fgets(line+last, ASCIILINESZ-last, in)!=NULL) {
- lineno++ ;
- len = (int)strlen(line)-1;
-- if (len==0)
-+ if (len<=0)
- continue;
- /* Safety check against buffer overflows */
- if (line[len]!='\n') {
diff --git a/dev-libs/iniparser/files/iniparser-4.1-CVE-null-getstring.patch b/dev-libs/iniparser/files/iniparser-4.1-CVE-null-getstring.patch
new file mode 100644
index 000000000000..bf3c035fda07
--- /dev/null
+++ b/dev-libs/iniparser/files/iniparser-4.1-CVE-null-getstring.patch
@@ -0,0 +1,43 @@
+From ace9871f65d11b5d73f0b9ee8cf5d2807439442d Mon Sep 17 00:00:00 2001
+From: Antonio <antoniolrt@gmail.com>
+Date: Fri, 2 Jun 2023 15:03:10 -0300
+Subject: [PATCH] Handle null return from iniparser_getstring
+
+Fix handling of NULL returns from iniparser_getstring in
+iniparser_getboolean, iniparser_getlongint and iniparser_getdouble,
+avoiding a crash.
+---
+ src/iniparser.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/iniparser.c b/src/iniparser.c
+index f1d1658..dbceb20 100644
+--- a/src/iniparser.c
++++ b/src/iniparser.c
+@@ -456,7 +456,7 @@ long int iniparser_getlongint(const dictionary * d, const char * key, long int n
+ const char * str ;
+
+ str = iniparser_getstring(d, key, INI_INVALID_KEY);
+- if (str==INI_INVALID_KEY) return notfound ;
++ if (str==NULL || str==INI_INVALID_KEY) return notfound ;
+ return strtol(str, NULL, 0);
+ }
+
+@@ -511,7 +511,7 @@ double iniparser_getdouble(const dictionary * d, const char * key, double notfou
+ const char * str ;
+
+ str = iniparser_getstring(d, key, INI_INVALID_KEY);
+- if (str==INI_INVALID_KEY) return notfound ;
++ if (str==NULL || str==INI_INVALID_KEY) return notfound ;
+ return atof(str);
+ }
+
+@@ -553,7 +553,7 @@ int iniparser_getboolean(const dictionary * d, const char * key, int notfound)
+ const char * c ;
+
+ c = iniparser_getstring(d, key, INI_INVALID_KEY);
+- if (c==INI_INVALID_KEY) return notfound ;
++ if (c==NULL || c==INI_INVALID_KEY) return notfound ;
+ if (c[0]=='y' || c[0]=='Y' || c[0]=='1' || c[0]=='t' || c[0]=='T') {
+ ret = 1 ;
+ } else if (c[0]=='n' || c[0]=='N' || c[0]=='0' || c[0]=='f' || c[0]=='F') {
diff --git a/dev-libs/iniparser/iniparser-3.1-r3.ebuild b/dev-libs/iniparser/iniparser-3.1-r3.ebuild
deleted file mode 100644
index 37dc4fdbbabb..000000000000
--- a/dev-libs/iniparser/iniparser-3.1-r3.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools
-
-DESCRIPTION="A free stand-alone ini file parsing library"
-HOMEPAGE="http://ndevilla.free.fr/iniparser/"
-SRC_URI="http://ndevilla.free.fr/iniparser/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
-IUSE="doc examples"
-# the tests are rather examples than tests, no point in running them
-RESTRICT="test"
-
-BDEPEND="doc? ( app-doc/doxygen )"
-
-S="${WORKDIR}/${PN}"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-3.0b-cpp.patch
- "${FILESDIR}"/${PN}-3.0-autotools.patch
- "${FILESDIR}"/${PN}-4.0-out-of-bounds-read.patch
-)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_install() {
- if use doc; then
- emake -C doc
- HTML_DOCS=( html/. )
- fi
-
- default
-
- if use examples; then
- docinto examples
- dodoc test/*.{c,ini,py}
- docompress -x /usr/share/doc/${PF}/examples
- fi
-
- # No static archives
- find "${ED}" -name '*.la' -delete || die
-}
diff --git a/dev-libs/iniparser/iniparser-4.1-r1.ebuild b/dev-libs/iniparser/iniparser-4.1-r1.ebuild
new file mode 100644
index 000000000000..67b34398872b
--- /dev/null
+++ b/dev-libs/iniparser/iniparser-4.1-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="A free stand-alone ini file parsing library"
+HOMEPAGE="https://github.com/ndevilla/iniparser"
+SRC_URI="https://github.com/ndevilla/iniparser/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="4"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="doc examples"
+
+BDEPEND="doc? ( app-doc/doxygen )"
+
+PATCHES=(
+ ${FILESDIR}/${P}-CVE-null-getstring.patch # upstream, bug #907928
+)
+
+_newlib_so_with_symlinks() {
+ local source="${1}" base="${2}" current="${3}" revision="${4}" age="${5}"
+
+ newlib.so ${source} ${base}.so.${current}.${revision}.${age}
+ local i
+ for i in ".${current}" '' ; do
+ dosym ${base}.so.${current}.${revision}.${age} /usr/$(get_libdir)/${base}.so${i}
+ done
+}
+
+src_prepare() {
+ default
+ rm -r html || die
+}
+
+src_configure() {
+ append-lfs-flags
+}
+
+_emake() {
+ emake CC="$(tc-getCC)" AR="$(tc-getAR)" V=1 \
+ SO_TARGET=lib${PN}${SLOT}.so.1 \
+ ADDITIONAL_CFLAGS= \
+ "$@"
+}
+
+src_compile() {
+ _emake
+}
+
+src_test() {
+ _emake -C test
+}
+
+src_install() {
+ _newlib_so_with_symlinks lib${PN}${SLOT}.so.1 lib${PN}${SLOT} 1 0 0
+
+ insinto /usr/include/${PN}${SLOT}
+ doins src/*.h
+
+ if use doc; then
+ emake -C doc
+ HTML_DOCS=( html/. )
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc -r example/.
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ einstalldocs
+}
diff --git a/dev-libs/iniparser/metadata.xml b/dev-libs/iniparser/metadata.xml
index d34e989567aa..3b48e648fba0 100644
--- a/dev-libs/iniparser/metadata.xml
+++ b/dev-libs/iniparser/metadata.xml
@@ -5,10 +5,6 @@
<email>samba@gentoo.org</email>
<name>Samba Team</name>
</maintainer>
- <maintainer type="person">
- <email>grobian@gentoo.org</email>
- <name>Fabian Groffen</name>
- </maintainer>
<upstream>
<remote-id type="github">ndevilla/iniparser</remote-id>
</upstream>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/iniparser/, dev-libs/iniparser/files/
@ 2023-06-07 7:54 Fabian Groffen
0 siblings, 0 replies; 5+ messages in thread
From: Fabian Groffen @ 2023-06-07 7:54 UTC (permalink / raw
To: gentoo-commits
commit: 269531ad4c0c31dee32ca78fb3e8832463a0fd08
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 7 07:54:19 2023 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Jun 7 07:54:19 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=269531ad
dev-libs/iniparser: bring back 3.1-r3: sys-block/ndctl depends on it
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
dev-libs/iniparser/Manifest | 1 +
.../iniparser/files/iniparser-3.0-autotools.patch | 38 ++++++++++++++++
dev-libs/iniparser/files/iniparser-3.0b-cpp.patch | 45 +++++++++++++++++++
.../files/iniparser-4.0-out-of-bounds-read.patch | 11 +++++
dev-libs/iniparser/iniparser-3.1-r3.ebuild | 50 ++++++++++++++++++++++
5 files changed, 145 insertions(+)
diff --git a/dev-libs/iniparser/Manifest b/dev-libs/iniparser/Manifest
index 80cc71c57966..f061f9715a2a 100644
--- a/dev-libs/iniparser/Manifest
+++ b/dev-libs/iniparser/Manifest
@@ -1 +1,2 @@
+DIST iniparser-3.1.tar.gz 39097 BLAKE2B 4ada36f5bb95476c06deffa7938a750bcdeb0bd5bb817b24274c1e1c588d9abbd23c3a58f3cb3b6f961912f3e12e74aadf224da4cd81863b874e4a84d11c1744 SHA512 8fd8324c5629fdc3e3eff00afb5f0832402ccc760c5b92db82aa29b340ec891419ca2c4fee3a4d4d67cf9bc51c76b095bc0c458e087c2b8e72ac36867c47ae86
DIST iniparser-4.1.tar.gz 44732 BLAKE2B a3480dab512b41eb9635c733b76048ab089a311c2970aae5ce89d103ff6ab1923d5824a5fca3bf445ba213ecd9954018fdef2831fd98c1a43c9ae7d4fb1cb388 SHA512 a8125aaaead1f9dfde380fa1e45bae31ca2312be029f2c53b4072cb3b127d16578a95c7c0aee1e3dda5e7b8db7a865ba6dfe8a1d80eb673061b3babef744e968
diff --git a/dev-libs/iniparser/files/iniparser-3.0-autotools.patch b/dev-libs/iniparser/files/iniparser-3.0-autotools.patch
new file mode 100644
index 000000000000..361c96a7d4fb
--- /dev/null
+++ b/dev-libs/iniparser/files/iniparser-3.0-autotools.patch
@@ -0,0 +1,38 @@
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1,8 @@
++ACLOCAL_AMFLAGS = -I config
++
++lib_LTLIBRARIES = libiniparser.la
++
++libiniparser_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
++libiniparser_la_SOURCES = src/dictionary.c src/iniparser.c
++
++include_HEADERS = src/dictionary.h src/iniparser.h
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,24 @@
++AC_PREREQ([2.65])
++AC_INIT([iniparser], [3.0], [ndevilla@free.fr])
++
++AC_CONFIG_AUX_DIR(config)
++AC_CONFIG_MACRO_DIR(config)
++
++AM_INIT_AUTOMAKE([1.8 foreign])
++
++SHARED_VERSION_INFO="0"
++AC_SUBST(SHARED_VERSION_INFO)
++
++# Checks for programs.
++AC_PROG_CC
++AC_SYS_LARGEFILE
++
++LT_INIT
++# Checks for header files.
++AC_CHECK_HEADERS([ ctype.h stdio.h stdlib.h string.h ])
++
++# Checks for library functions.
++AC_CHECK_FUNCS([strcmp])
++
++AC_CONFIG_FILES([Makefile])
++AC_OUTPUT
diff --git a/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch b/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch
new file mode 100644
index 000000000000..b7cd17d2d226
--- /dev/null
+++ b/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch
@@ -0,0 +1,45 @@
+--- a/src/dictionary.c
++++ b/src/dictionary.c
+@@ -32,6 +32,9 @@
+ /*---------------------------------------------------------------------------
+ Private functions
+ ---------------------------------------------------------------------------*/
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ /* Doubles the allocated size associated to a pointer */
+ /* 'size' is the current allocated size. */
+@@ -394,5 +397,10 @@
+ dictionary_del(d);
+ return 0 ;
+ }
++
++#ifdef __cplusplus
++}
++#endif
++
+ #endif
+ /* vim: set ts=4 et sw=4 tw=75 */
+--- a/src/iniparser.h
++++ b/src/iniparser.h
+@@ -49,6 +49,10 @@
+ int iniparser_getnsec(dictionary * d);
+
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ /*-------------------------------------------------------------------------*/
+ /**
+ @brief Get name for section n in a dictionary.
+@@ -304,4 +308,8 @@
+ /*--------------------------------------------------------------------------*/
+ void iniparser_freedict(dictionary * d);
+
++#ifdef __cplusplus
++}
++#endif
++
+ #endif
diff --git a/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch b/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch
new file mode 100644
index 000000000000..f6488810ac12
--- /dev/null
+++ b/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch
@@ -0,0 +1,11 @@
+--- a/src/iniparser.c
++++ b/src/iniparser.c
+@@ -663,7 +663,7 @@
+ while (fgets(line+last, ASCIILINESZ-last, in)!=NULL) {
+ lineno++ ;
+ len = (int)strlen(line)-1;
+- if (len==0)
++ if (len<=0)
+ continue;
+ /* Safety check against buffer overflows */
+ if (line[len]!='\n') {
diff --git a/dev-libs/iniparser/iniparser-3.1-r3.ebuild b/dev-libs/iniparser/iniparser-3.1-r3.ebuild
new file mode 100644
index 000000000000..37dc4fdbbabb
--- /dev/null
+++ b/dev-libs/iniparser/iniparser-3.1-r3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="A free stand-alone ini file parsing library"
+HOMEPAGE="http://ndevilla.free.fr/iniparser/"
+SRC_URI="http://ndevilla.free.fr/iniparser/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="doc examples"
+# the tests are rather examples than tests, no point in running them
+RESTRICT="test"
+
+BDEPEND="doc? ( app-doc/doxygen )"
+
+S="${WORKDIR}/${PN}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.0b-cpp.patch
+ "${FILESDIR}"/${PN}-3.0-autotools.patch
+ "${FILESDIR}"/${PN}-4.0-out-of-bounds-read.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_install() {
+ if use doc; then
+ emake -C doc
+ HTML_DOCS=( html/. )
+ fi
+
+ default
+
+ if use examples; then
+ docinto examples
+ dodoc test/*.{c,ini,py}
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ # No static archives
+ find "${ED}" -name '*.la' -delete || die
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-06-07 7:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-07 18:51 [gentoo-commits] repo/gentoo:master commit in: dev-libs/iniparser/, dev-libs/iniparser/files/ Mike Frysinger
-- strict thread matches above, loose matches on Subject: below --
2020-03-15 18:13 Sebastian Pipping
2020-08-29 16:32 David Seifert
2023-06-07 7:42 Fabian Groffen
2023-06-07 7:54 Fabian Groffen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox