Skip to contentSkip to conversation

Add defaults refs for linux-stable-rc

RFC PATCH Superseded [email protected] 3 participants 6 messages Mar 12, 2025 – Mar 13, 2025 Kbuild

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Add defaults refs for linux-stable-rc

From: Chuck Lever <[email protected]>

This series goes with the addition of linux-stable-rc to the set of repos handled by the local /mirror. These seem to behave OK, but I'm not sure I got everything right.

Chuck Lever (2):
linux-mirror: Enable choice of clone protocol for stable-rc tree Add the stable release candidate repo to the Linux git repos menu

 Makefile.linux-mirror                         |  1 +
 kconfigs/Kconfig.defaults                     | 12 ++++
 kconfigs/Kconfig.mirror                       | 41 ++++++++++++++
 kconfigs/workflows/Kconfig.bootlinux          |  4 ++
 scripts/gen-refs-default.Makefile             | 14 ++++-
 scripts/gen-refs-user.Makefile                | 18 +++++-
 workflows/linux/Kconfig                       |  9 +++
 workflows/linux/Kconfig.stable_rc             | 31 ++++++++++
 .../linux/refs/default/Kconfig.stable_rc      | 56 +++++++++++++++++++
 workflows/linux/refs/static/stable_rc.yaml    | 30 ++++++++++
 10 files changed, 212 insertions(+), 4 deletions(-)
 create mode 100644 workflows/linux/Kconfig.stable_rc
 create mode 100644 workflows/linux/refs/default/Kconfig.stable_rc
 create mode 100644 workflows/linux/refs/static/stable_rc.yaml
Signature · 1 line
2.48.1
#1 lore raw

RFC PATCH 1/2 linux-mirror: Enable choice of clone protocol for stable-rc tree

From: Chuck Lever <[email protected]>

Add linux-stable-rc to the "Install local mirror setup" menu so that users can select which default protocol and master to pull from.

---
 Makefile.linux-mirror     |  1 +
 kconfigs/Kconfig.defaults | 12 ++++++++++++
 kconfigs/Kconfig.mirror   | 41 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 54 insertions(+)
Makefile.linux-mirror +1 -0
index e2a4b4dcb3ae..2ff18adfda1a 100644
@@ -17,6 +17,7 @@ LINUX_MIRROR_ARGS += mirror_qemu_jic23_url='$(subst ",,$(CONFIG_MIRROR_KDEVOPS_U
 LINUX_MIRROR_ARGS += mirror_mcgrof_linus_url='$(subst ",,$(CONFIG_MIRROR_MCGROF_LINUS_URL))'
 LINUX_MIRROR_ARGS += mirror_mcgrof_url='$(subst ",,$(CONFIG_MIRROR_MCGROF_URL))'
 LINUX_MIRROR_ARGS += mirror_stable_url='$(subst ",,$(CONFIG_MIRROR_STABLE_URL))'
+LINUX_MIRROR_ARGS += mirror_stable_rc_url='$(subst ",,$(CONFIG_MIRROR_STABLE_RC_URL))'
 LINUX_MIRROR_ARGS += mirror_torvalds_url='$(subst ",,$(CONFIG_MIRROR_TORVALDS_URL))'
 endif
 
kconfigs/Kconfig.defaults +12 -0
index 9e6da24f2921..e03f17872850 100644
@@ -164,6 +164,18 @@ config DEFAULT_STABLE_HTTPS_GOOGLE_URL
 	string
 	default "https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux.git"
 
+config DEFAULT_STABLE_RC_GIT_URL
+	string
+	default "git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git"
+
+config DEFAULT_STABLE_RC_HTTPS_URL
+	string
+	default "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git"
+
+config DEFAULT_STABLE_RC_HTTPS_GOOGLE_URL
+	string
+	default "https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable-rc.git"
+
 config DEFAULT_VFS_GIT_URL
 	string
 	default "git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git"
kconfigs/Kconfig.mirror +41 -0

47 lines not on this page · raw message

Signature · 1 line
2.48.1
#2 lore raw

RFC PATCH 2/2 Add the stable release candidate repo to the Linux git repos menu

In reply to [email protected]

From: Chuck Lever <[email protected]>

I have several nightly test runners that pull LTS release candidates for testing. I have to hand-edit the Kconfig for each test runner when switching from the master repo to a local mirror.

I would like to get those to switch automatically over to using a local mirror, when one is available.

---
 kconfigs/workflows/Kconfig.bootlinux          |  4 ++
 scripts/gen-refs-default.Makefile             | 14 ++++-
 scripts/gen-refs-user.Makefile                | 18 +++++-
 workflows/linux/Kconfig                       |  9 +++
 workflows/linux/Kconfig.stable_rc             | 31 ++++++++++
 .../linux/refs/default/Kconfig.stable_rc      | 56 +++++++++++++++++++
 workflows/linux/refs/static/stable_rc.yaml    | 30 ++++++++++
 7 files changed, 158 insertions(+), 4 deletions(-)
 create mode 100644 workflows/linux/Kconfig.stable_rc
 create mode 100644 workflows/linux/refs/default/Kconfig.stable_rc
 create mode 100644 workflows/linux/refs/static/stable_rc.yaml
kconfigs/workflows/Kconfig.bootlinux +4 -0
index 25bbe4ea7e47..a66e44ee8cb7 100644
@@ -12,6 +12,10 @@ config HAVE_BOOTLINUX_TREE_STABLE_USER_REFS
 	bool
 	default $(shell, scripts/check_file_empty.sh workflows/linux/refs/user/Kconfig.stable)
 
+config HAVE_BOOTLINUX_TREE_STABLE_RC_USER_REFS
+	bool
+	default $(shell, scripts/check_file_empty.sh workflows/linux/refs/user/Kconfig.stable_rc)
+
 config HAVE_BOOTLINUX_TREE_MCGROF_LINUS_USER_REFS
 	bool
 	default $(shell, scripts/check_file_empty.sh workflows/linux/refs/user/Kconfig.mcgrof-linus)
scripts/gen-refs-default.Makefile +12 -2
index c5d12e152cb4..b50e7c26e754 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: copyleft-next-0.3.1
 
-REF_DEF_OBJS := $(addprefix $(TOPDIR)/workflows/linux/refs/default/, Kconfig.linus Kconfig.next Kconfig.stable)
-REF_DEF_SRC  := $(addprefix $(TOPDIR)/workflows/linux/refs/static/,  linus.yaml next.yaml stable.yaml)
+REF_DEF_OBJS := $(addprefix $(TOPDIR)/workflows/linux/refs/default/, Kconfig.linus Kconfig.next Kconfig.stable Kconfig.stable_rc)
+REF_DEF_SRC  := $(addprefix $(TOPDIR)/workflows/linux/refs/static/,  linus.yaml next.yaml stable.yaml stable_rc.yaml)
 
 KRELEASES_FORCE := $(if $(filter --force,$(KRELEASES_FORCE)),--force,)
 
@@ -35,6 +35,16 @@ $(TOPDIR)/workflows/linux/refs/default/Kconfig.stable: $(TOPDIR)/workflows/linux
 		kreleases \
 		--moniker stable
 
+$(TOPDIR)/workflows/linux/refs/default/Kconfig.stable_rc: $(TOPDIR)/workflows/linux/refs/static/stable_rc.yaml
+	$(Q)$(E) "Generating $@..."
+	$(Q)./scripts/generate_refs.py \
+		--prefix BOOTLINUX_TREE_STABLE_RC \
+		--output workflows/linux/refs/default/Kconfig.stable_rc \
+		--extra workflows/linux/refs/static/stable_rc.yaml \
+		$(KRELEASES_FORCE) \
+		kreleases \
+		--moniker stable_rc
+
 PHONY += refs-default
 refs-default: $(REF_DEF_OBJS) _gen-default-refs-development refs-user-clean
 
scripts/gen-refs-user.Makefile +16 -2
index 5c5df2f5417e..ed07b2df6d35 100644
@@ -3,6 +3,7 @@
 SRC_URI_HTTPS_LINUS = https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
 SRC_URI_HTTPS_NEXT = https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
 SRC_URI_HTTPS_STABLE = https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
+SRC_URI_HTTPS_STABLE_RC = https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
 
 SRC_URI_HTTPS_MCGROF_LINUS = https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git
 SRC_URI_HTTPS_MCGROF_NEXT = https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
@@ -17,6 +18,7 @@ SRC_URI_HTTPS_XFS = https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git
 REFS_TARGET_LINUS := gen_refs_linus
 REFS_TARGET_NEXT := gen_refs_next
 REFS_TARGET_STABLE := gen_refs_stable
+REFS_TARGET_STABLE_RC := gen_refs_stable_rc
 
 REFS_TARGET_DEVELOPMENT := gen_refs_mcgrof_linus
 REFS_TARGET_DEVELOPMENT += gen_refs_mcgrof_next
@@ -68,6 +70,18 @@ gen_refs_stable:
 		--repo $(SRC_URI_HTTPS_STABLE) \
 		--refs $(REFS_COUNT)
 
+PHONY += gen_refs_stable_rc
+gen_refs_stable_rc:
+	$(Q)$(E) "Generating refs/$(REFS_DIR)/Kconfig.$(subst _,-,$(patsubst gen_refs_%,%,$@)) ($(REFS_COUNT) refs)..."
+	$(Q)./scripts/generate_refs.py \
+		--prefix BOOTLINUX_TREE_STABLE_RC \
+		--output workflows/linux/refs/$(REFS_DIR)/Kconfig.stable_rc \
+		--extra workflows/linux/refs/static/stable_rc.yaml \
+		--force \
+		gitref \
+		--repo $(SRC_URI_HTTPS_STABLE_RC) \
+		--refs $(REFS_COUNT)
+
 PHONY += gen_refs_mcgrof_linus
 gen_refs_mcgrof_linus:
 	$(Q)$(E) "Generating refs/$(REFS_DIR)/Kconfig.$(subst _,-,$(patsubst gen_refs_%,%,$@)) ($(REFS_COUNT) refs)..."
@@ -183,8 +197,8 @@ refs-user-clean:
 	fi
 
 _gen-user-refs:
-	$(Q)$(E) "Generating refs/user/Kconfig.{linus,next,stable,mcgrof-linus,mcgrof-next,btrfs-devel,cel-linux-jlayton-linux-kdevops-linus} files..."
-	$(Q)$(MAKE) REFS_COUNT=15 REFS_DIR="user" $(REFS_TARGET_LINUS) $(REFS_TARGET_NEXT) $(REFS_TARGET_STABLE) $(REFS_TARGET_DEVELOPMENT)
+	$(Q)$(E) "Generating refs/user/Kconfig.{linus,next,stable,stable_rc,mcgrof-linus,mcgrof-next,btrfs-devel,cel-linux-jlayton-linux-kdevops-linus} files..."
+	$(Q)$(MAKE) REFS_COUNT=15 REFS_DIR="user" $(REFS_TARGET_LINUS) $(REFS_TARGET_NEXT) $(REFS_TARGET_STABLE) $(REFS_TARGET_STABLE_RC) $(REFS_TARGET_DEVELOPMENT)
 
 PHONY += refs-user
 refs-user: _gen-user-refs
workflows/linux/Kconfig +9 -0
index 6b496c56c762..8c4de4cc8ee2 100644
@@ -126,6 +126,11 @@ config BOOTLINUX_STABLE
 	help
 	  This will let you choose from stable Linux trees only.
 
+config BOOTLINUX_STABLE_RC
+	bool "Stable Linux release candidates"
+	help
+	  This will let you choose from stable Linux release candidates only.
+
 config BOOTLINUX_DEV
 	bool "Development Linux releases"
 	help
@@ -141,6 +146,7 @@ endchoice
 
 source "workflows/linux/Kconfig.linus"
 source "workflows/linux/Kconfig.stable"
+source "workflows/linux/Kconfig.stable_rc"
 source "workflows/linux/Kconfig.dev"
 source "workflows/linux/Kconfig.modules"
 source "workflows/linux/Kconfig.next"
@@ -185,6 +191,7 @@ config BOOTLINUX_TREE_NAME
 	string
 	default BOOTLINUX_TREE_LINUS_NAME if BOOTLINUX_TREE_LINUS
 	default BOOTLINUX_TREE_STABLE_NAME if BOOTLINUX_TREE_STABLE
+	default BOOTLINUX_TREE_STABLE_RC_NAME if BOOTLINUX_TREE_STABLE_RC
 	default BOOTLINUX_TREE_NEXT_NAME if BOOTLINUX_TREE_NEXT
 	default BOOTLINUX_TREE_BTRFS_DEVEL_NAME if BOOTLINUX_TREE_BTRFS_DEVEL
 	default BOOTLINUX_TREE_KDEVOPS_NAME if BOOTLINUX_TREE_KDEVOPS_LINUS
@@ -200,6 +207,7 @@ config BOOTLINUX_TREE
 	string
 	default BOOTLINUX_TREE_LINUS_URL if BOOTLINUX_TREE_LINUS
 	default BOOTLINUX_TREE_STABLE_URL if BOOTLINUX_TREE_STABLE
+	default BOOTLINUX_TREE_STABLE_RC_URL if BOOTLINUX_TREE_STABLE_RC
 	default BOOTLINUX_TREE_NEXT_URL if BOOTLINUX_TREE_NEXT
 	default BOOTLINUX_TREE_MCGROF_URL if BOOTLINUX_TREE_MCGROF
 	default BOOTLINUX_TREE_MODULES_URL if BOOTLINUX_TREE_MODULES
@@ -248,6 +256,7 @@ config BOOTLINUX_TREE_REF
 	string
 	default BOOTLINUX_TREE_LINUS_REF if BOOTLINUX_TREE_LINUS
 	default BOOTLINUX_TREE_STABLE_REF if BOOTLINUX_STABLE
+	default BOOTLINUX_TREE_STABLE_RC_REF if BOOTLINUX_STABLE_RC
 	default BOOTLINUX_TREE_NEXT_REF if BOOTLINUX_TREE_NEXT
 	default BOOTLINUX_TREE_VFS_REF if BOOTLINUX_TREE_VFS
 	default BOOTLINUX_TREE_XFS_REF if BOOTLINUX_TREE_XFS
workflows/linux/Kconfig.stable_rc new file +31 -0
new file mode 100644
index 000000000000..8bcb7a2fba61
@@ -0,0 +1,31 @@
+if BOOTLINUX_STABLE_RC
+
+choice
+	prompt "Linux stable release candidate tree to use"
+	default BOOTLINUX_TREE_STABLE_RC
+
+config BOOTLINUX_TREE_STABLE_RC
+	bool "linux-stable-rc"
+	help
+	  Use the linux-stable release candidate tree.
+
+endchoice
+
+if BOOTLINUX_TREE_STABLE_RC
+
+source "workflows/linux/refs/default/Kconfig.stable_rc"
+source "workflows/linux/refs/user/Kconfig.stable_rc"
+
+endif # BOOTLINUX_TREE_STABLE_RC
+
+config BOOTLINUX_TREE_STABLE_RC_NAME
+	string
+	default "linux-stable-rc" if BOOTLINUX_TREE_STABLE_RC
+
+config BOOTLINUX_TREE_STABLE_RC_URL
+	string
+	default DEFAULT_STABLE_RC_HTTPS_URL if !USE_LOCAL_LINUX_MIRROR
+	default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/linux-stable-rc.git) if USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS
+	default "/mirror/linux-stable-rc.git" if USE_LIBVIRT_MIRROR && BOOTLINUX_9P
+
+endif # BOOTLINUX_STABLE_RC
workflows/linux/refs/default/Kconfig.stable_rc new file +56 -0

56 lines not on this page · raw message

workflows/linux/refs/static/stable_rc.yaml new file +30 -0
new file mode 100644
index 000000000000..a7d82977a04a
@@ -0,0 +1,30 @@
+---
+configs:
+  - queue-5.4:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_54
+    ref: "queue/5.4"
+    help: "Pull the queue/5.4 branch."
+  - queue-5.10:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_510
+    ref: "queue/5.10"
+    help: "Pull the queue/5.10 branch."
+  - queue-5.15:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_515
+    ref: "queue/5.15"
+    help: "Pull the queue/5.15 branch."
+  - queue-6.1:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_61
+    ref: "queue/6.1"
+    help: "Pull the queue/6.1 branch."
+  - queue-6.6:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_66
+    ref: "queue/6.6"
+    help: "Pull the queue/6.6 branch."
+  - queue-6.12:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_612
+    ref: "queue/6.12"
+    help: "Pull the queue/6.12 branch."
+  - queue-6.13:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_613
+    ref: "queue/6.13"
+    help: "Pull the queue/6.13 branch."
Signature · 1 line
2.48.1
#3 lore raw

Re: [RFC PATCH 2/2] Add the stable release candidate repo to the Linux git repos menu

Quoted 54 lines · On Wed, Mar 12, 2025 at 02:50:01PM +0100, [email protected] wrote:

From: Chuck Lever <[email protected]>

I have several nightly test runners that pull LTS release candidates for testing. I have to hand-edit the Kconfig for each test runner when switching from the master repo to a local mirror.

I would like to get those to switch automatically over to using a local mirror, when one is available.

---
 kconfigs/workflows/Kconfig.bootlinux          |  4 ++
 scripts/gen-refs-default.Makefile             | 14 ++++-
 scripts/gen-refs-user.Makefile                | 18 +++++-
 workflows/linux/Kconfig                       |  9 +++
 workflows/linux/Kconfig.stable_rc             | 31 ++++++++++
 .../linux/refs/default/Kconfig.stable_rc      | 56 +++++++++++++++++++
 workflows/linux/refs/static/stable_rc.yaml    | 30 ++++++++++
 7 files changed, 158 insertions(+), 4 deletions(-)
 create mode 100644 workflows/linux/Kconfig.stable_rc
 create mode 100644 workflows/linux/refs/default/Kconfig.stable_rc
 create mode 100644 workflows/linux/refs/static/stable_rc.yaml
kconfigs/workflows/Kconfig.bootlinux +4 -0
index 25bbe4ea7e47..a66e44ee8cb7 100644
@@ -12,6 +12,10 @@ config HAVE_BOOTLINUX_TREE_STABLE_USER_REFS
 	bool
 	default $(shell, scripts/check_file_empty.sh workflows/linux/refs/user/Kconfig.stable)
 
+config HAVE_BOOTLINUX_TREE_STABLE_RC_USER_REFS
+	bool
+	default $(shell, scripts/check_file_empty.sh workflows/linux/refs/user/Kconfig.stable_rc)
+
 config HAVE_BOOTLINUX_TREE_MCGROF_LINUS_USER_REFS
 	bool
 	default $(shell, scripts/check_file_empty.sh workflows/linux/refs/user/Kconfig.mcgrof-linus)
scripts/gen-refs-default.Makefile +2 -2
index c5d12e152cb4..b50e7c26e754 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: copyleft-next-0.3.1
 
-REF_DEF_OBJS := $(addprefix $(TOPDIR)/workflows/linux/refs/default/, Kconfig.linus Kconfig.next Kconfig.stable)
-REF_DEF_SRC  := $(addprefix $(TOPDIR)/workflows/linux/refs/static/,  linus.yaml next.yaml stable.yaml)
+REF_DEF_OBJS := $(addprefix $(TOPDIR)/workflows/linux/refs/default/, Kconfig.linus Kconfig.next Kconfig.stable Kconfig.stable_rc)
+REF_DEF_SRC  := $(addprefix $(TOPDIR)/workflows/linux/refs/static/,  linus.yaml next.yaml stable.yaml stable_rc.yaml)
 
 KRELEASES_FORCE := $(if $(filter --force,$(KRELEASES_FORCE)),--force,)
 
@@ -35,6 +35,16 @@ $(TOPDIR)/workflows/linux/refs/default/Kconfig.stable: $(TOPDIR)/workflows/linux
 		kreleases \

scripts/gen-refs-default.Makefile $(TOPDIR)/workflows/linux/refs/default/Kconfig.stable: $(TOPDIR)/workflows/linux · line 45

Quoted 10 lines
scripts/gen-refs-default.Makefile +8 -0
 		--moniker stable
 
+$(TOPDIR)/workflows/linux/refs/default/Kconfig.stable_rc: $(TOPDIR)/workflows/linux/refs/static/stable_rc.yaml
+	$(Q)$(E) "Generating $@..."
+	$(Q)./scripts/generate_refs.py \
+		--prefix BOOTLINUX_TREE_STABLE_RC \
+		--output workflows/linux/refs/default/Kconfig.stable_rc \
+		--extra workflows/linux/refs/static/stable_rc.yaml \
+		$(KRELEASES_FORCE) \
+		kreleases \

I think you need gitref instead of kreleases subcommand. kreleases pulls information from https://kernel.org/releases.json, and I don't see stable_rc moniker being part of it, right?

That may explain why is not generating the configs properly.

Then, the right location for this should be: scripts/gen-refs-user.Makefile as stable-rc tree is not part of the official kernel.org releases.

Posting the generate_refs help for subcommand context:

python3 ./scripts/generate_refs.py -h
usage: generate_refs.py [-h] [--debug] --output OUTPUT [--force] --prefix PREFIX [--extra EXTRA] {gitref,kreleases} ...

Git Reference generate tool

options:

  -h, --help          show this help message and exit
  --debug             debug
  --output OUTPUT     output file
  --force             always generate output file
  --prefix PREFIX     the Kconfig CONFIG prefix to use (e.g. BOOTLINUX_TREE_LINUS)
  --extra EXTRA       extra configs (yaml)

subcommands:
valid subcommands

  {gitref,kreleases}  additional help
    gitref            git-ref tool (git-ls-remote)
    kreleases         kernel.org/releases.json

Daniel

Quoted 241 lines
scripts/gen-refs-default.Makefile +2 -0
+		--moniker stable_rc
+
 PHONY += refs-default
 refs-default: $(REF_DEF_OBJS) _gen-default-refs-development refs-user-clean
 
scripts/gen-refs-user.Makefile +16 -2
index 5c5df2f5417e..ed07b2df6d35 100644
@@ -3,6 +3,7 @@
 SRC_URI_HTTPS_LINUS = https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
 SRC_URI_HTTPS_NEXT = https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
 SRC_URI_HTTPS_STABLE = https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
+SRC_URI_HTTPS_STABLE_RC = https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
 
 SRC_URI_HTTPS_MCGROF_LINUS = https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git
 SRC_URI_HTTPS_MCGROF_NEXT = https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
@@ -17,6 +18,7 @@ SRC_URI_HTTPS_XFS = https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git
 REFS_TARGET_LINUS := gen_refs_linus
 REFS_TARGET_NEXT := gen_refs_next
 REFS_TARGET_STABLE := gen_refs_stable
+REFS_TARGET_STABLE_RC := gen_refs_stable_rc
 
 REFS_TARGET_DEVELOPMENT := gen_refs_mcgrof_linus
 REFS_TARGET_DEVELOPMENT += gen_refs_mcgrof_next
@@ -68,6 +70,18 @@ gen_refs_stable:
 		--repo $(SRC_URI_HTTPS_STABLE) \
 		--refs $(REFS_COUNT)
 
+PHONY += gen_refs_stable_rc
+gen_refs_stable_rc:
+	$(Q)$(E) "Generating refs/$(REFS_DIR)/Kconfig.$(subst _,-,$(patsubst gen_refs_%,%,$@)) ($(REFS_COUNT) refs)..."
+	$(Q)./scripts/generate_refs.py \
+		--prefix BOOTLINUX_TREE_STABLE_RC \
+		--output workflows/linux/refs/$(REFS_DIR)/Kconfig.stable_rc \
+		--extra workflows/linux/refs/static/stable_rc.yaml \
+		--force \
+		gitref \
+		--repo $(SRC_URI_HTTPS_STABLE_RC) \
+		--refs $(REFS_COUNT)
+
 PHONY += gen_refs_mcgrof_linus
 gen_refs_mcgrof_linus:
 	$(Q)$(E) "Generating refs/$(REFS_DIR)/Kconfig.$(subst _,-,$(patsubst gen_refs_%,%,$@)) ($(REFS_COUNT) refs)..."
@@ -183,8 +197,8 @@ refs-user-clean:
 	fi
 
 _gen-user-refs:
-	$(Q)$(E) "Generating refs/user/Kconfig.{linus,next,stable,mcgrof-linus,mcgrof-next,btrfs-devel,cel-linux-jlayton-linux-kdevops-linus} files..."
-	$(Q)$(MAKE) REFS_COUNT=15 REFS_DIR="user" $(REFS_TARGET_LINUS) $(REFS_TARGET_NEXT) $(REFS_TARGET_STABLE) $(REFS_TARGET_DEVELOPMENT)
+	$(Q)$(E) "Generating refs/user/Kconfig.{linus,next,stable,stable_rc,mcgrof-linus,mcgrof-next,btrfs-devel,cel-linux-jlayton-linux-kdevops-linus} files..."
+	$(Q)$(MAKE) REFS_COUNT=15 REFS_DIR="user" $(REFS_TARGET_LINUS) $(REFS_TARGET_NEXT) $(REFS_TARGET_STABLE) $(REFS_TARGET_STABLE_RC) $(REFS_TARGET_DEVELOPMENT)
 
 PHONY += refs-user
 refs-user: _gen-user-refs
workflows/linux/Kconfig +9 -0
index 6b496c56c762..8c4de4cc8ee2 100644
@@ -126,6 +126,11 @@ config BOOTLINUX_STABLE
 	help
 	  This will let you choose from stable Linux trees only.
 
+config BOOTLINUX_STABLE_RC
+	bool "Stable Linux release candidates"
+	help
+	  This will let you choose from stable Linux release candidates only.
+
 config BOOTLINUX_DEV
 	bool "Development Linux releases"
 	help
@@ -141,6 +146,7 @@ endchoice
 
 source "workflows/linux/Kconfig.linus"
 source "workflows/linux/Kconfig.stable"
+source "workflows/linux/Kconfig.stable_rc"
 source "workflows/linux/Kconfig.dev"
 source "workflows/linux/Kconfig.modules"
 source "workflows/linux/Kconfig.next"
@@ -185,6 +191,7 @@ config BOOTLINUX_TREE_NAME
 	string
 	default BOOTLINUX_TREE_LINUS_NAME if BOOTLINUX_TREE_LINUS
 	default BOOTLINUX_TREE_STABLE_NAME if BOOTLINUX_TREE_STABLE
+	default BOOTLINUX_TREE_STABLE_RC_NAME if BOOTLINUX_TREE_STABLE_RC
 	default BOOTLINUX_TREE_NEXT_NAME if BOOTLINUX_TREE_NEXT
 	default BOOTLINUX_TREE_BTRFS_DEVEL_NAME if BOOTLINUX_TREE_BTRFS_DEVEL
 	default BOOTLINUX_TREE_KDEVOPS_NAME if BOOTLINUX_TREE_KDEVOPS_LINUS
@@ -200,6 +207,7 @@ config BOOTLINUX_TREE
 	string
 	default BOOTLINUX_TREE_LINUS_URL if BOOTLINUX_TREE_LINUS
 	default BOOTLINUX_TREE_STABLE_URL if BOOTLINUX_TREE_STABLE
+	default BOOTLINUX_TREE_STABLE_RC_URL if BOOTLINUX_TREE_STABLE_RC
 	default BOOTLINUX_TREE_NEXT_URL if BOOTLINUX_TREE_NEXT
 	default BOOTLINUX_TREE_MCGROF_URL if BOOTLINUX_TREE_MCGROF
 	default BOOTLINUX_TREE_MODULES_URL if BOOTLINUX_TREE_MODULES
@@ -248,6 +256,7 @@ config BOOTLINUX_TREE_REF
 	string
 	default BOOTLINUX_TREE_LINUS_REF if BOOTLINUX_TREE_LINUS
 	default BOOTLINUX_TREE_STABLE_REF if BOOTLINUX_STABLE
+	default BOOTLINUX_TREE_STABLE_RC_REF if BOOTLINUX_STABLE_RC
 	default BOOTLINUX_TREE_NEXT_REF if BOOTLINUX_TREE_NEXT
 	default BOOTLINUX_TREE_VFS_REF if BOOTLINUX_TREE_VFS
 	default BOOTLINUX_TREE_XFS_REF if BOOTLINUX_TREE_XFS
workflows/linux/Kconfig.stable_rc new file +31 -0
new file mode 100644
index 000000000000..8bcb7a2fba61
@@ -0,0 +1,31 @@
+if BOOTLINUX_STABLE_RC
+
+choice
+	prompt "Linux stable release candidate tree to use"
+	default BOOTLINUX_TREE_STABLE_RC
+
+config BOOTLINUX_TREE_STABLE_RC
+	bool "linux-stable-rc"
+	help
+	  Use the linux-stable release candidate tree.
+
+endchoice
+
+if BOOTLINUX_TREE_STABLE_RC
+
+source "workflows/linux/refs/default/Kconfig.stable_rc"
+source "workflows/linux/refs/user/Kconfig.stable_rc"
+
+endif # BOOTLINUX_TREE_STABLE_RC
+
+config BOOTLINUX_TREE_STABLE_RC_NAME
+	string
+	default "linux-stable-rc" if BOOTLINUX_TREE_STABLE_RC
+
+config BOOTLINUX_TREE_STABLE_RC_URL
+	string
+	default DEFAULT_STABLE_RC_HTTPS_URL if !USE_LOCAL_LINUX_MIRROR
+	default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/linux-stable-rc.git) if USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS
+	default "/mirror/linux-stable-rc.git" if USE_LIBVIRT_MIRROR && BOOTLINUX_9P
+
+endif # BOOTLINUX_STABLE_RC
workflows/linux/refs/default/Kconfig.stable_rc new file +56 -0
new file mode 100644
index 000000000000..84495567d280
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: copyleft-next-0.3.1
+# Automatically generated file
+
+if !HAVE_BOOTLINUX_TREE_STABLE_RC_USER_REFS
+
+choice
+	prompt "Tag or branch to use"
+
+config BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_54
+	bool "queue/5.4"
+	help
+	  Pull the queue/5.4 branch.
+
+config BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_510
+	bool "queue/5.10"
+	help
+	  Pull the queue/5.10 branch.
+
+config BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_515
+	bool "queue/5.15"
+	help
+	  Pull the queue/5.15 branch.
+
+config BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_61
+	bool "queue/6.1"
+	help
+	  Pull the queue/6.1 branch.
+
+config BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_66
+	bool "queue/6.6"
+	help
+	  Pull the queue/6.6 branch.
+
+config BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_612
+	bool "queue/6.12"
+	help
+	  Pull the queue/6.12 branch.
+
+config BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_613
+	bool "queue/6.13"
+	help
+	  Pull the queue/6.13 branch.
+
+endchoice
+
+config BOOTLINUX_TREE_STABLE_RC_REF
+	string
+	default "queue/5.4" if BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_54
+	default "queue/5.10" if BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_510
+	default "queue/5.15" if BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_515
+	default "queue/6.1" if BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_61
+	default "queue/6.6" if BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_66
+	default "queue/6.12" if BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_612
+	default "queue/6.13" if BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_613
+
+endif # !HAVE_BOOTLINUX_TREE_STABLE_RC_USER_REFS
workflows/linux/refs/static/stable_rc.yaml new file +30 -0
new file mode 100644
index 000000000000..a7d82977a04a
@@ -0,0 +1,30 @@
+---
+configs:
+  - queue-5.4:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_54
+    ref: "queue/5.4"
+    help: "Pull the queue/5.4 branch."
+  - queue-5.10:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_510
+    ref: "queue/5.10"
+    help: "Pull the queue/5.10 branch."
+  - queue-5.15:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_515
+    ref: "queue/5.15"
+    help: "Pull the queue/5.15 branch."
+  - queue-6.1:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_61
+    ref: "queue/6.1"
+    help: "Pull the queue/6.1 branch."
+  - queue-6.6:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_66
+    ref: "queue/6.6"
+    help: "Pull the queue/6.6 branch."
+  - queue-6.12:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_612
+    ref: "queue/6.12"
+    help: "Pull the queue/6.12 branch."
+  - queue-6.13:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_613
+    ref: "queue/6.13"
+    help: "Pull the queue/6.13 branch."
Signature · 1 line
2.48.1
#4 lore raw

Re: [RFC PATCH 2/2] Add the stable release candidate repo to the Linux git repos menu

Quoted 70 lines · Daniel Gomez
Quoted 54 lines · On Wed, Mar 12, 2025 at 02:50:01PM +0100, [email protected] wrote:

From: Chuck Lever <[email protected]>

I have several nightly test runners that pull LTS release candidates for testing. I have to hand-edit the Kconfig for each test runner when switching from the master repo to a local mirror.

I would like to get those to switch automatically over to using a local mirror, when one is available.

---
 kconfigs/workflows/Kconfig.bootlinux          |  4 ++
 scripts/gen-refs-default.Makefile             | 14 ++++-
 scripts/gen-refs-user.Makefile                | 18 +++++-
 workflows/linux/Kconfig                       |  9 +++
 workflows/linux/Kconfig.stable_rc             | 31 ++++++++++
 .../linux/refs/default/Kconfig.stable_rc      | 56 +++++++++++++++++++
 workflows/linux/refs/static/stable_rc.yaml    | 30 ++++++++++
 7 files changed, 158 insertions(+), 4 deletions(-)
 create mode 100644 workflows/linux/Kconfig.stable_rc
 create mode 100644 workflows/linux/refs/default/Kconfig.stable_rc
 create mode 100644 workflows/linux/refs/static/stable_rc.yaml
kconfigs/workflows/Kconfig.bootlinux +4 -0
index 25bbe4ea7e47..a66e44ee8cb7 100644
@@ -12,6 +12,10 @@ config HAVE_BOOTLINUX_TREE_STABLE_USER_REFS
 	bool
 	default $(shell, scripts/check_file_empty.sh workflows/linux/refs/user/Kconfig.stable)
 
+config HAVE_BOOTLINUX_TREE_STABLE_RC_USER_REFS
+	bool
+	default $(shell, scripts/check_file_empty.sh workflows/linux/refs/user/Kconfig.stable_rc)
+
 config HAVE_BOOTLINUX_TREE_MCGROF_LINUS_USER_REFS
 	bool
 	default $(shell, scripts/check_file_empty.sh workflows/linux/refs/user/Kconfig.mcgrof-linus)
scripts/gen-refs-default.Makefile +2 -2
index c5d12e152cb4..b50e7c26e754 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: copyleft-next-0.3.1
 
-REF_DEF_OBJS := $(addprefix $(TOPDIR)/workflows/linux/refs/default/, Kconfig.linus Kconfig.next Kconfig.stable)
-REF_DEF_SRC  := $(addprefix $(TOPDIR)/workflows/linux/refs/static/,  linus.yaml next.yaml stable.yaml)
+REF_DEF_OBJS := $(addprefix $(TOPDIR)/workflows/linux/refs/default/, Kconfig.linus Kconfig.next Kconfig.stable Kconfig.stable_rc)
+REF_DEF_SRC  := $(addprefix $(TOPDIR)/workflows/linux/refs/static/,  linus.yaml next.yaml stable.yaml stable_rc.yaml)
 
 KRELEASES_FORCE := $(if $(filter --force,$(KRELEASES_FORCE)),--force,)
 
@@ -35,6 +35,16 @@ $(TOPDIR)/workflows/linux/refs/default/Kconfig.stable: $(TOPDIR)/workflows/linux
 		kreleases \

scripts/gen-refs-default.Makefile $(TOPDIR)/workflows/linux/refs/default/Kconfig.stable: $(TOPDIR)/workflows/linux · line 45

Quoted 10 lines
scripts/gen-refs-default.Makefile +8 -0
 		--moniker stable
 
+$(TOPDIR)/workflows/linux/refs/default/Kconfig.stable_rc: $(TOPDIR)/workflows/linux/refs/static/stable_rc.yaml
+	$(Q)$(E) "Generating $@..."
+	$(Q)./scripts/generate_refs.py \
+		--prefix BOOTLINUX_TREE_STABLE_RC \
+		--output workflows/linux/refs/default/Kconfig.stable_rc \
+		--extra workflows/linux/refs/static/stable_rc.yaml \
+		$(KRELEASES_FORCE) \
+		kreleases \

I think you need gitref instead of kreleases subcommand. kreleases pulls information from https://kernel.org/releases.json, and I don't see stable_rc moniker being part of it, right?

Quoted 4 lines

That may explain why is not generating the configs properly.

Then, the right location for this should be: scripts/gen-refs-user.Makefile as stable-rc tree is not part of the official kernel.org releases.

The next hunk below adds your recommended set-up to gen-refs-user. I think what you're saying is that the gen-refs-default hunk should be dropped, and I should rely on "make user-refs" instead of "make default-refs" to populate the linux-stable-rc menu... ?

(no objection to that, I just am not yet sure of how this works)

Quoted 265 lines

Posting the generate_refs help for subcommand context:

python3 ./scripts/generate_refs.py -h
usage: generate_refs.py [-h] [--debug] --output OUTPUT [--force] --prefix PREFIX [--extra EXTRA] {gitref,kreleases} ...

Git Reference generate tool

options:

  -h, --help          show this help message and exit
  --debug             debug
  --output OUTPUT     output file
  --force             always generate output file
  --prefix PREFIX     the Kconfig CONFIG prefix to use (e.g. BOOTLINUX_TREE_LINUS)
  --extra EXTRA       extra configs (yaml)

subcommands:
valid subcommands

  {gitref,kreleases}  additional help
    gitref            git-ref tool (git-ls-remote)
    kreleases         kernel.org/releases.json

Daniel

Quoted 241 lines
scripts/gen-refs-default.Makefile +2 -0
+		--moniker stable_rc
+
 PHONY += refs-default
 refs-default: $(REF_DEF_OBJS) _gen-default-refs-development refs-user-clean
 
scripts/gen-refs-user.Makefile +16 -2
index 5c5df2f5417e..ed07b2df6d35 100644
@@ -3,6 +3,7 @@
 SRC_URI_HTTPS_LINUS = https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
 SRC_URI_HTTPS_NEXT = https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
 SRC_URI_HTTPS_STABLE = https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
+SRC_URI_HTTPS_STABLE_RC = https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
 
 SRC_URI_HTTPS_MCGROF_LINUS = https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git
 SRC_URI_HTTPS_MCGROF_NEXT = https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
@@ -17,6 +18,7 @@ SRC_URI_HTTPS_XFS = https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git
 REFS_TARGET_LINUS := gen_refs_linus
 REFS_TARGET_NEXT := gen_refs_next
 REFS_TARGET_STABLE := gen_refs_stable
+REFS_TARGET_STABLE_RC := gen_refs_stable_rc
 
 REFS_TARGET_DEVELOPMENT := gen_refs_mcgrof_linus
 REFS_TARGET_DEVELOPMENT += gen_refs_mcgrof_next
@@ -68,6 +70,18 @@ gen_refs_stable:
 		--repo $(SRC_URI_HTTPS_STABLE) \
 		--refs $(REFS_COUNT)
 
+PHONY += gen_refs_stable_rc
+gen_refs_stable_rc:
+	$(Q)$(E) "Generating refs/$(REFS_DIR)/Kconfig.$(subst _,-,$(patsubst gen_refs_%,%,$@)) ($(REFS_COUNT) refs)..."
+	$(Q)./scripts/generate_refs.py \
+		--prefix BOOTLINUX_TREE_STABLE_RC \
+		--output workflows/linux/refs/$(REFS_DIR)/Kconfig.stable_rc \
+		--extra workflows/linux/refs/static/stable_rc.yaml \
+		--force \
+		gitref \
+		--repo $(SRC_URI_HTTPS_STABLE_RC) \
+		--refs $(REFS_COUNT)
+
 PHONY += gen_refs_mcgrof_linus
 gen_refs_mcgrof_linus:
 	$(Q)$(E) "Generating refs/$(REFS_DIR)/Kconfig.$(subst _,-,$(patsubst gen_refs_%,%,$@)) ($(REFS_COUNT) refs)..."
@@ -183,8 +197,8 @@ refs-user-clean:
 	fi
 
 _gen-user-refs:
-	$(Q)$(E) "Generating refs/user/Kconfig.{linus,next,stable,mcgrof-linus,mcgrof-next,btrfs-devel,cel-linux-jlayton-linux-kdevops-linus} files..."
-	$(Q)$(MAKE) REFS_COUNT=15 REFS_DIR="user" $(REFS_TARGET_LINUS) $(REFS_TARGET_NEXT) $(REFS_TARGET_STABLE) $(REFS_TARGET_DEVELOPMENT)
+	$(Q)$(E) "Generating refs/user/Kconfig.{linus,next,stable,stable_rc,mcgrof-linus,mcgrof-next,btrfs-devel,cel-linux-jlayton-linux-kdevops-linus} files..."
+	$(Q)$(MAKE) REFS_COUNT=15 REFS_DIR="user" $(REFS_TARGET_LINUS) $(REFS_TARGET_NEXT) $(REFS_TARGET_STABLE) $(REFS_TARGET_STABLE_RC) $(REFS_TARGET_DEVELOPMENT)
 
 PHONY += refs-user
 refs-user: _gen-user-refs
workflows/linux/Kconfig +9 -0
index 6b496c56c762..8c4de4cc8ee2 100644
@@ -126,6 +126,11 @@ config BOOTLINUX_STABLE
 	help
 	  This will let you choose from stable Linux trees only.
 
+config BOOTLINUX_STABLE_RC
+	bool "Stable Linux release candidates"
+	help
+	  This will let you choose from stable Linux release candidates only.
+
 config BOOTLINUX_DEV
 	bool "Development Linux releases"
 	help
@@ -141,6 +146,7 @@ endchoice
 
 source "workflows/linux/Kconfig.linus"
 source "workflows/linux/Kconfig.stable"
+source "workflows/linux/Kconfig.stable_rc"
 source "workflows/linux/Kconfig.dev"
 source "workflows/linux/Kconfig.modules"
 source "workflows/linux/Kconfig.next"
@@ -185,6 +191,7 @@ config BOOTLINUX_TREE_NAME
 	string
 	default BOOTLINUX_TREE_LINUS_NAME if BOOTLINUX_TREE_LINUS
 	default BOOTLINUX_TREE_STABLE_NAME if BOOTLINUX_TREE_STABLE
+	default BOOTLINUX_TREE_STABLE_RC_NAME if BOOTLINUX_TREE_STABLE_RC
 	default BOOTLINUX_TREE_NEXT_NAME if BOOTLINUX_TREE_NEXT
 	default BOOTLINUX_TREE_BTRFS_DEVEL_NAME if BOOTLINUX_TREE_BTRFS_DEVEL
 	default BOOTLINUX_TREE_KDEVOPS_NAME if BOOTLINUX_TREE_KDEVOPS_LINUS
@@ -200,6 +207,7 @@ config BOOTLINUX_TREE
 	string
 	default BOOTLINUX_TREE_LINUS_URL if BOOTLINUX_TREE_LINUS
 	default BOOTLINUX_TREE_STABLE_URL if BOOTLINUX_TREE_STABLE
+	default BOOTLINUX_TREE_STABLE_RC_URL if BOOTLINUX_TREE_STABLE_RC
 	default BOOTLINUX_TREE_NEXT_URL if BOOTLINUX_TREE_NEXT
 	default BOOTLINUX_TREE_MCGROF_URL if BOOTLINUX_TREE_MCGROF
 	default BOOTLINUX_TREE_MODULES_URL if BOOTLINUX_TREE_MODULES
@@ -248,6 +256,7 @@ config BOOTLINUX_TREE_REF
 	string
 	default BOOTLINUX_TREE_LINUS_REF if BOOTLINUX_TREE_LINUS
 	default BOOTLINUX_TREE_STABLE_REF if BOOTLINUX_STABLE
+	default BOOTLINUX_TREE_STABLE_RC_REF if BOOTLINUX_STABLE_RC
 	default BOOTLINUX_TREE_NEXT_REF if BOOTLINUX_TREE_NEXT
 	default BOOTLINUX_TREE_VFS_REF if BOOTLINUX_TREE_VFS
 	default BOOTLINUX_TREE_XFS_REF if BOOTLINUX_TREE_XFS
workflows/linux/Kconfig.stable_rc new file +31 -0
new file mode 100644
index 000000000000..8bcb7a2fba61
@@ -0,0 +1,31 @@
+if BOOTLINUX_STABLE_RC
+
+choice
+	prompt "Linux stable release candidate tree to use"
+	default BOOTLINUX_TREE_STABLE_RC
+
+config BOOTLINUX_TREE_STABLE_RC
+	bool "linux-stable-rc"
+	help
+	  Use the linux-stable release candidate tree.
+
+endchoice
+
+if BOOTLINUX_TREE_STABLE_RC
+
+source "workflows/linux/refs/default/Kconfig.stable_rc"
+source "workflows/linux/refs/user/Kconfig.stable_rc"
+
+endif # BOOTLINUX_TREE_STABLE_RC
+
+config BOOTLINUX_TREE_STABLE_RC_NAME
+	string
+	default "linux-stable-rc" if BOOTLINUX_TREE_STABLE_RC
+
+config BOOTLINUX_TREE_STABLE_RC_URL
+	string
+	default DEFAULT_STABLE_RC_HTTPS_URL if !USE_LOCAL_LINUX_MIRROR
+	default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/linux-stable-rc.git) if USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS
+	default "/mirror/linux-stable-rc.git" if USE_LIBVIRT_MIRROR && BOOTLINUX_9P
+
+endif # BOOTLINUX_STABLE_RC
workflows/linux/refs/default/Kconfig.stable_rc new file +56 -0
new file mode 100644
index 000000000000..84495567d280
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: copyleft-next-0.3.1
+# Automatically generated file
+
+if !HAVE_BOOTLINUX_TREE_STABLE_RC_USER_REFS
+
+choice
+	prompt "Tag or branch to use"
+
+config BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_54
+	bool "queue/5.4"
+	help
+	  Pull the queue/5.4 branch.
+
+config BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_510
+	bool "queue/5.10"
+	help
+	  Pull the queue/5.10 branch.
+
+config BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_515
+	bool "queue/5.15"
+	help
+	  Pull the queue/5.15 branch.
+
+config BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_61
+	bool "queue/6.1"
+	help
+	  Pull the queue/6.1 branch.
+
+config BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_66
+	bool "queue/6.6"
+	help
+	  Pull the queue/6.6 branch.
+
+config BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_612
+	bool "queue/6.12"
+	help
+	  Pull the queue/6.12 branch.
+
+config BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_613
+	bool "queue/6.13"
+	help
+	  Pull the queue/6.13 branch.
+
+endchoice
+
+config BOOTLINUX_TREE_STABLE_RC_REF
+	string
+	default "queue/5.4" if BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_54
+	default "queue/5.10" if BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_510
+	default "queue/5.15" if BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_515
+	default "queue/6.1" if BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_61
+	default "queue/6.6" if BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_66
+	default "queue/6.12" if BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_612
+	default "queue/6.13" if BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_613
+
+endif # !HAVE_BOOTLINUX_TREE_STABLE_RC_USER_REFS
workflows/linux/refs/static/stable_rc.yaml new file +30 -0
new file mode 100644
index 000000000000..a7d82977a04a
@@ -0,0 +1,30 @@
+---
+configs:
+  - queue-5.4:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_54
+    ref: "queue/5.4"
+    help: "Pull the queue/5.4 branch."
+  - queue-5.10:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_510
+    ref: "queue/5.10"
+    help: "Pull the queue/5.10 branch."
+  - queue-5.15:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_515
+    ref: "queue/5.15"
+    help: "Pull the queue/5.15 branch."
+  - queue-6.1:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_61
+    ref: "queue/6.1"
+    help: "Pull the queue/6.1 branch."
+  - queue-6.6:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_66
+    ref: "queue/6.6"
+    help: "Pull the queue/6.6 branch."
+  - queue-6.12:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_612
+    ref: "queue/6.12"
+    help: "Pull the queue/6.12 branch."
+  - queue-6.13:
+    config: BOOTLINUX_TREE_STABLE_RC_REF_QUEUE_613
+    ref: "queue/6.13"
+    help: "Pull the queue/6.13 branch."
Signature · 1 line
2.48.1
Signature · 1 line
Chuck Lever
#5 lore raw

Re: [RFC PATCH 2/2] Add the stable release candidate repo to the Linux git repos menu

Quoted 71 lines · Chuck Lever
Quoted 70 lines · Daniel Gomez
Quoted 54 lines · On Wed, Mar 12, 2025 at 02:50:01PM +0100, [email protected] wrote:

From: Chuck Lever <[email protected]>

I have several nightly test runners that pull LTS release candidates for testing. I have to hand-edit the Kconfig for each test runner when switching from the master repo to a local mirror.

I would like to get those to switch automatically over to using a local mirror, when one is available.

---
 kconfigs/workflows/Kconfig.bootlinux          |  4 ++
 scripts/gen-refs-default.Makefile             | 14 ++++-
 scripts/gen-refs-user.Makefile                | 18 +++++-
 workflows/linux/Kconfig                       |  9 +++
 workflows/linux/Kconfig.stable_rc             | 31 ++++++++++
 .../linux/refs/default/Kconfig.stable_rc      | 56 +++++++++++++++++++
 workflows/linux/refs/static/stable_rc.yaml    | 30 ++++++++++
 7 files changed, 158 insertions(+), 4 deletions(-)
 create mode 100644 workflows/linux/Kconfig.stable_rc
 create mode 100644 workflows/linux/refs/default/Kconfig.stable_rc
 create mode 100644 workflows/linux/refs/static/stable_rc.yaml
kconfigs/workflows/Kconfig.bootlinux +4 -0
index 25bbe4ea7e47..a66e44ee8cb7 100644
@@ -12,6 +12,10 @@ config HAVE_BOOTLINUX_TREE_STABLE_USER_REFS
 	bool
 	default $(shell, scripts/check_file_empty.sh workflows/linux/refs/user/Kconfig.stable)
 
+config HAVE_BOOTLINUX_TREE_STABLE_RC_USER_REFS
+	bool
+	default $(shell, scripts/check_file_empty.sh workflows/linux/refs/user/Kconfig.stable_rc)
+
 config HAVE_BOOTLINUX_TREE_MCGROF_LINUS_USER_REFS
 	bool
 	default $(shell, scripts/check_file_empty.sh workflows/linux/refs/user/Kconfig.mcgrof-linus)
scripts/gen-refs-default.Makefile +2 -2
index c5d12e152cb4..b50e7c26e754 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: copyleft-next-0.3.1
 
-REF_DEF_OBJS := $(addprefix $(TOPDIR)/workflows/linux/refs/default/, Kconfig.linus Kconfig.next Kconfig.stable)
-REF_DEF_SRC  := $(addprefix $(TOPDIR)/workflows/linux/refs/static/,  linus.yaml next.yaml stable.yaml)
+REF_DEF_OBJS := $(addprefix $(TOPDIR)/workflows/linux/refs/default/, Kconfig.linus Kconfig.next Kconfig.stable Kconfig.stable_rc)
+REF_DEF_SRC  := $(addprefix $(TOPDIR)/workflows/linux/refs/static/,  linus.yaml next.yaml stable.yaml stable_rc.yaml)
 
 KRELEASES_FORCE := $(if $(filter --force,$(KRELEASES_FORCE)),--force,)
 
@@ -35,6 +35,16 @@ $(TOPDIR)/workflows/linux/refs/default/Kconfig.stable: $(TOPDIR)/workflows/linux
 		kreleases \

scripts/gen-refs-default.Makefile $(TOPDIR)/workflows/linux/refs/default/Kconfig.stable: $(TOPDIR)/workflows/linux · line 45

Quoted 10 lines
scripts/gen-refs-default.Makefile +8 -0
 		--moniker stable
 
+$(TOPDIR)/workflows/linux/refs/default/Kconfig.stable_rc: $(TOPDIR)/workflows/linux/refs/static/stable_rc.yaml
+	$(Q)$(E) "Generating $@..."
+	$(Q)./scripts/generate_refs.py \
+		--prefix BOOTLINUX_TREE_STABLE_RC \
+		--output workflows/linux/refs/default/Kconfig.stable_rc \
+		--extra workflows/linux/refs/static/stable_rc.yaml \
+		$(KRELEASES_FORCE) \
+		kreleases \

I think you need gitref instead of kreleases subcommand. kreleases pulls information from https://kernel.org/releases.json, and I don't see stable_rc moniker being part of it, right?

Quoted 8 lines
Quoted 4 lines

That may explain why is not generating the configs properly.

Then, the right location for this should be: scripts/gen-refs-user.Makefile as stable-rc tree is not part of the official kernel.org releases.

The next hunk below adds your recommended set-up to gen-refs-user. I think what you're saying is that the gen-refs-default hunk should be dropped,

Yes

Quoted 2 lines

and I should rely on "make user-refs" instead of "make default-refs" to populate the linux-stable-rc menu... ?

I see this may be confusing the way I split these 2 files. To clarify the question, gen-refs-user.Makefile works for both default and user modes. We can rename this later for better clarity.

So moving the hunk but changing a few things. See below.

Quoted 2 lines

(no objection to that, I just am not yet sure of how this works)

Adding stable_rc to the _gen-default-refs-development Makefile target would generate stable_rc config for default mode with make refs-default. Generate and push are the steps here (more detailed description in docs "Default Default References for Development trees: Static References").

Adding stable_rc to _gen-user-refs would generate stable_rc config for user mode with make refs-user (more in docs "User References: Generating User Git References").

scripts/gen-refs-default.Makefile +0 -10
index b50e7c2..0ef1d67 100644
@@ -35,16 +35,6 @@ $(TOPDIR)/workflows/linux/refs/default/Kconfig.stable: $(TOPDIR)/workflows/linux
                kreleases \
                --moniker stable
 
-$(TOPDIR)/workflows/linux/refs/default/Kconfig.stable_rc: $(TOPDIR)/workflows/linux/refs/static/stable_rc.yaml
-       $(Q)$(E) "Generating $@..."
-       $(Q)./scripts/generate_refs.py \
-               --prefix BOOTLINUX_TREE_STABLE_RC \
-               --output workflows/linux/refs/default/Kconfig.stable_rc \
-               --extra workflows/linux/refs/static/stable_rc.yaml \
-               $(KRELEASES_FORCE) \
-               kreleases \
-               --moniker stable_rc
-
 PHONY += refs-default
 refs-default: $(REF_DEF_OBJS) _gen-default-refs-development refs-user-clean
 
scripts/gen-refs-user.Makefile +15 -2
index ed07b2d..67f4a0b 100644
@@ -10,6 +10,7 @@ SRC_URI_HTTPS_MCGROF_NEXT = https://git.kernel.org/pub/scm/linux/kernel/git/mcgr
 SRC_URI_HTTPS_MODULES = https://git.kernel.org/pub/scm/linux/kernel/git/modules/linux.git
 SRC_URI_HTTPS_BTRFS_DEVEL = https://github.com/kdave/btrfs-devel.git
 SRC_URI_HTTPS_CEL_LINUX = https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git
+SRC_URI_HTTPS_STABLE_RC = https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
 SRC_URI_HTTPS_JLAYTON_LINUX = https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git
 SRC_URI_HTTPS_KDEVOPS_LINUS = https://github.com/linux-kdevops/linux.git
 SRC_URI_HTTPS_VFS = https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
@@ -142,6 +143,18 @@ gen_refs_cel_linux:
                --repo $(SRC_URI_HTTPS_CEL_LINUX) \
                --refs $(REFS_COUNT)
 
+PHONY += gen_refs_stable_rc
+gen_refs_stable_rc:
+       $(Q)$(E) "Generating refs/$(REFS_DIR)/Kconfig.$(subst _,-,$(patsubst gen_refs_%,%,$@)) ($(REFS_COUNT) refs)..."
+       $(Q)./scripts/generate_refs.py \
+               --prefix BOOTLINUX_TREE_STABLE_RC \
+               --output workflows/linux/refs/$(REFS_DIR)/Kconfig.stable_rc \
+               --extra workflows/linux/refs/static/stable_rc.yaml \
+               --force \
+               gitref \
+               --repo $(SRC_URI_HTTPS_STABLE_RC) \
+               --refs $(REFS_COUNT)
+
 PHONY += gen_refs_jlayton_linux
 gen_refs_jlayton_linux:
        $(Q)$(E) "Generating refs/$(REFS_DIR)/Kconfig.$(subst _,-,$(patsubst gen_refs_%,%,$@)) ($(REFS_COUNT) refs)..."
@@ -197,14 +210,14 @@ refs-user-clean:
        fi
 
 _gen-user-refs:
-       $(Q)$(E) "Generating refs/user/Kconfig.{linus,next,stable,stable_rc,mcgrof-linus,mcgrof-next,btrfs-devel,cel-linux-jlayton-linux-kdevops-linus} files..."
+       $(Q)$(E) "Generating refs/user/Kconfig.{linus,next,stable,stable_rc,mcgrof-linus,mcgrof-next,btrfs-devel,cel-linux,stable_rc,jlayton-linux,kdevops-linus} files..."
        $(Q)$(MAKE) REFS_COUNT=15 REFS_DIR="user" $(REFS_TARGET_LINUS) $(REFS_TARGET_NEXT) $(REFS_TARGET_STABLE) $(REFS_TARGET_STABLE_RC) $(REFS_TARGET_DEVELOPMENT)
 
 PHONY += refs-user
 refs-user: _gen-user-refs
 
 _gen-default-refs-development:
-       $(Q)$(E) "Generating refs/default/Kconfig-{mcgrof-linus,mcgrof-next,btrfs-devel,cel-linux-jlayton-linux-kdevops-linus} files..."
+       $(Q)$(E) "Generating refs/default/Kconfig-{mcgrof-linus,mcgrof-next,btrfs-devel,cel-linux,stable_rc,jlayton-linux,kdevops-linus} files..."
        $(Q)$(MAKE) REFS_COUNT=0 REFS_DIR="default" $(REFS_TARGET_DEVELOPMENT)
 
 .PHONY: $(PHONY)

While reviewing this, I also found these typos. Can you add this to the series or just squash it with your changes?

commit 2d4824831c7cfdf09f3df3cb5f957bd0d917961a (HEAD -> refs-typos-fixes)

Author: Daniel Gomez <[email protected]>
Date:   Thu Mar 13 19:48:12 2025 +0000

refs: fix typos

scripts/gen-refs-user.Makefile +2 -2
index 5c5df2f..0cc94c9 100644
@@ -183,14 +183,14 @@ refs-user-clean:
        fi
 
 _gen-user-refs:
-       $(Q)$(E) "Generating refs/user/Kconfig.{linus,next,stable,mcgrof-linus,mcgrof-next,btrfs-devel,cel-linux-jlayton-linux-kdevops-linus} files..."
+       $(Q)$(E) "Generating refs/user/Kconfig.{linus,next,stable,mcgrof-linus,mcgrof-next,btrfs-devel,cel-linux,jlayton-linux,kdevops-linus} files..."
        $(Q)$(MAKE) REFS_COUNT=15 REFS_DIR="user" $(REFS_TARGET_LINUS) $(REFS_TARGET_NEXT) $(REFS_TARGET_STABLE) $(REFS_TARGET_DEVELOPMENT)
 
 PHONY += refs-user
 refs-user: _gen-user-refs
 
 _gen-default-refs-development:
-       $(Q)$(E) "Generating refs/default/Kconfig-{mcgrof-linus,mcgrof-next,btrfs-devel,cel-linux-jlayton-linux-kdevops-linus} files..."
+       $(Q)$(E) "Generating refs/default/Kconfig-{mcgrof-linus,mcgrof-next,btrfs-devel,cel-linux,jlayton-linux,kdevops-linus} files..."
        $(Q)$(MAKE) REFS_COUNT=0 REFS_DIR="default" $(REFS_TARGET_DEVELOPMENT)
 
 .PHONY: $(PHONY)