openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
3.97k stars 3.46k forks source link

Preparations to switch to APK package manager #23706

Open aparcar opened 6 months ago

aparcar commented 6 months ago

Hi all, some fellow developers and me worked for some time now on making APK the new package manager for OpenWrt, replacing the unmaintained OPKG fork we've been using for the longest time.

APK is actively developed and used in multiple other distributions, e.g. Alpine Linux 🎉

While there is till some work ahead, I'd like to prepare everyone who maintains a package to verify that the PKG_VERSION follows Semantic Versioning <major>.<minor>.<fixup>[.<sub1>...]. APK uses a deterministic algorithm to compare versions and does not like random strings, except a valid hash prefixed with a ~.

If in doubt, please use the Docker container below to verify the used version is valid:

docker run --rm -it ghcr.io/aparcar/apk-valid-version <VERSION> [<VERSION> ...]

It will print whatever version is not valid, if you get a zero exit code, you're fine.

Please feel free to reach out for assistance and have a look at the core migration of versions.

aparcar commented 6 months ago

Below packages that would cause trouble. Please bear in mind that PKG_RELEASE is soonish prefixed with an r and may only contain a number.

Naughty list:

brada4 commented 6 months ago

isc-dhcp is EOL https://www.isc.org/dhcp/

BKPepe commented 6 months ago

Dear package maintainers,

There is no need to open individual pull requests for your packages, you are maintaining. That will be really time-consuming for you and for us. We will do it here exactly the same as it was done in the main repo via treewide commit.

stokito commented 6 months ago

I didn't know that the OpenWrt is going to switch to APK. Here is more details on this https://forum.openwrt.org/t/rfc-announcing-apkwrt/120096

pesa1234 commented 6 months ago

Dear, I've update ksmbd https://github.com/openwrt/packages/pull/23750, I'm not maintainer but if I can why don't help? Thanks guys

stangri commented 6 months ago

@aparcar Just a heads up, most of my packages either:

I believe I have fixed most of those, but I may have to submit further PRs if needed.

Also, the https-dns-proxy should be fixed with the latest PR.

PS. If the PR needs to be made against packages/luci repo for reasons other than APK migration, should I refrain from moving to the new release syntax?

neheb commented 6 months ago

libmad was fixed.

pesa1234 commented 6 months ago

ksmbd-* fixed

neheb commented 5 months ago

I noticed mtd-rw has a bad version too. https://github.com/openwrt/packages/pull/23977 fixes.

ErwanMAS commented 5 months ago

@aparcar

root@debian:~# docker run --rm -it ghcr.io/aparcar/apk-valid-version
Unable to find image 'ghcr.io/aparcar/apk-valid-version:latest' locally
docker: Error response from daemon: Head "https://ghcr.io/v2/aparcar/apk-valid-version/manifests/latest": unauthorized.
See 'docker run --help'.
stokito commented 4 months ago

The sslh migration (just as a version update) https://github.com/openwrt/packages/pull/24192 Its author confirmed that he will now always use a semantic versioning

ttc0419 commented 3 months ago

Quick question, is 24x going to use apk?

aparcar commented 3 months ago

Quick question, is 24x going to use apk?

No final decision on this.

stangri commented 2 months ago

Quick question, is 24x going to use apk?

No final decision on this.

If 24.xx is NOT going to use APK by default, would the 24.xx building tools (toolchain, SDK, CI) still prepend r to the PKG_RELEASE?

aparcar commented 1 month ago

@openwrt/packages-write I kindly ask every maintainer to check the failing package builds here and see if the PKG_VERSION need some adoption: https://buildbot.aparcar.org/faillogs/x86_64/packages/

hnyman commented 1 month ago

@aparcar In addition of versioning, there appears to be also dependency trouble. Some packages depend explicitly on opkg, and building an actual firmware will fail if apk is selected. Apk also finds more conflicts that opkg.

I built yesterday an APK enabled firmware, and had to remove one package (openssh sftp server) due to the versioning reasons, like expected. But then at image finalization I ran into conflicts with e.g. @dibdot popular 'adblock' which explicitly depends on opkg.
Similarly, some packages depend on uclient-fetch,, which apk finds to be in conflict with GNU wget, unlike opkg does.

ErwanMAS commented 1 month ago

@aparcar

root@debian:~# docker run --rm -it ghcr.io/aparcar/apk-valid-version
Unable to find image 'ghcr.io/aparcar/apk-valid-version:latest' locally
docker: Error response from daemon: Head "https://ghcr.io/v2/aparcar/apk-valid-version/manifests/latest": unauthorized.
See 'docker run --help'.

@aparcar i want to try your docker image and i have this error ^

dibdot commented 1 month ago

But then at image finalization I ran into conflicts with e.g. @dibdot popular 'adblock' which explicitly depends on opkg.

@hnyman I'll remove the opkg dependency in adblock with the next minor update - thanks for heads up!

Edit: the opkg dependency has been removed in adblock-4.2.2 (see 34db79bcd584f2da9a64dd4c1e84f138e3e4f70b)

Payne-X6 commented 1 month ago

@aparcar What to do when apk compatible version format opkg compares as an older version than the original? See libedit.

nxhack commented 1 month ago

node, node-npm: I have sent a pull request.

Update: merged

cotequeiroz commented 1 month ago

libopenssl-afalg_sync: fixed by #24897