All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qemu-system-native: disable options not included in extended tarball
@ 2020-03-19 22:44 Jeremy A. Puhlman
  2020-03-20  0:02 ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Jeremy A. Puhlman @ 2020-03-19 22:44 UTC (permalink / raw)
  To: openembedded-core

From: Jeremy Puhlman <jpuhlman@mvista.com>

* Add PACKAGECONFIG option for xkbcommon
qemu-keymap.c:16:10: fatal error: xkbcommon/xkbcommon.h: No such file or directory

* Add PACKAGECONFIG option and patch for libudev
commands-posix.c:53:10: fatal error: libudev.h: No such file or directory

* Add PACKAGECONFIG option for libxml2
util/osdep.c:136: undefined reference to `fcntl64'

- Without specifying libxml2, configure searches the system and pulls in the system
  libxml2 if it is present. In the process it adds -L/usr/lib64 which causes the
  system libc to be linked instead of the one from the extended tarball.

* Specifically remove xkbcommon and libudev from qemu-system-native PACKAGECONFIG

None of the above libraries appear to be included in the depends for any of the qemu
builds, so if they are getting linked in, its probably not intentionally.

Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
---
 .../qemu/qemu-system-native_4.2.0.bb               |  3 +++
 meta/recipes-devtools/qemu/qemu.inc                |  4 +++
 .../qemu/qemu/0001-Add-enable-disable-udev.patch   | 29 ++++++++++++++++++++++
 3 files changed, 36 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch

diff --git a/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb b/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb
index d83ee59375..f3ceaa1003 100644
--- a/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb
+++ b/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb
@@ -10,6 +10,9 @@ DEPENDS = "glib-2.0-native zlib-native pixman-native qemu-native bison-native"
 EXTRA_OECONF_append = " --target-list=${@get_qemu_system_target_list(d)}"
 
 PACKAGECONFIG ??= "fdt alsa kvm"
+# Do not exist in buildtools-extended-tarball"
+PACKAGECONFIG_remove = "xkbcommon"
+PACKAGECONFIG_remove = "libudev"
 
 # Handle distros such as CentOS 5 32-bit that do not have kvm support
 PACKAGECONFIG_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 3ce14d9fa0..7cf436783d 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -33,6 +33,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://CVE-2020-7039-1.patch \
            file://CVE-2020-7039-2.patch \
            file://CVE-2020-7039-3.patch \
+           file://0001-Add-enable-disable-udev.patch \
 	   "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
@@ -172,6 +173,9 @@ PACKAGECONFIG[spice] = "--enable-spice,--disable-spice,spice"
 PACKAGECONFIG[usb-redir] = "--enable-usb-redir,--disable-usb-redir,usbredir"
 PACKAGECONFIG[snappy] = "--enable-snappy,--disable-snappy,snappy"
 PACKAGECONFIG[glusterfs] = "--enable-glusterfs,--disable-glusterfs"
+PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
+PACKAGECONFIG[libudev] = "--enable-libudev,--disable-libudev,eudev"
+#PACKAGECONFIG[libxml2] = "--enable-libxml2,--disable-libxml2,libxml2"
 
 INSANE_SKIP_${PN} = "arch"
 
diff --git a/meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch b/meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch
new file mode 100644
index 0000000000..c2c5849d65
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch
@@ -0,0 +1,29 @@
+From a471cf4e4c73350e090eb2cd87ec959d138012e5 Mon Sep 17 00:00:00 2001
+From: Jeremy Puhlman <jpuhlman@mvista.com>
+Date: Thu, 19 Mar 2020 11:54:26 -0700
+Subject: [PATCH] Add enable/disable libudev
+
+Upstream-Status: Pending
+Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
+---
+ configure | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/configure b/configure
+index cac271c..bd116eb 100755
+--- a/configure
++++ b/configure
+@@ -1539,6 +1539,10 @@ for opt do
+   ;;
+   --disable-plugins) plugins="no"
+   ;;
++  --enable-libudev) libudev="yes"
++  ;;
++  --disable-libudev) libudev="no"
++  ;;
+   *)
+       echo "ERROR: unknown option $opt"
+       echo "Try '$0 --help' for more information"
+-- 
+1.8.3.1
+
-- 
2.13.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] qemu-system-native: disable options not included in extended tarball
  2020-03-19 22:44 [PATCH] qemu-system-native: disable options not included in extended tarball Jeremy A. Puhlman
@ 2020-03-20  0:02 ` Richard Purdie
  2020-03-20  0:06   ` Jeremy Puhlman
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2020-03-20  0:02 UTC (permalink / raw)
  To: Jeremy A. Puhlman, openembedded-core

On Thu, 2020-03-19 at 15:44 -0700, Jeremy A. Puhlman wrote:
> From: Jeremy Puhlman <jpuhlman@mvista.com>
> 
> * Add PACKAGECONFIG option for xkbcommon
> qemu-keymap.c:16:10: fatal error: xkbcommon/xkbcommon.h: No such file or directory
> 
> * Add PACKAGECONFIG option and patch for libudev
> commands-posix.c:53:10: fatal error: libudev.h: No such file or directory
> 
> * Add PACKAGECONFIG option for libxml2
> util/osdep.c:136: undefined reference to `fcntl64'
> 
> - Without specifying libxml2, configure searches the system and pulls in the system
>   libxml2 if it is present. In the process it adds -L/usr/lib64 which causes the
>   system libc to be linked instead of the one from the extended tarball.
> 
> * Specifically remove xkbcommon and libudev from qemu-system-native PACKAGECONFIG
> 
> None of the above libraries appear to be included in the depends for any of the qemu
> builds, so if they are getting linked in, its probably not intentionally.
> 
> Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
> ---
>  .../qemu/qemu-system-native_4.2.0.bb               |  3 +++
>  meta/recipes-devtools/qemu/qemu.inc                |  4 +++
>  .../qemu/qemu/0001-Add-enable-disable-udev.patch   | 29 ++++++++++++++++++++++
>  3 files changed, 36 insertions(+)
>  create mode 100644 meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch
> 
> diff --git a/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb b/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb
> index d83ee59375..f3ceaa1003 100644
> --- a/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb
> +++ b/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb
> @@ -10,6 +10,9 @@ DEPENDS = "glib-2.0-native zlib-native pixman-native qemu-native bison-native"
>  EXTRA_OECONF_append = " --target-list=${@get_qemu_system_target_list(d)}"
>  
>  PACKAGECONFIG ??= "fdt alsa kvm"
> +# Do not exist in buildtools-extended-tarball"
> +PACKAGECONFIG_remove = "xkbcommon"
> +PACKAGECONFIG_remove = "libudev"

I don't like this piece of the patch. Remove is generally a bad idea as
its very hard to counteract. If you did add this to PACKAGECONFIG, it
would add the appropriate -native pieces to DEPENDS so I'm not sure
what we're trying to achieve here anyway, it should work without this
remove code either way?

At the very least the comment is very misleading and will be hard to
understand in a few months time without looking back at this commit.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] qemu-system-native: disable options not included in extended tarball
  2020-03-20  0:02 ` Richard Purdie
@ 2020-03-20  0:06   ` Jeremy Puhlman
  0 siblings, 0 replies; 3+ messages in thread
From: Jeremy Puhlman @ 2020-03-20  0:06 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core



On 3/19/2020 5:02 PM, Richard Purdie wrote:
> On Thu, 2020-03-19 at 15:44 -0700, Jeremy A. Puhlman wrote:
>> From: Jeremy Puhlman <jpuhlman@mvista.com>
>>
>> * Add PACKAGECONFIG option for xkbcommon
>> qemu-keymap.c:16:10: fatal error: xkbcommon/xkbcommon.h: No such file or directory
>>
>> * Add PACKAGECONFIG option and patch for libudev
>> commands-posix.c:53:10: fatal error: libudev.h: No such file or directory
>>
>> * Add PACKAGECONFIG option for libxml2
>> util/osdep.c:136: undefined reference to `fcntl64'
>>
>> - Without specifying libxml2, configure searches the system and pulls in the system
>>    libxml2 if it is present. In the process it adds -L/usr/lib64 which causes the
>>    system libc to be linked instead of the one from the extended tarball.
>>
>> * Specifically remove xkbcommon and libudev from qemu-system-native PACKAGECONFIG
>>
>> None of the above libraries appear to be included in the depends for any of the qemu
>> builds, so if they are getting linked in, its probably not intentionally.
>>
>> Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
>> ---
>>   .../qemu/qemu-system-native_4.2.0.bb               |  3 +++
>>   meta/recipes-devtools/qemu/qemu.inc                |  4 +++
>>   .../qemu/qemu/0001-Add-enable-disable-udev.patch   | 29 ++++++++++++++++++++++
>>   3 files changed, 36 insertions(+)
>>   create mode 100644 meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch
>>
>> diff --git a/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb b/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb
>> index d83ee59375..f3ceaa1003 100644
>> --- a/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb
>> +++ b/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb
>> @@ -10,6 +10,9 @@ DEPENDS = "glib-2.0-native zlib-native pixman-native qemu-native bison-native"
>>   EXTRA_OECONF_append = " --target-list=${@get_qemu_system_target_list(d)}"
>>   
>>   PACKAGECONFIG ??= "fdt alsa kvm"
>> +# Do not exist in buildtools-extended-tarball"
>> +PACKAGECONFIG_remove = "xkbcommon"
>> +PACKAGECONFIG_remove = "libudev"
> I don't like this piece of the patch. Remove is generally a bad idea as
> its very hard to counteract. If you did add this to PACKAGECONFIG, it
> would add the appropriate -native pieces to DEPENDS so I'm not sure
> what we're trying to achieve here anyway, it should work without this
> remove code either way?

Fair enough, I was just trying to ensure it would build if the options 
got set elsewhere. We don't have a eudev-native or
xkbcommon-native so if it got enabled it should die from lack of 
dependencies. I was trying to be cautious.

>
> At the very least the comment is very misleading and will be hard to
> understand in a few months time without looking back at this commit.
Okay I can remove it,

-- 
Jeremy A. Puhlman
jpuhlman@mvista.com



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-20  0:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19 22:44 [PATCH] qemu-system-native: disable options not included in extended tarball Jeremy A. Puhlman
2020-03-20  0:02 ` Richard Purdie
2020-03-20  0:06   ` Jeremy Puhlman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.