Bug 1076393 - fix nVidia KMP build
fix nVidia KMP build
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: E-mail List
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-17 14:11 UTC by Michal Suchanek
Modified: 2022-07-21 17:20 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Suchanek 2018-01-17 14:11:57 UTC
fix the macro kernel_module_package is using the "-f" option to use an alternate filelist
Comment 1 Michal Suchanek 2018-01-17 14:16:59 UTC
How far back is the new rpm going to be included?

openSUSE15 at least I suppose?
Comment 2 Takashi Iwai 2018-01-17 14:52:13 UTC
(In reply to Michal Suchanek from comment #1)
> How far back is the new rpm going to be included?
> 
> openSUSE15 at least I suppose?

Rather the question is what was practically broken without passing -f option there, regarding nvidia kmp?
Comment 3 Stefan Dirsch 2018-01-17 14:55:25 UTC
Date: Wed, 17 Jan 2018 14:26:04 +0100
From: Stefan Dirsch <sndirsch@suse.de>
To: Ruediger Oertel <ro@suse.de>
Cc: Michal Suchanek <msuchanek@suse.de>
Subject: Re: Fwd: kernel-source fix for new rpm in factory

Hi Rudi

Thanks! Michal left the company in September. Maybe Michal Suchanek can take
over? I think it needs to get fixed in kernel-source package, right?

CU,
Stefan

On Wed, Jan 17, 2018 at 12:16:49PM +0100, Ruediger Oertel wrote:
> Hi,
>
> this fix is needed so that nvidia-gfx build works again
> with the rpm in factory/tumbleweed.
>
> actually it fixes all occasions where the macro kernel_module_package
> is using the "-f" option to use an alternate filelist (virtualbox
> should at least be affected as well)
>
>
> -------- Forwarded Message --------
> Subject: kernel-source fix for new rpm in factory
> Date: Wed, 17 Jan 2018 12:13:12 +0100
> From: Ruediger Oertel <ro@fatou.suse.de>
> To: ro@suse.de
>
> diff --git a/rpm/macros.kernel-source b/rpm/macros.kernel-source
> index 62062c4aa3..555098fa94 100644
> --- a/rpm/macros.kernel-source
> +++ b/rpm/macros.kernel-source
> @@ -19,7 +19,7 @@
>           krel=$(make -s -C /usr/src/linux-obj/%_target_cpu/$flavor
> kernelrelease) \
>           kver=${krel%%-*} \
>           flavors_to_build="$flavors_to_build $flavor" \
> -         echo "%%_suse_kernel_module_subpackage -n %{-n*}%{!-n:%name} -v
> %{-v*}%{!-v:%version} -r %{-r*}%{!-r:%release} %{-p} %{-b} %{-c:-c}
> $flavor $kver" \
> +         echo "%%_suse_kernel_module_subpackage -n %{-n*}%{!-n:%name} -v
> %{-v*}%{!-v:%version} -r %{-r*}%{!-r:%release} %{-f} %{-p} %{-b}
> %{-c:-c} $flavor $kver" \
>       done \
>       echo "%%global flavors_to_build${flavors_to_build:-%%nil}" \
>       echo "%%{expand:%%(test -z '%flavors_to_build' && echo
> %%%%internal_kmp_error)}" \
Comment 5 Stefan Dirsch 2018-01-17 15:01:07 UTC
https://build.suse.de/package/view_file/Proprietary:X11:Drivers/x11-video-nvidiaG04/nvidia-gfxG04.spec?expand=1

[...]
%kernel_module_package %kmp_template %_builddir/nvidia-kmp-template -p %_sourcedir/preamble -f %_sourcedir/%kmp_filelist -x %x_flavors
[...]
Comment 6 Ruediger Oertel 2018-01-17 23:26:38 UTC
to add more detail: adding the missing %{-f} is correct for all versions of rpm,
but in the case of rpm-4.14 it fixes the error. The new version of rpm is being more strict in which options are passed inside a macro, it will now only pass those options that are actually specified while older version of rpm would just
have "leaked" the option flags to the inner macro.

the place where the problem occurs in the nvidia-gfxG03.spec case is in
/usr/lib/rpm/kernel-module-subpackage line 90ff
%files -n %{-n*}-kmp-%1
%{-f:%{expand:%(cd %_sourcedir; cat %{-f*})}}
%{!-f:%defattr (-,root,root)}
%{!-f:/lib/modules/%2-%1}


if the "-f" is passed correctly, it will read the filelist from the specified file
(kmp-filelist), otherwise it falls back to the default and just packages the stuff below /lib/modules/$version-$flavour.

if you look at the virtualbox package, you can see the same problem. In that case
it does not end in a failing package, but instead both kmp packages have the
same list of files, see:
# rpm -qpl virtualbox-guest-kmp-default-5.2.4_k4.14.13_1-2.1.x86_64.rpm
/lib/modules/4.14.13-1-default
/lib/modules/4.14.13-1-default/extra
/lib/modules/4.14.13-1-default/extra/vboxdrv.ko
/lib/modules/4.14.13-1-default/extra/vboxguest.ko
/lib/modules/4.14.13-1-default/extra/vboxnetadp.ko
/lib/modules/4.14.13-1-default/extra/vboxnetflt.ko
/lib/modules/4.14.13-1-default/extra/vboxpci.ko
/lib/modules/4.14.13-1-default/extra/vboxsf.ko
# rpm -qpl virtualbox-host-kmp-default-5.2.4_k4.14.13_1-2.1.x86_64.rpm
/lib/modules/4.14.13-1-default
/lib/modules/4.14.13-1-default/extra
/lib/modules/4.14.13-1-default/extra/vboxdrv.ko
/lib/modules/4.14.13-1-default/extra/vboxguest.ko
/lib/modules/4.14.13-1-default/extra/vboxnetadp.ko
/lib/modules/4.14.13-1-default/extra/vboxnetflt.ko
/lib/modules/4.14.13-1-default/extra/vboxpci.ko
/lib/modules/4.14.13-1-default/extra/vboxsf.ko

(check for comparison in Leap-42.3 where they have the proper content).
Comment 7 Stefan Dirsch 2018-01-25 14:49:34 UTC
May I ask, who broke this, so we can reassign this to the right person?
Comment 8 Michal Suchanek 2018-01-25 14:53:51 UTC
AFAICT it was broken to start with and a rpm update exposed the issue.
Comment 9 Stefan Dirsch 2018-01-25 15:07:59 UTC
(In reply to Michal Suchanek from comment #8)
> AFAICT it was broken to start with and a rpm update exposed the issue.

What was broken? The macro providing the "-f" parameter. And now silently removing the parameter now is ok ?!? I don't get this ...
Comment 10 Michal Suchanek 2018-01-25 16:29:40 UTC
As far as I understand the patch

 - the -f parameter was not explicitly passed
 - the new rpm does not pass it if not explicitly requested
 - the macro was fixed to pass the parameter

so what is silently removed?
Comment 11 Stefan Dirsch 2018-01-25 16:35:46 UTC
(In reply to Michal Suchanek from comment #10)
> As far as I understand the patch
> 
>  - the -f parameter was not explicitly passed
>  - the new rpm does not pass it if not explicitly requested
>  - the macro was fixed to pass the parameter
> 
> so what is silently removed?

So why is my package still failing?
Comment 12 Stefan Dirsch 2018-01-25 16:44:47 UTC
Guys, I no longer get this. Where does things need to get fixed? Is it in rpm/macros.kernel-source (by Rudi's patch in comment#3) or do I need to change the usage of the macro in the nvidia specfile somehow for TW and later? Or what else?

(In reply to Michal Suchanek from comment #0)
> fix the macro kernel_module_package is using the "-f" option to use an
> alternate filelist

I still can't parse this sentence. Sigh.
Comment 13 Michal Suchanek 2018-01-25 16:50:03 UTC
(In reply to Stefan Dirsch from comment #12)
> Guys, I no longer get this. Where does things need to get fixed? 
kernel
> Is it in
> rpm/macros.kernel-source (by Rudi's patch in comment#3)
exactly
> or do I need to
> change the usage of the macro in the nvidia specfile somehow for TW and
> later? Or what else?
wait for merge to master or build against next
> 
> (In reply to Michal Suchanek from comment #0)
> > fix the macro kernel_module_package is using the "-f" option to use an
> > alternate filelist
> 
> I still can't parse this sentence. Sigh.

Sorry, the initial description is not perfect. The following comments should clarify that.
Comment 14 Stefan Dirsch 2018-01-26 10:08:37 UTC
(In reply to Michal Suchanek from comment #13)
> (In reply to Stefan Dirsch from comment #12)
> > Guys, I no longer get this. Where does things need to get fixed? 
> kernel
> > Is it in
> > rpm/macros.kernel-source (by Rudi's patch in comment#3)
> exactly

Ok. Thanks! Now understood.

> > or do I need to
> > change the usage of the macro in the nvidia specfile somehow for TW and
> > later? Or what else?
> wait for merge to master or build against next

Ok. There is no such internal buildservice project available, against which I could test build the KMP, right?
Comment 15 Stefan Dirsch 2018-01-26 10:09:15 UTC
(In reply to Stefan Dirsch from comment #14)
> > > or do I need to
> > > change the usage of the macro in the nvidia specfile somehow for TW and
> > > later? Or what else?
> > wait for merge to master or build against next
> 
> Ok. There is no such internal buildservice project available, against which
> I could test build the KMP, right?

I mean for -next ...
Comment 16 Michal Suchanek 2018-01-30 12:30:45 UTC
This should be in master now as commit 66bd9b8da1f7bca9d5e66b963e35b85c4525631b meaning this should be fixed in 4.15
Comment 17 Stefan Dirsch 2018-02-05 11:10:35 UTC
Looks like 4.15 landed now in TW and the build appears to be fixed now. Closing as such.
Comment 20 Swamp Workflow Management 2018-11-06 15:41:46 UTC
This is an autogenerated message for OBS integration:
This bug (1076393) was mentioned in
https://build.opensuse.org/request/show/646686 42.3 / kernel-source
Comment 22 Swamp Workflow Management 2018-11-09 20:24:00 UTC
SUSE-SU-2018:3688-1: An update that solves 6 vulnerabilities and has 100 fixes is now available.

Category: security (important)
Bug References: 1011920,1012382,1012422,1020645,1031392,1035053,1042422,1043591,1048129,1050431,1050549,1053043,1054239,1057199,1065600,1065726,1067906,1073579,1076393,1078788,1079524,1082519,1083215,1083527,1084760,1089343,1091158,1093118,1094244,1094825,1095805,1096052,1098050,1098996,1099597,1101555,1103308,1103405,1104124,1105025,1105428,1105795,1105931,1106105,1106110,1106240,1106293,1106359,1106434,1106594,1106913,1106929,1107060,1107299,1107318,1107535,1107829,1107870,1108315,1108377,1108498,1109158,1109333,1109772,1109784,1109806,1109818,1109907,1109919,1109923,1110006,1110363,1110468,1110600,1110601,1110602,1110603,1110604,1110605,1110606,1110611,1110612,1110613,1110614,1110615,1110616,1110618,1110619,1111363,1111516,1111870,1112007,1112262,1112263,1112894,1112902,1112903,1112905,1113667,1113751,1113769,1114178,1114229,1114648,981083,997172
CVE References: CVE-2018-14633,CVE-2018-18281,CVE-2018-18386,CVE-2018-18690,CVE-2018-18710,CVE-2018-9516
Sources used:
SUSE Linux Enterprise Live Patching 12-SP3 (src):    kgraft-patch-SLE12-SP3_Update_21-1-4.5.2
Comment 23 Swamp Workflow Management 2018-11-09 20:50:29 UTC
SUSE-SU-2018:3689-1: An update that solves 6 vulnerabilities and has 100 fixes is now available.

Category: security (important)
Bug References: 1011920,1012382,1012422,1020645,1031392,1035053,1042422,1043591,1048129,1050431,1050549,1053043,1054239,1057199,1065600,1065726,1067906,1073579,1076393,1078788,1079524,1082519,1083215,1083527,1084760,1089343,1091158,1093118,1094244,1094825,1095805,1096052,1098050,1098996,1099597,1101555,1103308,1103405,1104124,1105025,1105428,1105795,1105931,1106105,1106110,1106240,1106293,1106359,1106434,1106594,1106913,1106929,1107060,1107299,1107318,1107535,1107829,1107870,1108315,1108377,1108498,1109158,1109333,1109772,1109784,1109806,1109818,1109907,1109919,1109923,1110006,1110363,1110468,1110600,1110601,1110602,1110603,1110604,1110605,1110606,1110611,1110612,1110613,1110614,1110615,1110616,1110618,1110619,1111363,1111516,1111870,1112007,1112262,1112263,1112894,1112902,1112903,1112905,1113667,1113751,1113769,1114178,1114229,1114648,981083,997172
CVE References: CVE-2018-14633,CVE-2018-18281,CVE-2018-18386,CVE-2018-18690,CVE-2018-18710,CVE-2018-9516
Sources used:
SUSE Linux Enterprise Workstation Extension 12-SP3 (src):    kernel-default-4.4.162-94.69.2
SUSE Linux Enterprise Software Development Kit 12-SP3 (src):    kernel-docs-4.4.162-94.69.2, kernel-obs-build-4.4.162-94.69.2
SUSE Linux Enterprise Server 12-SP3 (src):    kernel-default-4.4.162-94.69.2, kernel-source-4.4.162-94.69.2, kernel-syms-4.4.162-94.69.2, lttng-modules-2.7.1-8.6.1
SUSE Linux Enterprise High Availability 12-SP3 (src):    kernel-default-4.4.162-94.69.2
SUSE Linux Enterprise Desktop 12-SP3 (src):    kernel-default-4.4.162-94.69.2, kernel-source-4.4.162-94.69.2, kernel-syms-4.4.162-94.69.2
SUSE CaaS Platform ALL (src):    kernel-default-4.4.162-94.69.2
SUSE CaaS Platform 3.0 (src):    kernel-default-4.4.162-94.69.2
Comment 24 Swamp Workflow Management 2018-11-12 22:02:00 UTC
This is an autogenerated message for OBS integration:
This bug (1076393) was mentioned in
https://build.opensuse.org/request/show/648620 42.3 / kernel-source
Comment 25 Swamp Workflow Management 2018-11-20 20:12:23 UTC
openSUSE-SU-2018:3817-1: An update that solves 5 vulnerabilities and has 66 fixes is now available.

Category: security (important)
Bug References: 1011920,1012382,1012422,1020645,1031392,1035053,1042422,1043591,1048129,1050431,1053043,1054239,1057199,1062303,1065600,1065726,1067906,1073579,1076393,1078788,1079524,1083215,1083527,1084760,1091158,1093118,1094825,1095805,1098050,1098996,1101555,1104124,1105025,1105931,1106110,1106359,1106594,1106913,1106929,1107060,1107299,1107535,1107870,1108377,1108498,1109158,1109772,1109784,1109818,1109907,1109919,1109923,1110006,1111516,1111870,1112007,1112262,1112263,1112894,1112902,1112903,1112905,1113667,1113751,1113769,1114178,1114229,1114648,1115587,981083,997172
CVE References: CVE-2018-18281,CVE-2018-18386,CVE-2018-18690,CVE-2018-18710,CVE-2018-9516
Sources used:
openSUSE Leap 42.3 (src):    kernel-debug-4.4.162-78.1, kernel-default-4.4.162-78.1, kernel-docs-4.4.162-78.1, kernel-obs-build-4.4.162-78.1, kernel-obs-qa-4.4.162-78.1, kernel-source-4.4.162-78.1, kernel-syms-4.4.162-78.1, kernel-vanilla-4.4.162-78.1
Comment 28 Swamp Workflow Management 2019-01-16 07:01:52 UTC
SUSE-SU-2019:0095-1: An update that solves 13 vulnerabilities and has 140 fixes is now available.

Category: security (important)
Bug References: 1011920,1012382,1012422,1020645,1031392,1035053,1042422,1043591,1044189,1048129,1050431,1050549,1053043,1054239,1057199,1062303,1063026,1065600,1065726,1066223,1067906,1073579,1076393,1078788,1079524,1082519,1082863,1082979,1083215,1083527,1084427,1084536,1084760,1087209,1088087,1089343,1090535,1091158,1093118,1094244,1094555,1094562,1094825,1095344,1095753,1095805,1096052,1096547,1098050,1098996,1099597,1099810,1101555,1102495,1102715,1102870,1102875,1102877,1102879,1102882,1102896,1103156,1103269,1103308,1103405,1104124,1105025,1105428,1105795,1105931,1106095,1106105,1106110,1106240,1106293,1106359,1106434,1106512,1106594,1106913,1106929,1106934,1107060,1107299,1107318,1107535,1107829,1107870,1107924,1108096,1108170,1108240,1108281,1108315,1108377,1108399,1108498,1108803,1108823,1109038,1109158,1109333,1109336,1109337,1109441,1109772,1109784,1109806,1109818,1109907,1109919,1109923,1110006,1110297,1110337,1110363,1110468,1110600,1110601,1110602,1110603,1110604,1110605,1110606,1110611,1110612,1110613,1110614,1110615,1110616,1110618,1110619,1110930,1111363,1111516,1111870,1112007,1112262,1112263,1112894,1112902,1112903,1112905,1113667,1113751,1113766,1113769,1114178,1114229,1114648,1115593,981083,997172
CVE References: CVE-2018-14613,CVE-2018-14617,CVE-2018-14633,CVE-2018-16276,CVE-2018-16597,CVE-2018-17182,CVE-2018-18281,CVE-2018-18386,CVE-2018-18690,CVE-2018-18710,CVE-2018-7480,CVE-2018-7757,CVE-2018-9516
Sources used:
SUSE Linux Enterprise Server 12-SP3 (src):    kernel-azure-4.4.162-4.19.2, kernel-source-azure-4.4.162-4.19.1, kernel-syms-azure-4.4.162-4.19.1