Mailinglist Archive: opensuse-factory (443 mails)

< Previous Next >
Re: [opensuse-factory] I need help with RPM macros
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 <Larry.Finger@xxxxxxxxxxxx> 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

--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups