summaryrefslogtreecommitdiffstats
path: root/scripts/distro-manifest-generator.sh
AgeCommit message (Collapse)AuthorFilesLines
2019-07-20aglsetup: add -t|--topic and -V|--version optionsStephane Desneux1-3/+6
New options are: * -t|--topic : add a 'topic' to current setup (default: empty) * -V|--version : display aglsetup version The topic value can be any string and it is propagated to aglsetup.manifest, which in turn is used by distro-build-manifest to put it in DIST_BUILD_TOPIC variable in all build manifests (deploy dir, target image, sdk) Using the --topic option to specify a unique identifier will help to provide a common ID for all builds in the same "family" even if features and layers differ. For this purpose, a topic could be: * a gerrit review id + a patchset number * a project name (git repo) + a Change-Id * a random UUID * ... When run with -V or --version, aglsetup writes its version on stdout and sets the variable AGLSETUP_VERSION then exits. As aglsetup can only be called by being sourced, the AGLSETUP_VERSION variable is finally set in the caller environment. The version can be used for various purposes. The immediate goal is to detect if --topic option is supported or not. Bug-AGL: SPEC-2646 Change-Id: I0b68dfa297509dac07e9b2942948631cfc13c319 Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
2019-07-16distro-build-manifest: add DIST_BUILD_TS in all manifestsStephane Desneux1-5/+9
The build timestamp is added to build manifests deployed in target images and SDK. Also, this patch adds a new option '-t|--timestamp' to distro-manifest-generator.sh to let the recipe pass the same timestamp as the one used for the image suffix (in Yocto 2.6/Thud, DATETIME is used). So DIST_BUILD_TS should have the same value as the image version suffix. Bug-AGL: SPEC-2649 Change-Id: I2a9d11b2ce59753bca31ebb8e82d46c224110d68 Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
2019-07-16distro-build-manifest: fix incorrect DIST_LAYERSStephane Desneux1-1/+1
Using repo tool, a .repo subfolder is created beside the cloned git repositories. It contains also some git repositories (handled by repo tool). But when enumerating the layers, those extra ".repo/xxxx" git repositories must be ignored to get a consistent signature on layers. This patch excludes hidden folders (starting by '.') from the search. Bug-AGL: SPEC-2648 Change-Id: Ibee41d4efff0898d1bf67ab661ccdf70729b6211 Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
2019-06-20distro-manifest-generator: enhance git repos detectionStephane Desneux1-2/+2
Following recent change 334a201 (#21619), it's now necessary to explore the layers folder to find git repositories. But when the build directory is a subfolder of $METADIR (repo folder), 'find' digs too deeply to find git repositories. This patch adds some limits for 'find' to dig into subfolders: * only find "top" git repos (no git submodules) * limit the search depth to 2 Bug-AGL: SPEC-2450 Change-Id: Idd907737673d196cc8ba157a5c49492119efeb88 Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
2019-06-17distro-build-manifest: fix DIST_LAYERS due to new layoutStephane Desneux1-1/+1
New layout with subfolders causes incomplete DIST_LAYERS to be generated in deploy/images/.../build-info. This patches fixes how git repos are found in the layers directory. Bug-AGL: SPEC-2450 Change-Id: I4b6a62b68064de12119e668522242677e11c65eb Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
2018-11-23distro-manifest-generator: add support for JSON output formatguppy_6.99.1guppy/6.99.16.99.1Stephane Desneux1-49/+206
Distro build manifest is easier to parse if output is made in a structured format. Adding JSON output format will allow bindings to read information more easily. The files created are now: On target: * /etc/platform-info/build (shell format) * /etc/platform-info/build.json (JSON format) In image deploy dir (.../tmp/deploy/images/$MACHINE/): * build-info (shell format) * build-info.json (JSON format) In sdk deploy dir (.../tmp/deploy/sdk/): * poky-agl-<version details>.build-info (shell format) * poky-agl-<version details>.build-info.json (JSON format) Bug-AGL: SPEC-720, SPEC-1917 Change-Id: If45d2c5dd96b15ce790aa7f7f97c24f119ad117b Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
2018-10-09aglsetup: generate setup manifest fileStephane Desneux1-0/+146
This patch modifies aglsetup to output the execution context in a "setup manifest" located in $builddir/aglsetup.manifest This file can then be processed by another script (distro-manifest-generator.sh) to generate a complete distro manifest at build time. Bug-AGL: SPEC-720, SPEC-1741 Change-Id: I1f9bc8a6d8bc4c659e59ed0025f71ad9e1c86355 Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>