diff mbox series

imagebuilder: add check if target is sourced from a feed

Message ID 20231020114527.3586387-1-fe@dev.tdt.de
State Superseded
Headers show
Series imagebuilder: add check if target is sourced from a feed | expand

Commit Message

Florian Eckert Oct. 20, 2023, 11:45 a.m. UTC
If a target is not upstream because it is still under development, it
can still be added to the openwrt via a feed and can be build. Although
the build is successful, no new images can be build with the new board,
because it cannot find them.

To fix this issue add a check to the imagebuilder and test if the target
is located in the feed directory.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
---

The problem occurred when we started using the new LGM target from MXL
in Openwrt.

 target/imagebuilder/files/Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Thomas Richard March 19, 2024, 3:19 p.m. UTC | #1
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
On 10/20/23 13:45, Florian Eckert wrote:
> If a target is not upstream because it is still under development, it
> can still be added to the openwrt via a feed and can be build. Although
> the build is successful, no new images can be build with the new board,
> because it cannot find them.
> 
> To fix this issue add a check to the imagebuilder and test if the target
> is located in the feed directory.

Hello Florian,

I tested your patch, it works well.
But I don't know how you created your imagebuilder.
On my side, building an imagebuilder for a target sourced from a feed
didn't work.
So I just sent a patch to fix it:
http://lists.openwrt.org/pipermail/openwrt-devel/2024-March/042452.html

Tested-by: Thomas Richard <thomas.richard@bootlin.com>

Regards,
Florian Eckert March 20, 2024, 9:39 a.m. UTC | #2
Hello Thomas

> I tested your patch, it works well.

Thanks

> But I don't know how you created your imagebuilder.
> On my side, building an imagebuilder for a target sourced from a feed
> didn't work.

I forgot to send a second commit that fixes this issue comprehensive.
Thanks for the reminder.

> So I just sent a patch to fix it:
> http://lists.openwrt.org/pipermail/openwrt-devel/2024-March/042452.html

Yours change looks exactly like my modification. So I don't care which 
one is used.
The main thing is that it is fixed.

I opened a pullrequest right now that include the fix that a had on my 
patch set [1] for a long time.
And also the patch I have already send to the mailing list [2].

Best regards

Florian

[1] https://github.com/openwrt/openwrt/pull/14937
[2] 
https://patchwork.ozlabs.org/project/openwrt/patch/20231020114527.3586387-1-fe@dev.tdt.de/
Thomas Richard March 20, 2024, 9:57 a.m. UTC | #3
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
On 3/20/24 10:39, Florian Eckert wrote:
> Hello Thomas
> 
>> I tested your patch, it works well.
> 
> Thanks
> 
>> But I don't know how you created your imagebuilder.
>> On my side, building an imagebuilder for a target sourced from a feed
>> didn't work.
> 
> I forgot to send a second commit that fixes this issue comprehensive.
> Thanks for the reminder.
> 
>> So I just sent a patch to fix it:
>> http://lists.openwrt.org/pipermail/openwrt-devel/2024-March/042452.html
> 
> Yours change looks exactly like my modification. So I don't care which
> one is used.
> The main thing is that it is fixed.
> 
> I opened a pullrequest right now that include the fix that a had on my
> patch set [1] for a long time.
> And also the patch I have already send to the mailing list [2].
> 
> Best regards

I added my Tested-by in the PR, as I don't know if Github or ML is used
to merge changes.

Best Regards,
diff mbox series

Patch

diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index 78ec7e2e94..0466fc7dcc 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -205,8 +205,13 @@  build_image: FORCE
 	@echo
 	@echo Building images...
 	rm -rf $(BUILD_DIR)/json_info_files/
-	$(NO_TRACE_MAKE) -C target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \
-		$(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)")
+	if [ -d "target/linux/feeds/$(BOARD)" ]; then \
+		$(NO_TRACE_MAKE) -C target/linux/feeds/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \
+			$(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)"); \
+	else \
+		$(NO_TRACE_MAKE) -C target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \
+			$(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)"); \
+	fi
 
 $(BIN_DIR)/profiles.json: FORCE
 	$(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \