[PATCH] treewide: unify OpenWrt hosted source URL

Hannu Nyman hannu.nyman at iki.fi
Sun Jan 31 06:29:27 EST 2021


Paul Spooren kirjoitti 31.1.2021 klo 11.19:
>
>
> On Sun, Jan 31, 2021 at 10:08, Hannu Nyman <hannu.nyman at iki.fi> wrote:
>> Paul Spooren kirjoitti 30.1.2021 klo 23.54:
>>> Multiple sources are hosted on OpenWrts source server only. The source
>>> URLs to point to the server vary based on different epochs in OpenWrts
>>> history. Unify them to use always the new source CDN and HTTPS.
>>>
>>> If the CDN fails, sources.o.o is used as a fallback via downloads.pl.
>>>
>>> Signed-off-by: Paul Spooren <mail at aparcar.org>
>>> ---
>>> ...
>>>     PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
>>> -PKG_SOURCE_URL:=https://downloads.openwrt.org/sources
>>> +PKG_SOURCE_URL:=https://sources.cdn.openwrt.org
>>
>>
>> Would it make sense to define a similar @OPENWRT alias in 
>> scripts/download.pl as we have done for SF, APACHE, GITHUB, GNU, SAVANNAH, 
>> KERNEL and GNOME ?
>
> I had the same idea but thought it's awkward to define a variable which is 
> then empty. I'll give it a try and see how it looks. We could then decide 
> for either solution.


Just an elsif block with a comment about the actual sites being added at the 
end as deafult fallback sites in any case. (and possibly a no-op line like 
sleep(1), if the elsif block needs some actual contents. (not sure about perl)).

Or possibly an elsif block containing the same cdn line, so that it gets 
added twice (once here, once as fallback). Seems extraflous, but would look tidy.


>
>>
>> https://github.com/openwrt/openwrt/blob/master/scripts/download.pl#L192-L255
>>
>> Then we could in future change those download locations centrally in 
>> download.pl, instead of changing it every single Makefile where it is 
>> used. The Makefiles could just contain PKG_SOURCE_URL:=@OPENWRT
>>
>> (One afterthought: the pushed contents might actually be empty, as the 
>> actual download locations are pushed on lines 261-263 to the same trial 
>> queue. Not quite sure about the pushing order logic, but might work.)
>>
>
>




More information about the openwrt-devel mailing list