Bug 10251 - linux-firmware packages include licenses from all firmware packages
Summary: linux-firmware packages include licenses from all firmware packages
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: deployment (show other bugs)
Version: 2.2
Hardware: All Multiple
: Medium normal
Target Milestone: 2.2 M4
Assignee: Saul Wold
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-09-09 06:46 UTC by Jonathan Liu
Modified: 2016-09-23 03:37 UTC (History)
4 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 Jonathan Liu 2016-09-09 06:46:30 UTC
1. local.conf contains:
COPY_LIC_MANIFEST = "1"
COPY_LIC_DIRS = "1"
2. linux-firmware-ralink is added to image
3. If you check /usr/share/common-licenses/linux-firmware-ralink, it has licenses for all the firmware packages. license.manifest shows "LICENSE: Firmware-ralink-firmware" for the linux-firmware-ralink package
4. If you check /usr/share/common-licenses/linux-firmware-ralink-license, it has licenses for all the firmware packages. license.manifest shows "LICENSE: Firmware-Abilis & [...] & Firmware-xc5000c     & WHENCE".

So we need to do the following:
 * License for each linux-firmware-*-license package should be set correctly
 * Copy only the licenses for a package to the package's licenses directory and not the licenses for the recipe (which will have the licenses of all the packages)
Comment 1 Saul Wold 2016-09-16 02:45:24 UTC
Seems that the linux-firmware base package has an RDEPENDS on the generic linux-firmware-license package which includes all the licenses.

Still digging
Comment 3 Jonathan Liu 2016-09-22 08:20:28 UTC
Not completely fixed.

The licenses directory still has licenses for all the firmware packages in:
 * /usr/share/common-licenses
 * /usr/share/common-licenses/linux-firmware-ralink
 * /usr/share/common-licenses/linux-firmware-ralink-license
Comment 4 Saul Wold 2016-09-23 00:02:32 UTC
Ok, so a little more research, the Manifest is generated on way based on the actual packages installed on the target rootfs. The License Directory is copied from the licenses provided by the recipe (so not on a package basis), to change this would require a pretty good re-write in the license.bbclass. THis actually affects all packages that might have multiple licenses, but only ship limited licneses in each package.

Unless this is really urgent, I am going to close this one and will re-open a more general bug against license.bbclass
Comment 5 Saul Wold 2016-09-23 03:37:32 UTC
So we have fixed part of the problem that pertains to linux-firwmare license packages having the incorrect licenses.

There is an problem that is generic to all packages that copies the working set of licenses to the target image based on the recipe's licenses vs the actual installed packages.

A new bug#10325 has been created to address this in 2.3