Skip to content

linux: generate git refs automatically

Daniel Gomez (Samsung) kdevops 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v4 Latest1 patch 1 replyIn review

Changes in v4 from the cover letter

* Change the strategy for the canon path (linus, next and stable trees):
* Current git references used in Kdevops are now included in a YAML file.
* This static references will be appended to the latest-and-greatest found by kreleases (kernel.org/releases.json).

* Minor typing fixes in generate_refs.py.
* --extra (config yaml) is now supported for gitrefs and kreleases sub-commands.
* Review files where new vars/configs were required to update because of renaming.
* Minor CONFIG renames for consistency.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1linux: generate refs automatically.gitignore Makefile defconfigs/cxl-switch +39 more+798 -3071 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/1] linux: generate git refs automatically

This adds support to generate git references automatically using git-ls-remote and kernel.org/releases.json.

I plan to push this next Monday. Please, let me know if I you find any issues in your workflow after this change.

Changes since v3:
* Change the strategy for the canon path (linus, next and stable trees):
* Current git references used in Kdevops are now included in a YAML file.
* This static references will be appended to the latest-and-greatest found by kreleases (kernel.org/releases.json).

* Minor typing fixes in generate_refs.py.
* --extra (config yaml) is now supported for gitrefs and kreleases sub-commands.
* Review files where new vars/configs were required to update because of renaming.
* Minor CONFIG renames for consistency.

Changes since v2:
* Rebase changes to latest kdevops.
* Add parser support for kernel.org/releases.json
* Add generate_refs.py subcommand support: gitref and kreleases.
* gitref: Retrieves refs from upstream repository.
* kreleases: Retrieves latest-and-greatest refs from kernel.org/releases.
* Integrate yaml with static configuration for mcgrof, jlayton and cel trees.
* Generate a default configuration file for all trees except for linus, next and stable.
* Kconfig.refs-{linus,next,stable} refs will automatically retrieve the information from kernel.org/releases.json every time make is run.
* Kconfig.refs-* files will be generated/forced when make dynconfig is run.
* Minor script changes: e.g. special case handling for CUSTOM entries.
* Minor Kconfig/Makefile renaming/cleanup.

Changes since v1:
* Script generation moved and called from the main Makefile.
* scripts/gen-refs.Makefile to generate refs.
* Conversion to python.
* Added support for:
* Command-line arguments to control options.
* YAML parser to configure extra and static references. Example added for mcgrof and mcgrof-next.
* Filter for tags and heads. Example to filter semantic versioning would be --filter-tags "*.*.*".
* File generation based on time. Update it every 24h (hardcoded). Possibility to use --force to always generate the file.
* git-ls-remote sorting inverted using --sort option and git versionsort.suffix option (to avoid sort --reverse).

Daniel

Daniel Gomez (1):
linux: generate refs automatically

 .gitignore                                    |   2 +
 Makefile                                      |   3 +
 defconfigs/cxl-switch                         |   8 +-
 defconfigs/nfsd                               |   4 +-
 docs/how-extra-vars-generated.md              |   8 +-
 playbooks/roles/bootlinux/README.md           |   4 +-
 playbooks/roles/bootlinux/defaults/main.yml   |   4 +-
 playbooks/roles/bootlinux/tasks/main.yml      |   8 +-
 .../bootlinux/tasks/update-grub/install.yml   |   6 +-
 scripts/dynamic-kconfig.Makefile              |   4 +
 scripts/gen-gitrefs.Makefile                  | 111 +++++++
 scripts/gen-kreleases.Makefile                |  28 ++
 scripts/generate_refs.py                      | 308 ++++++++++++++++++
 scripts/workflows/fstests/fstests_watchdog.py |   4 +-
 scripts/workflows/generic/run_kernel_ci.sh    |   2 +-
 workflows/fstests/Makefile                    |   4 +-
 .../xfs/unassigned/fstests-next-20230515      |   2 +-
 workflows/linux/Kconfig                       |  46 +--
 workflows/linux/Kconfig.btrfs                 |   4 +-
 workflows/linux/Kconfig.cel                   |  31 +-
 workflows/linux/Kconfig.jlayton               |  31 +-
 workflows/linux/Kconfig.kdevops               |  17 +-
 workflows/linux/Kconfig.linus                 |  69 +---
 workflows/linux/Kconfig.mcgrof                |  48 +--
 workflows/linux/Kconfig.next                  |   4 +-
 workflows/linux/Kconfig.refs-btrfs-devel      |  15 +
 workflows/linux/Kconfig.refs-cel-linux        |  27 ++
 workflows/linux/Kconfig.refs-jlayton-linux    |  27 ++
 workflows/linux/Kconfig.refs-kdevops-linus    |  15 +
 workflows/linux/Kconfig.refs-mcgrof-linus     |  21 ++
 workflows/linux/Kconfig.refs-mcgrof-next      |  21 ++
 workflows/linux/Kconfig.stable                |  63 +---
 workflows/linux/Makefile                      |  14 +-
 workflows/linux/btrfs-devel-refs.yaml         |   6 +
 workflows/linux/cel-linux-refs.yaml           |  14 +
 workflows/linux/jlayton-linux-refs.yaml       |  14 +
 workflows/linux/kdevops-linus-refs.yaml       |   6 +
 workflows/linux/linus-refs.yaml               |  38 +++
 workflows/linux/mcgrof-linus-refs.yaml        |  10 +
 workflows/linux/mcgrof-next-refs.yaml         |  10 +
 workflows/linux/next-refs.yaml                |   6 +
 workflows/linux/stable-refs.yaml              |  38 +++
 42 files changed, 798 insertions(+), 307 deletions(-)
 create mode 100644 scripts/gen-gitrefs.Makefile
 create mode 100644 scripts/gen-kreleases.Makefile
 create mode 100755 scripts/generate_refs.py
 create mode 100644 workflows/linux/Kconfig.refs-btrfs-devel
 create mode 100644 workflows/linux/Kconfig.refs-cel-linux
 create mode 100644 workflows/linux/Kconfig.refs-jlayton-linux
 create mode 100644 workflows/linux/Kconfig.refs-kdevops-linus
 create mode 100644 workflows/linux/Kconfig.refs-mcgrof-linus
 create mode 100644 workflows/linux/Kconfig.refs-mcgrof-next
 create mode 100644 workflows/linux/btrfs-devel-refs.yaml
 create mode 100644 workflows/linux/cel-linux-refs.yaml
 create mode 100644 workflows/linux/jlayton-linux-refs.yaml
 create mode 100644 workflows/linux/kdevops-linus-refs.yaml
 create mode 100644 workflows/linux/linus-refs.yaml
 create mode 100644 workflows/linux/mcgrof-linus-refs.yaml
 create mode 100644 workflows/linux/mcgrof-next-refs.yaml
 create mode 100644 workflows/linux/next-refs.yaml
 create mode 100644 workflows/linux/stable-refs.yaml
Signature · 1 line
2.45.1