From cea6c5ee827a29872de01f4cdcfe9c89f90fa83f Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 13 Jan 2025 07:05:21 +0000 Subject: [PATCH] dev-db/sqlite: Sync with Gentoo It's from Gentoo commit d18d1ddf245ddbff4ab199dd1c197ca14a49641b. --- .../portage-stable/dev-db/sqlite/Manifest | 4 +- .../sqlite-3.47.0-allocator-mismatch.patch | 37 ------ .../files/sqlite-3.47.0-buildtclext.patch | 122 ------------------ .../sqlite/files/sqlite-3.47.0-nonbash.patch | 53 -------- .../files/sqlite-3.47.1-buildtclext.patch | 33 +++++ ...-3.47.0-r1.ebuild => sqlite-3.47.2.ebuild} | 4 +- 6 files changed, 36 insertions(+), 217 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.0-allocator-mismatch.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.0-buildtclext.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.0-nonbash.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.1-buildtclext.patch rename sdk_container/src/third_party/portage-stable/dev-db/sqlite/{sqlite-3.47.0-r1.ebuild => sqlite-3.47.2.ebuild} (98%) diff --git a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/Manifest b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/Manifest index ed269ba97f..d266c56e80 100644 --- a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/Manifest @@ -1,4 +1,4 @@ DIST sqlite-doc-3460100.zip 10851427 BLAKE2B 7462e83ca84e3e9aac7236f575fd2bdddac7744ae700a63fe8fdc9d2df3157c59fd374d99a0526bd4d9f742005ee7a90f3d78057861d3c3fcba9f897630e48db SHA512 1ad7dfc938d182f69ea9367b4f5ead1d48b991626521249e8b58c9fb4c2553e348ce402de9cc81b0ad699d4c45c467de56a98ee39f9c3555c6fafff15fba41ce -DIST sqlite-doc-3470000.zip 10937359 BLAKE2B 3fc349e4b2b0cd3fc59147519062133261463e09933419f330cd18e6b120d3498c10a1864c85c2de144430f1dbf7f9a867aba47ab77dbe2aa0b5128e0742dddf SHA512 20c126551a95905e63e99930e3f7964b6e3fc8b72fbbedf5484f669817af2a8384f05fce89d6117a5e232ba71f5469894d4bb22ba7abd796b24fd624372c7c17 +DIST sqlite-doc-3470200.zip 10957830 BLAKE2B cbc40dd440d1c5af4ad4333090a7306bd54ec43250a478b6900b8f74bd721035018ea7647f3a208d42cc0639827325be26a9412d17af7d390f4e584d4c6acf44 SHA512 48349d512b7cd9bc6f6a5da3a2b2285de159d4653667311adb0f5e6a970060db940a590c2d01b529afc1614065b22434d5b3ac4d8d0122d003d74926745ba56e DIST sqlite-src-3460100.zip 14276926 BLAKE2B df16ea944e317df8ed64fdfab289e3699ec71725ce55e2b30450adaeb41c061b4fba1eb8c41ba638b0edcd12b23264a1f9e413b69fd593c2b65fb1037d3fc8b2 SHA512 6d32a0db9f95d3cec34f02f3fd45b453bf7c422d4d4d9570790f641e7d190b8b31be8e8715afacc1b6e4417f15a4d15a0b28e608ae0b4b5f3054b075783b916e -DIST sqlite-src-3470000.zip 14408459 BLAKE2B c8e883410fdf9f020bc55ef01d7c2c5b7f1744d3475e7755f2395b24b2d5397302aac2eb7912161cbc2a705a1d7a94b1fa5e8f4e5dbf374c31de56228cbc9e5d SHA512 294d718fb1ebb23e2a4d6e8b7f498d7a7d922e6af5e36452fae075c0d48f4d4f64b5f235ab561b1e47fb7722efc647dfe541164cc385ddc0e2ec0dbce1f40b01 +DIST sqlite-src-3470200.zip 14421983 BLAKE2B dcaea5be0099b2dad1b53403933f0037ace48b1f248040c1b5cc116ac2ad6c9b44c71b8efe3afd16bef01119b440d1a2ec9d553a22f855e0ba55793684f53d8d SHA512 a6280a02304bfae173d9e9ebf376b2d3624658f04af4d8e95d5a042e24cf0405a47c0a4023f4dbc2790716cd85e16b97fcc0a83c1534e6d554f4eb0bfb0a3ed3 diff --git a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.0-allocator-mismatch.patch b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.0-allocator-mismatch.patch deleted file mode 100644 index 35ea63a28e..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.0-allocator-mismatch.patch +++ /dev/null @@ -1,37 +0,0 @@ -https://github.com/sqlite/sqlite/commit/76b77c63f730aa163d82d082c0e1bf648cc4c567 - -From 76b77c63f730aa163d82d082c0e1bf648cc4c567 Mon Sep 17 00:00:00 2001 -From: stephan -Date: Mon, 4 Nov 2024 13:59:58 +0000 -Subject: [PATCH] Fix two mismatched uses of malloc() and sqlite3_free() in - sqlite3_stdio.c, as reported in [forum:7dd7c70038 | forum post 7dd7c70038]. - -FossilOrigin-Name: 5238959d05bbf3c12f488a55e52f3e9733138993d0365255184dffeb2bf36c03 ---- - ext/misc/sqlite3_stdio.c | 4 ++-- - manifest | 13 +++++++------ - manifest.uuid | 2 +- - 3 files changed, 10 insertions(+), 9 deletions(-) - -diff --git a/ext/misc/sqlite3_stdio.c b/ext/misc/sqlite3_stdio.c -index 5bb26084c2..ba37e4be30 100644 ---- a/ext/misc/sqlite3_stdio.c -+++ b/ext/misc/sqlite3_stdio.c -@@ -146,7 +146,7 @@ char *sqlite3_fgets(char *buf, int sz, FILE *in){ - ** that into UTF-8. Otherwise, non-ASCII characters all get translated - ** into '?'. - */ -- wchar_t *b1 = malloc( sz*sizeof(wchar_t) ); -+ wchar_t *b1 = sqlite3_malloc( sz*sizeof(wchar_t) ); - if( b1==0 ) return 0; - _setmode(_fileno(in), IsConsole(in) ? _O_WTEXT : _O_U8TEXT); - if( fgetws(b1, sz/4, in)==0 ){ -@@ -212,7 +212,7 @@ int sqlite3_fputs(const char *z, FILE *out){ - ** use O_U8TEXT for everything in text mode. - */ - int sz = (int)strlen(z); -- wchar_t *b1 = malloc( (sz+1)*sizeof(wchar_t) ); -+ wchar_t *b1 = sqlite3_malloc( (sz+1)*sizeof(wchar_t) ); - if( b1==0 ) return 0; - sz = MultiByteToWideChar(CP_UTF8, 0, z, sz, b1, sz); - b1[sz] = 0; diff --git a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.0-buildtclext.patch b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.0-buildtclext.patch deleted file mode 100644 index 491674f5e9..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.0-buildtclext.patch +++ /dev/null @@ -1,122 +0,0 @@ -# https://sqlite.org/forum/forumpost/0683a49cb02f31a1 -# https://bugs.gentoo.org/942918 -# Compiled from https://sqlite.org/forum/forumpost/6fd4ca69e86eafc6, https://www.sqlite.org/src/info/38136b33f9536b63 and https://www.sqlite.org/src/info/2f6e5946cf34e094 - ---- a/tool/buildtclext.tcl -+++ b/tool/buildtclext.tcl -@@ -140,12 +140,13 @@ - if {[string length $OPTS]>1} { - append LDFLAGS $OPTS - } -- set CMD [subst $cmd] - if {$TCLMAJOR>8} { - set OUT libtcl9sqlite$VERSION.$SUFFIX - } else { - set OUT libsqlite$VERSION.$SUFFIX - } -+ set @ $OUT; # workaround for https://sqlite.org/forum/forumpost/6b1af7eb10884373 -+ set CMD [subst $cmd] - } - - # Show information about prior installs - -From b03592c324a4d066e12c3af945dd510dc28b6d65 Mon Sep 17 00:00:00 2001 -From: stephan -Date: Sat, 16 Nov 2024 14:33:01 +0000 -Subject: [PATCH] Add DESTDIR support to the tclextension-install target, via - [67a3ca0c013b] and [d1663cf05f7d]. - ---- a/Makefile.in -+++ b/Makefile.in -@@ -1600,7 +1600,7 @@ tclextension: tclsqlite3.c - # to find it. - # - tclextension-install: tclsqlite3.c -- $(TCLSH_CMD) $(TOP)/tool/buildtclext.tcl --cc "$(CC)" $(CFLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) -+ $(TCLSH_CMD) $(TOP)/tool/buildtclext.tcl --destdir "$(DESTDIR)" --cc "$(CC)" $(CFLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) - - # Install the SQLite TCL extension that is used by $TCLSH_CMD - # -+38136b33f9536b63520d3810f397a3b4b5372028b31108806f84fe44bf338425 ---- a/tool/buildtclext.tcl -+++ b/tool/buildtclext.tcl -@@ -15,6 +15,7 @@ Options: - --info Show info on existing SQLite TCL extension installs - --install-only Install an extension previously build - --uninstall Uninstall the extension -+ --destdir DIR Installation root (used by "make install DESTDIR=...") - - Other options are retained and passed through into the compiler.} - -@@ -25,6 +26,7 @@ set uninstall 0 - set infoonly 0 - set CC {} - set OPTS {} -+set DESTDIR ""; # --destdir "$(DESTDIR)" - for {set ii 0} {$ii<[llength $argv]} {incr ii} { - set a0 [lindex $argv $ii] - if {$a0=="--install-only"} { -@@ -42,6 +44,9 @@ for {set ii 0} {$ii<[llength $argv]} {incr ii} { - } elseif {$a0=="--cc" && $ii+1<[llength $argv]} { - incr ii - set CC [lindex $argv $ii] -+ } elseif {$a0=="--destdir" && $ii+1<[llength $argv]} { -+ incr ii -+ set DESTDIR [lindex $argv $ii] - } elseif {[string match -* $a0]} { - append OPTS " $a0" - } else { -@@ -245,7 +250,7 @@ package ifneeded sqlite3 $VERSION \\ - - if {$install} { - # Install the extension -- set DEST2 $DEST/sqlite$VERSION -+ set DEST2 ${DESTDIR}$DEST/sqlite$VERSION - file mkdir $DEST2 - puts "installing $DEST2/pkgIndex.tcl" - file copy -force pkgIndex.tcl $DEST2 - -From 375552f224813c7e2fac0e67dd13ecd6ba3a3571 Mon Sep 17 00:00:00 2001 -From: stephan -Date: Sat, 16 Nov 2024 17:12:17 +0000 -Subject: [PATCH] Handle DESTDIR at an earlier phase in buildtclext.tcl to - account for the is-writable-dir check and to filter out //zipfs: dirs as - (im)possible installation targets. ---- a/tool/buildtclext.tcl -+++ b/tool/buildtclext.tcl -@@ -198,7 +198,15 @@ if {$install} { - # - set DEST {} - foreach dir $auto_path { -- if {[file writable $dir]} { -+ if {[string match //*:* $dir]} { -+ # We can't install to //zipfs: paths -+ continue -+ } elseif {"" ne $DESTDIR && ![file writable $DESTDIR]} { -+ continue -+ } -+ set dir ${DESTDIR}$dir -+ if {[file writable $dir] || "" ne $DESTDIR} { -+ # the dir will be created later ^^^^^^^^ - set DEST $dir - break - } elseif {[glob -nocomplain $dir/sqlite3*/pkgIndex.tcl]!=""} { -@@ -216,7 +224,7 @@ if {$install} { - puts "to work around this problem.\n" - puts "These are the (unwritable) \$auto_path directories:\n" - foreach dir $auto_path { -- puts " * $dir" -+ puts " * ${DESTDIR}$dir" - } - exit 1 - } -@@ -250,7 +258,7 @@ package ifneeded sqlite3 $VERSION \\ - - if {$install} { - # Install the extension -- set DEST2 ${DESTDIR}$DEST/sqlite$VERSION -+ set DEST2 $DEST/sqlite$VERSION - file mkdir $DEST2 - puts "installing $DEST2/pkgIndex.tcl" - file copy -force pkgIndex.tcl $DEST2 - diff --git a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.0-nonbash.patch b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.0-nonbash.patch deleted file mode 100644 index 3eece5ed5b..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.0-nonbash.patch +++ /dev/null @@ -1,53 +0,0 @@ -https://sqlite.org/forum/info/14274389fb2 -https://bugs.gentoo.org/942917 -https://bugs.gentoo.org/942918 -https://github.com/sqlite/sqlite/commit/a40e6e927313ed97a895ff7c022eff705e50b1e6 - -From a40e6e927313ed97a895ff7c022eff705e50b1e6 Mon Sep 17 00:00:00 2001 -From: stephan -Date: Wed, 30 Oct 2024 00:35:08 +0000 -Subject: [PATCH] Replace 3 instances of the == 'test' shell command operator - with =, as == is apparently not as portable across shells. Problem reported - in [forum:14274389fb2|forum post 14274389fb2]. - -FossilOrigin-Name: 68199c40fedeb07a3f9c5024fac6376a0579a13b0e5690aef6238e3e22b9c1b7 ---- a/configure -+++ b/configure -@@ -10334,7 +10334,7 @@ else - fi - - original_use_tcl=${use_tcl} --if test x"${with_tclsh}" == x -a x"${with_tcl}" == x; then -+if test x"${with_tclsh}" = x -a x"${with_tcl}" = x; then - for ac_prog in tclsh9.0 tclsh8.6 tclsh - do - # Extract the first word of "$ac_prog", so it can be a program name with args. -@@ -10453,7 +10453,7 @@ $as_echo "unable to run tests because no tclConfig.sh file could be located" >&6 - HAVE_TCL=0 - fi - --if test x"$TCLSH_CMD" == x; then -+if test x"$TCLSH_CMD" = x; then - TCLSH_CMD=${TCL_EXEC_PREFIX}/bin/tclsh${TCL_VERSION} - if test ! -x ${TCLSH_CMD}; then - TCLSH_CMD_2=${TCL_EXEC_PREFIX}/bin/tclsh ---- a/configure.ac -+++ b/configure.ac -@@ -124,7 +124,7 @@ AC_ARG_WITH(tcl, AS_HELP_STRING([--with-tcl=DIR],[directory containing (tclConfi - AC_ARG_ENABLE(tcl, AS_HELP_STRING([--disable-tcl],[omit building accessory programs that require TCL-dev]), - [use_tcl=$enableval],[use_tcl=yes]) - original_use_tcl=${use_tcl} --if test x"${with_tclsh}" == x -a x"${with_tcl}" == x; then -+if test x"${with_tclsh}" = x -a x"${with_tcl}" = x; then - AC_CHECK_PROGS(TCLSH_CMD, [tclsh9.0 tclsh8.6 tclsh],none) - with_tclsh=${TCLSH_CMD} - fi -@@ -195,7 +195,7 @@ else - HAVE_TCL=0 - fi - AC_SUBST(HAVE_TCL) --if test x"$TCLSH_CMD" == x; then -+if test x"$TCLSH_CMD" = x; then - TCLSH_CMD=${TCL_EXEC_PREFIX}/bin/tclsh${TCL_VERSION} - if test ! -x ${TCLSH_CMD}; then - TCLSH_CMD_2=${TCL_EXEC_PREFIX}/bin/tclsh diff --git a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.1-buildtclext.patch b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.1-buildtclext.patch new file mode 100644 index 0000000000..d7a95ec527 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.1-buildtclext.patch @@ -0,0 +1,33 @@ +# https://bugs.gentoo.org/945906 +# https://www.sqlite.org/src/info?name=e24a3efec8c168b6 +--- a/tool/buildtclext.tcl ++++ b/tool/buildtclext.tcl +@@ -107,7 +107,7 @@ if {$tcl_platform(platform)=="windows"} { + set fd [open $LIBDIR/tclConfig.sh rb] + set tclConfig [read $fd] + close $fd +- ++ + # Extract parameter we will need from the tclConfig.sh file + # + set TCLMAJOR 8 +@@ -140,14 +140,17 @@ if {$tcl_platform(platform)=="windows"} { + if {[string length $OPTS]>1} { + append LDFLAGS $OPTS + } +- set CMD [subst $cmd] + if {$TCLMAJOR>8} { + set OUT libtcl9sqlite$VERSION.$SUFFIX + } else { + set OUT libsqlite$VERSION.$SUFFIX + } ++ set @ $OUT; # Workaround for https://sqlite.org/forum/forumpost/0683a49cb02f31a1 ++ # in which Gentoo edits their tclConfig.sh to include an soname ++ # linker flag which includes ${@} (the target file's name). ++ set CMD [subst $cmd] + } +- ++ + # Show information about prior installs + # + if {$infoonly} { diff --git a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-3.47.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-3.47.2.ebuild similarity index 98% rename from sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-3.47.0-r1.ebuild rename to sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-3.47.2.ebuild index b3dd1b416b..a5d7c70c50 100644 --- a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-3.47.0-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-3.47.2.ebuild @@ -52,9 +52,7 @@ fi PATCHES=( "${FILESDIR}"/${PN}-3.45.1-ppc64-ptr.patch - "${FILESDIR}"/${PN}-3.47.0-nonbash.patch - "${FILESDIR}"/${PN}-3.47.0-allocator-mismatch.patch - "${FILESDIR}"/${PN}-3.47.0-buildtclext.patch + "${FILESDIR}"/${PN}-3.47.1-buildtclext.patch ) _fossil_fetch() {