linux: generate git refs automatically
v4 cover 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
PATCH v4 1/1 linux: generate refs automatically
From: Daniel Gomez <[email protected]>
Generate a Kconfig choice/endchoice menu with a list of the latest git references for upstream repositories.
* Default behaviour for next, stable and linus trees:
latest-and-greatest + static refs.
The script included (generate_refs.py) will create the Kconfig choice options with the latest and greatest kernel release references provided by kernel.org/releases.json including the static references defined in the YAML files. Every time make is run, the script will check for the date of the last modification, and will force an update if more than 24h has passed since last modification. The generated files are:Kconfig.refs-{next,stable,linus}.
* Kconfig.refs-{btrfs-devel,cel-linux,jlayton-linux,kdevops-linus, mcgrof-linus,mcgrof-next} files are autogenerated using their respective YAML static configuration files. This is to be able to run gitrefs and automatically generate the latest references using gitrefs (see below) including the static references.
Note: This files are also included in kdevops tree. If you need to modify them, just modify the YAML file to autogenerate the Kconfig and send a patch.
* make dynconfig:
In addition, the script will generate and overwrite all the existing Kconfig.refs-* files (including next, stable and linus) when dynconfig is run. This mode will retrieve the information from the upstream git repoitories for all supported kernel trees in kdevops and will create a list with the latest 15 references found.
--- .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
.gitignore +2 -0
@@ -80,6 +80,8 @@ playbooks/roles/linux-mirror/linux-mirror-systemd/xfsprogs-mirror.timer # yet. workflows/selftests/results/ +workflows/linux/Kconfig.refs-* + .kernel-ci.* .kotd.*
Makefile +3 -0
@@ -174,6 +174,9 @@ endif include scripts/gen-hosts.Makefile include scripts/gen-nodes.Makefile +ifneq ($(MAKECMDGOALS),dynconfig) + include scripts/gen-kreleases.Makefile +endif # disable built-in rules for this .SUFFIXES:
defconfigs/cxl-switch +4 -4
@@ -13,12 +13,12 @@ CONFIG_WORKFLOW_LINUX_CUSTOM=y CONFIG_BOOTLINUX=y CONFIG_BOOTLINUX_9P=y CONFIG_BOOTLINUX_CUSTOM=y -CONFIG_BOOTLINUX_CUSTOM_NAME="cxl-fixes" -CONFIG_BOOTLINUX_CUSTOM_URL="https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git" -CONFIG_BOOTLINUX_CUSTOM_TAG="cxl-fixes-6.6-rc3" +CONFIG_BOOTLINUX_TREE_CUSTOM_NAME="cxl-fixes" +CONFIG_BOOTLINUX_TREE_CUSTOM_URL="https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git" +CONFIG_BOOTLINUX_TREE_CUSTOM_REF="cxl-fixes-6.6-rc3" CONFIG_BOOTLINUX_TREE_NAME="cxl-fixes" CONFIG_BOOTLINUX_TREE="https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git" -CONFIG_BOOTLINUX_TREE_TAG="cxl-fixes-6.6-rc3" +CONFIG_BOOTLINUX_TREE_REF="cxl-fixes-6.6-rc3" CONFIG_QEMU_ENABLE_CXL=y CONFIG_QEMU_ENABLE_CXL_SWITCH_TOPOLOGY_1=y CONFIG_WORKFLOWS_TESTS=y
defconfigs/nfsd +2 -2
@@ -279,13 +279,13 @@ CONFIG_BOOTLINUX_TREE_NEXT=y # CONFIG_BOOTLINUX_TREE_BTRFS_DEVEL is not set # CONFIG_BOOTLINUX_TREE_JLAYTON_LINUX is not set # CONFIG_BOOTLINUX_TREE_MCGROF_NEXT is not set -CONFIG_BOOTLINUX_TREE_NEXT_TAG="next-20240108" +CONFIG_BOOTLINUX_TREE_NEXT_REF="next-20240108" CONFIG_BOOTLINUX_TREE_NEXT_NAME="linux-next" CONFIG_BOOTLINUX_TREE_NEXT_URL="/mirror/linux-next.git" CONFIG_BOOTLINUX_TREE_NAME="linux-next" CONFIG_BOOTLINUX_TREE="/mirror/linux-next.git" # CONFIG_BOOTLINUX_TEST_MESSAGE_ID is not set -CONFIG_BOOTLINUX_TREE_TAG="next-20240108" +CONFIG_BOOTLINUX_TREE_REF="next-20240108" CONFIG_BOOTLINUX_TREE_LOCALVERSION="" # CONFIG_BOOTLINUX_SHALLOW_CLONE is not set # end of Get and install Linux from git
docs/how-extra-vars-generated.md +4 -4
@@ -60,19 +60,19 @@ This make it easy to just `git grep BOOTLINUX_ARGS` to see what is defined. TREE_URL:=$(subst ",,$(CONFIG_BOOTLINUX_TREE)) TREE_NAME:=$(notdir $(TREE_URL)) TREE_NAME:=$(subst .git,,$(TREE_NAME)) -TREE_TAG:=$(subst ",,$(CONFIG_BOOTLINUX_TREE_TAG)) +TREE_REF:=$(subst ",,$(CONFIG_BOOTLINUX_TREE_REF)) TREE_LOCALVERSION:=$(subst ",,$(CONFIG_BOOTLINUX_TREE_LOCALVERSION)) TREE_SHALLOW_DEPTH:=$(subst ",,$(CONFIG_BOOTLINUX_SHALLOW_CLONE_DEPTH)) -TREE_CONFIG:=config-$(TREE_TAG) +TREE_CONFIG:=config-$(TREE_REF) ifeq (y,$(CONFIG_BOOTLINUX_PURE_IOMAP)) -TREE_CONFIG:=config-$(TREE_TAG)-pure-iomap +TREE_CONFIG:=config-$(TREE_REF)-pure-iomap endif # Describes the Linux clone BOOTLINUX_ARGS += target_linux_git=$(TREE_URL) BOOTLINUX_ARGS += target_linux_tree=$(TREE_NAME) -BOOTLINUX_ARGS += target_linux_tag=$(TREE_TAG) +BOOTLINUX_ARGS += target_linux_ref=$(TREE_REF) BOOTLINUX_ARGS += target_linux_config=$(TREE_CONFIG) BOOTLINUX_ARGS += target_linux_localversion=$(TREE_LOCALVERSION) ```
playbooks/roles/bootlinux/README.md +2 -2
@@ -43,7 +43,7 @@ Role Variables * target_linux_tree: the name of the tree * target_linux_dir_path: where to place the tree on the target system - * target_linux_tag : the actual tag as used on linux, so v4.19.62 + * target_linux_ref : the actual tag as used on linux, so v4.19.62 * target_linux_extra_patch: if defined an extra patch to apply with git am prior to compilation * target_linux_config: the configuration file to use
@@ -87,7 +87,7 @@ You'd place the `pend-v4.19.58-fixes-20190716-v2.patch` file on the directory Now say you wantd to be explicit about a tag of Linux you'd want to use: ``` -ansible-playbook -i hosts -l dev --extra-vars "target_linux_tag=v4.19.21 "target_linux_extra_patch=try-v4.19.20-fixes-20190716-v1.patch" bootlinux.yml +ansible-playbook -i hosts -l dev --extra-vars "target_linux_ref=v4.19.21 "target_linux_extra_patch=try-v4.19.20-fixes-20190716-v1.patch" bootlinux.yml ``` To uninstall a kernel:
playbooks/roles/bootlinux/defaults/main.yml +2 -2
@@ -21,9 +21,9 @@ target_linux_tree: "linux-stable" target_linux_dir_path: "{{ data_path }}/{{ target_linux_tree }}" kdevops_baseline_and_dev: False -target_linux_tag: "v4.19.133" +target_linux_ref: "v4.19.133" target_linux_delta_file: -target_linux_config: "config-{{ target_linux_tag }}" +target_linux_config: "config-{{ target_linux_ref }}" make: "make" # Once ansible v2.10 becomes available we can move on to using # ansible_processor_nproc but that was merged in 2020:
playbooks/roles/bootlinux/tasks/main.yml +4 -4
@@ -80,7 +80,7 @@ dest: "{{ target_linux_dir_path }}" update: yes depth: "{{ target_linux_shallow_depth }}" - version: "{{ target_linux_tag }}" + version: "{{ target_linux_ref }}" retries: 3 delay: 5 register: result
@@ -95,7 +95,7 @@ dest: "{{ bootlinux_9p_host_path }}" update: yes depth: "{{ target_linux_shallow_depth }}" - version: "{{ target_linux_tag }}" + version: "{{ target_linux_ref }}" retries: 3 delay: 5 register: result
@@ -412,7 +412,7 @@ - name: Check kernel uname for uninstall debug: - msg: "Target kernel {{ target_linux_tag }} Running kernel {{ running_kernel }}" + msg: "Target kernel {{ target_linux_ref }} Running kernel {{ running_kernel }}" vars: running_kernel: "{{ uname_cmd_before.stdout_lines.0 }}" tags: [ 'uninstall-linux' ]
@@ -543,7 +543,7 @@ - name: Check kernel uname debug: - msg: "Target kernel {{ target_linux_tag }} Running kernel {{ running_kernel }}" + msg: "Target kernel {{ target_linux_ref }} Running kernel {{ running_kernel }}" vars: running_kernel: "{{ uname_cmd.stdout_lines.0 }}" tags: [ 'linux', 'git', 'config', 'uname' ]
playbooks/roles/bootlinux/tasks/update-grub/install.yml +3 -3
@@ -131,13 +131,13 @@ # is either you do the work to enhance the heuristic or live happy with the # assumption that grub2's default of picking the latest kernel is the best # option. -- name: Try to find your target kernel's GRUB boot entry number now that the menu is flattened for {{ target_linux_tag }} using inferred KERNELRELEASE {{ kernelrelease.stdout}} +- name: Try to find your target kernel's GRUB boot entry number now that the menu is flattened for {{ target_linux_ref }} using inferred KERNELRELEASE {{ kernelrelease.stdout}} become: yes become_flags: 'su - -c' become_method: sudo shell: " {{ determine_default_kernel_id }} " vars: - target_kernel: "{{ target_linux_tag | replace('v', '') }}" + target_kernel: "{{ target_linux_ref | replace('v', '') }}" register: grub_boot_number_cmd tags: [ 'linux', 'git', 'config', 'saved' ] when: kernel_release_file.stat.exists
@@ -170,7 +170,7 @@ debug: msg: "{{ target_kernel }} determined to be {{ target_boot_entry }} on the GRUB2 flat menu. Ran: grub-set-default {{ target_boot_entry }}" vars: - target_kernel: "{{ target_linux_tag | replace('v', '') }}" + target_kernel: "{{ target_linux_ref | replace('v', '') }}" target_boot_entry: "{{ grub_boot_number_cmd.stdout_lines.0 }}" tags: [ 'linux', 'git', 'config', 'saved' ] when:
scripts/dynamic-kconfig.Makefile +4 -0
@@ -17,6 +17,10 @@ dynamic-kconfig-help: PHONY += dynamic-kconfig-help +ifeq ($(MAKECMDGOALS),dynconfig) + include scripts/gen-gitrefs.Makefile +endif + dynconfig: $(Q)$(MAKE) dynconfig-pci
scripts/gen-gitrefs.Makefile new file +111 -0
111 lines not on this page · raw message
scripts/gen-kreleases.Makefile new file +28 -0
@@ -0,0 +1,28 @@ +# SPDX-License-Identifier: copyleft-next-0.3.1 + +GENERATED_REFS_NEXT := $(shell \ + ./scripts/generate_refs.py \ + --prefix BOOTLINUX_TREE_NEXT \ + --output workflows/linux/Kconfig.refs-next \ + --extra workflows/linux/next-refs.yaml \ + kreleases \ + --moniker linux-next \ + ) + +GENERATED_REFS_STABLE := $(shell \ + ./scripts/generate_refs.py \ + --prefix BOOTLINUX_TREE_STABLE \ + --output workflows/linux/Kconfig.refs-stable \ + --extra workflows/linux/stable-refs.yaml \ + kreleases \ + --moniker stable \ + ) + +GENERATED_REFS_LINUS := $(shell \ + ./scripts/generate_refs.py \ + --prefix BOOTLINUX_TREE_LINUS \ + --output workflows/linux/Kconfig.refs-linus \ + --extra workflows/linux/linus-refs.yaml \ + kreleases \ + --moniker mainline \ + )
scripts/generate_refs.py new file +308 -0
308 lines not on this page · raw message
scripts/workflows/fstests/fstests_watchdog.py +2 -2
@@ -21,8 +21,8 @@ def print_fstest_host_status(host, verbose, use_remote, use_ssh, basedir, config configured_kernel = None if "CONFIG_WORKFLOW_LINUX_DISTRO" in config: configured_kernel = "Distro-kernel" - elif "CONFIG_BOOTLINUX_TREE_TAG" in config: - configured_kernel = config["CONFIG_BOOTLINUX_TREE_TAG"].strip('\"') + elif "CONFIG_BOOTLINUX_TREE_REF" in config: + configured_kernel = config["CONFIG_BOOTLINUX_TREE_REF"].strip('\"') remote_path = "/var/log/journal/remote/" kernel = systemd_remote.get_uname(remote_path, host, configured_kernel) if kernel == configured_kernel:
scripts/workflows/generic/run_kernel_ci.sh +1 -1
@@ -50,7 +50,7 @@ kernel_ci_subject_topic() if [[ "$CONFIG_KERNEL_CI_ADD_CUSTOM_SUBJECT_TOPIC" != "y" ]]; then echo "kernel-ci on $(hostname)" elif [[ "$CONFIG_KERNEL_CI_ADD_CUSTOM_SUBJECT_TOPIC_TAG" == "y" ]]; then - echo "kernel-ci on $(hostname) $CONFIG_KERNEL_CI_SUBJECT_TOPIC $CONFIG_BOOTLINUX_TREE_TAG" + echo "kernel-ci on $(hostname) $CONFIG_KERNEL_CI_SUBJECT_TOPIC $CONFIG_BOOTLINUX_TREE_REF" else echo "kernel-ci on $(hostname) $CONFIG_KERNEL_CI_SUBJECT_TOPIC" fi
workflows/fstests/Makefile +2 -2
@@ -99,8 +99,8 @@ FSTESTS_ARGS += fstests_testdev_nvme_fallback_model_serial='True' endif ifeq (y,$(CONFIG_CONFIG_BOOTLINUX)) -TREE_TAG:=$(subst ",,$(CONFIG_BOOTLINUX_TREE_TAG)) -FSTESTS_ARGS += fstests_perf_config='$(PROJECTRELEASE)-kernel-$(TREE_TAG)' +TREE_REF:=$(subst ",,$(CONFIG_BOOTLINUX_TREE_REF)) +FSTESTS_ARGS += fstests_perf_config='$(PROJECTRELEASE)-kernel-$(TREE_REF)' endif ifeq (,$(CONFIG_CONFIG_BOOTLINUX)) FSTESTS_ARGS += fstests_perf_config='$(PROJECTRELEASE)-kernel-distro'
workflows/fstests/expunges/6.4.0-rc2-next-20230515/xfs/unassigned/fstests-next-20230515 +1 -1
@@ -199,7 +199,7 @@ CONFIG_BOOTLINUX_TREE_NEXT=y # CONFIG_BOOTLINUX_TREE_MCGROF_NEXT is not set CONFIG_BOOTLINUX_TREE_NAME="linux-next" CONFIG_BOOTLINUX_TREE="/mirror/linux-next.git" -CONFIG_BOOTLINUX_TREE_TAG="next-20230426" +CONFIG_BOOTLINUX_TREE_REF="next-20230426" CONFIG_BOOTLINUX_TREE_LOCALVERSION="" # CONFIG_BOOTLINUX_SHALLOW_CLONE is not set # end of Get and install Linux from git
workflows/linux/Kconfig +23 -23
81 lines not on this page · raw message
workflows/linux/Kconfig.btrfs +1 -3
@@ -1,8 +1,6 @@ if BOOTLINUX_TREE_BTRFS_DEVEL -config BOOTLINUX_TREE_BTRFS_DEVEL_TAG - string - default "btrfs-devel" +source "workflows/linux/Kconfig.refs-btrfs-devel" config BOOTLINUX_TREE_BTRFS_DEVEL_NAME string
workflows/linux/Kconfig.cel +3 -28
@@ -1,25 +1,6 @@ if BOOTLINUX_TREE_CEL_LINUX -choice - prompt "cel-linux branch to use" - default BOOTLINUX_CEL_LINUX_NEXT - -config BOOTLINUX_CEL_LINUX_NEXT - bool "nfsd-next" - help - Pull the nfsd-next branch. - -config BOOTLINUX_CEL_LINUX_FIXES - bool "nfsd-fixes" - help - Pull the nfsd-fixes branch. - -config BOOTLINUX_CEL_LINUX_CUSTOM - bool "Custom branch name" - help - Pull a custom branch name. - -endchoice +source "workflows/linux/Kconfig.refs-cel-linux" config BOOTLINUX_CEL_LINUX_CUSTOM_NAME string "Custom branch name"
@@ -28,17 +9,11 @@ config BOOTLINUX_CEL_LINUX_CUSTOM_NAME help Custom branch name to use for Chuck Lever's linux tree. -config BOOTLINUX_CEL_TREE_TAG - string - default "nfsd-next" if BOOTLINUX_CEL_LINUX_NEXT - default "nfsd-fixes" if BOOTLINUX_CEL_LINUX_FIXES - default BOOTLINUX_CEL_LINUX_CUSTOM_NAME if BOOTLINUX_CEL_LINUX_CUSTOM - -config BOOTLINUX_CEL_TREE_NAME +config BOOTLINUX_TREE_CEL_NAME string default "cel-linux" -config BOOTLINUX_CEL_TREE_URL +config BOOTLINUX_TREE_CEL_URL string default "https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git" if BOOTLINUX_TREE_CEL_LINUX
workflows/linux/Kconfig.jlayton +3 -28
@@ -1,25 +1,6 @@ if BOOTLINUX_TREE_JLAYTON_LINUX -choice - prompt "jlayton-linux branch to use" - default BOOTLINUX_JLAYTON_LINUX_KDEVOPS - -config BOOTLINUX_JLAYTON_LINUX_KDEVOPS - bool "kdevops" - help - Use the kdevops branch. - -config BOOTLINUX_JLAYTON_LINUX_IVERSION - bool "iversion-next" - help - Use the iversion-next branch. - -config BOOTLINUX_JLAYTON_LINUX_CUSTOM - bool "Custom branch name" - help - Use a custom branch name. - -endchoice +source "workflows/linux/Kconfig.refs-jlayton-linux" config BOOTLINUX_JLAYTON_LINUX_CUSTOM_NAME string "Custom branch name"
@@ -28,17 +9,11 @@ config BOOTLINUX_JLAYTON_LINUX_CUSTOM_NAME help Custom branch name to use for Jeff Layton's linux tree. -config BOOTLINUX_JLAYTON_LINUX_TAG - string - default BOOTLINUX_JLAYTON_LINUX_CUSTOM_NAME if BOOTLINUX_JLAYTON_LINUX_CUSTOM - default "kdevops" if BOOTLINUX_JLAYTON_LINUX_KDEVOPS - default "iversion-next" if BOOTLINUX_JLAYTON_LINUX_IVERSION - -config BOOTLINUX_JLAYTON_TREE_NAME +config BOOTLINUX_TREE_JLAYTON_NAME string default "jlayton-linux" -config BOOTLINUX_JLAYTON_TREE_URL +config BOOTLINUX_TREE_JLAYTON_URL string default "git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git" if BOOTLINUX_TREE_JLAYTON_LINUX
workflows/linux/Kconfig.kdevops +2 -15
@@ -1,26 +1,13 @@ if BOOTLINUX_TREE_KDEVOPS_LINUS -choice - prompt "kdevops-linus branch to use" - default BOOTLINUX_KDEVOPS_LINUS_LBS_MINORDER - -config BOOTLINUX_KDEVOPS_LINUS_LBS_MINORDER - bool "large-block-minorder" - help - Use the latest LBS branch based on Linus' tree. - -endchoice +source "workflows/linux/Kconfig.refs-kdevops-linus" config BOOTLINUX_TREE_KDEVOPS_URL string default "https://github.com/linux-kdevops/linux.git" if !USE_LOCAL_LINUX_MIRROR default "/mirror/kdevops-linus.git" if USE_LIBVIRT_MIRROR && BOOTLINUX_9P -config BOOTLINUX_KDEVOPS_TREE_TAG - string - default "large-block-minorder" - -config BOOTLINUX_KDEVOPS_TREE_NAME +config BOOTLINUX_TREE_KDEVOPS_NAME string default "kdevops-linus"
workflows/linux/Kconfig.linus +1 -68
75 lines not on this page · raw message
workflows/linux/Kconfig.mcgrof +5 -43
70 lines not on this page · raw message
workflows/linux/Kconfig.next +1 -3
@@ -1,8 +1,6 @@ if BOOTLINUX_TREE_NEXT -config BOOTLINUX_TREE_NEXT_TAG - string "linux-next tag to pull" - default "next-20240424" +source "workflows/linux/Kconfig.refs-next" config BOOTLINUX_TREE_NEXT_NAME string
workflows/linux/Kconfig.refs-btrfs-devel new file +15 -0
@@ -0,0 +1,15 @@ +# SPDX-License-Identifier: copyleft-next-0.3.1 +# Automatically generated file +choice + prompt "Tag or branch to use" + +config BOOTLINUX_TREE_BTRFS_DEVEL_REF_BTRFSDEVEL + bool "btrfs-devel" + help + Use development branch. + +endchoice + +config BOOTLINUX_TREE_BTRFS_DEVEL_REF + string + default "btrfs-devel" if BOOTLINUX_TREE_BTRFS_DEVEL_REF_BTRFSDEVEL
workflows/linux/Kconfig.refs-cel-linux new file +27 -0
@@ -0,0 +1,27 @@ +# SPDX-License-Identifier: copyleft-next-0.3.1 +# Automatically generated file +choice + prompt "Tag or branch to use" + +config BOOTLINUX_TREE_CEL_LINUX_REF_NEXT + bool "nfsd-next" + help + Pull the nfsd-next branch. + +config BOOTLINUX_TREE_CEL_LINUX_REF_FIXES + bool "nfsd-fixed" + help + Pull the nfsd-fixed branch. + +config BOOTLINUX_TREE_CEL_LINUX_REF_CUSTOM + bool "custom" + help + Use a custom branch name. + +endchoice + +config BOOTLINUX_TREE_CEL_LINUX_REF + string + default "nfsd-next" if BOOTLINUX_TREE_CEL_LINUX_REF_NEXT + default "nfsd-fixed" if BOOTLINUX_TREE_CEL_LINUX_REF_FIXES + default BOOTLINUX_CEL_LINUX_CUSTOM_REF_NAME if BOOTLINUX_TREE_CEL_LINUX_REF_CUSTOM
workflows/linux/Kconfig.refs-jlayton-linux new file +27 -0
@@ -0,0 +1,27 @@ +# SPDX-License-Identifier: copyleft-next-0.3.1 +# Automatically generated file +choice + prompt "Tag or branch to use" + +config BOOTLINUX_TREE_JLAYTON_LINUX_REF_KDEVOPS + bool "kdevops" + help + Use the latest kdevops branch. + +config BOOTLINUX_TREE_JLAYTON_LINUX_REF_IVERSION + bool "iversion-next" + help + Use the iversion-next branch. + +config BOOTLINUX_TREE_JLAYTON_LINUX_REF_CUSTOM + bool "custom" + help + Use a custom branch name. + +endchoice + +config BOOTLINUX_TREE_JLAYTON_LINUX_REF + string + default "kdevops" if BOOTLINUX_TREE_JLAYTON_LINUX_REF_KDEVOPS + default "iversion-next" if BOOTLINUX_TREE_JLAYTON_LINUX_REF_IVERSION + default BOOTLINUX_TREE_JLAYTON_LINUX_CUSTOM_REF_NAME if BOOTLINUX_TREE_JLAYTON_LINUX_REF_CUSTOM
workflows/linux/Kconfig.refs-kdevops-linus new file +15 -0
@@ -0,0 +1,15 @@ +# SPDX-License-Identifier: copyleft-next-0.3.1 +# Automatically generated file +choice + prompt "Tag or branch to use" + +config BOOTLINUX_TREE_KDEVOPS_LINUS_REF_LBS_MINORDER + bool "large-block-minorder" + help + Use the latest LBS branch based on Linus's tree + +endchoice + +config BOOTLINUX_TREE_KDEVOPS_LINUS_REF + string + default "large-block-minorder" if BOOTLINUX_TREE_KDEVOPS_LINUS_REF_LBS_MINORDER
workflows/linux/Kconfig.refs-mcgrof-linus new file +21 -0
@@ -0,0 +1,21 @@ +# SPDX-License-Identifier: copyleft-next-0.3.1 +# Automatically generated file +choice + prompt "Tag or branch to use" + +config BOOTLINUX_TREE_MCGROF_LINUS_REF_LBS + bool "large-block-linus" + help + Use the latest LBS branch based on Linus' tree. + +config BOOTLINUX_TREE_MCGROF_LINUS_REF_LBS_NOBDEV + bool "large-block-linus-nobdev" + help + Use the latest minimal branch for LBS which let's you use LBS devices with a sectorsize compatibility based on Linus' tree. + +endchoice + +config BOOTLINUX_TREE_MCGROF_LINUS_REF + string + default "large-block-linus" if BOOTLINUX_TREE_MCGROF_LINUS_REF_LBS + default "large-block-linus-nobdev" if BOOTLINUX_TREE_MCGROF_LINUS_REF_LBS_NOBDEV
workflows/linux/Kconfig.refs-mcgrof-next new file +21 -0
@@ -0,0 +1,21 @@ +# SPDX-License-Identifier: copyleft-next-0.3.1 +# Automatically generated file +choice + prompt "Tag or branch to use" + +config BOOTLINUX_TREE_MCGROF_NEXT_REF_LBS + bool "large-block-next" + help + Use the latest stable LBS branch which enables all the bells and whistles for all types of LBS devices. + +config BOOTLINUX_TREE_MCGROF_NEXT_REF_LBS_NOBDEV + bool "large-block-nobdev" + help + Use the latest minimal branch for LBS which let's you use LBS devices with a sectorsize compatibility + +endchoice + +config BOOTLINUX_TREE_MCGROF_NEXT_REF + string + default "large-block-next" if BOOTLINUX_TREE_MCGROF_NEXT_REF_LBS + default "large-block-nobdev" if BOOTLINUX_TREE_MCGROF_NEXT_REF_LBS_NOBDEV
workflows/linux/Kconfig.stable +1 -62
72 lines not on this page · raw message
workflows/linux/Makefile +7 -7
@@ -3,25 +3,25 @@ TREE_URL:=$(subst ",,$(CONFIG_BOOTLINUX_TREE)) TREE_NAME:=$(notdir $(TREE_URL)) TREE_NAME:=$(subst .git,,$(TREE_NAME)) -TREE_TAG:=$(subst ",,$(CONFIG_BOOTLINUX_TREE_TAG)) +TREE_REF:=$(subst ",,$(CONFIG_BOOTLINUX_TREE_REF)) TREE_KERNELRELEASE:=$(subst ",,$(CONFIG_BOOTLINUX_TREE_KERNELRELEASE)) TREE_LOCALVERSION:=$(subst ",,$(CONFIG_BOOTLINUX_TREE_LOCALVERSION)) TREE_SHALLOW_DEPTH:=$(subst ",,$(CONFIG_BOOTLINUX_SHALLOW_CLONE_DEPTH)) -TREE_CONFIG:=config-$(TREE_TAG) +TREE_CONFIG:=config-$(TREE_REF) ifeq (y,$(CONFIG_BOOTLINUX_PURE_IOMAP)) -TREE_CONFIG:=config-$(TREE_TAG)-pure-iomap +TREE_CONFIG:=config-$(TREE_REF)-pure-iomap endif # Describes the Linux clone BOOTLINUX_ARGS += target_linux_git=$(TREE_URL) -# ifeq (y,$(CONFIG_BOOTLINUX_CUSTOM_NAME)) -ifdef CONFIG_BOOTLINUX_CUSTOM_NAME -BOOTLINUX_ARGS += target_linux_tree=$(CONFIG_BOOTLINUX_CUSTOM_NAME) +# ifeq (y,$(CONFIG_BOOTLINUX_TREE_CUSTOM_NAME)) +ifdef CONFIG_BOOTLINUX_TREE_CUSTOM_NAME +BOOTLINUX_ARGS += target_linux_tree=$(CONFIG_BOOTLINUX_TREE_CUSTOM_NAME) else BOOTLINUX_ARGS += target_linux_tree=$(TREE_NAME) endif -BOOTLINUX_ARGS += target_linux_tag=$(TREE_TAG) +BOOTLINUX_ARGS += target_linux_ref=$(TREE_REF) BOOTLINUX_ARGS += target_linux_config=$(TREE_CONFIG) BOOTLINUX_ARGS += target_linux_kernelrelease=$(TREE_KERNELRELEASE) BOOTLINUX_ARGS += target_linux_localversion=$(TREE_LOCALVERSION)
workflows/linux/btrfs-devel-refs.yaml new file +6 -0
@@ -0,0 +1,6 @@ +--- +configs: + - btrfs: + config: BOOTLINUX_TREE_BTRFS_DEVEL_REF_BTRFSDEVEL + ref: "btrfs-devel" + help: "Use development branch."
workflows/linux/cel-linux-refs.yaml new file +14 -0
@@ -0,0 +1,14 @@ +--- +configs: + - next: + config: BOOTLINUX_TREE_CEL_LINUX_REF_NEXT + ref: "nfsd-next" + help: "Pull the nfsd-next branch." + - fixes: + config: BOOTLINUX_TREE_CEL_LINUX_REF_FIXES + ref: "nfsd-fixed" + help: "Pull the nfsd-fixed branch." + - custom: + config: BOOTLINUX_TREE_CEL_LINUX_REF_CUSTOM + ref: BOOTLINUX_CEL_LINUX_CUSTOM_REF_NAME + help: "Use a custom branch name."
workflows/linux/jlayton-linux-refs.yaml new file +14 -0
@@ -0,0 +1,14 @@ +--- +configs: + - kdevops: + config: BOOTLINUX_TREE_JLAYTON_LINUX_REF_KDEVOPS + ref: "kdevops" + help: "Use the latest kdevops branch." + - iversion: + config: BOOTLINUX_TREE_JLAYTON_LINUX_REF_IVERSION + ref: "iversion-next" + help: "Use the iversion-next branch." + - custom: + config: BOOTLINUX_TREE_JLAYTON_LINUX_REF_CUSTOM + ref: BOOTLINUX_TREE_JLAYTON_LINUX_CUSTOM_REF_NAME + help: "Use a custom branch name."
workflows/linux/kdevops-linus-refs.yaml new file +6 -0
@@ -0,0 +1,6 @@ +--- +configs: + - minorder: + config: BOOTLINUX_TREE_KDEVOPS_LINUS_REF_LBS_MINORDER + ref: "large-block-minorder" + help: "Use the latest LBS branch based on Linus's tree"
workflows/linux/linus-refs.yaml new file +38 -0
@@ -0,0 +1,38 @@ +--- +configs: + - master: + config: BOOTLINUX_TREE_LINUS_REF_MASTER + ref: "master" + help: "master" + - v6.6-rc2: + config: BOOTLINUX_TREE_LINUS_REF_66_RC2 + ref: "v6.6-rc2" + help: "v6.6-rc2" + - v6.6-rc4: + config: BOOTLINUX_TREE_LINUS_REF_66_RC4 + ref: "v6.6-rc4" + help: "v6.6-rc4" + - v6.6-rc5: + config: BOOTLINUX_TREE_LINUS_REF_66_RC5 + ref: "v6.6-rc5" + help: "v6.6-rc5" + - v6.8-rc2: + config: BOOTLINUX_TREE_LINUS_REF_68_RC2 + ref: "v6.8-rc2" + help: "v6.8-rc2" + - v6.9-rc2: + config: BOOTLINUX_TREE_LINUS_REF_69_RC2 + ref: "v6.9-rc2" + help: "v6.9-rc2" + - v6.9-rc4: + config: BOOTLINUX_TREE_LINUS_REF_69_RC4 + ref: "v6.9-rc4" + help: "v6.9-rc4" + - v6.9-rc5: + config: BOOTLINUX_TREE_LINUS_REF_69_RC5 + ref: "v6.9-rc5" + help: "v6.9-rc5" + - v6.9-rc6: + config: BOOTLINUX_TREE_LINUS_REF_69_RC6 + ref: "v6.9-rc6" + help: "v6.9-rc6"
workflows/linux/mcgrof-linus-refs.yaml new file +10 -0
@@ -0,0 +1,10 @@ +--- +configs: + - master: + config: BOOTLINUX_TREE_MCGROF_LINUS_REF_LBS + ref: "large-block-linus" + help: "Use the latest LBS branch based on Linus' tree." + - main: + config: BOOTLINUX_TREE_MCGROF_LINUS_REF_LBS_NOBDEV + ref: "large-block-linus-nobdev" + help: "Use the latest minimal branch for LBS which let's you use LBS devices with a sectorsize compatibility based on Linus' tree."
workflows/linux/mcgrof-next-refs.yaml new file +10 -0
@@ -0,0 +1,10 @@ +--- +configs: + - master: + config: BOOTLINUX_TREE_MCGROF_NEXT_REF_LBS + ref: "large-block-next" + help: "Use the latest stable LBS branch which enables all the bells and whistles for all types of LBS devices." + - main: + config: BOOTLINUX_TREE_MCGROF_NEXT_REF_LBS_NOBDEV + ref: "large-block-nobdev" + help: "Use the latest minimal branch for LBS which let's you use LBS devices with a sectorsize compatibility"
workflows/linux/next-refs.yaml new file +6 -0
@@ -0,0 +1,6 @@ +--- +configs: + - next-20240424: + config: BOOTLINUX_TREE_NEXT_REF_20240424 + ref: "next-20240424" + help: "next-20240424"
workflows/linux/stable-refs.yaml new file +38 -0
@@ -0,0 +1,38 @@ +--- +configs: + - v4.19.133: + config: BOOTLINUX_TREE_STABLE_REF_419133 + ref: "v4.19.133" + help: "v4.19.133" + - v5.4.210: + config: BOOTLINUX_TREE_STABLE_REF_54210 + ref: "v5.4.210" + help: "v5.4.210" + - v5.10.105: + config: BOOTLINUX_TREE_STABLE_REF_510105 + ref: "v5.10.105" + help: "v5.10.105" + - v5.14.4: + config: BOOTLINUX_TREE_STABLE_REF_5144 + ref: "v5.14.4" + help: "v5.14.4" + - v5.17-rc7: + config: BOOTLINUX_TREE_STABLE_REF_517RC7 + ref: "v5.17-rc7" + help: "v5.17-rc7" + - v5.19-rc4: + config: BOOTLINUX_TREE_STABLE_REF_519RC4 + ref: "v5.19-rc4" + help: "v5.19-rc4" + - v6.0.9: + config: BOOTLINUX_TREE_STABLE_REF_609 + ref: "v6.0.9" + help: "v6.0.9" + - linux-6.1.y: + config: BOOTLINUX_TREE_STABLE_REF_LINUX61Y + ref: "linux-6.1.y" + help: "linux-6.1.y" + - linux-6.6.y: + config: BOOTLINUX_TREE_STABLE_REF_LINUX66Y + ref: "linux-6.6.y" + help: "linux-6.6.y"
Signature · 1 line
2.45.1
Re: [PATCH v4 1/1] linux: generate refs automatically
Quoted 25 lines · Daniel Gomez (Samsung)
From: Daniel Gomez <[email protected]>
Generate a
Kconfigchoice/endchoice menu with a list of the latest git references for upstream repositories.* Default behaviour for next, stable and linus trees:
latest-and-greatest + static refs.
The script included (generate_refs.py) will create theKconfigchoice options with the latest and greatest kernel release references provided bykernel.org/releases.jsonincluding the static references defined in the YAML files. Every time make is run, the script will check for the date of the last modification, and will force an update if more than 24h has passed since last modification. The generated files are:Kconfig.refs-{next,stable,linus}.*
Kconfig.refs-{btrfs-devel,cel-linux,jlayton-linux,kdevops-linus, mcgrof-linus,mcgrof-next} files are autogenerated using their respective YAML static configuration files. This is to be able to run gitrefs and automatically generate the latest references using gitrefs (see below) including the static references.Note: This files are also included in kdevops tree. If you need to modify them, just modify the YAML file to autogenerate the
Kconfigand send a patch.
Quoted 8 lines
* make dynconfig:
In addition, the script will generate and overwrite all the existingKconfig.refs-*files (including next, stable and linus) when dynconfig is run. This mode will retrieve the information from the upstream git repoitories for all supported kernel trees in kdevops and will create a list with the latest 15 references found.Signed-off-by Daniel Gomez <[email protected]>
Just two requests:
1) A large portion of this patch is a few renames, and it makes it difficult to review the actual functional changes. Could the rename be split, so that the functional changes are visible and clearer?
2) The expected day to do is not clear from the commit log. What aspects of no-use of this will generate a 'git diff' visible output if one does not use 'make dynconfig'? What aspects will generate a diff which *should* be commited to the tree, ie how are kdevops developers expected to contribute to say a new revision of Linus' bump of a new rc candidate? The same applies to their git trees.
Luis