This might be something where the documentation is under development, but… I’ve been hosting a personal OpenWrt repository for my builds, and used the ipkg-make-index and ipkg-build tools. Obviously, those are obsolete once we switch to APK packages.
I checked the forums and couldn’t find much. There was this post:
… and a reference to the Alpine documentation, which didn’t have a "buildrepo” section and so wasn’t much help.
From piecing things together:
apk looks for a packages.adb file in the repo directory
It appears that this file is created automatically during the compile process?
It is simply a matter of creating the packages/arch directory, copying the package files + packages.adb, and adding an entry in /etc/apk/repositories.d/customfeeds.list that points to that https location?
Signing and uploading the key used to be required to get my device to accept the repo. I don’t understand how that step works now, or if it’s even necessary. In a rough test, it seems like it isn’t?
Oh, and if you want to create your own index files outside of the buildroot environment, take a look in the package/Makefile, search for mkndx. There are a couple examples in there:
You can grab the host apk binary from staging_dir/host/bin/apk...
I don't know about others, but every time I want to build my repository, I modify package/Makefile by adding the location of my packages. This way, when I build image, I also build the repository. At the moment, I don't know of any other simple way (I would also like to know it).
apk also requires keys for the repository /etc/apk/keys/*.pem
I am modifying the makefile so that it signs the already compiled *.apk packages and creates a list of them in a json file.
I understand that custom-feed adds packages to the general compilation, it does not create another dedicated repository (which would be useful). There should be a script which, as in the case of ipk, signs packages, e.g. in the my_apk_rep folder, and makes a list of them without the full compilation process.
I have a very noob question about apk repos – are these hosted by alpine and therefore different apks from those in the opkg repos?
The opkg shairport-sync-mbedtls apk is built to airport2 (in spite of Ted’s makefile stipulating airport classic) and I’m hoping the switch to apk will solve this problem
OpenWrt has switched to using the binary apk package- repository format. It does not share packages or reprositories with alpine (there are binary incompatibilities everywhere) and even the way the source packages are created differs completely.
You cannot install binary Alpine packages on OpenWrt (apart really most extremely simple ones), nor the reverse. Neither package dependencies would be declared correctly, nor would the library dependencies be compatible.
Technically this is no different compared to prior status, the general ipkg/ opkg package format is shared with dd-wrt, entware and yocto, yet there is zero compatibility between the actual binary packages/ repositories with either of them. Likewise Debian- and Ubuntu dpkg packages or Fedora, Mandriva/ Mageia or OpenSuSE RPM packages aren't compatible either, even though they share the same package format.
can you tell me the best way to flag a problem like this one with shairport-sync-mbedtls? I’ve posted a couple of reports on github but I’m not sure that’s the way to go about it