Closed r0kk3rz closed 4 years ago
Thank you for explaining the OBS hurdles.
I might alter the version numbering scheme per next release to satisfy OBS, but would like to fully comprehend the issue first.
Unfortunately OBS doesn't use the
Release:
tag part of the RPM Spec and overwrites theVersion:
part with the latest tag information and expects that to be part of the tarball naming.
That is for release 3.5-8:
Release:
tag part 8 is not used by OBS.Version:
part with the latest tag information ...", hence 3.5 would be overwritten with the git tag 3.5-8, correct?sfos-upgrade-3.5-8.src.rpm
So while I believe that I am causing some issue with OBS, from your description I do not comprehend yet what exactly OBS stumbles over.
Edit / P.S.: Did you mean, "which must be a 3 digit versioning number."?
Note that for following the download link in the release section (e.g. https://github.com/Olf0/sfos-upgrade/archive/3.5-8.tar.gz
) one has to follow http-redirections in order to download e.g. sfos-upgrade-3.5-8.tar.gz
.
The correct construction of canonical download links (with the full, correct file name already in place, but still requiring an http-redirect to be followed) was discussed at issue #36 and has been introduced as Source:
tag in the spec file ever since MR #37. I wonder, why OBS does not simply use this link, as this is what build systems should do AFAIU.
Oh, I even do not know if OBS starts from the raw TARball (as assumed in the previous comment) or from the SRPM (as discussed in the comment before, and which I started releasing to satisfy the needs of build systems. ;-\ )?!?
Edit / P.S.: I.e., I don't know how to interpret this https://build.sailfishos.org/package/view_file/home:r0kk3rz/sfos-upgrade/_service?expand=1
Ah, now I remember your commit #8949a8 and my comments to it (I wonder if you noticed them), plus found its updated version #cbfd004.
The way OBS works is that it fetches the Git repo and tarballs it, and mangles the naming of it to match the tag, rather than downloading anything pre organised. It ignores everything except the final name of the tarball in the Source:
part, which unfortunately needs to match what it creates.
It also seems to ignore hyphens in the tag, so 3.5-8
turns into just 3.5
, which then doesn't match the name in the Source:
... and then the build fails.
So I would suggest switching from 3.5-8
to 3.5.8
, which is a pain, but I don't see an alternative really.
It would be nice to get this building on OBS because then we can easily add it to ported devices, which do not have an easy method of updating other than the usual ssu/zypper dance
Thank you for your explanations. There are a couple of aspects to this:
Thus I introduced these changes according to what I gathered from your description of OBS' needs:
@r0kk3rz, can you please check, if one of these is working fine with OBS now:
It's not really 'OBS' thats being inflexible, but the tar_git plugin in use by build.sailfishos.org.
Thanks for adopting the new versioning though, this now seems happy on OBS: https://build.sailfishos.org/package/show/home:r0kk3rz/sfos-upgrade
BTW, you should solely use the git tags of the release versions, otherwise you might easily retrieve a non-functional version (which I am trying to avoid for releases 😉).
Today this would have been the tag 3.6.1 instead of the virtual, autogenerated tag of the (master) branch head 3.6.1+master.20191228030140.8.gccf3943 . Consequently what you downloaded and built per OBS is a mix of v3.6.1 with changes destined for v3.6.2! Although by luck, functionality is not negatively affected in this specific case, the version numbering is: You built sfos-upgrade-3.6.1-stable2, which is a version I did and will never create.
Good point, i was mostly just checking the packaging has been fixed. I've now added the appropriate commit to match the proper version
It's not really 'OBS' thats being inflexible, but the tar_git plugin in use by build.sailfishos.org.
Thanks again for pointing this out. Unfortunately I did not remember this hint two years later, ran into the same issues again, was hinted again, lastly analysed Jolla's tar_git
and submitted this analysis by obs-service-tar-git PR #4.
Unfortunately OBS doesn't use the
Release:
tag part of the RPM Spec and overwrites theVersion:
part with the latest tag information and expects that to be part of the tarball naming.To fix this, i would suggest a change to the way you number releases, which can be a 3 digit versioning number.
eg.
3.5.8
instead of3.5-8
https://github.com/r0kk3rz/sfos-upgrade/commit/cbfd0046c8bed0271de22fe4aa55e91afc6ff20f https://build.sailfishos.org/package/show/home:r0kk3rz/sfos-upgrade