Message ID | 20250414-b4-autorefs-user-agent-v2-0-0398333b5676@samsung.com (mailing list archive) |
---|---|
Headers | show |
Series | autorefs: add kdevops User-Agent identifier | expand |
On 4/14/25 9:01 AM, Daniel Gomez wrote: > To avoid "HTTP Error 403: Forbidden" [1] errors in kdevops CI > deployments, add support for a kdevops User-Agent identifier in > the kernel.org/releases.json request, based on the PROJECT and > PROJECTVERSION Makefile variables. > > The resulting User-Agent identifier would be: > kdevops/5.0.2 (kdevops@lists.linux.dev) > > Additionally, clean up the autorefs Makefile and fix an issue where > refs from releases.json were not properly updated. > > Testing refs generation after bug fix: > make mrproper V=1 > {...} > make -f scripts/gen-refs-default.Makefile _refs-default-clean > rm --force workflows/linux/refs/default/Kconfig.linus > rm --force workflows/linux/refs/default/Kconfig.next > rm --force workflows/linux/refs/default/Kconfig.stable > > make V=1 menuconfig > make -C scripts/kconfig/ mconf > cc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -I ./ -c -o lexer.lex.o lexer.lex.c > {...} > ./scripts/generate_refs.py \ > --prefix BOOTLINUX_TREE_LINUS \ > --output workflows/linux/refs/default/Kconfig.linus \ > --extra workflows/linux/refs/static/linus.yaml \ > \ > --debug \ > kreleases \ > --moniker mainline \ > --pname kdevops \ > --pversion 5.0.2 > DEBUG:root:Connection to kernel.org on port 80 succeeded! > DEBUG:root:Generating... > DEBUG:root:0: v6.15-rc1 > DEBUG:root:static: master > DEBUG:root:static: v6.6-rc2 > DEBUG:root:static: v6.6-rc4 > DEBUG:root:static: v6.6-rc5 > DEBUG:root:static: v6.8-rc2 > DEBUG:root:static: v6.9-rc2 > DEBUG:root:static: v6.9-rc4 > DEBUG:root:static: v6.9-rc5 > DEBUG:root:static: v6.9-rc6 > ./scripts/generate_refs.py \ > --prefix BOOTLINUX_TREE_NEXT \ > --output workflows/linux/refs/default/Kconfig.next \ > --extra workflows/linux/refs/static/next.yaml \ > \ > --debug \ > kreleases \ > --moniker linux-next \ > --pname kdevops \ > --pversion 5.0.2 > DEBUG:root:Connection to kernel.org on port 80 succeeded! > DEBUG:root:Generating... > DEBUG:root:0: next-20250411 > DEBUG:root:static: master > DEBUG:root:static: next-20250328 > DEBUG:root:static: fs-current > DEBUG:root:static: fs-next > ./scripts/generate_refs.py \ > --prefix BOOTLINUX_TREE_STABLE \ > --output workflows/linux/refs/default/Kconfig.stable \ > --extra workflows/linux/refs/static/stable.yaml \ > \ > --debug \ > kreleases \ > --moniker stable \ > --pname kdevops \ > --pversion 5.0.2 > DEBUG:root:Connection to kernel.org on port 80 succeeded! > DEBUG:root:Generating... > DEBUG:root:0: v6.14.2 > DEBUG:root:1: v6.13.11 > DEBUG:root:static: v4.19.133 > DEBUG:root:static: v5.4.210 > DEBUG:root:static: v5.10.105 > DEBUG:root:static: v5.14.4 > DEBUG:root:static: v5.17-rc7 > DEBUG:root:static: v5.19-rc4 > DEBUG:root:static: v6.0.9 > DEBUG:root:static: linux-6.1.y > DEBUG:root:static: linux-6.6.y > {..} > > make menuconfig V=1 > ./scripts/generate_refs.py \ > --prefix BOOTLINUX_TREE_LINUS \ > --output workflows/linux/refs/default/Kconfig.linus \ > --extra workflows/linux/refs/static/linus.yaml \ > \ > --debug \ > kreleases \ > --moniker mainline \ > --pname kdevops \ > --pversion 5.0.2 > DEBUG:root:File already updated > ./scripts/generate_refs.py \ > --prefix BOOTLINUX_TREE_NEXT \ > --output workflows/linux/refs/default/Kconfig.next \ > --extra workflows/linux/refs/static/next.yaml \ > \ > --debug \ > kreleases \ > --moniker linux-next \ > --pname kdevops \ > --pversion 5.0.2 > DEBUG:root:File already updated > ./scripts/generate_refs.py \ > --prefix BOOTLINUX_TREE_STABLE \ > --output workflows/linux/refs/default/Kconfig.stable \ > --extra workflows/linux/refs/static/stable.yaml \ > \ > --debug \ > kreleases \ > --moniker stable \ > --pname kdevops \ > --pversion 5.0.2 > DEBUG:root:File already updated > touch vagrant/Kconfig.passthrough_libvirt.generated > Specify "host" missing argument. > {...} > > touch --date "24 hours ago" workflows/linux/refs/default/Kconfig.stable > dagomez@sarkhan:~/src/linux-kdevops/kdevops$ make menuconfig V=1 > ./scripts/generate_refs.py \ > --prefix BOOTLINUX_TREE_LINUS \ > --output workflows/linux/refs/default/Kconfig.linus \ > --extra workflows/linux/refs/static/linus.yaml \ > \ > --debug \ > kreleases \ > --moniker mainline \ > --pname kdevops \ > --pversion 5.0.2 > DEBUG:root:File already updated > ./scripts/generate_refs.py \ > --prefix BOOTLINUX_TREE_NEXT \ > --output workflows/linux/refs/default/Kconfig.next \ > --extra workflows/linux/refs/static/next.yaml \ > \ > --debug \ > kreleases \ > --moniker linux-next \ > --pname kdevops \ > --pversion 5.0.2 > DEBUG:root:File already updated > ./scripts/generate_refs.py \ > --prefix BOOTLINUX_TREE_STABLE \ > --output workflows/linux/refs/default/Kconfig.stable \ > --extra workflows/linux/refs/static/stable.yaml \ > \ > --debug \ > kreleases \ > --moniker stable \ > --pname kdevops \ > --pversion 5.0.2 > DEBUG:root:Connection to kernel.org on port 80 succeeded! > DEBUG:root:Generating... > DEBUG:root:0: v6.14.2 > DEBUG:root:1: v6.13.11 > DEBUG:root:static: v4.19.133 > DEBUG:root:static: v5.4.210 > DEBUG:root:static: v5.10.105 > DEBUG:root:static: v5.14.4 > DEBUG:root:static: v5.17-rc7 > DEBUG:root:static: v5.19-rc4 > DEBUG:root:static: v6.0.9 > DEBUG:root:static: linux-6.1.y > DEBUG:root:static: linux-6.6.y > touch vagrant/Kconfig.passthrough_libvirt.generated > Specify "host" missing argument. > {...} > > [1] > https://lore.kernel.org/kdevops/q3gayrsulu424e2qr5eg7zfs2rgy5ucluuw73o2pjcxmehvvmp@qxy723fyda3x/ > > Signed-off-by: Daniel Gomez <da.gomez@samsung.com> > --- > Changes in v2: > - Add cleanup patch for python script > - Add fix to generate project release info in .config reported by Chuck > - Add review tags from Luis > - Update latest patch to include resulting User-Agent string > - Link to v1: https://lore.kernel.org/r/20250411-b4-autorefs-user-agent-v1-0-4b5ed5a084a4@samsung.com > > --- > Daniel Gomez (7): > scripts/gen-refs-default.Makefile: fix targets > mrproper: cleanup default refs files > scripts/gen-refs-default.Makefile: cleanup > scripts/gen-refs-default.Makefile: add debug output when verbose > scripts/generate_refs.py: cleanup > scripts/kconfig/kconfig.Makefile: fix project release in defconfigs-* > gitref: generate user agent kdevops header identifier > > Makefile | 1 + > scripts/gen-refs-default.Makefile | 45 ++++++++++++++++++++++++++++----------- > scripts/generate_refs.py | 20 +++++++++++++++-- > scripts/kconfig/kconfig.Makefile | 2 +- > 4 files changed, 52 insertions(+), 16 deletions(-) > --- > base-commit: d389d2540036a59bdd1162e5d0d81464faf86f61 > change-id: 20250411-b4-autorefs-user-agent-417d5d0c46f5 > > Best regards, Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
To avoid "HTTP Error 403: Forbidden" [1] errors in kdevops CI deployments, add support for a kdevops User-Agent identifier in the kernel.org/releases.json request, based on the PROJECT and PROJECTVERSION Makefile variables. The resulting User-Agent identifier would be: kdevops/5.0.2 (kdevops@lists.linux.dev) Additionally, clean up the autorefs Makefile and fix an issue where refs from releases.json were not properly updated. Testing refs generation after bug fix: make mrproper V=1 {...} make -f scripts/gen-refs-default.Makefile _refs-default-clean rm --force workflows/linux/refs/default/Kconfig.linus rm --force workflows/linux/refs/default/Kconfig.next rm --force workflows/linux/refs/default/Kconfig.stable make V=1 menuconfig make -C scripts/kconfig/ mconf cc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -I ./ -c -o lexer.lex.o lexer.lex.c {...} ./scripts/generate_refs.py \ --prefix BOOTLINUX_TREE_LINUS \ --output workflows/linux/refs/default/Kconfig.linus \ --extra workflows/linux/refs/static/linus.yaml \ \ --debug \ kreleases \ --moniker mainline \ --pname kdevops \ --pversion 5.0.2 DEBUG:root:Connection to kernel.org on port 80 succeeded! DEBUG:root:Generating... DEBUG:root:0: v6.15-rc1 DEBUG:root:static: master DEBUG:root:static: v6.6-rc2 DEBUG:root:static: v6.6-rc4 DEBUG:root:static: v6.6-rc5 DEBUG:root:static: v6.8-rc2 DEBUG:root:static: v6.9-rc2 DEBUG:root:static: v6.9-rc4 DEBUG:root:static: v6.9-rc5 DEBUG:root:static: v6.9-rc6 ./scripts/generate_refs.py \ --prefix BOOTLINUX_TREE_NEXT \ --output workflows/linux/refs/default/Kconfig.next \ --extra workflows/linux/refs/static/next.yaml \ \ --debug \ kreleases \ --moniker linux-next \ --pname kdevops \ --pversion 5.0.2 DEBUG:root:Connection to kernel.org on port 80 succeeded! DEBUG:root:Generating... DEBUG:root:0: next-20250411 DEBUG:root:static: master DEBUG:root:static: next-20250328 DEBUG:root:static: fs-current DEBUG:root:static: fs-next ./scripts/generate_refs.py \ --prefix BOOTLINUX_TREE_STABLE \ --output workflows/linux/refs/default/Kconfig.stable \ --extra workflows/linux/refs/static/stable.yaml \ \ --debug \ kreleases \ --moniker stable \ --pname kdevops \ --pversion 5.0.2 DEBUG:root:Connection to kernel.org on port 80 succeeded! DEBUG:root:Generating... DEBUG:root:0: v6.14.2 DEBUG:root:1: v6.13.11 DEBUG:root:static: v4.19.133 DEBUG:root:static: v5.4.210 DEBUG:root:static: v5.10.105 DEBUG:root:static: v5.14.4 DEBUG:root:static: v5.17-rc7 DEBUG:root:static: v5.19-rc4 DEBUG:root:static: v6.0.9 DEBUG:root:static: linux-6.1.y DEBUG:root:static: linux-6.6.y {..} make menuconfig V=1 ./scripts/generate_refs.py \ --prefix BOOTLINUX_TREE_LINUS \ --output workflows/linux/refs/default/Kconfig.linus \ --extra workflows/linux/refs/static/linus.yaml \ \ --debug \ kreleases \ --moniker mainline \ --pname kdevops \ --pversion 5.0.2 DEBUG:root:File already updated ./scripts/generate_refs.py \ --prefix BOOTLINUX_TREE_NEXT \ --output workflows/linux/refs/default/Kconfig.next \ --extra workflows/linux/refs/static/next.yaml \ \ --debug \ kreleases \ --moniker linux-next \ --pname kdevops \ --pversion 5.0.2 DEBUG:root:File already updated ./scripts/generate_refs.py \ --prefix BOOTLINUX_TREE_STABLE \ --output workflows/linux/refs/default/Kconfig.stable \ --extra workflows/linux/refs/static/stable.yaml \ \ --debug \ kreleases \ --moniker stable \ --pname kdevops \ --pversion 5.0.2 DEBUG:root:File already updated touch vagrant/Kconfig.passthrough_libvirt.generated Specify "host" missing argument. {...} touch --date "24 hours ago" workflows/linux/refs/default/Kconfig.stable dagomez@sarkhan:~/src/linux-kdevops/kdevops$ make menuconfig V=1 ./scripts/generate_refs.py \ --prefix BOOTLINUX_TREE_LINUS \ --output workflows/linux/refs/default/Kconfig.linus \ --extra workflows/linux/refs/static/linus.yaml \ \ --debug \ kreleases \ --moniker mainline \ --pname kdevops \ --pversion 5.0.2 DEBUG:root:File already updated ./scripts/generate_refs.py \ --prefix BOOTLINUX_TREE_NEXT \ --output workflows/linux/refs/default/Kconfig.next \ --extra workflows/linux/refs/static/next.yaml \ \ --debug \ kreleases \ --moniker linux-next \ --pname kdevops \ --pversion 5.0.2 DEBUG:root:File already updated ./scripts/generate_refs.py \ --prefix BOOTLINUX_TREE_STABLE \ --output workflows/linux/refs/default/Kconfig.stable \ --extra workflows/linux/refs/static/stable.yaml \ \ --debug \ kreleases \ --moniker stable \ --pname kdevops \ --pversion 5.0.2 DEBUG:root:Connection to kernel.org on port 80 succeeded! DEBUG:root:Generating... DEBUG:root:0: v6.14.2 DEBUG:root:1: v6.13.11 DEBUG:root:static: v4.19.133 DEBUG:root:static: v5.4.210 DEBUG:root:static: v5.10.105 DEBUG:root:static: v5.14.4 DEBUG:root:static: v5.17-rc7 DEBUG:root:static: v5.19-rc4 DEBUG:root:static: v6.0.9 DEBUG:root:static: linux-6.1.y DEBUG:root:static: linux-6.6.y touch vagrant/Kconfig.passthrough_libvirt.generated Specify "host" missing argument. {...} [1] https://lore.kernel.org/kdevops/q3gayrsulu424e2qr5eg7zfs2rgy5ucluuw73o2pjcxmehvvmp@qxy723fyda3x/ Signed-off-by: Daniel Gomez <da.gomez@samsung.com> --- Changes in v2: - Add cleanup patch for python script - Add fix to generate project release info in .config reported by Chuck - Add review tags from Luis - Update latest patch to include resulting User-Agent string - Link to v1: https://lore.kernel.org/r/20250411-b4-autorefs-user-agent-v1-0-4b5ed5a084a4@samsung.com --- Daniel Gomez (7): scripts/gen-refs-default.Makefile: fix targets mrproper: cleanup default refs files scripts/gen-refs-default.Makefile: cleanup scripts/gen-refs-default.Makefile: add debug output when verbose scripts/generate_refs.py: cleanup scripts/kconfig/kconfig.Makefile: fix project release in defconfigs-* gitref: generate user agent kdevops header identifier Makefile | 1 + scripts/gen-refs-default.Makefile | 45 ++++++++++++++++++++++++++++----------- scripts/generate_refs.py | 20 +++++++++++++++-- scripts/kconfig/kconfig.Makefile | 2 +- 4 files changed, 52 insertions(+), 16 deletions(-) --- base-commit: d389d2540036a59bdd1162e5d0d81464faf86f61 change-id: 20250411-b4-autorefs-user-agent-417d5d0c46f5 Best regards,