Tie OBS build of custom kernel to Tumbleweed snapshot kernel version, not kernel:stable

Hey everyone,

I’ve successfully gotten OBS to build me a custom kernel with a few modifications to the kernel parameters. I’ve then added the repo from the OBS as a repository, and OBS rebuilds the kernel any time there is a change to kernel-source. It works almost perfect except that the kernel package is updated too soon. What I mean is that anytime there is a change to the kernel-source repository, OBS rebuilds my custom kernel and next time I do a zypper dup, it updates my kernel. This led to yesterday, my kernel updating to 4.14 even though it hasn’t appeared in the Tumbleweed snapshots. It ended up breaking libvirt for some reason. I would much prefer to wait until the kernel is updated in the Tumbleweed snapshot so that I know it’s gone through the testing phase before a new snapshot is released (my modifications are minor). Is there any way to do that with OBS?

I initially branched Kernel:stable/kernel-source, and since kernel:stable is the development repo for openSUSE Factory, I’m not surprised that this happened. I went ahead and tried to branch openSUSE:Factory, but it doesn’t seem to actually let me branch it directly (I’m fairly new to OBS, so I may have made mistakes). If I branch openSUSE:Factory (by going to the website and branching from the openSUSE:Factory/kernel-source package page), my actual branch is a branch of kernel:stable (at least going by the URL). And the kernel that it builds is 4.14 even though the openSUSE:Factory kernel that OBS is building is 4.13. So, either I’ve done something wrong, or branching openSUSE:Factory doesn’t work in holding the kernel back from it’s development version. Any ideas on why branching openSUSE:Factory doesn’t work?

Thanks in advance!

In case you haven’t figured out, this is how branching Factory packages should work. We are not suppose to directly edit packages under Factory, so if you want to, for example, fix something in the specfile, this fix must go first to the devel project and then, only then, the change would be submitted to Factory. And that’s why we see this default behavior when branching a package from Factory.

Now, I’m afraid it is not possible, at least AFAIC, to have a linked package against something that is published in the snapshot since the snapshot is only a build-disabled repository under openSUSE:Factory, in a _link file we can specify the project and package but not repository. So, the best you can get is when you branch the kernel from Factory, you edit your _link file to point to ‘openSUSE:Factory’; you could eventually still
get some hiccups but at least the rebuild would be decreased.

Although I don’t build kernels,

Seems to me from your description that you’ve taken a baby step already towards a possible solution based on a proper version naming. Your current build spec increments to the next major version which is likely why your system upgrades to that immediately.

You could increment your kernel a <minor> version.
I can’t think of a scenario this won’t work. Your custom kernel will always be slightly ahead of Factory if your build is automatic and shouldn’t conflict with openSUSE versions that use a “more” major version number.

TSU