openwrt / openwrt/asu

build: upstream_url not used for setup

Open Beginner friendly
#1,623 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
450
Forks
111
PR merge metrics
No merged PRs in 30d

Description

@aparcar Not sure how you want to handle this one...

In https://github.com/openwrt/asu/blob/main/asu/build.py#L211

where we run setup.sh, the value of environment["UPSTREAM_URL"] is not set, so the default FILE_HOST=mirror-03.infra... is used, even when the config settings are set to downloads.... On my local host, this bypasses the CDN for a bunch of files, most importantly the imagebuilder itself, and can cause timeouts on builds:

$ podman run -ti ghcr.io/openwrt/imagebuilder:mediatek-filogic-main

buildbot@984608bff4e5:~$ echo $FILE_HOST
mirror-03.infra.openwrt.org

buildbot@984608bff4e5:~$ . setup.sh
2026-04-16 13:07:31 URL:https://mirror-03.infra.openwrt.org/...

If I change the environment as below, works for me, but will that be ok on the production server?

asu/build.py line 163

-    environment: dict[str, str] = {}
+    environment: dict[str, str] = {
+        "UPSTREAM_URL": settings.upstream_url,
+    }

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in asu/build.py around lines 163 and 211, then inspect how setup.sh reads UPSTREAM_URL and how settings.upstream_url is populated. Exercise the imagebuilder setup path with a configured upstream URL and confirm that setup uses it instead of the default mirror, including on the production configuration path.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.