Fwd: [PATCH] treewide: use CDN for downloads

Paul Spooren mail at aparcar.org
Thu Feb 4 18:05:03 EST 2021


Hi all,

I think this is a nice patch as it speeds up the package manager on
devices and releases load on our infrastructure.

Additionally we could add a link in the Wiki pointing to the CDN rather
than the origin server.

As this is a "deep" change of infrastucture (usage), I wanted to checkin
with the adm list.

Best,
Paul

Forwarded message from Paul Spooren on Sat Jan 30, 2021 at 12:11 PM:
Use CDN for opkg repositories.

Signed-off-by: Paul Spooren <mail at aparcar.org>
---
Tested with browser and opkg running on router.
HTTP works only for specific user-agents and `ipk` files, this is a
*limitation* (or security precaution) of the origin server not
influenced by the CDN.

include/version.mk | 2 +-
package/base-files/image-config.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/version.mk b/include/version.mk
index b7f42e13bb..e38d22bcd4 100644
--- a/include/version.mk
+++ b/include/version.mk
@@ -32,7 +32,7 @@ VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))
 
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
-VERSION_REPO:=$(if
$(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/snapshots)
+VERSION_REPO:=$(if
$(VERSION_REPO),$(VERSION_REPO),https://downloads.cdn.openwrt.org/snapshots)
 
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)
diff --git a/package/base-files/image-config.in
b/package/base-files/image-config.in
index bfa3055cc8..71de5fd59f 100644
--- a/package/base-files/image-config.in
+++ b/package/base-files/image-config.in
@@ -183,7 +183,7 @@ if VERSIONOPT
config VERSION_REPO
string
prompt "Release repository"
- default "https://downloads.openwrt.org/snapshots"
+ default "https://downloads.cdn.openwrt.org/snapshots"
help
This is the repository address embedded in the image, it defaults
to the trunk snapshot repo; the url may contain the following
placeholders:
--
2.29.2




More information about the openwrt-adm mailing list