Repository navigation
remap custom repos to the same format as the standard repo - #84
benjaminlevine wants to merge 1 commit into
Conversation
|
|
|
Belay that, I just read through your forum thread. Let's find all the various formats and consolidate all of them into a simple "read an index". (My main goal is to keep the code as small as possible these days, adding features has made it grow too big for tiny devices and I'd like to combat that and add some shrinkage.) |
|
Maybe the solution can be pushed to the user when setting up their custom server. At the moment my index.json is generated as (as described here): Comparing the format of the upstream index with my generated index:
Don't we just need a local script to do the conversion between formats and output a local json in the same format as the upstream one? Not sure how to document it though. |
Aha! The index should be auto-generated during the package build by the Here's where it happens in full buildroot: $ git grep make-index-json.py
package/Makefile: $(SCRIPT_DIR)/make-index-json.py -f apk -a "$(ARCH_PACKAGES)" - > index.json; \
package/Makefile: $(SCRIPT_DIR)/make-index-json.py -f opkg -a "$(ARCH_PACKAGES)" Packages > index.json; \
target/imagebuilder/files/Makefile: $(SCRIPT_DIR)/make-index-json.py -a $(ARCH_PACKAGES) -f apk --manifest - |
|
Here's what I see in my buildroot currently, just the junk laying around after test builds: $ for s in $(find bin/ -iname index.json); do echo $s; cat $s | jq | head -5; done
bin/packages/riscv64_generic/base/index.json
{
"version": 2,
"architecture": "riscv64_generic",
"packages": {
"apk-mbedtls": "3.0.5-r3",
bin/packages/riscv64_generic/luci/index.json
{
"version": 2,
"architecture": "riscv64_generic",
"packages": {
"liblucihttp-ucode": "2023.03.15~9b5b683f-r1",
bin/packages/riscv64_generic/packages/index.json
{
"version": 2,
"architecture": "riscv64_generic",
"packages": {
"adblock": "4.5.7-r4",
bin/packages/mipsel_24kc/base/index.json
{
"version": 2,
"architecture": "mipsel_24kc",
"packages": {
"apk-mbedtls": "3.0.5-r3",
bin/packages/mipsel_24kc/luci/index.json
{
"version": 2,
"architecture": "mipsel_24kc",
"packages": {
"liblucihttp-ucode": "2023.03.15~9b5b683f-r1",
bin/packages/mipsel_24kc/packages/index.json
{
"version": 2,
"architecture": "mipsel_24kc",
"packages": {
"adblock": "4.5.8-r2",
bin/targets/spacemit/k1/packages/index.json
{
"version": 2,
"architecture": "riscv64_generic",
"packages": {
"base-files": "1706~7b396007440c",
bin/targets/ramips/mt7620/packages/index.json
{
"version": 2,
"architecture": "mipsel_24kc",
"packages": {
"base-files": "1706~f0d3e332e5f8", |
|
OK! That works now when I run: This isn't being autogenerated because I'm not running a whole buildroot - just compiling individual packages. Thanks for the help. I'll close the pull request |
Convert the formatting of custom repositories into the same format as used by the upstream server.