openSUSE / obs-build

OBS build script, can be used with OBS or stand alone
GNU General Public License v2.0
132 stars 183 forks source link

OBS fails to set `pkgrel=<CI_CNT>.<B_CNT>` in Archlinux builds #984

Open leukimi opened 9 months ago

leukimi commented 9 months ago

For Archlinux auto-incrementing the Release number is needed. It already works in openSUSE, Fedora and similar RPM-based distros and Debian/Ubuntu/Raspbian.

Typical PKGBUILD header looks like this:

pkgname=mypackage
pkgver=0.0.1
pkgrel=CI_CNT.B_CNT

For Debian builds see this issue there seems to be a solution in place that works.

Reason why this is needed

pacman -Sy mypackage searches all available databases for a match and may therefore choose to download a package with the same name and pkgrel version from another not-yet-freshly-synched server with shorter latency, causing a GPG or checksum mismatch detected at installation time compared to the hashes found in the openSUSE database.

Therefore, today a manual pkgrel= update is needed to force pacman to choose a newer package from the openSUSE Archlinux Extra repository. Since rebuild can happen anytime, manual update of pkgrel is not optimal and would benefit from an automatic updating mechanism such as in all the other distributions OBS build service can build.

leukimi commented 6 months ago

The answer to this question seems to have ended up in this thread and reads as follows:


"that functionality is just not implemented in the build script. You may want to create a pull request for build-recipe-arch ..."


I do not have the code for this to propose a merge.

Would somebody be willing to reuse/adapt the code from Debian/Fedora/openSUSE build script to stretch the same functionality to Archlinux/Manjaro builds and implement

pkgrel=<CI_CNT>.<B_CNT>

functionality in Archlinux/Manjaro within build-recipe-arch ?