builds failing with: pkgconf version is invalid
Since the most recent abuild update, some builds start failing with messages like:
ERROR: mesa-git-dev*: usr/lib/pkgconfig/dri.pc: pkgconf version 20.0.0-devel is invalid
Looking at the abuild source and git blame
:
- abuild automatically generates "provides" entries for each .pc file in the resulting apks
- therefore, each version in that provides list needs to pass apk's version check
- versions like "20.0.0-devel" don't pass it and fail the build (although it is a valid pkgconf version!)
- this check has been in place for a long time, but recently abuild started to check more dirs and this is why we see it failing now
This is somewhat ugly, because valid pkgconf versions can be invalid in apk. But in general, it makes sense to me, because these automatically generated provides entries improve package management. So we can't fix this from my perspective, and should just make sure that we pass the version check.
This can be done by replacing the invalid suffix with sed in package()
:
--- a/temp/click/APKBUILD
+++ b/temp/click/APKBUILD
@@ -35,6 +35,9 @@ check() {
package() {
cd "$builddir"
make DESTDIR="$pkgdir/" PYTHON_INSTALL_FLAGS="--root=$pkgdir/" install
+
+ # Make abuild's version check happy
+ sed -i s/+ubports//g "$pkgdir"/usr/lib/pkgconfig/*.pc
}
If the suffix was helpful to distinguish a package from another one in alpine (like mesa, mesa-grate probably), we should also use pcprefix
(see abuild source).
I'll fix the related packages currently failing on build.postmarketos.org.
CC: @z3ntu