Bug 7012

Summary: archiver.bbclass fails to filter the source licenses
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Costin <costin.c.constantin>
Component: coreAssignee: Alexandru Georgescu <alexandru.c.georgescu>
Status: VERIFIED WONTFIX QA Contact: Costin <costin.c.constantin>
Severity: normal    
Priority: Medium CC: bogdanx.a.voiculescu, meta.mr.watcher, meta.watcher, richard.purdie
Version: 1.5.4   
Target Milestone: 1.5.4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Attachments:
Description Flags
log none

Description Costin 2014-12-02 15:46:23 UTC
Hello,

While performing tests for TC 297 - Use archiver.bbclass to filter the source, no matter what I set in local.conf the licensing remains the same in tmp/deploy/sources.

TC content:

"
Feature request::

https://bugzilla.yoctoproject.org/show_bug.cgi?id=2473

1. Add the following lines to conf/local.conf:

ARCHIVER_MODE ?= "original"

ARCHIVER_MODE[type] ?= "tar" 
ARCHIVER_MODE[log_type] ?= "logs_with_scripts" 
ARCHIVER_MODE[filter] = "no"   
ARCHIVER_CLASS = "${@'archive-${ARCHIVER_MODE}-source' if ARCHIVER_MODE != 'none' else ''}" 

INHERIT += "${ARCHIVER_CLASS}"

and run bitbake core-image-minimal

 

2. Clean the test environment and add to the conf/local.conf file the following lines:

CONF_VERSION = "1"

ARCHIVER_MODE ?= "original" 
ARCHIVER_MODE[type] ?= "tar" 
ARCHIVER_MODE[log_type] ?= "logs_with_scripts" 
ARCHIVER_MODE[filter] = "yes" 
ARCHIVER_CLASS = "${@'archive-${ARCHIVER_MODE}-source' if ARCHIVER_MODE != 'none' else ''}"  INHERIT += "${ARCHIVER_CLASS}"

and run bitbake core-image-minimal"

Expected results:
"
1. Check in tmp/deploy/sources/{MACHINE}-poky-linux/ the existence of the following licenses:
BSD-3-Clause GPL-3.0-with-GCC-exceptionGPL-3.0 LGPLv2+BSDPD

GPL-1.0              GPLv2+                             MIT GPL-2.0              GPLv2.0+LGPLv2.1+                  PD GPL-2.0BSD-4-Clause  GPLv3+                             Sleepycat GPL-2.0+LGPL-2.1+    GPLv3+LGPL-2.1+                    Zlib GPL-2.0LGPL-2.1      LGPLv2.1+ 
"

2. Only the following licenses are shown: GPL-2.0 GPL-3.0

The process of preparing core-image-minimal goes flawlessly but for step 2 there are still other licenses available except GPL-2.0 GPL-3.0. I tried this test with a fresh copy of poky. First I ran both steps (step1 and after clean env and then step2) and after observing the output erased build dir and did only step 2. In the end I tried only step 2 on a fresh copy of poky. Results are the same.

Build Configuration:
BB_VERSION        = "1.20.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.10"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.5.4"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "(detachedfromde14d21):de14d21bc6633ddeb810cef051b91ee322276496"

cosscat@ubnt:/media/poky/3poky/build$ cd tmp/deploy/sources/
cosscat@ubnt:/media/poky/3poky/build/tmp/deploy/sources$ ls
allarch-poky-linux  i586-poky-linux
cosscat@ubnt:/media/poky/3poky/build/tmp/deploy/sources$ ls ./*
./allarch-poky-linux:
GPLv2+

./i586-poky-linux:
GPL-2.0       GPL-2.0+LGPL-2.1+  GPL-3.0-with-GCC-exceptionGPL-3.0  GPLv2.0+LGPLv2.1+   GPLv3+LGPL-2.1+  LGPLv2.1+GPLv2+
GPL-2.0bzip2  GPL-2.0LGPL-2.1    GPLv2+                             GPLv2+LGPLv2.1+BSD  LGPLv2.1+        LGPLv2+BSDPD


Regards,

Costin
Comment 1 Alexandru Georgescu 2014-12-04 16:31:23 UTC
Created attachment 2283 [details]
log
Comment 2 Alexandru Georgescu 2014-12-04 16:31:37 UTC
I did 2 checks:

 #1. Checked a build with 1.5.3 commit 4278b11da97f6fbb5da16dffe46e797923063da9  and I can't reproduce because binutils fails at do_compile. Conf was like this:


CONF_VERSION = "1"

ARCHIVER_MODE ?= "original" 
ARCHIVER_MODE[type] ?= "tar" 
ARCHIVER_MODE[log_type] ?= "logs_with_scripts" 
ARCHIVER_MODE[filter] = "yes" 
ARCHIVER_CLASS = "${@'archive-${ARCHIVER_MODE}-source' if ARCHIVER_MODE != 'none' else ''}"
INHERIT += "${ARCHIVER_CLASS}"

I attached part of the log.


 #2. Did a build with a random commit between 1.5.3 and 1.5.4. Building a clean core-image-minimal with 6d0a1893d1e2df20b62296ec2cc80924cbab8e90 showed the same issue as found by Costin:

autobuilder@ubuntuAB:~/tmp/poky-1.5.3_test2$ ls build3/tmp/deploy/sources/i586-poky-linux/
GPL-2.0       GPL-2.0+LGPL-2.1+  GPL-3.0-with-GCC-exceptionGPL-3.0  GPLv2.0+LGPLv2.1+   GPLv3+LGPL-2.1+  LGPLv2.1+GPLv2+
GPL-2.0bzip2  GPL-2.0LGPL-2.1    GPLv2+                             GPLv2+LGPLv2.1+BSD  LGPLv2.1+        LGPLv2+BSDPD
autobuilder@ubuntuAB:~/tmp/poky-1.5.3_test2$
Comment 3 Richard Purdie 2014-12-09 16:08:58 UTC
There were many changes in 1.6 and 1.7 in this area., too many to realistically fix this in 1.5.x. Therefore marking this as WONTFIX, anyone needing this functionality should use a later version.
Comment 4 Alexandru Georgescu 2014-12-10 10:22:26 UTC
verified as per RP's comments.