[openwrt/openwrt] sdk: use GIT_COMMIT for buildbot SDK

LEDE Commits lede-commits at lists.infradead.org
Thu Dec 4 10:23:38 PST 2025


ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6c94b53f110da02e2972a8023ad8622931373b04

commit 6c94b53f110da02e2972a8023ad8622931373b04
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Thu Dec 4 19:20:55 2025 +0100

    sdk: use GIT_COMMIT for buildbot SDK
    
    Instead of using tag name, directly use git commit for the base feed
    string if we detect we are generating an SDK from a buildbot (using
    CONFIG_BUILDBOT)
    
    This improve security and generates consistent feed.conf.default files
    following the pattern used by feeds repository.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/sdk/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/sdk/Makefile b/target/sdk/Makefile
index 537e56382c..4da9a5dbe9 100644
--- a/target/sdk/Makefile
+++ b/target/sdk/Makefile
@@ -44,10 +44,10 @@ GIT_COMMIT:=$(shell git rev-parse HEAD 2>/dev/null)
 GIT_BRANCH:=$(filter-out master main HEAD,$(shell git rev-parse --abbrev-ref HEAD 2>/dev/null))
 GIT_TAGNAME:=$(shell git show-ref --tags --dereference 2>/dev/null | sed -ne '/^$(GIT_COMMIT) / { s|^.*/||; s|\^.*||; p }')
 
-BASE_FEED:=$(if $(GIT_URL),src-git --root=package base $(GIT_URL)$(if $(GIT_TAGNAME),;$(GIT_TAGNAME),$(if $(GIT_BRANCH),;$(GIT_BRANCH))))
+BASE_FEED:=$(if $(GIT_URL),src-git --root=package base $(GIT_URL)$(if $(CONFIG_BUILDBOT),^$(GIT_COMMIT),$(if $(GIT_TAGNAME),;$(GIT_TAGNAME),$(if $(GIT_BRANCH),;$(GIT_BRANCH)))))
 BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),$(shell cd $(TOPDIR); LC_ALL=C git svn info 2>/dev/null | sed -ne 's/^URL: /src-gitsvn --root=package base /p'))
 BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),$(shell cd $(TOPDIR); LC_ALL=C svn info 2>/dev/null | sed -ne 's/^URL: /src-svn --root=package base /p'))
-BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),src-git --root=package base $(PROJECT_GIT)/openwrt/openwrt.git$(if $(GIT_TAGNAME),;$(GIT_TAGNAME),$(if $(GIT_BRANCH),;$(GIT_BRANCH))))
+BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),src-git --root=package base $(PROJECT_GIT)/openwrt/openwrt.git$(if $(CONFIG_BUILDBOT),^$(GIT_COMMIT),$(if $(GIT_TAGNAME),;$(GIT_TAGNAME),$(if $(GIT_BRANCH),;$(GIT_BRANCH)))))
 
 KDIR_BASE = $(patsubst $(TOPDIR)/%,%,$(LINUX_DIR))
 KDIR_ARCHES = $(LINUX_KARCH)




More information about the lede-commits mailing list