All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 5/5] sqlite3: use 1024 for MAX_PATHNAM
Date: Thu, 30 Nov 2017 09:45:15 +0800	[thread overview]
Message-ID: <917550ac335cd0af547d301f41605d8de6678d19.1512006081.git.liezhi.yang@windriver.com> (raw)
In-Reply-To: <cover.1512006081.git.liezhi.yang@windriver.com>

The 512 is a little small when len(TMPDIR) == 410, it would be failed when
do_rootfs, use 1024 to fix problem:

Fixed when len(TMPDIR) == 410:
$ bitbake core-image-minimal
[snip]
"tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/lib/python3.5/site-packages/dnf/yum/history.py", line 799, in _get_cursor
    self._conn = sqlite.connect(self._db_file)
sqlite3.OperationalError: unable to open database file

[YOCTO #12374]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 .../0001-sqlite3.c-use-1024-MAX_PATHNAME.patch     | 37 ++++++++++++++++++++++
 meta/recipes-support/sqlite/sqlite3_3.21.0.bb      |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 meta/recipes-support/sqlite/files/0001-sqlite3.c-use-1024-MAX_PATHNAME.patch

diff --git a/meta/recipes-support/sqlite/files/0001-sqlite3.c-use-1024-MAX_PATHNAME.patch b/meta/recipes-support/sqlite/files/0001-sqlite3.c-use-1024-MAX_PATHNAME.patch
new file mode 100644
index 0000000..f000477
--- /dev/null
+++ b/meta/recipes-support/sqlite/files/0001-sqlite3.c-use-1024-MAX_PATHNAME.patch
@@ -0,0 +1,37 @@
+From 9f63bdd623a851c6f4af6d1259161d5d47d94bb3 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 22 Nov 2017 15:23:24 +0800
+Subject: [PATCH] sqlite3.c: use 1024 for MAX_PATHNAME
+
+The 512 is a little small when build in deep directory, e.g., it would be
+failed to run when oe-core's TMPDIR == 410, use 1024 to fix problem.
+
+Fixed:
+[snip]
+"/usr/lib/python3.5/site-packages/dnf/yum/history.py", line 799, in _get_cursor
+    self._conn = sqlite.connect(self._db_file)
+sqlite3.OperationalError: unable to open database file
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ sqlite3.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sqlite3.c b/sqlite3.c
+index 4ec1271..31edaf8 100644
+--- a/sqlite3.c
++++ b/sqlite3.c
+@@ -30379,7 +30379,7 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
+ /*
+ ** Maximum supported path-length.
+ */
+-#define MAX_PATHNAME 512
++#define MAX_PATHNAME 1024
+ 
+ /*
+ ** Maximum supported symbolic links
+-- 
+2.7.4
+
diff --git a/meta/recipes-support/sqlite/sqlite3_3.21.0.bb b/meta/recipes-support/sqlite/sqlite3_3.21.0.bb
index 1d51733..33f41e5 100644
--- a/meta/recipes-support/sqlite/sqlite3_3.21.0.bb
+++ b/meta/recipes-support/sqlite/sqlite3_3.21.0.bb
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed0
 
 SRC_URI = "\
   http://www.sqlite.org/2017/sqlite-autoconf-${SQLITE_PV}.tar.gz \
+  file://0001-sqlite3.c-use-1024-MAX_PATHNAME.patch \
   "
 SRC_URI[md5sum] = "7913de4c3126ba3c24689cb7a199ea31"
 SRC_URI[sha256sum] = "d7dd516775005ad87a57f428b6f86afd206cb341722927f104d3f0cf65fbbbe3"
-- 
2.7.4



  parent reply	other threads:[~2017-11-30  1:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-30  1:45 [PATCH 0/5] fix build when len(TMPDIR) == 410 Robert Yang
2017-11-30  1:45 ` [PATCH 1/5] go-native: fix PATH issue " Robert Yang
2017-11-30 11:33   ` Alexander Kanavin
2017-12-01  1:40     ` Robert Yang
2017-12-01  8:25       ` Alexander Kanavin
2017-11-30  1:45 ` [PATCH 2/5] go-native: fix import error " Robert Yang
2017-11-30  1:45 ` [PATCH 3/5] ninja: fix for llvm build " Robert Yang
2017-11-30  1:45 ` [PATCH 4/5] webkitgtk: fix compile error " Robert Yang
2017-11-30 11:34   ` Alexander Kanavin
2017-12-01  1:46     ` Robert Yang
2017-12-01  8:26       ` Alexander Kanavin
2017-12-01  9:49         ` Alexander Kanavin
2017-12-04  6:16           ` Robert Yang
2017-11-30  1:45 ` Robert Yang [this message]
2018-01-09  3:09 ` [PATCH 0/5] fix build " Robert Yang
2018-01-19  1:52 ` Robert Yang
2018-02-02  3:34 ` Robert Yang
2018-03-06  1:51 ` Robert Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=917550ac335cd0af547d301f41605d8de6678d19.1512006081.git.liezhi.yang@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.