You don‘t „patch“ a spec file. You simply adjust it, save it and the build process automatically begins.
And yes im talking also about OBS.
You don‘t „patch“ a spec file. You simply adjust it, save it and the build process automatically begins.
And yes im talking also about OBS.
If I just adjust it, then if upstream updates the software version then I have to re-adjust it again?
I really like the “link” or “branch” feature of OBS, it makes it very fast to apply custom patches. but once the software spec file comes from outside OBS, this feature becomes unusable, unfortunately.
If the version of the source changes, you simply change this number in the spec and save it. 2 seconds work.
Often it’s not just the version number that needs to be updated. Also you don’t know why you need a file like patch? Isn’t it to avoid this? Why use the most complicated way when there are convenient ways?
I’ve been using this feature for quite a while.
@fxzxmic likewise the source should be pulled direct from upstream, not from a src rpm, else you break security… Look at _service files to do foo!
I don’t know why it breaks security, but I’ll accept that explanation for now.
If OBS can import srpm directly online and show the source URL of the srpm, I think it should be more secure than the maintainers uploading unknown tarballs themselves. Maintainers only need to upload patches, which I feel would be safer.
OBS is not GUI frontend to rpmbuild
. OBS builds (binary) packages from the sources that are stored in the SCM. You need to have sources in the SCM; there is no way around it. If a package you linked to changes, OBS will attempt to merge your modified sources with the new package version. If it succeeds, you got your patch applied. If it fails, you need to readjust your patch anyway. In this case you do normal merge failure resolution like in any other SCM.
Yes, OBS will not import (updated) SRPM for you. Apparently, nobody needed it so far. If you think it is an important missing feature - nothing stops you from implementing it in OBS (GUI frontend) and submitting PR. But honestly, it is a trivial shell wrapper around osc commit
. If you want OBS to fetch the new SRPM automatically from somewhere - you would need to implement service, convince developers to integrate it and wait until build.opensuse.org is updated to include this service.
It’s good that you partially answered this question, i.e. the feature is missing only because no one is using it this way for the time being, not that this feature goes against the OBS development philosophy.
@fxzxmic again, you need to add the src URL for verification that the sources you unpack from said srpm are vanilla and not modified…
It looks like I’m stuck with a combination of github and copr for now then, after all, copr supports importing srpm and github can be used to patch spec files.
I regret not being able to enjoy the “link” or “branch” feature of OBS.
I don’t know what you mean by that. Do you mean the URL that the Source
keyword in the spec file points to? All spec files upstream of fedora have the full URL in them.
@fxzxmic yup, that should work then…
I do have fallback solution, but I just regret that I can no longer enjoy the “link” or “branch” feature on srpm outside of OBS.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.