Bug 6986

Summary: linux-yocto do_patch fails with a long working directory path
Product: [Yocto Project Subprojects] Kernel Reporter: Sami RHATAY <sami.rhatay>
Component: kernel-toolingAssignee: Bruce Ashfield <bruce.ashfield>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: Medium CC: bruce.ashfield, nat.bailey, randy.macleod, richard.purdie, yp.kernel.watcher, yp.watcher
Version: unspecified   
Target Milestone: 4.99   
Hardware: x86   
OS: x86_64   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Sami RHATAY 2014-11-20 18:23:47 UTC
It seems that a too long working directory path in file bblayers.conf provoke an error during patching linux-yocto.

After some researches, I changed the working directory path of my project by a shorter one and after do_patch succeeded.

I changed the working directory path from '/home/opengraphvirt/open_graph_virt_a/developpements/compilation_tizen/yocto' to '/home/opengraphvirt/yocto' . 

The build configuration :

Build Configuration:
BB_VERSION        = "1.24.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "openSUSE-project-13.2"
TARGET_SYS        = "x86_64-oe-linux"
MACHINE           = "romley-ivb"
DISTRO            = "tizen"
DISTRO_VERSION    = "3.0"
TUNE_FEATURES     = "m64 corei7"
TARGET_FPU        = ""
meta
meta-yocto
meta-yocto-bsp    = "master:edaeb8940813b620090a0797ad3b6a076897512d"
meta-oe           = "master:c78eca1ea7452a62f86b740ec59f1cd39e399d73"
meta-tizen-adaptation
meta-tizen-common-base
meta-tizen-common-demo
meta-tizen-common-devtools
meta-tizen-common-share
meta-tizen-ivi    = "tizen:85b4ad68e285d3303cf962a173829df8c220db18"
meta-intel
meta-romley       = "master:0f6d30a95c84ec239f5a30bbfba17ed42e2cf284"

+--------------------------------+

Error log with the old path : 

| WARNING:
/home/opengraphvirt/open_graph_virt_a/developpements/compilation_tizen/yocto/build-melissa/tmp-glibc-glibc/work/romley_ivb-oe-linux/linux-yocto/3.14.19+gitAUTOINC+28e39741b8_902f34d361-r0/temp/run.do_patch.20978:1
exit 1 from

| DEBUG: Executing shell function do_patch
| [INFO]: checkpoint is already restored, nothing to do
| [INFO] validating against known patches  (intel-corei7-64-standard-meta)
/home/opengraphvirt/open_graph_virt_a/developpements/compilation_tizen/yocto/build-melissa/tmp-glibc-glibc/sysroots/x86_64-linux/usr/bin/kgit-s2q:
line 96:
meta/patches/standard/base/links/0001-net-ptp-move-PTP-classifier-in-its-own-file.patch:
No such file or directory
|
/home/opengraphvirt/open_graph_virt_a/developpements/compilation_tizen/yocto/build-melissa/tmp-glibc-glibc/sysroots/x86_64-linux/usr/bin/kgit-s2q:
line 96:
meta/patches/standard/base/links/0001-net-ptp-do-not-reimplement-PTP-BPF-classifier.patch:
No such file or directory
|
/home/opengraphvirt/open_graph_virt_a/developpements/compilation_tizen/yocto/build-melissa/tmp-glibc-glibc/sysroots/x86_64-linux/usr/bin/kgit-s2q:
line 96:
meta/patches/standard/base/links/0001-net-ptp-use-sk_unattached_filter_create-for-BPF.patch:
No such file or directory
|
/home/opengraphvirt/open_graph_virt_a/developpements/compilation_tizen/yocto/build-melissa/tmp-glibc-glibc/sysroots/x86_64-linux/usr/bin/kgit-s2q:
line 96:
meta/patches/standard/base/links/0002-SMACK-Fix-handling-value-NULL-in-post-setxattr.patch:
No such file or directory
|
/home/opengraphvirt/open_graph_virt_a/developpements/compilation_tizen/yocto/build-melissa/tmp-glibc-glibc/sysroots/x86_64-linux/usr/bin/kgit-s2q:
line 96:
meta/patches/standard/base/links/0001-Smack-Cgroup-filesystem-access.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0001-net-ptp-move-PTP-classifier-in-its-own-file.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0001-net-ptp-do-not-reimplement-PTP-BPF-classifier.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0001-net-ptp-use-sk_unattached_filter_create-for-BPF.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0002-SMACK-Fix-handling-value-NULL-in-post-setxattr.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0001-Smack-Cgroup-filesystem-access.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0001-net-ptp-move-PTP-classifier-in-its-own-file.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0001-net-ptp-do-not-reimplement-PTP-BPF-classifier.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0001-net-ptp-use-sk_unattached_filter_create-for-BPF.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0002-SMACK-Fix-handling-value-NULL-in-post-setxattr.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0001-Smack-Cgroup-filesystem-access.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0001-net-ptp-move-PTP-classifier-in-its-own-file.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0001-net-ptp-move-PTP-classifier-in-its-own-file.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0001-net-ptp-do-not-reimplement-PTP-BPF-classifier.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0001-net-ptp-do-not-reimplement-PTP-BPF-classifier.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0001-net-ptp-use-sk_unattached_filter_create-for-BPF.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0001-net-ptp-use-sk_unattached_filter_create-for-BPF.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0002-SMACK-Fix-handling-value-NULL-in-post-setxattr.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0002-SMACK-Fix-handling-value-NULL-in-post-setxattr.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0001-Smack-Cgroup-filesystem-access.patch:
No such file or directory
| cat:
meta/patches/standard/base/links/0001-Smack-Cgroup-filesystem-access.patch:
No such file or directory
| ERROR. could not update git tree
| ERROR: Could not apply patches for intel-corei7-64.
Comment 1 Bruce Ashfield 2014-11-27 15:56:55 UTC
Forgot to accept this earlier. I'll have a look .. but it is likely just more nasty PATH_MAX
issues, which I can deal with.
Comment 2 Bruce Ashfield 2017-09-14 15:33:14 UTC
I'm holding onto this one.
Comment 3 Bruce Ashfield 2019-05-22 20:53:41 UTC
This is not popping up often (at all), so I'm moving this to 2.99 to clear cycles for more pressing issues.
Comment 4 Randy MacLeod 2021-05-27 15:19:12 UTC
We think this might have been fixed. Tony will try to reproduce it on master.
Comment 5 Yoann Congal 2023-06-01 15:11:46 UTC
This bug and the linked fix may apply to this bug :
12374 – do_rootfs failed when len(TMPDIR) == 410
https://bugzilla.yoctoproject.org/show_bug.cgi?id=12374
Comment 6 Randy MacLeod 2023-06-08 00:30:51 UTC
Nat is doing some test builds of:

$ bitbake -c patch linux-yocto on master.

to see if this fails before the sqlite3 check, that Yoann mentioned, kicks in.
So far a depth of 328 is fine and 504 is the limit for sqlite3.
Comment 7 Natasha Bailey 2023-06-08 21:51:37 UTC
Tried to reproduce on Mickledore and wasn't able to. Here are my steps:
1. Did a normal build with a normal path length to ensure everything was working
2. Created a super long working path and moved the poky directory into that path
3. Ran bitbake -c patch linux-yocto in that new subdirectory with a path length of 350 characters (see below)

$ pwd
/server-wxyz/nbailey/long-dirname-testing/aaaaaaaaaa/bbbbbbbbbb/cccccccccc/dddddddddd/eeeeeeeeee/ffffffffff/gggggggg
gg/hhhhhhhhhh/iiiiiiiiii/jjjjjjjjjj/kkkkkkkkkk/llllllllll/mmmmmmmmmm/nnnnnnnnnn/oo
oooooooo/pppppppppp/qqqqqqqqqq/rrrrrrrrrr/ssssssssss/tttttttttt/uuuuuuuuuu/vvvvvvv
vvv/wwwwwwwwww/xxxxxxxxxx/yyyyyyyyyy/zzzzzzzzzz/aaaaaaaaaa/poky/build
$ pwd | wc
      1       1     350

... and got a successful build.
4. Repeated steps 2 and 3 for some different path lengths (427 characters, 482 characters, and 471 characters)

I only encountered a failure when the path length was 482, which triggered the sqlite check for database path length > 504 characters, which is something that is already known about as a separate issue. Going to mark this as resolved.