packages icon indicating copy to clipboard operation
packages copied to clipboard

Preparations to switch to APK package manager

Open aparcar opened this issue 5 months ago • 13 comments

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 avatar Mar 21 '24 16:03 aparcar

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:

  • [ ] ack 3.7.0+perl5.38-r1
  • [ ] atlas-probe 0~2.6.3-r1
  • [ ] bcm2711-eeprom v.2024.01.05-2712-r2
  • [ ] bcm2712-eeprom v.2024.01.05-2712-r2
  • [ ] bcm27xx-eeprom v.2024.01.05-2712-r2
  • [ ] bluez-tools 20201025.f653217-r2
  • [ ] convbin 2.4.3_b34-r1
  • [ ] debootstrap 1.0.128+nmu2+deb12u1-r1
  • [ ] faad2 0~2.11.1-r1
  • [ ] fft-eval 2019-11-27-r4d3b6faee428e3bd9f44ab6a3d70585ec50484a1
  • [ ] hfsfsck 540.1.linux3-r2
  • [x] https-dns-proxy 2023-11-19-r1
  • [ ] isc-dhcp-client-ipv4 4.4.3-P1-r7
  • [ ] isc-dhcp-client-ipv6 4.4.3-P1-r7
  • [ ] isc-dhcp-dyndns 4.4.3-P1-r7
  • [ ] isc-dhcp-omshell-ipv4 4.4.3-P1-r7
  • [ ] isc-dhcp-omshell-ipv6 4.4.3-P1-r7
  • [ ] isc-dhcp-relay-ipv4 4.4.3-P1-r7
  • [ ] isc-dhcp-relay-ipv6 4.4.3-P1-r7
  • [ ] isc-dhcp-server-ipv4 4.4.3-P1-r7
  • [ ] isc-dhcp-server-ipv6 4.4.3-P1-r7
  • [ ] ksmbd-avahi-service 0~3.5.1-r1
  • [ ] ksmbd-hotplug 0~3.5.1-r1
  • [ ] ksmbd-server 0~3.5.1-r1
  • [ ] libcli 2022.07.06~V1.10.7
  • [ ] libdb47 4.7.25.4.NC-r7
  • [ ] libdb47xx 4.7.25.4.NC-r7
  • [ ] libedit 20230828-3.1-r1
  • [ ] libfaad2 0~2.11.1-r1
  • [ ] libinih r58-r1
  • [ ] libinireader r58-r1
  • [ ] libmad 0~0.16.4-r1
  • [x] libmbim 0~1.30.0-r1 fixed in master branch
  • [ ] libmspack 0.10.1alpha-r1
  • [ ] libnet-1.2.x 1.2-rc3-r4
  • [ ] libopenssl-afalg_sync 1.2.0-beta.1-r5
  • [ ] libow 3.2p4-r2
  • [ ] libow-capi 3.2p4-r2
  • [ ] libpagekite 0.91.201110C-r2
  • [x] libqmi 0~1.34.0-r1 fixed in master branch
  • [ ] libradiotap 2020-06-22-r5
  • [ ] libuwifi 2020-03-10-r2
  • [ ] libuwsc-mbedtls 3.3.5-r5.1
  • [ ] libuwsc-nossl 3.3.5-r5.1
  • [ ] libuwsc-openssl 3.3.5-r5.1
  • [ ] libuwsc-wolfssl 3.3.5-r5.1
  • [ ] libvorbisidec 1.0.3-20180319-r2
  • [ ] libx264 2024-01-13-r1
  • [ ] lua-curl-v3 0.3.13-snapshot-r2
  • [ ] lua-openssl 0~0.8.5-1-r1
  • [ ] luajit 2.1.0-beta3-r7
  • [ ] luajit2 2.1-20231117-r1
  • [ ] luasoap 2014-08-21-raf1e100281cee4b972df10121e37e51d53367a98
  • [ ] luv 1.40.0-0-r2
  • [ ] mbim-utils 0~1.30.0-r1
  • [ ] mdio-tools 0~1.3.1-r1
  • [ ] mdns-utils IETF104-r5
  • [ ] mdnsd IETF104-r5
  • [ ] mdnsresponder IETF104-r5
  • [ ] mkhfs 540.1.linux3-r2
  • [x] modemmanager 0~1.22.0-r12 fixed in master branch
  • [ ] netdiscover 0.3-pre-beta7-r2
  • [ ] netifyd 2023.08.10~v4.4.7-r1
  • [ ] netjson-monitoring 0~0.1.1-r2
  • [ ] node v20.11.1-r1
  • [ ] node-npm v20.11.1-r1
  • [ ] nsutils 0.2-2022-05-13-d6570bdec8435dfc781b95f6b404dedf965294dd-r1
  • [ ] ntfs-3g 2022.5.17-r1-fuseint
  • [ ] ntfs-3g-low 2022.5.17-r1-fuseint
  • [ ] ntfs-3g-utils 2022.5.17-r1-fuseint
  • [ ] ntp-keygen 4.2.8p15-r4
  • [ ] ntp-utils 4.2.8p15-r4
  • [ ] ntpd 4.2.8p15-r4
  • [ ] ntpdate 4.2.8p15-r4
  • [ ] oci-runtime-tests 1.0.0-pre20210326-r3
  • [ ] oci-runtime-tool 1.0.0-pre20210326-r3
  • [ ] openocd 0~v0.12.0-r2
  • [ ] openssh-client 9.7p1-r1
  • [ ] openssh-client-utils 9.7p1-r1
  • [ ] openssh-keygen 9.7p1-r1
  • [ ] openssh-moduli 9.7p1-r1
  • [ ] openssh-server 9.7p1-r1
  • [ ] openssh-server-pam 9.7p1-r1
  • [ ] openssh-sftp-avahi-service 9.7p1-r1
  • [ ] openssh-sftp-client 9.7p1-r1
  • [ ] openssh-sftp-server 9.7p1-r1
  • [ ] openwisp-config 0~1.0.1-r2
  • [ ] openwisp-monitoring 0~0.1.1-r2
  • [ ] owfs 3.2p4-r2
  • [ ] owftpd 3.2p4-r2
  • [ ] owhttpd 3.2p4-r2
  • [ ] owserver 3.2p4-r2
  • [ ] owshell 3.2p4-r2
  • [ ] pagekitec 0.91.201110C-r2
  • [ ] perl-ack 3.7.0+perl5.38-r1
  • [ ] perl-authen-sasl 2.16+perl5.38-r2
  • [ ] perl-authen-sasl-xs 1.00+perl5.38-r2
  • [ ] perl-cgi 4.57+perl5.38-r1
  • [ ] perl-compress-bzip2 2.28+perl5.38-r1
  • [ ] perl-dbi 1.643+perl5.38-r1
  • [ ] perl-device-serialport 1.04+perl5.38-r4
  • [ ] perl-device-usb 0.38+perl5.38-r1
  • [ ] perl-encode-locale 1.05+perl5.38-r2
  • [ ] perl-file-listing 6.04+perl5.38-r2
  • [ ] perl-file-next 1.18+perl5.38-r1
  • [ ] perl-file-rsyncp 0.74+perl5.38-r1
  • [ ] perl-file-sharedir-install 0.13+perl5.38-r1
  • [ ] perl-html-form 6.07+perl5.38-r1
  • [ ] perl-html-parser 3.75+perl5.38-r1
  • [ ] perl-html-tagset 3.20+perl5.38-r4
  • [ ] perl-html-tree 3.23+perl5.38-r5
  • [ ] perl-http-cookies 6.08+perl5.38-r1
  • [ ] perl-http-daemon 6.06+perl5.38-r1
  • [ ] perl-http-date 6.05+perl5.38-r2
  • [ ] perl-http-message 6.22+perl5.38-r1
  • [ ] perl-http-negotiate 6.01+perl5.38-r2
  • [ ] perl-http-server-simple 0.52+perl5.38-r1
  • [ ] perl-inline 0.86+perl5.38-r1
  • [ ] perl-inline-c 0.81+perl5.38-r1
  • [ ] perl-io-html 1.001+perl5.38-r2
  • [ ] perl-lockfile-simple 0.208+perl5.38-r4
  • [ ] perl-lwp-mediatypes 6.04+perl5.38-r1
  • [ ] perl-net-cidr-lite 0.21+perl5.38-r1
  • [ ] perl-net-dns 1.41+perl5.38-r1
  • [ ] perl-net-http 6.19+perl5.38-r1
  • [ ] perl-net-telnet 3.04+perl5.38-r4
  • [ ] perl-netaddr-ip 4.079+perl5.38-r1
  • [ ] perl-parse-recdescent 1.967015+perl5.38-r2
  • [ ] perl-parse-yapp 1.21+perl5.38-r1
  • [ ] perl-sub-uplevel 0.2800+perl5.38-r1
  • [ ] perl-test-harness 3.42+perl5.38-r1
  • [ ] perl-test-warn 0.36+perl5.38-r1
  • [ ] perl-text-csv_xs 1.52+perl5.38-r1
  • [ ] perl-time-moment 0.44+perl5.38-r1
  • [ ] perl-try-tiny 0.31+perl5.38-r1
  • [ ] perl-uri 1.76+perl5.38-r1
  • [ ] perl-www 6.43+perl5.38-r2
  • [ ] perl-www-curl 4.17+perl5.38-r7
  • [ ] perl-www-mechanize 1.96+perl5.38-r1
  • [ ] perl-www-robotrules 6.02+perl5.38-r2
  • [ ] perl-xml-parser 2.46+perl5.38-r1
  • [ ] pingcheck 2022-03-01-r1
  • [ ] pos2kml 2.4.3_b34-r1
  • [ ] proto-bonding 2021-04-09-r3
  • [ ] pservice 2017-08-29-r3
  • [ ] python3-dateutil 2.9.0.post0-r1
  • [ ] python3-dateutil-src 2.9.0.post0-r1
  • [ ] qauld 2.0.0-beta.15-r1
  • [ ] qcsuper 2022-08-11-r1
  • [ ] qmi-utils 0~1.34.0-r1
  • [ ] re2 2023-02-01-r3
  • [ ] rnx2rtkp 2.4.3_b34-r1
  • [ ] rtkrcv 2.4.3_b34-r1
  • [ ] softethervpn-base 4.38-9760-r2
  • [ ] softethervpn-bridge 4.38-9760-r2
  • [ ] softethervpn-client 4.38-9760-r2
  • [ ] softethervpn-server 4.38-9760-r2
  • [ ] spamassassin 4.0.0+perl5.38-r1
  • [ ] spamc 4.0.0+perl5.38-r1
  • [ ] spamc-ssl 4.0.0+perl5.38-r1
  • [ ] sqm-scripts-extra 2016-06-08-r1
  • [ ] squeezelite-custom 1.9.9-1432-r2
  • [ ] squeezelite-dynamic 1.9.9-1432-r2
  • [ ] squeezelite-full 1.9.9-1432-r2
  • [ ] sslh v1.22c-r1
  • [ ] str2str 2.4.3_b34-r1
  • [ ] sudo 1.9.15p5-r1
  • [ ] svox 1.0+git20130326-r3
  • [ ] tinc 1.1pre18-r3
  • [ ] tmate-ssh-server 511fd2bd852464e76824279609a34ee93fe148a4-r2
  • [ ] tunneldigger-broker 0~v0.4.0-r1
  • [ ] tunneldigger-broker-src 0~v0.4.0-r1
  • [ ] tvheadend 2023-06-05-r2
  • [ ] udpxy 1.0-25.1-r1
  • [x] v2ray-geoip 202403210039-1
  • [x] v2ray-geosite 20240316051411-1
  • [x] v2ray-geosite-ir 202403180026-1
  • [ ] xupnpd 2018-11-20-r2
  • [ ] zlog 0~1.2.17-r1

aparcar avatar Mar 21 '24 16:03 aparcar

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

brada4 avatar Mar 21 '24 22:03 brada4

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.

BKPepe avatar Mar 23 '24 14:03 BKPepe

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

stokito avatar Mar 24 '24 10:03 stokito

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

pesa1234 avatar Mar 25 '24 17:03 pesa1234

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

  • depended on the old style of version/revision to be presented by the binary to be compatible with upstream-maintained products (client to a server or a peer in a mixed network for example)
  • contained dependencies on opkg and were incompatible with upcoming APK in the ways other than version/release number

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?

stangri avatar Mar 25 '24 20:03 stangri

libmad was fixed.

neheb avatar Apr 07 '24 04:04 neheb

ksmbd-* fixed

pesa1234 avatar Apr 07 '24 19:04 pesa1234

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

neheb avatar Apr 21 '24 02:04 neheb

@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'.

ErwanMAS avatar May 05 '24 16:05 ErwanMAS