From 117a1a9fa7d196acd8658b59f92bcfff962210de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakov=20Smoli=C4=87?= Date: Sat, 22 Feb 2025 00:08:41 +0100 Subject: [PATCH 1/2] dev-db/sqlite: Sync live ebuild MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakov Smolić --- dev-db/sqlite/sqlite-9999.ebuild | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/dev-db/sqlite/sqlite-9999.ebuild b/dev-db/sqlite/sqlite-9999.ebuild index e0fe683ea625a..2b47259e17d4a 100644 --- a/dev-db/sqlite/sqlite-9999.ebuild +++ b/dev-db/sqlite/sqlite-9999.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit autotools flag-o-matic multilib-minimal toolchain-funcs +inherit flag-o-matic multilib-minimal toolchain-funcs DESCRIPTION="SQL database engine" HOMEPAGE="https://sqlite.org/" @@ -19,8 +19,8 @@ else #printf -v DOC_PV "%u%02u%02u00" $(ver_rs 1-3 " ") SRC_URI=" - https://sqlite.org/2024/${PN}-src-${SRC_PV}.zip - doc? ( https://sqlite.org/2024/${PN}-doc-${DOC_PV}.zip ) + https://sqlite.org/2025/${PN}-src-${SRC_PV}.zip + doc? ( https://sqlite.org/2025/${PN}-doc-${DOC_PV}.zip ) " S="${WORKDIR}/${PN}-src-${SRC_PV}" @@ -43,7 +43,6 @@ DEPEND=" ${RDEPEND} test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] ) " -BDEPEND=">=dev-lang/tcl-8.6:0" if [[ ${PV} == 9999 ]]; then BDEPEND+=" dev-vcs/fossil" else @@ -142,7 +141,6 @@ src_unpack() { src_prepare() { default - eautoreconf multilib_copy_sources } @@ -196,7 +194,8 @@ multilib_src_configure() { # https://sqlite.org/compile.html#enable_fts5 # https://sqlite.org/fts3.html # https://sqlite.org/fts5.html - append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 + append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS + options+=( --enable-fts4 ) options+=( --enable-fts5 ) # Support hidden columns. @@ -205,7 +204,7 @@ multilib_src_configure() { # Support memsys5 memory allocator. # https://sqlite.org/compile.html#enable_memsys5 # https://sqlite.org/malloc.html#memsys5 - append-cppflags -DSQLITE_ENABLE_MEMSYS5 + options+=( --enable-memsys5 ) # Support sqlite3_normalized_sql() function. # https://sqlite.org/c3ref/expanded_sql.html @@ -231,12 +230,12 @@ multilib_src_configure() { # https://sqlite.org/compile.html#enable_geopoly # https://sqlite.org/rtree.html # https://sqlite.org/geopoly.html - append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY + options+=( --enable-rtree --enable-geopoly ) # Support Session extension. # https://sqlite.org/compile.html#enable_session # https://sqlite.org/sessionintro.html - append-cppflags -DSQLITE_ENABLE_SESSION + options+=( --enable-session ) # Support scan status functions. # https://sqlite.org/compile.html#enable_stmt_scanstatus @@ -280,8 +279,7 @@ multilib_src_configure() { if use icu; then # Support ICU extension. # https://sqlite.org/compile.html#enable_icu - append-cppflags -DSQLITE_ENABLE_ICU - sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed" + options+=( --with-icu-config ) fi options+=( @@ -320,7 +318,13 @@ multilib_src_configure() { fi fi - econf "${options[@]}" + # set SONAME for the library + options+=( --soname=legacy ) + + # https://sqlite.org/forum/forumpost/4f4d06a9f6683bb9 + tc-export_build_env BUILD_CC + + CC_FOR_BUILD=${BUILD_CC} econf "${options[@]}" } multilib_src_compile() { From 75d82143fa29cb7a37550333c548292bda6b4687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakov=20Smoli=C4=87?= Date: Sat, 22 Feb 2025 13:36:21 +0100 Subject: [PATCH 2/2] dev-db/sqlite: Fix buffer overflow in autosetup jimsh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a patch similar to https://github.com/msteveb/jimtcl/commit/9b754b8033b9f2a1dc8ba1227df2e5d75185dda7 until this is fixed upstream in autosetup Closes: https://bugs.gentoo.org/949981 Signed-off-by: Jakov Smolić --- dev-db/sqlite/files/sqlite-3.49.1-jimsh.patch | 36 +++++++++++++++++++ dev-db/sqlite/sqlite-3.49.1.ebuild | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 dev-db/sqlite/files/sqlite-3.49.1-jimsh.patch diff --git a/dev-db/sqlite/files/sqlite-3.49.1-jimsh.patch b/dev-db/sqlite/files/sqlite-3.49.1-jimsh.patch new file mode 100644 index 0000000000000..68203390c7935 --- /dev/null +++ b/dev-db/sqlite/files/sqlite-3.49.1-jimsh.patch @@ -0,0 +1,36 @@ +# https://bugs.gentoo.org/949981 +# https://github.com/msteveb/jimtcl/commit/9b754b8033b9f2a1dc8ba1227df2e5d75185dda7 +--- a/autosetup/jimsh0.c ++++ b/autosetup/jimsh0.c +@@ -2088,9 +2088,13 @@ enum wbuftype { + #define UNIX_SOCKETS 0 + #endif + +-#ifndef MAXPATHLEN +-#define MAXPATHLEN JIM_PATH_LEN +-#endif ++# ifndef MAXPATHLEN ++# ifdef PATH_MAX ++# define MAXPATHLEN PATH_MAX ++# else ++# define MAXPATHLEN JIM_PATH_LEN ++# endif ++# endif + + + +@@ -4173,14 +4177,6 @@ int Jim_regexpInit(Jim_Interp *interp) + #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) + #endif + +-# ifndef MAXPATHLEN +-# ifdef PATH_MAX +-# define MAXPATHLEN PATH_MAX +-# else +-# define MAXPATHLEN JIM_PATH_LEN +-# endif +-# endif +- + #if defined(__MINGW32__) || defined(__MSYS__) || defined(_MSC_VER) + #define ISWINDOWS 1 + diff --git a/dev-db/sqlite/sqlite-3.49.1.ebuild b/dev-db/sqlite/sqlite-3.49.1.ebuild index a0c2249a68026..3deeb24b18ab5 100644 --- a/dev-db/sqlite/sqlite-3.49.1.ebuild +++ b/dev-db/sqlite/sqlite-3.49.1.ebuild @@ -53,6 +53,8 @@ PATCHES=( "${FILESDIR}"/${PN}-3.47.2-hwtime.h-Don-t-use-rdtsc-on-i486.patch # https://sqlite.org/forum/forumpost/f93323a743 "${FILESDIR}"/${PN}-3.49.0-icu-tests.patch + # https://bugs.gentoo.org/949981 + "${FILESDIR}"/${PN}-3.49.1-jimsh.patch ) _fossil_fetch() {