* [Buildroot] [RFC v2] libvirt: new package
@ 2017-09-14 20:36 Carlos Santos
2017-09-15 0:09 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Carlos Santos @ 2017-09-14 20:36 UTC (permalink / raw)
To: buildroot
Libvirt is collection of software that provides a convenient way to
manage virtual machines and other virtualization functionality, such as
storage and network interface management. These software pieces include
an API library, a daemon (libvirtd), and a command line utility (virsh).
http://libvirt.org/
---
History:
v0: primitive package, for experimental purposes only
v0->v1:
- Clarify dependence on !BR2_TOOLCHAIN_USES_MUSL
- Add run-time dependence dnsmask
- Add dependence on eudev and libpciaccess when eudev is selected
(thus detected by configure).
---
package/Config.in | 1 +
package/libvirt/Config.in | 25 +++++++++++++++++++++++++
package/libvirt/libvirt.hash | 2 ++
package/libvirt/libvirt.mk | 30 ++++++++++++++++++++++++++++++
4 files changed, 58 insertions(+)
create mode 100644 package/libvirt/Config.in
create mode 100644 package/libvirt/libvirt.hash
create mode 100644 package/libvirt/libvirt.mk
diff --git a/package/Config.in b/package/Config.in
index ba101db..ccd42c7 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1876,6 +1876,7 @@ menu "System tools"
source "package/keyutils/Config.in"
source "package/kmod/Config.in"
source "package/kvmtool/Config.in"
+ source "package/libvirt/Config.in"
source "package/lxc/Config.in"
source "package/monit/Config.in"
source "package/ncdu/Config.in"
diff --git a/package/libvirt/Config.in b/package/libvirt/Config.in
new file mode 100644
index 0000000..cc6dcb0
--- /dev/null
+++ b/package/libvirt/Config.in
@@ -0,0 +1,25 @@
+config BR2_PACKAGE_LIBVIRT
+ bool "libvirt"
+ depends on !BR2_STATIC_LIBS # libnl, lvm2
+ depends on BR2_USE_MMU # needs fork()
+ depends on BR2_TOOLCHAIN_HAS_THREADS # libnl, libtirpc
+ depends on !BR2_TOOLCHAIN_USES_MUSL # lvm2
+ select BR2_PACKAGE_DNSMASQ # run-time
+ select BR2_PACKAGE_LIBNL
+ select BR2_PACKAGE_LIBTIRPC
+ select BR2_PACKAGE_LIBPCIACCESS if BR2_PACKAGE_EUDEV
+ select BR2_PACKAGE_LIBXML2
+ select BR2_PACKAGE_LVM2
+ select BR2_PACKAGE_YAJL
+ help
+ Libvirt is collection of software that provides a convenient
+ way to manage virtual machines and other virtualization
+ functionality, such as storage and network interface
+ management. These software pieces include an API library, a
+ daemon (libvirtd), and a command line utility (virsh).
+
+ http://libvirt.org/
+
+comment "libvirt needs a glibc or uClibc toolchain w/ threads, dynamic library"
+ depends on BR2_USE_MMU
+ depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_USES_MUSL
diff --git a/package/libvirt/libvirt.hash b/package/libvirt/libvirt.hash
new file mode 100644
index 0000000..389a3c1
--- /dev/null
+++ b/package/libvirt/libvirt.hash
@@ -0,0 +1,2 @@
+# locally computed
+sha256 4e7bcb209eeef99f026484293abc733e30ed06dabcdde62c4c3e95f71b2b67ba libvirt-3.7.0.tar.xz
diff --git a/package/libvirt/libvirt.mk b/package/libvirt/libvirt.mk
new file mode 100644
index 0000000..eaf1fc3
--- /dev/null
+++ b/package/libvirt/libvirt.mk
@@ -0,0 +1,30 @@
+################################################################################
+#
+# libvirt
+#
+################################################################################
+
+LIBVIRT_VERSION = 3.7.0
+LIBVIRT_SITE = http://libvirt.org/sources
+LIBVIRT_SOURCE = libvirt-$(LIBVIRT_VERSION).tar.xz
+LIBVIRT_LICENSE = LGPL-2.1+
+LIBVIRT_LICENSE_FILES = COPYING
+# LIBVIRT_INSTALL_STAGING = YES
+LIBVIRT_DEPENDENCIES = libnl libtirpc libxml2 lvm2 yajl
+
+ifeq ($(BR2_PACKAGE_EUDEV),y)
+LIBVIRT_DEPENDENCIES += eudev libpciaccess
+endif
+
+LIBVIRT_CONF_ENV += \
+ CFLAGS="$(TARGET_CFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`" \
+ LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`"
+
+LIBVIRT_CONF_OPTS = \
+ --disable-debug \
+ --with-gnu-ld \
+ --without-dtrace \
+ --without-vmware \
+ --without-vbox
+
+$(eval $(autotools-package))
--
2.7.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* [Buildroot] [RFC v2] libvirt: new package
2017-09-14 20:36 [Buildroot] [RFC v2] libvirt: new package Carlos Santos
@ 2017-09-15 0:09 ` Thomas Petazzoni
2017-09-15 17:10 ` Carlos Santos
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2017-09-15 0:09 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 14 Sep 2017 17:36:31 -0300, Carlos Santos wrote:
> +LIBVIRT_VERSION = 3.7.0
> +LIBVIRT_SITE = http://libvirt.org/sources
> +LIBVIRT_SOURCE = libvirt-$(LIBVIRT_VERSION).tar.xz
> +LIBVIRT_LICENSE = LGPL-2.1+
> +LIBVIRT_LICENSE_FILES = COPYING
> +# LIBVIRT_INSTALL_STAGING = YES
Commented line ?
> +LIBVIRT_DEPENDENCIES = libnl libtirpc libxml2 lvm2 yajl
> +
> +ifeq ($(BR2_PACKAGE_EUDEV),y)
> +LIBVIRT_DEPENDENCIES += eudev libpciaccess
> +endif
Why do you handle eudev specifically here? Isn't the udev
implementation in systemd not suitable?
I.e, I believe this should be:
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
LIBVIRT_DEPENDENCIES += udev libpciaccess
endif
And of course, adjust Config.in accordingly.
> +LIBVIRT_CONF_ENV += \
> + CFLAGS="$(TARGET_CFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`" \
> + LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`"
Why is libtirpc unconditionally necessary? The RPC implementation built
into the C library is not sufficient ?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [RFC v2] libvirt: new package
2017-09-15 0:09 ` Thomas Petazzoni
@ 2017-09-15 17:10 ` Carlos Santos
0 siblings, 0 replies; 3+ messages in thread
From: Carlos Santos @ 2017-09-15 17:10 UTC (permalink / raw)
To: buildroot
> From: "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>
> To: "Carlos Santos" <casantos@datacom.ind.br>
> Cc: buildroot at buildroot.org
> Sent: Thursday, September 14, 2017 9:09:06 PM
> Subject: Re: [Buildroot] [RFC v2] libvirt: new package
> Hello,
>
> On Thu, 14 Sep 2017 17:36:31 -0300, Carlos Santos wrote:
>
>> +LIBVIRT_VERSION = 3.7.0
>> +LIBVIRT_SITE = http://libvirt.org/sources
>> +LIBVIRT_SOURCE = libvirt-$(LIBVIRT_VERSION).tar.xz
>> +LIBVIRT_LICENSE = LGPL-2.1+
>> +LIBVIRT_LICENSE_FILES = COPYING
>> +# LIBVIRT_INSTALL_STAGING = YES
>
> Commented line ?
A leftover from previous editions.
>> +LIBVIRT_DEPENDENCIES = libnl libtirpc libxml2 lvm2 yajl
>> +
>> +ifeq ($(BR2_PACKAGE_EUDEV),y)
>> +LIBVIRT_DEPENDENCIES += eudev libpciaccess
>> +endif
>
> Why do you handle eudev specifically here? Isn't the udev
> implementation in systemd not suitable?
Probably yes, but I didn't test with systemd, yet.
> I.e, I believe this should be:
>
> ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
> LIBVIRT_DEPENDENCIES += udev libpciaccess
> endif
>
> And of course, adjust Config.in accordingly.
Done.
>> +LIBVIRT_CONF_ENV += \
>> + CFLAGS="$(TARGET_CFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`" \
>> + LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`"
>
> Why is libtirpc unconditionally necessary? The RPC implementation built
> into the C library is not sufficient ?
Fixed. I was using a uClibc-based toolchain without built-in RPC.
--
Carlos Santos (Casantos) - DATACOM, P&D
?The greatest triumph that modern PR can offer is the transcendent
success of having your words and actions judged by your reputation,
rather than the other way about.? ? Christopher Hitchens
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-15 17:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-14 20:36 [Buildroot] [RFC v2] libvirt: new package Carlos Santos
2017-09-15 0:09 ` Thomas Petazzoni
2017-09-15 17:10 ` Carlos Santos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox