New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add APK package building capabilities to OpenWrt #4294
base: main
Are you sure you want to change the base?
Conversation
cool to add this util |
on my case, I have to use |
so how to mark |
@ptpt52 these are issues for packages.git since there Sure, if Alpine is up for it I'm happy to merge package building but I don't see this to happen any time soon. |
I am a bit sorry to ask here, but I wonder if it makes sense to improve some aspect of opkg. Opkg stores information about installed packages as plain text in files in IDK if apk is immune to this problem, it seems for search it stores the info in form of a hash of a path, but for efficient proper uninstallation it must store original paths somehow. I have encountered a similar problem in ubuntu (I needed a fast search of a package by a path). I have solved it by creating a library for storing such information in an own format and a framework for converting the info from various distros into its format and a backend for The format consists of an SQLite database, which has 2 tables. One stores strings, and another one (in fact, 2) stores a prefix tree (using datrie library) of primary keys of these strings. The prefix tree is then compressed. I wonder if it makes sense for OpenWRT to utilise a similar format in own package managers. |
62ec5e4
to
5155a53
Compare
--help requires libluaapk.so AFAIK
No. '--help' requires Lua on the build-host to generate the compressed
help output. APK doesn't need to be compiled with Lua just for that.
|
Okay great, I will fix that. |
I think this is indeed the wrong place to suggest changes to opkg. APK uses a flat buffer like database to store for packages, I'll ask the dev on compression is a possibility. Proper file handling of (un)installed packages is part of both opkg and apk, and so is dependency tracking. Motivation for apk is that we no longer maintain our own fork of a package manager but share tooling with similar minded projects (alpine). |
I'm not Timo, but compression of the database should be possible in apk3, as it would use the same access methods as the packaging side. So the appropriate compression flags would just need to be added to the file header, basically. |
Signed-off-by: Paul Spooren <mail@aparcar.org>
cleanup should be more sophisticated since APK can actually handle multiple versions of the same package - take that opkg
Instead of attaching the `-stable` suffix, only handle it within the build system. Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
This adds support for mbedtls 3.6.0. The 3.6 version is the next LTS version of mbedtls. This version supports TLS 1.3. This switches to download using git. The codeload tar file misses some git submodules. Add some extra options added in mbedtls 3.6.0. The size of the compressed ipkg increases: 230933 bin/packages/mips_24kc/base/libmbedtls13_2.28.7-r2_mips_24kc.ipk 300154 bin/packages/mips_24kc/base/libmbedtls14_3.6.0-r1_mips_24kc.ipk Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
keylen and ivlen are of type long and not size_t. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This makes it compile with mbedtls 3.6.0. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Fix compile of the mbedtls extension for hostapd. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
In package-defaults.mk the VERSION variable contains the final package version, which is a combination of `PKG_VERSION`, `PKG_RELEASE` and if used, parameters of `PKG_SOURCE_VERSION`. While this works fine for building, within the package Makefile the content VERSION varies: When building a package from a release tarball, the content of VERSION contains the actual package version, however when building from source (i.e. Git), the VERSION is overwritten by `PKG_SOURCE_VERSION`. To fix the overwrite, this commit switches from `VERSION` in download.mk to `SOURCE_VERSION` which isn't used anywhere else yet. As a result, Makefiles may pass the package version to be included inside the binary. Signed-off-by: Paul Spooren <mail@aparcar.org>
3382048
to
18b55a0
Compare
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
…chain Currently when external toolchain is used, a info.mk is created (with to-be-filled values) but is never actually filled with real values and is never actually used in rules.mk. This info.mk is used down the code with special packages like libgcc to reference info like gcc version and package special library. To mimic what is done with internal toolchain, add the include in rules.mk for info.mk also for external library and in fix toolchain/wrapper to fill the staging_dir info.mk. The logic is to check if the external toolchain provide an info.mk and if it doesn't we at least fill the GCC_VERSION with the value set in the .config file. With this special library like libgcc correctly reference and have set the GCC_VERSION variable. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
APK is the main package manager of Alpine Linux. This is just a proof of concept to double create package for OPKG and APK in parrallel.
(Personal) motivation is a long time replacement of OPKG with APK and join forces with Alpine Linux to create a great package manager for embedded devices rather than maintaining OPKG.
This is a follow up of the accidentally (mystically) closed #3811
Open Issues:
CONFIG_CLEAN_IPKG
@dangowrtAPK got
/etc/apk/world
which unfortunately is not quite like gentoo emerge's@world
, but rather just stores a list of explicitely installed packages (while gentoo's emerge@world
store a record of the manually selected dependency atoms, ie. it would remember if the user asked for an explicit version or if a package had been selected as a provider for something the user requested). However, using that gets us the same data we previously had withopkg
: if a package is user-selected or not.apk
version of itself output on cmdline (always 3.0.0pre0, should be 3.0.0pre20240205)apk-tools 3.0.0_pre20240324, compiled for aarch64.
opkg
vsapk
@aparcarupstream problem).Optional: