[Bug 269677] New: opensuse-buildservice: Kernel Module Package macros not being defined?!?
https://bugzilla.novell.com/show_bug.cgi?id=269677 Summary: opensuse-buildservice: Kernel Module Package macros not being defined?!? Product: openSUSE 10.2 Version: Final Platform: x86-64 URL: http://build.opensuse.org/package/show?package=bluesmoke &project=home%3Atroytelford OS/Version: SLES 10 Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: froh@novell.com ReportedBy: ttelford@lnxi.com QAContact: qa@suse.de (Originally from opensuse-buildservice mailing list) On build.opensuse.org, I have an example package named "Bluesmoke") -- the URL is in the bug's URL field. 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. The .spec file is very similar to other KMP packages on build.opensuse.org, with only a couple of minor conditionals that only have an effect on Red Hat distros. In fact, it builds fine on an actual <foo linux> install, but not so much with the build service. 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). %{flavors_to_build} is defined in the same macro (%_kernel_module_package). Since I'm calling %_kernel_module_package without a problem, why aren't some of the other values that the same macro defines available? (Namely, %kernel_source, and %flavors_to_build) The macros are installed as part of the 'rpm' package on SLES 10, which the log shows is installed. The macros are also available for openSUSE. (RHEL5 also has a version of these macros as well, though the behavior is slightly different) When I run the RPM creation directly from a SLES 10 box, an openSUSE 10.2 box, or a RHEL 5 box, it builds fine. I also run into slightly different (but still the same overall problem) behavior with two different build service servers (My own, and build.opensuse.org). On build.opensuse.org: * The log shows that %kernel_source isn't being defined for OpenSUSE 10.2 * The log also shows that %flavors_to_build isn't being defined on SLES 10 (ie. the 'for' loop never loops, and nothing is really built). On my own obs server, the behavior is similar, but swapped (ie. %flavors_to_build isn't defined on openSUSE, and %kernel_source isn't defined on SLES 10). Either way -- when %suse_kernel_module_package is being called, the values %kenrel_source and %flavors_to_build aren't being set. So when I try to use %kernel_source or %flavors_to_build later on, the build fails with an error, because the macro isn't defined. This happens only within the obs -- if I build the RPM manually (from a 'real' distro install), there are no issues at all -- all of the macros are properly defined and the build works. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 froh@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mls@novell.com, agruen@novell.com ------- Comment #1 from froh@novell.com 2007-04-30 03:52 MST ------- The builds on sles10-* succeeded --- however no KMP subpackages were created at all. Looking at the build logs, it seems for some reason kernel-source and kernel-syms have not *not* installed. Michael, do we support multiple BuildRequires lines and conditional BuildRequires? the build on 10.2-i586 failed for Xen reasons. the builds on 10.2-x86_64 (and FedoraExtras6-i586) fail because indeed the macros are not defined. Andreas, have you seen something like this before on 10.2 (or fedora)? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 mls@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- URL|http://build.opensuse.org/pa|http://rudin.suse.de:8894/package/show?package=b |ckage/show?package=bluesmoke|luesmoke&project=home%3Atroytelford |&project=home%3Atroytelford | ------- Comment #2 from mls@novell.com 2007-04-30 03:58 MST ------- Multiple/Conditional BuildRequires? Of course we support them! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 froh@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |mls@novell.com ------- Comment #3 from froh@novell.com 2007-04-30 06:05 MST ------- (In reply to comment #2)
Multiple/Conditional BuildRequires? Of course we support them!
cool :) then do you have an idea why kernel-source and kernel-syms are not installed? http://build.opensuse.org/package/show?package=bluesmoke&project=home%3Atroytelford -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 mls@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|mls@novell.com | ------- Comment #4 from mls@novell.com 2007-04-30 06:16 MST ------- Sure,. it's because _vendor is not "suse". Only packages built by us have vendor == "suse". The right way to test for suse is "%if 0%?suse_version", as also stated in the build service wiki. (Dunno if redhat has the same policy). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 ------- Comment #5 from ttelford@lnxi.com 2007-04-30 10:37 MST -------
the builds on 10.2-x86_64 (and FedoraExtras6-i586) fail because indeed the macros are not defined. I'm not suprised Fedora didn't work; it only works on RHEL5, which build.opensuse.org doesn't have (which I'm not really suprised/worried about) I haven't found the related macros in Fedora 6 yet (if they exist at all).
Sure,. it's because _vendor is not "suse". Only packages built by us have vendor == "suse". The right way to test for suse is "%if 0%?suse_version", as also stated in the build service wiki.
My understanding was that I could use "_vendor == suse" to determine the distro the package is built upon. The reason I was lead to believe this is because "%_vendor" is defined as "suse" (well, at least on SuSE Distros) in /usr/lib/rpm/macros -- the same place things default definitions like %_arch, %_os, %_prefix, etc. are. As long as I didn't re-define _vendor, it should remain the same as that which is in /usr/lib/rpm/macros (ie. "suse"). _vendor has nothing to do with the "Vendor: <foo>" tag in an RPM .spec file. A spec file whose 'Vendor' tag is <foo> will still have _vendor=suse for suse distros. I thought the important part would be that only packages built by SuSE would have the "Vendor: SuSE" tag (in the .spec file), but /all/ packages built on a suse distro would have _vendor as suse. (Indeed, when I set "Vendor: foo" in the .spec file, _vendor is still "suse" during the RPM build) I don't have a problem being told I'm doing it the wrong way; that's easy to fix. However, I'd like to hear & understand how & why my reasoning is incorrect.
(Dunno if redhat has the same policy). I don't think redhat has something like suse_version, as the obs config file for Fedora defines an equivalent macro to suse_version, where on suse distros, it's unnecessary, because suse_version is defined in /usr/lib/rpm/suse_macros.
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 ------- Comment #6 from mls@novell.com 2007-05-02 06:46 MST ------- Ah, sorry, my mistake. I confused %_vendor with %vendor. I'll add a definition for %_vendor to the build service configuration. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 ------- Comment #7 from mls@novell.com 2007-05-02 06:59 MST ------- It's now defined. (Btw, I actually like the idea to use %_vendor, now that it's different from %vendor.) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 ------- Comment #8 from froh@novell.com 2007-05-02 10:14 MST ------- Will this trigger an automatic rebuild now or should Troy trigger the rebuild? I can't, I don;t have the permissions... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 mls@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #9 from mls@novell.com 2007-05-03 03:49 MST ------- As the dependencies didn't change there will be no automatic rebuild. So please trigger the build manually. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 froh@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | ------- Comment #10 from froh@novell.com 2007-05-03 07:29 MST ------- somehow it was triggered and the conditional is working now, as the BuildRequires now are in, thx for fixing that part. However there is no "installing ..." lines for the kernel-source and kernel-syms packages. I think I don't have full access to the project metadata, so I can't tell wether it's just not pointing to the right repos? But then openSUSE 10.2 should have all that's needed, right? Also, on sles, the %flavors_to_build macro seems to be set (to empty, that's why the for loop is skipped completely), while on openSUSE 10.2, it is undefined --- have the macro names changed there? is something special needed now to get them working? Also not sure which of the questions are for Michael and which ones for Andreas. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 mls@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED ------- Comment #11 from mls@novell.com 2007-05-03 08:05 MST ------- It's because the parser thinks the BuildRequires belong to the description. I'm not sure if the parser is correct or not. Move the %if "%{_vendor}" stuff before %description and it should work. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 ------- Comment #12 from ttelford@lnxi.com 2007-05-03 13:24 MST ------- The 'somehow' for it being triggered was probably me; I saw the entry that the fix should be in, and triggered a rebuild (on SLES) to verify the bug was fixed... but never got back to it on the 2nd of May. I've just retriggered a build: Worked beautifully for openSUSE 10.2. SLES 10 had the following error: + make -C %kernel_source <flavor> make: *** %kernel_source: No such file or directory. Stop. ie. kernel_source not being defined, again odd because kernel_source is defined in the same place as flavors_to_build-- the line after flavors_to_build is defined, kernel_source is defined (/usr/lib/rpm/suse_macros) One thing I'd appreciate (since I run my own OBS server as well) is the svn commit that has this bugfix. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 ------- Comment #13 from mls@novell.com 2007-05-03 13:51 MST ------- There is no svn commit, you just have to add %_vendor suse to the macros section of the base projects' configuration files. As for SLES 10: seems like we didn't support %kernel_source at that time. It should work if you put %define kernel_source() /usr/src/linux-obj/%_target_cpu/%{1} before the %suse_kernel_module_package line. Andreas, is that correct? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 ------- Comment #14 from ttelford@lnxi.com 2007-05-03 14:00 MST ------- I could do the define kernel_source line; however, but as I said -- it *is* defined, in /usr/lib/rpm/suse_macros (on SLES 10, on line 495 for my current build of SLES 10.) I have SLES 10 systems I build the package on; the problem is only within obs; outside of obs, kernel_source() works fine on SLES 10. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 ------- Comment #15 from mls@novell.com 2007-05-03 14:23 MST ------- It is *not* defined on SLES10 systems here. It really depends on the installed rpm package. rpm-4.4.2-43.4 on the GA doesn't have the macro, rpm-4.4.2-43.7 from the online update has it. The (optional) online update has the following description: --- This update fixes a few problems when building Kernel Module Packages (KMPs), and fixes how initrds are regenerated when they include modules from kernel module packages. When not building kernel module packages, this update can safely be ignored. --- Hmm. Our SLES10 build service project doesn't contain online update packages (on purpose, so that built packages work with old SLES systems). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 ttelford@lnxi.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED ------- Comment #16 from ttelford@lnxi.com 2007-05-03 17:49 MST ------- OK, that explains things. It looks like it's been resolved to me. Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=269677 froh@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- OtherBugsDependingO| |271207 nThis| | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com