[opensuse-buildservice] Kernel Module Package Oddity
I've been working on a kernel module package that builds on multiple distros (SLES9, SLES 10, openSUSE, RHEL, Fedora, etc.). I looked at the kernel module packages on the Build Service for some guidance, did some digging, etc. I finally came upon something that worked fine on a non-buildservice machine. In fact, it builds find on an actual <foo linux> install, but not so much with the build service. In particular, SLES 10. The 'offending' parts from the spec file are along the lines of: ******* for flavor in %{flavors_to_build}; do rm -rf obj/$flavor cp -r source obj/$flavor make -C %kernel_source $flavor ${MODULES_CONF_PARAMS} \ M=$PWD/obj/$flavor/ \ modules done ******* I receive an error to the extent of: ******* + make -C %kernel_source '%{flavors_to_build}' make: *** %kernel_source: No such file or directory. Stop. error: Bad exit status from /var/tmp/rpm-tmp.25150 (%build) ******* In the SuSE RPM Macros, %kernel_source is defined as part of the %_kernel_module_package macro (which is itself called by %suse_kernel_module_package). For that matter, so is %{flavors_to_build}. Since I'm calling %_kernel_module_package without a problem, why aren't some of the other values it defines available? The macros are installed as part of the 'rpm' package on SLES 10, which the log shows is installed. (And I'm aware on other distros it's released elsewhere...) When I run the RPM creation command from a SLES 10 box, it builds fine. Any ideas? -- Troy Telford --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hi, On 2007-04-13 15:27:35 -0600, Troy Telford wrote:
In particular, SLES 10. The 'offending' parts from the spec file are along the lines of:
******* for flavor in %{flavors_to_build}; do rm -rf obj/$flavor cp -r source obj/$flavor make -C %kernel_source $flavor ${MODULES_CONF_PARAMS} \ M=$PWD/obj/$flavor/ \ modules done *******
I receive an error to the extent of:
******* + make -C %kernel_source '%{flavors_to_build}' make: *** %kernel_source: No such file or directory. Stop. error: Bad exit status from /var/tmp/rpm-tmp.25150 (%build) *******
In the SuSE RPM Macros, %kernel_source is defined as part of the %_kernel_module_package macro (which is itself called by %suse_kernel_module_package). For that matter, so is %{flavors_to_build}.
Are you sure? I can't find a "%kernel_source" macro.
Since I'm calling %_kernel_module_package without a problem, why aren't some of the other values it defines available?
The macros are installed as part of the 'rpm' package on SLES 10, which the log shows is installed. (And I'm aware on other distros it's released elsewhere...)
When I run the RPM creation command from a SLES 10 box, it builds fine.
Are you talking about your "bluesmoke" project in the BS? If yes it doesn't build correct on SLE_10 too (have a look at the buildlog, no kernel modules are built) - it just doesn't complain because it seems that the for loops aren't executed. Have a look at this document http://www.suse.de/~agruen/KMPM/KernelModulePackagesManual-CODE10.pdf - it really helps if you try to build kmp packages. At the end of the document there's an example spec file. Marcus --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Are you sure? I can't find a "%kernel_source" macro.
On openSUSE 10.2, it's in /etc/rpm/macros.kernel-source, line 22: echo "%%global kernel_source() /usr/src/linux-obj/%_target_cpu/%%%%{1}" \ (/etc/rpm/macros.kernel-source is in package kernel-source) In SLES 10, it's in /usr/lib/rpm/suse_macros, line 495: echo "%%global kernel_source() /usr/src/linux-obj/%_target_cpu/%%%%{1}" \ (suse_macros is in package rpm)
Since I'm calling %_kernel_module_package without a problem, why aren't some of the other values it defines available?
The macros are installed as part of the 'rpm' package on SLES 10, which the log shows is installed. (And I'm aware on other distros it's released elsewhere...)
When I run the RPM creation command from a SLES 10 box, it builds fine.
Are you talking about your "bluesmoke" project in the BS? If yes it doesn't build correct on SLE_10 too (have a look at the buildlog, no kernel modules are built) - it just doesn't complain because it seems that the for loops aren't executed.
the 'bluesmoke' project in the BS is one of the modules I'm working on; I have my own BS server, but I figured I could add it to my home package on the BS to see if the behavior was the same or not. It's not, FYI: on my BS server, the modules build perfectly on OpenSUSE and RHEL 5. (including the kmp/kmod packages, which aren't built on build.opensuse.org) The build error for my bluesmoke/openSUSE module on the opensuse.org build service shows the exact error I get on SLES 10 on my own server. The part where it isn't executing the 'for' loops -- that's because %flavors_to_build isn't being set either. (%flavors_to_build is set just before %kernel_source, FYI)
Have a look at this document http://www.suse.de/~agruen/KMPM/KernelModulePackagesManual-CODE10.pdf - it really helps if you try to build kmp packages. At the end of the document there's an example spec file.
Read it, printed it, used it, along with looking at the kernel modules in 'drivers:<foo>' on the build service. My only susbtantial departure from the examples given is that I use %{kernel_source} rather than '/usr/src/linux-obj' -- because Red Hat distros don't use linux-obj, they use '/usr/src/kernels/<foo>' The rpm macros clearly set %{kernel_source} to be the right place (/usr/src/linux-obj/$flavor) on suse distros, and the equivalent operation on RHEL distros. And as I previously mentioned, the RPM builds fine when built on a non-BS SLES, openSUSE, and RHEL system. When I build the package using the Build Service, I get inconsistent behavior. (And different behavior on two different Build Service servers), which is what is troubling me. -- Troy Telford --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (2)
-
Marcus Hüwe
-
Troy Telford