Firmware Selector Setup

Moritz Warning moritzwarning at web.de
Wed Aug 19 11:17:05 EDT 2020


Hi

On 8/19/20 12:36 PM, Petr Štetiar wrote:
> Moritz Warning <moritzwarning at web.de> [2020-08-19 11:24:38]:
>
> Hi,
>
>> the deployment of the firmware selector seems to be stuck
>
> it's in progress[1].
Awesome! Thank you. :D

>
>> at the point where someone with access actually need to set it up
>
> Access gives one great power, but also great responsibility :-)
True, true.

>
> So if I'm going to be the person which is going to deploy that project under
> OpenWrt umbrella, I plan to do the following in upcoming days/weeks:
>
>  - rethink the JSON generation
>    * we don't need to scrape anything, files are already on the disk, just in different directory
You mean the contents of https://downloads.openwrt.org are available on the same disk?
That is nice. I can add that to the python script without much work.

>    * are we going to generate separate JSON for every application out there?
>      - I mean, wouldn't it make sense to generate something generic, something like:
>
>        meta/json/targets-full-v1.json (complete amalgamation of profiles.json)
>        meta/json/targets-minimal-v1.json (just the bare minimum)
>        meta/json/targets-images-v1.json (just the images)
Do you argue that OpenWrt should generate these files?
I argue that OpenWrt should generate the raw data (albeit machine readable) as json files. External projects can then format it into the optimized format they need.
It is very hard to predict and serve all use cases people come up with.

>
>        so we've some standard JSONs in predictable locations for consumption
>        by whatever out there
>
>    * I know, 260kB is peanuts, but still wondering why we need to have
>      everything in one big JSON file? I mean, why not just generate some
>      minimal JSON with all names/flags suitable for search and then download the
>      complete profile.json once user actually decides to download the file ?
When somebody navigates to the firmware selector, the overview.json (~260KB) of the selected release is loaded.
But it is only ~30KB when we take into account the compression done by the web server.
Under that perspective it was decided that it is worth to keep it in one file and lessen the complexity of the whole setup.


>
>  - make it pass all QA checks currently failing on CI[2]
>    * HTML is not valid, that Python script wont run on the downloads server
>      etc.
>    * this CI stuff is going to help with the maintenance/QA
I will take a look.

>
>  - make it official OpenWrt project under git.openwrt.org/web
>
>  - find out suitable automatic deployment of new versions
>    * once it passes all checks on CI, make release, deploy the release
>      - adding Git tag/hash into HTML so its visible what version is deployed
>
>> Is there something I can do to help out?
>
> Yeah, would be nice to make the CI checks pass. As you might guess, I'm not
> HTML/JS guy, so feel free to suggest better tools for HTML/JS linting and
> validation. I don't want to start reviewing HTML/JS :-)I will take a look.

>
> 1. https://gitlab.com/ynezz/openwrt-firmware-selector/-/pipelines/175117737
> 2. https://gitlab.com/ynezz/openwrt-firmware-selector/-/pipelines/175117737/failures
>
> Cheers,
>
> Petr
>




More information about the openwrt-adm mailing list