-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the yocto-metrics wiki!
📣 Please read this for creating a CVE patch: See Yocot Contributing guides
-
git branch --edit-description
// better use a branchname here but this didn't work -
git format-patch --cover-letter --cover-from-description=auto <COMMIT>
you can add -s
tag after format-patch if you did not add sign-off when making the commits. For yocto project we need to add sign-off
-
git send-email --to MAILING_LIST_EMAIL --reply-to [email protected] *.patch
instead of *.patch you can specify patch file names
** Note: For git email configurations, please use your thehoodiefirm.com
email for smtpuser
and create gmail app password for smtppass
. Remove all spaces for the generated app password.
For larger patch series it is preferable to send a pull request that not only includes the patch but also a pointer to a branch that can be pulled from.
Documentation on contributing to yocto: https://docs.yoctoproject.org/contributor-guide/submit-changes.html#using-scripts-to-push-a-change-upstream-and-request-a-pull
The following namespaces have push access to the yocto-metrics
and yocto-autobuilder-helper
repo:
- contrib/albaherrerias/*
- contrib/ninette/*
- contrib/jacobabrandner/*
Go to the relevant local repository and push your commit in the following format:
git push [email protected]:REPO_NAME LOCAL_BRANCH:NAMESPACE/BRANCH_NAME
For yocto-metrics
for example, the command will be like this:
git push [email protected]:yocto-metrics patch-status-improvements-contrib:contrib/ninette/patch-status-improvements-contrib
After committing changes to the remote repo, you can create Pull request patch files with the following:
LOCAL_PATH/poky/scripts/create-pull-request -u REMOTE_REPO -s "PR_TITLE"
For example for yocto-metrics
it will be like this:
~/poky/scripts/create-pull-request -u https://git.yoctoproject.org/yocto-metrics/ -s "M10: Metrics view"
The patch files can be emailed to yocto team through their mailing list or internally through NH sales team.
- Example report: https://autobuilder.yocto.io/pub/non-release/patchmetrics/index.html
- Data: Data in metrics repo
- Report code: Code in yocto-autobuilder-helper
- Notes: Google docs
Clone both the report and data repo:
# clone yocto-autobuilder-helper from Neighbourhoodie fork
git clone https://github.com/neighbourhoodie/yocto-autobuilder-helper.git
# clone yocto-metrics from Neighbourhoodie fork
git clone https://github.com/neighbourhoodie/yocto-metrics.git
At first we have to generate the necessary data for the charts. For this we have to go the autobuilder repo and generate chart data.
# Go to your local clone of the autobuilder repo
cd yocto-autobuilder-helper
Make sure to add your local path to the yocto-metrics
repo.
# Then run the following to generate the data and save it in your local yocto-metrics repo
./scripts/patchmetrics-generate-chartdata --json "YOUR_LOCAL_PATH/yocto-metrics/patch-status.json" --outputdir "YOUR_LOCAL_PATH/yocto-metrics/patch-status/"
Next you'll need to generate CVE chart data by running the following. Again please note to add your local path to the yocto-metrics
repo.
./scripts/cve-generate-chartdata --json "YOUR_LOCAL_PATH/yocto-metrics/cve-count-byday.json" --resultsdir "YOUR_LOCAL_PATH/yocto-metrics/cve-check/"
The following is for generating CVE report data. Note that CVE data needs to be generated for each branch. The following is an example showing data generated for the master
branch. You will need to run this for every branch you need CVE data for.
📣 Replace master
for other relevant branch names and 1709622082
for respective json file names.
The branch names and data are listed here.
./scripts/cve-report.py "YOUR_LOCAL_PATH/yocto-metrics/cve-check/master/<TIMESTAMP>.json" > "YOUR_LOCAL_PATH/yocto-metrics/patch-status/cve-status-master.json"
For Jacoba it is
./scripts/cve-report.py "../yocto-metrics/cve-check/master/1709622082.json" > "../yocto-metrics/patch-status/cve-status-master.txt"
./scripts/cve-report.py "../yocto-metrics/cve-check/dunfell/1712037647.json" > "../yocto-metrics/patch-status/cve-status-dunfell.txt"
./scripts/cve-report.py "../yocto-metrics/cve-check/kirkstone/1712038549.json" > "../yocto-metrics/patch-status/cve-status-kirkstone.txt"
./scripts/cve-report.py "../yocto-metrics/cve-check/nanbield/1712040349.json" > "../yocto-metrics/patch-status/cve-status-nanbield.txt"
Once the chart data is created you can run the chart html files in the yocto-metrics
repo as follows:
# Go to your local clone of the yocto-metrics repo
cd yocto-metrics
# open the chart html file in your browser
open ./patch-status/index.html
Note: If the index.html
throws CORS error you can run the file through VSCode's Live Server.