Discussion:
How to specify a version of kernel-syms to use?
Lee Duncan
2014-07-23 19:57:15 UTC
Permalink
Hi:

I am trying to build a KMP package for SLES 11 SP3 using IBS.

I am modeling my package after ocfs2, if that helps answer my question.

My package patches the rbd device driver, patching rbd.c, then builds
the rbd.ko kernel module.

I can get this to work on my local system using rpmbuild. My local
system is SLES 11 SP3, and the kernel on it is 3.0.101-0.35-default.

But when I specify SLES 11 SP3 as a build target in IBS, it seems to get
kernel-syms-3.0.76-0.11.1.

This causes patch errors because the 3.0.76 kernel had an older version
of rbd.c.

In my spec file, I have:

BuildRequires: kernel-syms

I have also tried:

BuildRequires: kernel-syms = 3.0.101

and

BuildRequires: kernel-syms >= 3.0.101


I have several questions:

- Why does my system have a newer 3.0.101 kernel and the build
service have an older one?

- Can I specify 3.0.101, or should I just patch against
3.0.76?

- How do I know what kernel a particular OS flavor will use
in general?
--
Lee Duncan
SUSE Labs
--
To unsubscribe, e-mail: opensuse-packaging+***@opensuse.org
To contact the owner, e-mail: opensuse-packaging+***@opensuse.org
Jan Engelhardt
2014-07-23 20:08:32 UTC
Permalink
Post by Lee Duncan
My package patches the rbd device driver, patching rbd.c, then builds
the rbd.ko kernel module.
[...]This causes patch errors because the 3.0.76 kernel had an older version
of rbd.c.
BuildRequires: kernel-syms = 3.0.101
kernel-syms does not give you rbd.c. In fact, the source is normally
not installed anymore. So, in light of future compatibility, the only
sensible way is to ship rbd.c in your own package and not depend on
a preexisting one.
--
To unsubscribe, e-mail: opensuse-packaging+***@opensuse.org
To contact the owner, e-mail: opensuse-packaging+***@opensuse.org
Andrew Daugherity
2014-07-23 20:40:12 UTC
Permalink
Post by Lee Duncan
- Why does my system have a newer 3.0.101 kernel and the build
service have an older one?
The build service is only enabling the SLES11-SP3-Pool repo (the complete repo as of the time SP3 shipped, and a superset of the DVD), not SLES11-SP3-Updates. There have of course been several kernel updates since the release of SP3.

Perhaps someone else can explain how to enable the SP3-Updates repo for your build, or if it is even possible to do so with OBS. I myself don't know, but would also like to learn...
Post by Lee Duncan
- Can I specify 3.0.101, or should I just patch against
3.0.76?
If you can get the updates repo enabled, then you can build against the latest version, but if you can patch against the older version (and the kernel ABI hasn't changed since [1]), that might be preferable, since you'd have one package that would work with all kernel versions for a given OS/SP release. Of course, getting your patch mainlined might be the better option...
Post by Lee Duncan
- How do I know what kernel a particular OS flavor will use
in general?
Look at the kernel packages in the SLES-SPn-Pool repo, or the oss repo for opensuse (or a DVD ISO for either). Without update repos this is what will be used.


-Andrew


[1] See https://www.novell.com/developer/Kmpm-code11.pdf -- kernel packages have RPM provides/requires for some driver symbols. This is why some kmp RPMs get updated with some kernel updates, but not all.--
To unsubscribe, e-mail: opensuse-packaging+***@opensuse.org
To contact the owner, e-mail: opensuse-packaging+***@opensuse.org
Lee Duncan
2014-07-23 20:58:53 UTC
Permalink
I figured this out. Answer below (if anybody else has the problem).
Post by Lee Duncan
I am trying to build a KMP package for SLES 11 SP3 using IBS.
I am modeling my package after ocfs2, if that helps answer my question.
My package patches the rbd device driver, patching rbd.c, then builds
the rbd.ko kernel module.
I can get this to work on my local system using rpmbuild. My local
system is SLES 11 SP3, and the kernel on it is 3.0.101-0.35-default.
But when I specify SLES 11 SP3 as a build target in IBS, it seems to get
kernel-syms-3.0.76-0.11.1.
This causes patch errors because the 3.0.76 kernel had an older version
of rbd.c.
BuildRequires: kernel-syms
BuildRequires: kernel-syms = 3.0.101
and
BuildRequires: kernel-syms >= 3.0.101
- Why does my system have a newer 3.0.101 kernel and the build
service have an older one?
Because I was using SLE 11 SP3, and I needed to use SLE 11 SP3
Update:Test, under the "Advanced" tab in the repository.
Post by Lee Duncan
- Can I specify 3.0.101, or should I just patch against
3.0.76?
- How do I know what kernel a particular OS flavor will use
in general?
I know I can check the git tags in the kernel source repository to find
out what driver each kernel version has, but I still don't know where a
list of release-vs-kernel-version exists.
--
Lee Duncan
SUSE Labs
--
To unsubscribe, e-mail: opensuse-packaging+***@opensuse.org
To contact the owner, e-mail: opensuse-packaging+***@opensuse.org
Dominique Leuenberger a.k.a. Dimstar
2014-07-23 20:44:29 UTC
Permalink
Post by Lee Duncan
Post by Lee Duncan
- How do I know what kernel a particular OS flavor will use
in general?
I know I can check the git tags in the kernel source repository to find
out what driver each kernel version has, but I still don't know where a
list of release-vs-kernel-version exists.
At least for SLE/OES, you should be able to refer to:

http://www.novell.com/support/kb/doc.php?id=3594951

Cheers,
Dominique
--
To unsubscribe, e-mail: opensuse-packaging+***@opensuse.org
To contact the owner, e-mail: opensuse-packaging+***@opensuse.org
Loading...