[opensuse-factory] VirtualBox build with X server 1.19.0
Dominique, I now have a patch for VB that builds with X server 1.19.0. Unfortunately, it breaks the build with v. 1.18.4. I do not know how to conditionally include a patch depending on the version of a required package, nor do I know how to pass that information to the build as an exported symbol. Accordingly, I have placed a requirement on the BuildRequires statement for xorg-x11-server. When I submit that change, the build will be blocked for everything but Project openSUSE:Factory:Staging:I:DVD, which started this whole mess. Is submitting an update that will block with v 1.18.4 and build for 1.19.0 the correct thing to do? Is there a better option? Thanks, Larry -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Hi Larry, Am 04.12.2016 um 17:43 schrieb Larry Finger:
Dominique,
I now have a patch for VB that builds with X server 1.19.0. Unfortunately, it breaks the build with v. 1.18.4. I do not know how to conditionally include a patch depending on the version of a required package, nor do I know how to pass that information to the build as an exported symbol.
I don't know this. But. Maybe the patch could be changed to build with both version (some ugly #ifdef stuff or similar)? Do you have a pointer to the patched package so that we can see what you're talking about and maybe help? Best regards, -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 12/05/2016 06:08 AM, Stefan Seyfried wrote:
Hi Larry,
Am 04.12.2016 um 17:43 schrieb Larry Finger:
Dominique,
I now have a patch for VB that builds with X server 1.19.0. Unfortunately, it breaks the build with v. 1.18.4. I do not know how to conditionally include a patch depending on the version of a required package, nor do I know how to pass that information to the build as an exported symbol.
I don't know this. But. Maybe the patch could be changed to build with both version (some ugly #ifdef stuff or similar)?
Do you have a pointer to the patched package so that we can see what you're talking about and maybe help?
Best regards,
Probably needs to be uglier then a ifdef, you could create a bash 1 liner based off "X -version" (or any other way to find the X11 version from the command line without launching it). You could then use a shell test too determine whether too apply the patch or not. -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adeliade Australia, UTC+9:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B
On 12/04/2016 09:39 PM, Simon Lees wrote:
On 12/05/2016 06:08 AM, Stefan Seyfried wrote:
Hi Larry,
Am 04.12.2016 um 17:43 schrieb Larry Finger:
Dominique,
I now have a patch for VB that builds with X server 1.19.0. Unfortunately, it breaks the build with v. 1.18.4. I do not know how to conditionally include a patch depending on the version of a required package, nor do I know how to pass that information to the build as an exported symbol.
I don't know this. But. Maybe the patch could be changed to build with both version (some ugly #ifdef stuff or similar)?
Do you have a pointer to the patched package so that we can see what you're talking about and maybe help?
Best regards,
Probably needs to be uglier then a ifdef, you could create a bash 1 liner based off "X -version" (or any other way to find the X11 version from the command line without launching it). You could then use a shell test too determine whether too apply the patch or not.
It is a little ugly, but with Tobias' help, I ended up with the following patch hunks for the spec file:: @@ -304,6 +307,9 @@ ########################################### %prep +xserver_str=`rpm -q xorg-x11-server` +XSERVER_VERSION=`expr match "$xserver_str" '.*\(\([0-9]\.[0-9][0-9]\.[0-9]\)\)'` +#XSERVER_VERSION=`echo $XSERVER_VERSION | sed -e 's/\.//g'` %setup -q -n VirtualBox-%{version} %patch1 -p1 %patch2 -p1 @@ -328,6 +334,11 @@ %patch113 -p1 %patch114 -p1 %patch115 -p1 +if [ "$XSERVER_VERSION" = "1.18.4" ] ; then + echo "Patch 116 not applied" +else +%patch116 -p1 +fi #copy user manual cp %{SOURCE1} UserManual.pdf That test for the server version should be for > 1.18.4, but I was not able to get the syntax right. This one works for both 1.18.4 and 1.19.0, which is what I needed. Thanks for all the help, Larry -- If I was stranded on an island and the only way to get off the island was to make a pretty UI, I’d die there. Linus Torvalds -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Larry On Sun, 2016-12-04 at 21:47 -0600, Larry Finger wrote:
It is a little ugly, but with Tobias' help, I ended up with the following patch hunks for the spec file::
@@ -304,6 +307,9 @@ ###########################################
%prep +xserver_str=`rpm -q xorg-x11-server` +XSERVER_VERSION=`expr match "$xserver_str" '.*\(\([0-9]\.[0-9][0- 9]\.[0-9]\)\)'` +#XSERVER_VERSION=`echo $XSERVER_VERSION | sed -e 's/\.//g'` %setup -q -n VirtualBox-%{version} %patch1 -p1 %patch2 -p1 @@ -328,6 +334,11 @@ %patch113 -p1 %patch114 -p1 %patch115 -p1 +if [ "$XSERVER_VERSION" = "1.18.4" ] ; then + echo "Patch 116 not applied" +else +%patch116 -p1 +fi
That IS ugly :) and totally specialcases 1.18.4 compared to anybody building the package against 1.18.3 - which would fail. The 'proper' things would be to either a) Make the patch in a way that it ca be applied unconditionally; hae the conditions inside the patch. Something like: #if XORG_VERSION_CURRENT >= 11900000 #code for version >= 1.19 #else #code for version < 1.19 #endif b) Apply the patch a bit less hackish..
if pkg-config --atleast-version 1.19 xorg-server; then %patch116 -p1 fi
On 12/05/2016 03:35 AM, Dominique Leuenberger / DimStar wrote:
Larry
On Sun, 2016-12-04 at 21:47 -0600, Larry Finger wrote:
It is a little ugly, but with Tobias' help, I ended up with the following patch hunks for the spec file::
@@ -304,6 +307,9 @@ ###########################################
%prep +xserver_str=`rpm -q xorg-x11-server` +XSERVER_VERSION=`expr match "$xserver_str" '.*\(\([0-9]\.[0-9][0- 9]\.[0-9]\)\)'` +#XSERVER_VERSION=`echo $XSERVER_VERSION | sed -e 's/\.//g'` %setup -q -n VirtualBox-%{version} %patch1 -p1 %patch2 -p1 @@ -328,6 +334,11 @@ %patch113 -p1 %patch114 -p1 %patch115 -p1 +if [ "$XSERVER_VERSION" = "1.18.4" ] ; then + echo "Patch 116 not applied" +else +%patch116 -p1 +fi
That IS ugly :) and totally specialcases 1.18.4 compared to anybody building the package against 1.18.3 - which would fail.
The 'proper' things would be to either a) Make the patch in a way that it ca be applied unconditionally; hae the conditions inside the patch. Something like:
#if XORG_VERSION_CURRENT >= 11900000 #code for version >= 1.19 #else #code for version < 1.19 #endif
b) Apply the patch a bit less hackish..
if pkg-config --atleast-version 1.19 xorg-server; then %patch116 -p1 fi
Thanks, XORG_VERSION_CURRENT was exactly what I was looking for. That has been applied to the patch, and the spec file applies it unconditionally. Larry -- If I was stranded on an island and the only way to get off the island was to make a pretty UI, I’d die there. Linus Torvalds -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Hi, the snippet i had sent to you should work without modifications (at least it did for me in another package), but anyway this is a bit more complicated, but fine as well! Greetings, Tobias On 05.12.2016 04:47, Larry Finger wrote:
On 12/04/2016 09:39 PM, Simon Lees wrote:
On 12/05/2016 06:08 AM, Stefan Seyfried wrote:
Hi Larry,
Am 04.12.2016 um 17:43 schrieb Larry Finger:
Dominique,
I now have a patch for VB that builds with X server 1.19.0. Unfortunately, it breaks the build with v. 1.18.4. I do not know how to conditionally include a patch depending on the version of a required package, nor do I know how to pass that information to the build as an exported symbol.
I don't know this. But. Maybe the patch could be changed to build with both version (some ugly #ifdef stuff or similar)?
Do you have a pointer to the patched package so that we can see what you're talking about and maybe help?
Best regards,
Probably needs to be uglier then a ifdef, you could create a bash 1 liner based off "X -version" (or any other way to find the X11 version from the command line without launching it). You could then use a shell test too determine whether too apply the patch or not.
It is a little ugly, but with Tobias' help, I ended up with the following patch hunks for the spec file::
@@ -304,6 +307,9 @@ ###########################################
%prep +xserver_str=`rpm -q xorg-x11-server` +XSERVER_VERSION=`expr match "$xserver_str" '.*\(\([0-9]\.[0-9][0-9]\.[0-9]\)\)'` +#XSERVER_VERSION=`echo $XSERVER_VERSION | sed -e 's/\.//g'` %setup -q -n VirtualBox-%{version} %patch1 -p1 %patch2 -p1 @@ -328,6 +334,11 @@ %patch113 -p1 %patch114 -p1 %patch115 -p1 +if [ "$XSERVER_VERSION" = "1.18.4" ] ; then + echo "Patch 116 not applied" +else +%patch116 -p1 +fi
#copy user manual cp %{SOURCE1} UserManual.pdf
That test for the server version should be for > 1.18.4, but I was not able to get the syntax right. This one works for both 1.18.4 and 1.19.0, which is what I needed.
Thanks for all the help,
Larry
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Hi, On 05.12.2016 04:39, Simon Lees wrote:
On 12/05/2016 06:08 AM, Stefan Seyfried wrote:
Maybe the patch could be changed to build with both version (some ugly #ifdef stuff or similar)?
Do you have a pointer to the patched package so that we can see what you're talking about and maybe help?
Best regards,
Probably needs to be uglier then a ifdef
No. There are defines in the X service includes that define version and patchlevel, so the C code could probably easily be #ifdef'ed in the patch, and the patch unconditionally applied. But since we still do not know where to look, there's not much we can do. -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On lundi, 5 décembre 2016 10.07:42 h CET Stefan Seyfried wrote:
Hi,
On 05.12.2016 04:39, Simon Lees wrote:
On 12/05/2016 06:08 AM, Stefan Seyfried wrote:
Maybe the patch could be changed to build with both version (some ugly #ifdef stuff or similar)?
Do you have a pointer to the patched package so that we can see what you're talking about and maybe help?
Best regards,
Probably needs to be uglier then a ifdef
No. There are defines in the X service includes that define version and patchlevel, so the C code could probably easily be #ifdef'ed in the patch, and the patch unconditionally applied.
But since we still do not know where to look, there's not much we can do.
Seems this hack has been pushed to the devel location of VB https://build.opensuse.org/package/show/Virtualization/virtualbox -- Bruno Friedmann Ioda-Net Sàrl www.ioda-net.ch Bareos Partner, openSUSE Member, fsfe fellowship GPG KEY : D5C9B751C4653227 irc: tigerfoot -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (6)
-
Bruno Friedmann
-
Dominique Leuenberger / DimStar
-
Larry Finger
-
Simon Lees
-
Stefan Seyfried
-
Tobias Klausmann