Skip to content

Conversation

@quaresmajose
Copy link
Member

@quaresmajose quaresmajose commented Jan 13, 2025

- License handling

Instead of blindly failing, this will improve the situation and will show up what is the missing manifests.

  • Skip lmp-mfgtool disto variant ()
  • Fail if the image manifest not exist
  • Consider only the symbolic links of the images manifest
  • From the licenses deploy dir of the image:
  • Copy the license.manifest, if not possible fail
  • Copy the image_license.manifest

For the lmp-mfgtool we don't produce an image and don't make sense to processes the image manifest.

The following is an example of such blindly CI build fail:

| + for img in ${DEPLOY_DIR_IMAGE}/*${MACHINE}.manifest
| ++ basename '/srv/oe/build/deploy/images/intel-corei7-64/*intel-corei7-64.manifest'
| ++ sed -e s/.manifest//
| + image_name='*intel-corei7-64'
| ++ readlink '/srv/oe/build/deploy/images/intel-corei7-64/*intel-corei7-64.manifest'
| ++ sed -e 's/\..*manifest//'
| + image_name_id=
| Script completed with error(s)

- Source-code handling

Adding support for collecting duplicated sources

On multiconfig machines the sources and the license can be duplicated.
We have two places with the source-code and licenses on the ti bsp [1].
If it was the case we will deploy only one package, we will search for the first package license path and use that.

We can also escape and jump this source-code collecting step when we not have any IMAGE_MANIFESTS (i.e no image produced).

[1] https://github.com/foundriesio/meta-lmp/blob/7657b41046ff745ce5fe61a64f615623ebb098e0/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc#L457-L459

@quaresmajose quaresmajose requested a review from a team January 13, 2025 17:59
@quaresmajose
Copy link
Member Author

This is not required for the scarthgap version but I discovered this when I was working on that-

@quaresmajose quaresmajose marked this pull request as draft January 14, 2025 10:38
@quaresmajose quaresmajose marked this pull request as ready for review January 14, 2025 14:34
Copy link
Member

@ricardosalveti ricardosalveti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we just won't have a way to notify our customer of such missing file at this stage, we need to work on getting the possible fix backported to scarthgap.

@quaresmajose
Copy link
Member Author

LGTM, we just won't have a way to notify our customer of such missing file at this stage, we need to work on getting the possible fix backported to scarthgap.

I will try to see how to do this.

@quaresmajose
Copy link
Member Author

The scarthgap is broken with this and I need validate this again on both scarthgap + kirkstone

- Skip lmp-mfgtool disto variant
- Fail if the image manifest not exist
- Consider only the symbolic links of the images manifest
- From the licenses deploy dir of the image:
 - Copy the license.manifest, if not possible fail
 - Copy the image_license.manifest

| + for img in ${DEPLOY_DIR_IMAGE}/*${MACHINE}.manifest
| ++ basename '/srv/oe/build/deploy/images/intel-corei7-64/*intel-corei7-64.manifest'
| ++ sed -e s/.manifest//
| + image_name='*intel-corei7-64'
| ++ readlink '/srv/oe/build/deploy/images/intel-corei7-64/*intel-corei7-64.manifest'
| ++ sed -e 's/\..*manifest//'
| + image_name_id=
| Script completed with error(s)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
There is a bug in oe-core and sometimes the lic folder is empty.
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15394

The intention of this change is to document and be reverted once
the problem is fixed.

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
@quaresmajose quaresmajose force-pushed the lic_and_img_manifest branch 2 times, most recently from ae37104 to a3a1d8a Compare February 13, 2025 15:49
@quaresmajose quaresmajose changed the title lmp/build: Improve license and image manifest handling lmp/build: Improve license and source-code handling Feb 13, 2025
@quaresmajose
Copy link
Member Author

The scarthgap is broken with this and I need validate this again on both scarthgap + kirkstone

Validated on both scarthgap + kirkstone ci based builds.

On multiconfig machines the sources and the license can be duplicated.
We have two places with the source-code and licenses on the ti bsp [1].
If it was the case we will deploy only one package, we will search for
the first package license path and use that.

We can also escape and jump this source-code collecting step when we not have any IMAGE_MANIFESTS (i.e no image produced).

[1] https://github.com/foundriesio/meta-lmp/blob/7657b41046ff745ce5fe61a64f615623ebb098e0/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc#L457-L459

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Copy link
Member

@ricardosalveti ricardosalveti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@ricardosalveti ricardosalveti merged commit 58870aa into foundriesio:master Feb 17, 2025
2 checks passed
@quaresmajose quaresmajose deleted the lic_and_img_manifest branch February 17, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants