After I get into how the build things work, I start trying to submit to Factory and declined by factory-auto bot with this reason below:
Output of check script:
Services are only allowed if they are mode=‘localonly’, ‘disabled’, ‘manual’ or ‘buildtime’. Please change the mode of obs_scm and use
osc service localrun/disabledrun.
Found _service generated file _service:obs_scm:_servicedata in checkout. Please clean this up first.Found _service generated file _service:obs_scm:clash-1.8.0.obscpio in checkout. Please clean this up first.Found _service generated file _service:obs_scm:clash.changes in checkout. Please clean this up first.Found _service generated file _service:obs_scm:clash.obsinfo in checkout. Please clean this up first.
This is really weird to me, it’s basically saying you’re not allowed to use the _service file.
Hi there. Welcome to the dark side. You’re misunderstanding the point of _service files a little. They are of great help if you know how to use, when to used, and where to use them. If a package won’t get into Factory, you can use and abuse the many sourceservices the folks are providing.
Now if the package should get into Factory, the most common use case is when a package is in facilities like GitHub/GitLab, etc, and a giving repository doesn’t generate a regular/proper release tarball, or even they provides an interesting fix you wan’t, but won’t do a release for a while. Those kinds of situation are quite a legitimate use case for a _service to checkout the code using specific tags or commits. See the Docker package for such an example.
- localonly means I have to local run the service but I can’t add “_service generated files” to the repo.
Not true, do a
geeko~> osc help add
- buildtime won’t work cause there is no internet.
buildtime can be used with some sourceservices that don’t need internet to be run.
- disabled, then why would I bother to write this _service file.
In Factory, that’s the preferred way to go, disabled, so it won’t trigger those services to run on the servers causing the package to get rebuilt. If a package gets rebuilt, things depending on it will get triggered to rebuild too. That only generates additional noise in Factory and it would help delaying snapshots getting tested and published.
- manual will make the build work but I have to manually trigger the service every fxxking time and generate a blank revision.
And also I can’t delete “_service generated files” myself, I could only download them.
So how the things should work here or you just not allowed to use obs_scm in Factory? I am really confused now.
When you run them locally you can freely add/remove stuff if needed. It’s just when they, _service files, are run on the OBS servers that they get nested like that.
Packagers nowadays have so many options to speed up their processes, you can’t imagine how much. When you get used with packaging policies/guidelines you’ll have a better understanding of the big picture that developing a distribution is.