You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenWRT is currently migrating from OPKG to APK. As of 2024-11-28 the snapshot build already uses APK and 24.10-SNAPSHOT still uses OPKG. Although there are some other changes to the directory structure in both of these branches.
I want to use this issue to track what needs to be done to make nix-openwrt-imagebuilder support these changes and the newer version of OpenWRT.
There's also a apk adbdump command which allows to dump this DB into a "yaml-like" format. This plaintext file contains the depends field which we can use to replace Depends from the Packages file
But there are issues with quoting currently, so the file is not always valid YAML. Meaning it can't be convered to Nix easily. The issue has been open for 3+ years and it seems like it's not a priority for the developers. So we might need to resort to plain-text parsing 😞
OpenWRT currently uses awk & sed to generate index.json from this yaml-like code.
APK requires adb file instead of just src custom file:///path/to/packages to consider something a repository
We can use apk mkndx just like like OpenWRT does. Perhaps it makes sense to package all packages into a separate derivation that would build this adb file.
Proposed plan
Wait for APK v3 release
Wait for OpenWRT 24.10 release or at least wait until snapshot builds are "stable" (optional?)
Add support for "separate" kmods to generate-hashes.nix and files.nix
Add support for parsing packages.adb and building custom static.adb containing only required packages
Again, this is just a proposal and a place to track my findings.
Let me know what you think. 🙇
The text was updated successfully, but these errors were encountered:
Update about APK's adbdump output: it might support JSON output "soon". Which great news for Nix, as we could just use builtins.fromJSON instead of using yq + IFD 🚀
An update about adbdump: JSON support was added! This is not in any of the releases yet, but I built the package locally and tested it.
The output JSON file is valid and it'll help simplify the code here.
OpenWRT is currently migrating from OPKG to APK. As of 2024-11-28 the
snapshot
build already usesAPK
and24.10-SNAPSHOT
still usesOPKG
. Although there are some other changes to the directory structure in both of these branches.I want to use this issue to track what needs to be done to make
nix-openwrt-imagebuilder
support these changes and the newer version of OpenWRT.Changes present in both branches
kmods
are not included inpackages
anymorehttps://downloads.openwrt.org/releases/<release>/targets/<target>/<variant>/packages
, for example https://downloads.openwrt.org/releases/23.05.5/targets/mediatek/filogic/packages/Packages, look forPackage: kmod-
.https://downloads.openwrt.org/releases/<release>/targets/<target>/<variant>/kmods/<kmod-target>
. For example: https://downloads.openwrt.org/releases/24.10-SNAPSHOT/targets/mediatek/filogic/kmods/6.6.58-1-8aeafca30161030b0854d761688a400e/Packages<kmod-target>
as I call it, consists of the kernel version, kernel release, and hash of some kind.profiles.json
. For example: https://downloads.openwrt.org/releases/24.10-SNAPSHOT/targets/mediatek/filogic/profiles.json, fieldlinux_kernel
.kmods
as another "feed" ingenerate-hashes.nix
andfiles.nix
and use a different URL to downloadkmod-*
packagesChanges present only in SNAPSHOT (as of 2024-11-28)
Packages
file in APK buildspackages.adb
file. For example: https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/packages/packages.adb This file is APK's "apkv3 repository index file" created usingapk mkndx
commandapk adbdump
command which allows to dump this DB into a "yaml-like" format. This plaintext file contains thedepends
field which we can use to replaceDepends
from thePackages
fileawk
&sed
to generateindex.json
from this yaml-like code.v3
preview builds of APK: https://gitlab.alpinelinux.org/alpine/apk-tools/-/releases/v3.0.0_pre4. So we need to wait for a stableapk
release and ideally for quoting issues to be resolved.adb
file instead of justsrc custom file:///path/to/packages
to consider something a repositoryapk mkndx
just like like OpenWRT does. Perhaps it makes sense to package all packages into a separate derivation that would build thisadb
file.Proposed plan
kmods
togenerate-hashes.nix
andfiles.nix
packages.adb
and building customstatic.adb
containing only required packagesAgain, this is just a proposal and a place to track my findings.
Let me know what you think. 🙇
The text was updated successfully, but these errors were encountered: