Bug 7959 - archiver.bbclass: fails for linux--yocto when archiving patched source
Summary: archiver.bbclass: fails for linux--yocto when archiving patched source
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.8
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.1 M3
Assignee: Ross Burton
QA Contact: Cristina Agurida
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-07-06 12:27 UTC by Patrick Ohly
Modified: 2016-03-07 15:20 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Ohly 2015-07-06 12:27:54 UTC
I'm using Poky 1.8 Fido, default configuration with the following added to local.conf:

INHERIT += "archiver"
ARCHIVER_MODE[src] = "patched"

Archiving linux-yocto in that configuration fails:

$ bitbake -c deploy_archives linux-yocto
Loading cache: 100% |#########################################################################| ETA:  00:00:00
Loaded 1286 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.26.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Debian-8.0"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.8"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "fido:58b038b7783b32aeb8ee138728b6d801dacd7da4"

NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Function failed: do_patch (log file is located at /work/build/poky/tmp/work/qemux86-poky-linux/linux-yocto/3.19.2+gitAUTOINC+9e70b482d3_31b35da6a5-r0/temp/log.do_unpack_and_patch.19823)
ERROR: Logfile of failure stored in: /work/build/poky/tmp/work/qemux86-poky-linux/linux-yocto/3.19.2+gitAUTOINC+9e70b482d3_31b35da6a5-r0/temp/log.do_unpack_and_patch.19823
Log data follows:
| DEBUG: Executing python function do_unpack_and_patch
| DEBUG: Executing python function do_unpack
| DEBUG: Executing python function base_do_unpack
| DEBUG: Running export SSH_AUTH_SOCK="/tmp/ssh-WWbRxAatz9/agent.1276"; export PATH="/work/poky/scripts:/work/build/poky/tmp/sysroots/x86_64-linux/usr/bin/i586-poky-linux:/work/build/poky/tmp/sysroots/qemux86/usr/bin/crossscripts:/work/build/poky/tmp/sysroots/x86_64-linux/usr/sbin:/work/build/poky/tmp/sysroots/x86_64-linux/usr/bin:/work/build/poky/tmp/sysroots/x86_64-linux/sbin:/work/build/poky/tmp/sysroots/x86_64-linux/bin:/work/poky/scripts:/work/poky/bitbake/bin:/home/pohly/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"; export HOME="/home/pohly"; git -c core.fsyncobjectfiles=0 clone -s -n --mirror /work/build/poky/downloads/git2/git.yoctoproject.org.linux-yocto-3.19.git/ /work/build/poky/tmp/work/qemux86-poky-linux/linux-yocto/3.19.2+gitAUTOINC+9e70b482d3_31b35da6a5-r0/archiver-work/git/
| DEBUG: Python function base_do_unpack finished
| DEBUG: Python function do_unpack finished
| DEBUG: Executing shell function do_kernel_checkout
| Switched to branch 'standard/common-pc'
| DEBUG: Shell function do_kernel_checkout finished
| DEBUG: Executing shell function do_validate_branches
| NOTE: Setting branch meta to 9e70b482d3773abf92c9c5850e134cbca1d5651f
| Branch standard/common-pc-orig set up to track remote branch standard/common-pc from origin.
| HEAD is now at 31b35da Merge tag 'v3.19.2' into standard/base
| DEBUG: Shell function do_validate_branches finished
| DEBUG: Executing shell function do_patch
| ls: cannot access .meta*: No such file or directory
| find: `.meta/cfg/scratch': No such file or directory
| ERROR. Could not locate meta series for qemux86
| WARNING: exit code 1 from a shell command.
| DEBUG: Python function do_unpack_and_patch finished
| ERROR: Function failed: do_patch (log file is located at /work/build/poky/tmp/work/qemux86-poky-linux/linux-yocto/3.19.2+gitAUTOINC+9e70b482d3_31b35da6a5-r0/temp/log.do_unpack_and_patch.19823)
ERROR: Task 6 (/work/poky/meta/recipes-kernel/linux/linux-yocto_3.19.bb, do_unpack_and_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 21 tasks of which 7 didn't need to be rerun and 1 failed.
No currently running tasks (21 of 23)

Summary: 1 task failed:
  /work/poky/meta/recipes-kernel/linux/linux-yocto_3.19.bb, do_unpack_and_patch
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Comment 1 Patrick Ohly 2015-07-09 15:09:10 UTC
There's actually a related problem which probably has the same root cause: when using ARCHIVER_MODE[src] = "original", the archive contains just git meta data, but no actual source code - not what is expected and needed from a GPL license perspective.

$ tar ztvf tmp-glibc/deploy/sources/i586-iotos-linux/linux-yocto-3.19.5+gitAUTOINC+118f27167f_e152349de5-r0/git.yoctoproject.org.linux-yocto-3.19.git.118f27167f_e152349de5.tar.gz 
drwx------ pohly/pohly       0 2015-07-09 17:08 ./
drwxr-xr-x pohly/pohly       0 2015-07-09 17:08 ./git/
-rw-r--r-- pohly/pohly   44227 2015-07-09 17:08 ./git/packed-refs
-rwxr--r-- pohly/pohly     219 2015-07-09 17:08 ./git/config
drwxr-xr-x pohly/pohly       0 2015-07-09 17:08 ./git/hooks/
-rwxr-xr-x pohly/pohly    1352 2015-07-09 17:08 ./git/hooks/pre-push.sample
-rwxr-xr-x pohly/pohly     189 2015-07-09 17:08 ./git/hooks/post-update.sample
-rwxr-xr-x pohly/pohly    3611 2015-07-09 17:08 ./git/hooks/update.sample
-rwxr-xr-x pohly/pohly    1642 2015-07-09 17:08 ./git/hooks/pre-commit.sample
-rwxr-xr-x pohly/pohly     452 2015-07-09 17:08 ./git/hooks/applypatch-msg.sample
-rwxr-xr-x pohly/pohly     398 2015-07-09 17:08 ./git/hooks/pre-applypatch.sample
-rwxr-xr-x pohly/pohly     896 2015-07-09 17:08 ./git/hooks/commit-msg.sample
-rwxr-xr-x pohly/pohly    4898 2015-07-09 17:08 ./git/hooks/pre-rebase.sample
-rwxr-xr-x pohly/pohly    1239 2015-07-09 17:08 ./git/hooks/prepare-commit-msg.sample
drwxr-xr-x pohly/pohly       0 2015-07-09 17:08 ./git/info/
-rw-r--r-- pohly/pohly     240 2015-07-09 17:08 ./git/info/exclude
drwxr-xr-x pohly/pohly       0 2015-07-09 17:08 ./git/objects/
drwxr-xr-x pohly/pohly       0 2015-07-09 17:08 ./git/objects/info/
-rw-r--r-- pohly/pohly      97 2015-07-09 17:08 ./git/objects/info/alternates
drwxr-xr-x pohly/pohly       0 2015-07-09 17:08 ./git/objects/pack/
drwxr-xr-x pohly/pohly       0 2015-07-09 17:08 ./git/branches/
-rw-r--r-- pohly/pohly      73 2015-07-09 17:08 ./git/description
drwxr-xr-x pohly/pohly       0 2015-07-09 17:08 ./git/refs/
drwxr-xr-x pohly/pohly       0 2015-07-09 17:08 ./git/refs/heads/
drwxr-xr-x pohly/pohly       0 2015-07-09 17:08 ./git/refs/tags/
-rw-r--r-- pohly/pohly      23 2015-07-09 17:08 ./git/HEAD
Comment 2 Ross Burton 2016-02-11 11:42:56 UTC
There's been a number of changes to the archive in the 2.1 cycle, is this still a problem?
Comment 3 Patrick Ohly 2016-02-11 12:29:24 UTC
Seems to work now.
Comment 4 Cristina Agurida 2016-03-07 15:20:50 UTC
Verified on master: d2c96caa40d6979792b7b73f37e81e2bc67f6735