Commit Graph

280 Commits

Author SHA1 Message Date
Daniel Turull
348ef80f27 improve_kernel_cve_report: do not use custom version
When using the version specified in cve-summary.json, we need to
remove the suffix containing the custom version to match the
versions from the CVEs.

This patch truncates the version from cve-summary.json to use only
the base version of the kernel.

This is only applicable for kernels where the user has added their
own version.

(From OE-Core rev: 3942d40e96989268e8d1030f9d8c3859044d9635)

Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-07-10 10:47:31 +01:00
Daniel Turull
dac57535d9 improve_kernel_cve_report: do not override backported-patch
If the user has a CVE_STATUS for their own backported patch,
the backport takes priority over upstream vulnerable versions.

(From OE-Core rev: 0beef05be119ea465ba06553a42edea03dfc9fd3)

Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-07-10 10:47:30 +01:00
Daniel Turull
5dff1c40db improve_kernel_cve_report: add script for postprocesing of kernel CVE data
Adding postprocessing script to process data from linux CNA that includes more accurate metadata and it is updated directly by the source.

Example of enhanced CVE from a report from cve-check:

{
  "id": "CVE-2024-26710",
  "status": "Ignored",
  "link": "https://nvd.nist.gov/vuln/detail/CVE-2024-26710",
  "summary": "In the Linux kernel, the following vulnerability [...]",
  "scorev2": "0.0",
  "scorev3": "5.5",
  "scorev4": "0.0",
  "modified": "2025-03-17T15:36:11.620",
  "vector": "LOCAL",
  "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
  "detail": "not-applicable-config",
  "description": "Source code not compiled by config. ['arch/powerpc/include/asm/thread_info.h']"
},

And same from a report generated with vex:
{
  "id": "CVE-2024-26710",
  "status": "Ignored",
  "link": "https://nvd.nist.gov/vuln/detail/CVE-2024-26710",
  "detail": "not-applicable-config",
  "description": "Source code not compiled by config. ['arch/powerpc/include/asm/thread_info.h']"
},

For unpatched CVEs, provide more context in the description:
Tested with 6.12.22 kernel
{
  "id": "CVE-2025-39728",
  "status": "Unpatched",
  "link": "https://nvd.nist.gov/vuln/detail/CVE-2025-39728",
  "summary": "In the Linux kernel, the following vulnerability has been [...],
  "scorev2": "0.0",
  "scorev3": "0.0",
  "scorev4": "0.0",
  "modified": "2025-04-21T14:23:45.950",
  "vector": "UNKNOWN",
  "vectorString": "UNKNOWN",
  "detail": "version-in-range",
  "description": "Needs backporting (fixed from 6.12.23)"
},

CC: Peter Marko <peter.marko@siemens.com>
CC: Marta Rybczynska <rybczynska@gmail.com>
(From OE-Core rev: e60b1759c1aea5b8f5317e46608f0a3e782ecf57)

Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-19 21:54:43 +01:00
Joshua Watt
36be59464c scripts/contrib: Add oe-image-files-spdx script
Adds a template for a python project that processes the SPDX 3.0.1
output from a build and lists all the files on the root file system with
their checksums

This is intended to be an example to show how to deal with the SPDX data
to do common tasks.

(From OE-Core rev: 3d9c5588ce6181b519810e3378b55826ffcaee49)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-18 11:56:03 +00:00
Bastian Germann
bdcc24a44f licenses: Map SGIv1 to SGI-OpenGL
SGI-1 is not a SPDX license identifier. However, the SGI-1 license has
the same license text as SGI-OpenGL. Map the old SGIv1 name to SGI-OpenGL.

(From OE-Core rev: e97a9c3c86a8fe27a26ad69174ba50e5228846e5)

Signed-off-by: Bastian Germann <bage@debian.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-05 12:49:55 +00:00
Nicolas Dechesne
79ef781499 scripts: patchreview: fix failure when running from a different folder
When running patchreview with --blame, the scripts runs a git log
command on the analyzed patch. When trying to analyse a layer which is
not in poky tree, we might be running the git log command from outside
the git workspace where the file is located, which results in such
failures:

Missing Signed-off-by tag ([truncated]/meta-qcom-hwe/recipes-devtools/partition-utils/qcom-ptool/0001-ptool.py-Generate-zero-files-in-output-folder-when-s.patch)
fatal: not a git repository (or any parent up to mount point /local/mnt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

Fix this situation by setting the current work dir inside the git
workspace of the patch when running git log.

(From OE-Core rev: 8cc1c900b91d60e633f62bfe16a2ffc2d61c3f55)

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@oss.qualcomm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-21 12:16:28 +00:00
Martin Jansa
6eb0a35580 patchreview: use check_upstream_status() from oe.qa
* the idea was to reuse the same function as I've noticed that the
  QA check which was added to insane.bbclass in:
  https://git.openembedded.org/openembedded-core/commit/?id=76a685bfcf927593eac67157762a53259089ea8a
  is in some cases more strcit than scripts/contrib/patchreview.py

  To be honest I wasn't aware of scripts/contrib/patchreview.py
  existence when I've asked about moving check_upstream_status()
  to oe.qa in order to write standalone script just like
  patchreview.py

* I've sent this long time ago:
  https://lists.openembedded.org/g/openembedded-core/message/177207
  but didn't like the sys.path.append to find oe.qa much or the
  duplicated path to .patch file in the output, then I've forgot about
  it until today in https://github.com/OE4T/meta-tegra/pull/1749
  where checklayer found one more issue, which I haven't noticed
  with patchreview.py before (because I've accidentally used a version
  without this change). It's not perfect, but at least it will be
  consistent with checklayer and patch-status QA check.

(From OE-Core rev: f291c08ea6a95638c3ad1f70434678bd5e374195)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-12 11:19:44 +00:00
Joshua Watt
dfa892cfa6 Add script to make SPDX bindings
Adds a script to generate the SPDX code bindings

(From OE-Core rev: f0a5fdf54f975f9bc30758aec1f6f27e2d8149de)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-09-30 17:07:18 +01:00
Adrian Freihofer
605ef6f5a2 scripts: python 3.12 regex
All the regexes throw a warning like this:

WARNING: scripts/lib/recipetool/create_buildsys.py:140:
      SyntaxWarning: invalid escape sequence '\s'
      proj_re = re.compile('project\s*\(([^)]*)\)', re.IGNORECASE)

Python 3 interprets string literals as Unicode strings, and therefore
\s is treated as an escaped Unicode character which is not correct.
Declaring the RegEx pattern as a raw string instead of unicode is
required for Python 3.

(From OE-Core rev: 24b0ba00d4f0b4d9834f7693ecb6032dfc534a80)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-13 13:51:41 +00:00
Ross Burton
28324600cb scripts/contrib/patchreview: fix commit identification
git show-ref looks at the _remote_ ref called HEAD, which is fine when it
matches the local HEAD but problematic when you're iterating a series of
commits.

Use rev-parse to resolve the local name to a proper hash.

(From OE-Core rev: 3c04747b681cf6090ba9c77752f6c2f304dbbe17)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-30 11:53:20 +00:00
Ross Burton
2cbbe428db scripts/contrib/patchreview: consolidate imports
Move most imports to the top of the file.

(From OE-Core rev: d2c287db0739b249604cd1beaa03ec38512ba718)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-27 17:48:11 +01:00
Ross Burton
62c80e3a79 scripts/contrib/patchreview: add commit and recipe count fields to JSON
The autobuilder scripts post-process the generated JSON to inject recipe
and commit counts into the data.  We can do this easily in patchreview
instead.

(From OE-Core rev: 77c96e43090cbf485aec612cc2315b85e5635dda)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-27 17:48:11 +01:00
Ross Burton
116c044212 scripts/patchreview: rework patch detection
A previous patch[1] added the ability to allow the search pattern for
patches to be changed, so that patchreview can be used across the entire
meta-oe repository by changing the patterns.

However, this means the caller needs to write long patterns when calling
patchreview.

Instead, we can see if the specified directory contains a layer by
checking if conf/layer.conf exists.  If it does, then search for patches
inside this directory.  If it doesn't, assume that the specified
directory is a repository that contains sublayers (such as
meta-openembedded) and look through each of the directories that match
the pattern meta-*.

This means patchreview can both scan either a single layer (eg
.../poky/meta) or a repository of sublayers (eg .../meta-openembedded).

[1] oe-core 599046ea9302af0cf856d3fcd827f6a2be75b7e1

(From OE-Core rev: a3a868519beab1b9cac94fefd7dbeffb09d047e9)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-27 17:48:11 +01:00
Peter Kjellerstedt
cec84a072d bb-matrix-plot.sh: Show underscores correctly in labels
Underscores previously caused the next character in the label to be
printed using subscript due to the enhanced string support in gnuplot.

(From OE-Core rev: 282b48f90f77e0766993018d22fe03dd303febdc)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-23 10:49:19 +01:00
Mickael RAMILISON
9c7148318f scripts/patchreview: Add a custom pattern for finding recipe patches
This introduces support for specifying a search pattern with the -p/--pattern
option in the patchreview.py script. This is designed to accommodate
the directory structure of meta-openembedded.

(From OE-Core rev: 599046ea9302af0cf856d3fcd827f6a2be75b7e1)

Signed-off-by: Mickael RAMILISON <mickael.ramilison@smile.fr>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-15 09:11:47 +01:00
Martin Jansa
94149c4f37 meta: remove True option to getVar and getVarFlag calls (again)
* True is default since 2016 and most layers were already updated
  not to pass this parameter where not necessary, e.g. oe-core was
  updated couple times, first in:
  https://git.openembedded.org/openembedded-core/commit/?id=7c552996597faaee2fbee185b250c0ee30ea3b5f

  Updated with the same regexp as later oe-core update:
  https://git.openembedded.org/openembedded-core/commit/?id=9f551d588693328e4d99d33be94f26684eafcaba

  with small modification to replace not only d.getVar, but also data.getVar as in e.g.:
  e.data.getVar('ERR_REPORT_USERNAME', True)

  and for getVarFlag:
  sed -e 's|\(d\.getVarFlag \?\)( \?\([^,()]*, \?[^,()]*\), \?True)|\1(\2)|g' \
      -i $(git grep -E 'getVarFlag ?\( ?([^,()]*), ?([^,()]*), ?True\)' \
          | cut -d':' -f1 \
          | sort -u)

(From OE-Core rev: 26c74fd10614582e177437608908eb43688ab510)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-02 09:50:02 +00:00
Joshua Watt
3e5ce0275a scripts: convert-overrides: Allow command-line customizations
Adds argument parsing to the conversion script so that the fields that
the script uses to do conversions can be customized on the command line.
The intention is to allows easier customization without having to fork
the script, and allow automated checking on 3rd party layers via CI
without false positives

(From OE-Core rev: b9551f9180bf9f13fb1c480b5b7892fdc831ffcd)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-11-14 16:19:42 +00:00
Richard Purdie
7350e82ce1 scripts: Add copyright statements to files without one
Where there isn't a copyright statement, add one to make it explicit.
Also drop editor config lines where they were present and add license
identifiers as MIT if there isn't one.

(From OE-Core rev: deb3ccec53e0bd63bc4235cf2b0d3fc781687361)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 11:58:01 +01:00
Richard Purdie
c9303648f8 scripts/patchreview: Make json output human parsable
Sort dict keys in the json output and use tab spacing. This means
when commited into git, the diffs are human readable but it is more
compact filesize than space indentation.

(From OE-Core rev: bde2ecb203d8a1a29715c70ca3ded382982390cf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-23 14:00:38 +01:00
Richard Purdie
a0d120dd56 scripts/patchreview: Add commit to stored json data
Save commit data when writing to the json file so the results can
be copared/extended later.

(From OE-Core rev: da761ac1984ee2a06ded905fc4ad878ef7d613e4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-23 14:00:38 +01:00
Steve Sakoman
33df924c00 scripts/contrib/oe-build-perf-report-email.py: remove obsolete check for phantomjs and optipng
Use of those tools was removed in b5c131006e3fad0a15e6cdf81f71dc1e96647028
perf-build-test/report: Drop phantomjs and html email reports support

(From OE-Core rev: 33df447affa7a3a360b1da028e6b12fbcd388db6)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-30 22:00:20 +01:00
Simon Kuhnle
5b5a7567bc convert-variable-renames: Fix typo in description
(From OE-Core rev: 8e3aa9638691709e136bf2005541bdfd4bb1a6f7)

Signed-off-by: Simon Kuhnle <simon.kuhnle@methodpark.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-31 17:52:58 +01:00
Alexandre Belloni
d68b2090e9 scripts/patchreview: handle Inactive-Upstream status
(From OE-Core rev: 44afce53725f59fefb0ca5df6babe2b8bec6a68b)

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-18 23:32:46 +00:00
Richard Purdie
10d9a8ba7a perf-build-test/report: Drop phantomjs and html email reports support
phantomjs isn't reliable and we've moved to sharing the reports via a webserver.
Update the scripts to more match those being used in the autobuilder helper
where the html email support was removed.

(From OE-Core rev: b5c131006e3fad0a15e6cdf81f71dc1e96647028)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 10:31:41 +00:00
Saul Wold
1507286c7d convert-variable-renames: Fix output string
(From OE-Core rev: a8d6882144e76f384022fe7d2b4ee13ad876317a)

Signed-off-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-04 17:14:15 +00:00
Khem Raj
20f23b5f65 scripts/documentation-audit: Use renamed LICENSE_FLAGS_ACCEPTED variable
(From OE-Core rev: c8f8fe5a4f57febb1fb9b54f53d2a0b95f01179b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-25 08:38:46 +00:00
Scott Murray
3c7c2fa055 scripts: fix file writing in convert-spdx-licenses
The convert-spdx-licenses.py script needs the same file closing
fix as was made to convert-variable-renames to ensure modified
file contents get flushed out.

(From OE-Core rev: 46135c87345c7189053dafbed92c754f9f328c32)

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-22 15:24:51 +00:00
Scott Murray
ccbc29bbc4 scripts: fix file writing in convert-variable-renames
In my test environments (Fedora 35 and Debian 10.10 on AMD 2970WX),
running the convert-variable-renames.py rename script was resulting
in empty files instead of updated ones.  From inspection, the new
files are never flushed/closed before moving them into place, which
seems inherently racy.  Adding an explicit close to flush the modified
contents out before moving into place fixes the issue for me.

(From OE-Core rev: 187ac1ea0a701a5ba9ec92f6aa32f2a67600a584)

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-22 08:23:50 +00:00
Saul Wold
0b46552625 meta: Rename LICENSE_FLAGS variable
(From OE-Core rev: 5c5b3bc563059ba728dc9724656cc69669f8e25f)

Signed-off-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21 23:37:27 +00:00
Richard Purdie
3be8a7a6b1 icecc: Improve variables/terminology
The SYSTEM and USER seperation between variables seems odd and not necessary,
drop it. Avoid the use of whitelist/blacklist and also change "packages" to
"recipes" since that misuse causes confusion.

(From OE-Core rev: 0df0eb6401a02139b9110bc95e21d97a67125ec5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21 23:37:27 +00:00
Saul Wold
5a3d6c7bda scripts: Add convert-variable-renames script for inclusive language variable renaming
This script searches for a list of variable that have been renamed
and converts them to their more descriptive names. It also searches
for a list of variables that have been removed or deprecated and
prints a message.

It will print a message to inform the user that there are terms that
need to be updated in their files. Many of these changes are context
sensitive and may not be modified as they might be existing calls to
other libraries. This message is informational only.

I have tested this on poky and meta-openembedded so far.

(From OE-Core rev: 50fe7ba8dba05a9681c9095506f798796cfc2750)

(From OE-Core rev: 75f319c105484d0b312a858cc0bd8148728c8622)

Signed-off-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21 23:37:27 +00:00
Richard Purdie
492214104a meta/scripts: Change BB_ENV_EXTRA_WHITE -> BB_ENV_PASSTHROUGH_ADDITIONS
After the change to bitbake, update the references in OE-Core to match the updates.

(From OE-Core rev: 193affb9f28b0116c3fd619834f145326fee08c5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21 23:37:26 +00:00
Richard Purdie
301d24952e scripts: Add a conversion script to use SPDX license names
We're standardising on SPDX license names so it is overdue to change
the ones in the LICENSE fileds to the SPDX values. Add a conversion
script which makes this straightforward on the most part.

Ultimately this allows the core code to be more efficient and not need
to consult the mappings.

(From OE-Core rev: 512cd4ca91bc5107d68b7e721257a8f62f878994)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-20 16:45:25 +00:00
Kai Kang
0a0052e456 convert-srcuri.py: use regex to check space in SRC_URI
There may be none, one or more spaces including tab before backslash in
SRC_URI. Use regex to check and update. It helps to avoid malformed uri
such as recipe open-iscsi-user in meta-openstack:

SRC_URI = "git://github.com/open-iscsi/open-iscsi.git;protocol=https  ;branch=master \

And help to check more recipes such as concurrent-ruby in the same
layer:

SRC_URI = "git://github.com/ruby-concurrency/concurrent-ruby.git;protocol=https;tag=v1.1.6\

(From OE-Core rev: a69a53573b1987ee5834a6fc27763f9bbf5fe5a4)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-11 17:09:17 +00:00
Richard Purdie
e177e03320 scripts/convert-srcuri: Update SRC_URI conversion script to handle github url changes
Github are dropping support for git:// protocol fetching. Update the script
to learn about corner cases found in the previous conversion and
support remapping the github urls as needed too.

(From OE-Core rev: e59fe8279b209f67ff79b9d6dbb69389a64db236)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-03 10:12:42 +00:00
Richard Purdie
ddcf16d1f7 meta: Add explict branch to git SRC_URIs
There is uncertainty about the default branch name in git going forward.
To try and cover the different possible outcomes, add branch names to all
git:// and gitsm:// SRC_URI entries.

This update was made with the script added to contrib in this patch which
aims to help others convert other layers.

(From OE-Core rev: b51c405faf6f8c0365f7533bfaf470d79152a463)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30 18:56:47 +01:00
Chen Qi
62372aedfe convert-overrides.py: also convert comments without a leading whitespace
Currently lines like below are converted.
  e.g.
  # IMAGE_INSTALL_append = " A"

But lines without a leading whitespace are not converted.
  e.g.
  #IMAGE_INSTALL_append = " A"

We should be converting both.

(From OE-Core rev: 1994e3844c1aa6b595c0c18040e4f8240fa04438)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-12 06:26:15 +01:00
Martin Jansa
1c240f9209 convert-overrides.py: allow dots before override in vars_re and shortvars_re
e.g. VIRTUAL-RUNTIME_com.webos.service.flowmanager_armv4 weren't replaced
with VIRTUAL-RUNTIME_com.webos.service.flowmanager:armv4 or when package
name contains a dot like in:
RDEPENDS:gstreamer1.0-meta-base:remove

(From OE-Core rev: 41bff44bd26c09573eb3139bb6735e5ecfda18b7)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-05 08:53:40 +01:00
Richard Purdie
34cc76ff05 image/image_types: Convert CONVERSION_CMD/COMPRESS_CMD to new override syntax
For consistency, use override syntax for these variables as well since
it is more consistent with the rest of the image code. We may be able to use
these as proper overrides in due course.

(From OE-Core rev: 52674c4b1fdf79829095031b2e342d44fb0dc181)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-04 20:45:41 +01:00
Richard Purdie
ea984415f6 meta: Convert IMAGE_TYPEDEP to use override syntax
The IMAGE_TYPEDEP variable would make more sense to match the form of the
other image override variables, convert it to use the overrides format.

(From OE-Core rev: 8573f6b2a7af9867da0b21936ffd2cd2a417de1d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-04 20:45:41 +01:00
Denys Dmytriyenko
b26e9eed52 convert-overrides.py: handle few more cases of overrides
Add task-configure and few more supported values of TARGET_OS override.

(From OE-Core rev: 1172f9593902f28ddd8da47de6bd51cda9a0f86a)

Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-04 20:45:41 +01:00
Richard Purdie
54b9a58c20 convert-overrides: Allow script to handle patch/diffs
It is handy to be able to have the script convert a single patch file
and it turns out to be straightforward to make it do this.

(From OE-Core rev: 21df7acc969f47d615d1701ee71f19571de94949)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:11 +01:00
Martin Jansa
926fae24e1 convert-overrides.py: allow specifying multiple target dirs
(From OE-Core rev: e6aa4b1f6f4f174cba027ee096db174541815ff0)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-30 11:31:09 +01:00
Martin Jansa
812ca4cc91 convert-overrides.py: 0.9.1 include '(' as delimiter for shortvars
(From OE-Core rev: ffe91649fafa84f814e32c9979e6a2de40a1bb25)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-30 11:31:09 +01:00
Martin Jansa
b4d63248f0 convert-overrides.py: remove base_dep_prepend and autotools_dep_prepend exception
* the functions were renamed in:
  https://git.openembedded.org/openembedded-core/commit/?id=9d002acae720b0a8e96a6734424a142b86880461

(From OE-Core rev: 43b7cbfb46701a130c248842426370372c88553b)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-30 10:55:13 +01:00
Martin Jansa
1a1bb6ce51 convert-overrides.py: show processed file and version of this script
* on bigger layer this script takes couple minutes without showing any progress
* add a version to reference it in the conversion commit (to easily figure out
  if it's worth re-converting the layer).

(From OE-Core rev: 39edf868deafe79ffd2ea57620af70840ec4c208)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-30 10:55:13 +01:00
Richard Purdie
82c1581e48 scripts/contrib: Add override conversion script
This adds a script I've developed to migrate metadata to use the new override
syntax. It is a bit rough but since its for a single use with validation, it
doesn't need to be perfect. It is run simply as:

scripts/contrib/convert-overrides.py <directory>

It is setup and has been tested to work with OE-Core, Bitbake, yocto-docs,
meta-yocto, meta-gplv2 and meta-mingw. For OE-Core, it converts around 10,100
lines with about 34 manual fixes needed.

For other layers it would need updating for override names and exclusions for
functions/variable names with "append", "prepend" or "remove" in them.

(From OE-Core rev: e8fc67f6f6baf54ccdf548b947c35dea926842c3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-30 00:11:51 +01:00
Anders Wallin
9e0f210179 scripts/contrib/image-manifest: add new script
image-manifest: script to generate product/image specific BOM

The image-manifest script generates image specific reports based on
an image manifest file. Currently there is data generated by buildhistory,
pkgdata, and license manifest but this data is poorly formated and spread
across multiple text files. This script can generate a single JSON output
file that is machine readable by other tools.

The manifest-info collects package information and stores the information
in a tarball. manifest-info can be configured using a json configuration
file. The default configuration including all possible options can be
dumped using the dump-config subcommand.

image-manifest takes an image manifest file as input to get the runtime
dependencies. As an option image-manifest can also use the build dependency
file, pn-buildlist, to get the build dependencies excluding native
packages.

This script extends the oe-image-manifest script [0] done by Paul Eggleton

[0]
https://github.com/intel/clear-linux-dissector-web/blob/master/layerindex/static/files/oe-image-manifest

------------------------------------------------------
usage: image-manifest [-h] [-d] [-q] <subcommand> ...

Image manifest utility

options:
  -h, --help     show this help message and exit
  -d, --debug    Enable debug output
  -q, --quiet    Print only errors

subcommands:
  recipe-info    Get recipe info
  list-depends   List dependencies
  list-recipes   List recipes producing packages within an image
  list-packages  List packages within an image
  list-layers    List included layers
  dump-config    Dump default config
  manifest-info  Export recipe info for a manifest
Use image-manifest <subcommand> --help to get help on a specific command

Co-developed-by: Paul Eggleton <bluelightning@bluelightning.org>
(From OE-Core rev: ad8fec9ce1704866df925bda18a240d6889b1ed5)

Signed-off-by: Anders Wallin <anders.wallin@windriver.com>
Signed-off-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18 11:37:25 +01:00
Khem Raj
a7e1bbaf6d documentation-audit.sh: Fix typo in specifying LICENSE_FLAGS_WHITELIST
(From OE-Core rev: 410a45639d84a3d69a65133593da32062196dd59)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-26 11:34:33 +00:00
Richard Purdie
e9aac299c7 scripts/contrib/list-packageconfig-flags: Upate for tinfoil API changes
Update after tinfoil API changes in bitake for REQUIRED_VERSION.

(From OE-Core rev: 1645c9b093bebf7ced67cbee0009d81d1a215966)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-15 14:49:09 +00:00