On Fri, 12 Jul 2019 13:25:48 -0500
Larry Finger
On 7/12/19 1:07 PM, Larry Finger wrote:
On 7/10/19 1:43 PM, Michal Suchánek wrote:
On Wed, 10 Jul 2019 13:11:42 -0500 Larry Finger
wrote: In the spec file for VirtualBox is the following code:
%patch128 -p1 %if 0%{?suse_version} > 1500 || (0%{?sle_version} >= 150100 && 0%{?is_opensuse}) # Tumbleweed, Leap 15.1 and above drm adjustments %patch129 -p1 %else ^^^^^ remove %if (0%{?sle_version} == 150100) # Patch only for SLE15.1 %patch133 -p1 %endif %endif # Qt5.13 adjustments %if %{qt5ver} >= 51300 %patch131 -p1 %endif %patch132 -p1
Patch #129 is needed for Leap 15.1, and patch #133 is needed for SLE15 and for SLE15_SP1. The log shows that Patch #128 is applied, followed by #132. My problem is that Patch #133 is not used.
Anyone know why?
Because it is in the else branch which is not executed on 15.1
Yes, it did help a bit, but I still have a problem.
According to https://en.opensuse.org/openSUSE:Packaging_for_Leap, SLE15_SP1 should have the following parameters: sle_version = 150100, and is_opensuse not undefined.
Using these parameters, I have not been able to apply the patch needed handle the kernel API changes. To debug, I included the following test code:
%patch128 -p1 %if %{undefined is_opensuse} echo is_opensuse is not defined. %endif %if %{undefined sle_version} echo sle_version is not defined %else echo sle_version is "%{?sle_version}" %endif
In a build for SLE15_SP1, this snippet output the following:
[ 127s] Patch #128 (fix_lib_search.patch): [ 127s] + /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 [ 127s] patching file configure [ 127s] Hunk #1 succeeded at 1546 (offset 8 lines). [ 127s] patching file src/VBox/Additions/common/crOpenGL/Makefile.kmk [ 127s] + echo sle_version is 150000 [ 127s] sle_version is 150000
From this I conclude that contrary to the above cited web page, an "SLE15_SP1" build has "is_opensuse" defined with "sle_version" set to 150000, not 150100. These are the parameters of SLE15:Backports. Is this an error in the configuration for SLE15_SP1, or is it really a backports project?
The situation is worse than I thought. The "SLE15_SP1" project has exactly the same parameters as Leap 15.0, thus a build cannot distinguish between the two; however, the underlying kernels need a different set of patches.
Is this a bug I should report?
Larry
[ 76s] + echo suse_version 1500 [ 76s] suse_version 1500 [ 76s] + echo leap_version [ 76s] leap_version [ 76s] + echo sles_version 0 [ 76s] sles_version 0 [ 76s] + echo sle_version 150000 [ 76s] sle_version 150000 [ 76s] + echo is_opensuse 0 [ 76s] is_opensuse 0 [ 76s] + echo _project home:michals [ 76s] _project home:michals [ 76s] + echo _repo '%{_repo}' [ 76s] _repo %{_repo} [ 76s] + echo _repository SLE_15 [ 76s] _repository SLE_15 [ 41s] + echo suse_version 1500 [ 41s] suse_version 1500 [ 41s] + echo leap_version [ 41s] leap_version [ 41s] + echo sles_version 0 [ 41s] sles_version 0 [ 41s] + echo sle_version 150000 [ 41s] sle_version 150000 [ 41s] + echo is_opensuse 1 [ 41s] is_opensuse 1 [ 41s] + echo _project home:michals [ 41s] _project home:michals [ 41s] + echo _repo '%{_repo}' [ 41s] _repo %{_repo} [ 41s] + echo _repository SLE_15_Backports [ 41s] _repository SLE_15_Backports [ 34s] + echo suse_version 1500 [ 34s] suse_version 1500 [ 34s] + echo leap_version [ 34s] leap_version [ 34s] + echo sles_version 0 [ 34s] sles_version 0 [ 34s] + echo sle_version 150000 [ 34s] sle_version 150000 [ 34s] + echo is_opensuse 1 [ 34s] is_opensuse 1 [ 34s] + echo _project home:michals [ 34s] _project home:michals [ 34s] + echo _repo '%{_repo}' [ 34s] _repo %{_repo} [ 34s] + echo _repository openSUSE_Leap_15.0 [ 34s] _repository openSUSE_Leap_15.0 [ 27s] + echo suse_version 1500 [ 27s] suse_version 1500 [ 27s] + echo leap_version [ 27s] leap_version [ 27s] + echo sles_version 0 [ 27s] sles_version 0 [ 27s] + echo sle_version 150100 [ 27s] sle_version 150100 [ 27s] + echo is_opensuse 1 [ 27s] is_opensuse 1 [ 27s] + echo _project home:michals [ 27s] _project home:michals [ 27s] + echo _repo '%{_repo}' [ 27s] _repo %{_repo} [ 27s] + echo _repository openSUSE_Leap_15.1 [ 27s] _repository openSUSE_Leap_15.1 [ 92s] + echo suse_version 1500 [ 92s] suse_version 1500 [ 92s] + echo leap_version [ 92s] leap_version [ 92s] + echo sles_version 0 [ 92s] sles_version 0 [ 92s] + echo sle_version 150000 [ 92s] sle_version 150000 ^^^^^^ [ 92s] + echo is_opensuse 1 [ 92s] is_opensuse 1 [ 92s] + echo _project home:michals [ 92s] _project home:michals [ 92s] + echo _repo '%{_repo}' [ 92s] _repo %{_repo} [ 92s] + echo _repository SLE_15_SP1_Backports [ 92s] _repository SLE_15_SP1_Backports [ 38s] + echo suse_version 1500 [ 38s] suse_version 1500 [ 38s] + echo leap_version [ 38s] leap_version [ 38s] + echo sles_version 0 [ 38s] sles_version 0 [ 38s] + echo sle_version 150000 ^^^^^^ [ 38s] sle_version 150000 [ 38s] + echo is_opensuse 0 [ 38s] is_opensuse 0 [ 38s] + echo _project home:michals [ 38s] _project home:michals [ 38s] + echo _repo '%{_repo}' [ 38s] _repo %{_repo} [ 38s] + echo _repository SLE_15_SP1 [ 38s] _repository SLE_15_SP1 These look like a bug in OBS setup. You can also patch in #ifdefs on SUSE_PRODUCT_PATCHLEVEL so you get one patch for both variants. Thanks Michal -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org