All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David Nyström" <david.nystrom@enea.com>
To: Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: meta-virtualization@yoctoproject.org,
	Richard Purdie <richard.purdie@linuxfoundation.org>
Subject: Re: [PATCHv3 13/14] Upgraded to libvirt 1.0.0, and added a more detailed packageconfig
Date: Thu, 6 Dec 2012 15:53:57 +0100	[thread overview]
Message-ID: <50C0B185.9050807@enea.com> (raw)
In-Reply-To: <CADkTA4NrbWtbBB-0oqHPC1VHMbvxkJnKKfbYD9p68cD_jwX02A@mail.gmail.com>



On 12/06/2012 03:26 PM, Bruce Ashfield wrote:
> On Thu, Dec 6, 2012 at 9:03 AM, <david.c.nystrom@gmail.com> wrote:
>
>> From: David Nyström <david.nystrom@enea.com>
>>
>> ---
>>   recipes-extended/libvirt/libvirt_1.0.0.bb |  139
>> +++++++++++++++++++++++++++++
>>   1 file changed, 139 insertions(+)
>>   create mode 100644 recipes-extended/libvirt/libvirt_1.0.0.bb
>>
>> diff --git a/recipes-extended/libvirt/libvirt_1.0.0.bbb/recipes-extended/libvirt/
>> libvirt_1.0.0.bb
>> new file mode 100644
>> index 0000000..45b460a
>> --- /dev/null
>> +++ b/recipes-extended/libvirt/libvirt_1.0.0.bb
>> @@ -0,0 +1,139 @@
>> +DESCRIPTION = "A toolkit to interact with the virtualization capabilities
>> of recent versions of Linux."
>> +HOMEPAGE = "http://libvirt.org"
>> +LICENSE = "GPLv2+"
>> +LIC_FILES_CHKSUM = "file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f"
>> +SECTION = "console/tools"
>> +PR = "r2"
>> +
>> +DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap
>> util-linux e2fsprogs pm-utils \
>> +          iptables ebtables dnsmasq readline"
>> +
>> +# These might be included by PACKAGECONFIG
>> +#RRECOMMENDS+= "polkit qemu yajl libnl lxc netcf"
>> +
>> +RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasq
>> openbsd-netcat"
>> +RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode"
>> +RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode"
>> +
>> +#connman blocks the 53 port and libvirtd can't start its DNS service
>> +RCONFLICTS_${PN}_libvirtd = "connman"
>> +
>> +SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz \
>> +       file://libvirtd.sh \
>> +       file://libvirtd.conf"
>> +
>> +SRC_URI[md5sum] = "7c8b006de7338e30866bb56738803b21"
>> +SRC_URI[sha256sum] =
>> "14c8a30ebfb939c82cab5f759a95d09646b43b4210e45490e92459ae65123076"
>> +
>> +inherit autotools gettext update-rc.d
>> +
>> +CACHED_CONFIGUREVARS += "\
>> +ac_cv_path_XMLLINT=/usr/bin/xmllint \
>> +ac_cv_path_XMLCATLOG=/usr/bin/xmlcatalog \
>> +ac_cv_path_AUGPARSE=/usr/bin/augparse \
>> +ac_cv_path_DNSMASQ=/usr/bin/dnsmasq \
>> +ac_cv_path_BRCTL=/usr/sbin/brctl \
>> +ac_cv_path_TC=/sbin/tc \
>> +ac_cv_path_UDEVADM=/sbin/udevadm \
>> +ac_cv_path_MODPROBE=/sbin/modprobe \
>> +ac_cv_path_IP_PATH=/bin/ip \
>> +ac_cv_path_IPTABLES_PATH=/usr/sbin/iptables \
>> +ac_cv_path_IP6TABLES_PATH=/usr/sbin/ip6tables \
>> +ac_cv_path_MOUNT=/bin/mount \
>> +ac_cv_path_UMOUNT=/bin/umount \
>> +ac_cv_path_MKFS=/usr/sbin/mkfs \
>> +ac_cv_path_SHOWMOUNT=/usr/sbin/showmount \
>> +ac_cv_path_PVCREATE=/usr/sbin/pvcreate \
>> +ac_cv_path_VGCREATE=/usr/sbin/vgcreate \
>> +ac_cv_path_LVCREATE=/usr/sbin/lvcreate \
>> +ac_cv_path_PVREMOVE=/usr/sbin/pvremove \
>> +ac_cv_path_VGREMOVE=/usr/sbin/vgremove \
>> +ac_cv_path_LVREMOVE=/usr/sbin/lvremove \
>> +ac_cv_path_LVCHANGE=/usr/sbin/lvchange \
>> +ac_cv_path_VGCHANGE=/usr/sbin/vgchange \
>> +ac_cv_path_VGSCAN=/usr/sbin/vgscan \
>> +ac_cv_path_PVS=/usr/sbin/pvs \
>> +ac_cv_path_VGS=/usr/sbin/vgs \
>> +ac_cv_path_LVS=/usr/sbin/lvs \
>> +ac_cv_path_PARTED=/usr/sbin/parted \
>> +ac_cv_path_DMSETUP=/usr/sbin/dmsetup"
>> +
>> +# Some other possible paths we are not yet setting
>> +#ac_cv_path_RPCGEN=
>> +#ac_cv_path_XSLTPROC=
>> +#ac_cv_path_RADVD=
>> +#ac_cv_path_UDEVSETTLE=
>> +#ac_cv_path_EBTABLES_PATH=
>> +#ac_cv_path_PKG_CONFIG=
>> +#ac_cv_path_ac_pt_PKG_CONFIG
>> +#ac_cv_path_PKCHECK_PATH=
>> +#ac_cv_path_POLKIT_AUTH=
>> +#ac_cv_path_DTRACE=
>> +#ac_cv_path_ISCSIADM=
>> +#ac_cv_path_MSGFMT=
>> +#ac_cv_path_GMSGFMT=
>> +#ac_cv_path_XGETTEXT=
>> +#ac_cv_path_MSGMERGE=
>> +#ac_cv_path_SCRUB=
>> +#ac_cv_path_PYTHON=
>> +
>> +ALLOW_EMPTY_${PN} = "1"
>> +
>> +PACKAGES =+ "${PN}-libvirtd ${PN}-virsh"
>> +
>> +FILES_${PN}-libvirtd = "${sysconfdir}/init.d \
>> +       ${sysconfdir}/sysctl.d \
>> +       ${sysconfdir}/logrotate.d \
>> +       ${sysconfdir}/libvirt/libvirtd.conf \
>> +       ${sbindir}/libvirtd"
>>
>
> What happens if libvirtd is disabled via:
>
>   PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd"
>
> I haven't tried it to see, but on a glance, it looks like some missing files
> and packaging issues.
>
> Cheers,
>
> Bruce

I assume your suggested solution for this would be to 
ALLOW_EMPTY_${PN}-libvirtd = "1".
Not good for QA, but do we have any other options ?

>
> +
>> +FILES_${PN}-virsh = "${bindir}/virsh"
>> +FILES_${PN} += "${libdir}/libvirt/connection-driver \
>> +           ${datadir}/augeas \
>> +           ${datadir}/polkit-1"
>> +
>> +FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug"
>> +FILES_${PN}-staticdev += "${libdir}/*.a
>> ${libdir}/libvirt/connection-driver/*.a"
>> +
>> +INITSCRIPT_PACKAGES = "${PN}-libvirtd"
>> +INITSCRIPT_NAME_${PN}-libvirtd = "libvirtd"
>> +INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72"
>> +
>> +# xen-minimal config
>> +#PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd"
>> +
>> +# full config
>> +PACKAGECONFIG ??= "qemu yajl xen libxl xen-inotify uml openvz vmware vbox
>> esx \
>> +                  polkit lxc test remote macvtap libvirtd netcf"
>> +
>> +PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu"
>> +PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl"
>> +PACKAGECONFIG[xen] = "--with-xen,--without-xen,xen"
>> +PACKAGECONFIG[xenapi] = "--with-xenapi,--without-xenapi"
>> +PACKAGECONFIG[libxl] =
>> "--with-libxl=${STAGING_DIR_TARGET}/lib,--without-libxl,xen"
>> +PACKAGECONFIG[xen-inotify] =
>> "--with-xen-inotify,--without-xen-inotify,xen"
>> +PACKAGECONFIG[uml] = "--with-uml, --without-uml"
>> +PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz"
>> +PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware"
>> +PACKAGECONFIG[phyp] = "--with-phyp,--without-phyp"
>> +PACKAGECONFIG[vbox] = "--with-vbox,--without-vbox"
>> +PACKAGECONFIG[esx] = "--with-esx,--without-esx"
>> +PACKAGECONFIG[hyperv] = "--with-hyperv,--without-hyperv"
>> +PACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit,polkit"
>> +PACKAGECONFIG[lxc] = "--with-lxc,--without-lxc, lxc"
>> +PACKAGECONFIG[test] = "--with-test=yes,--with-test=no"
>> +PACKAGECONFIG[remote] = "--with-remote,--without-remote"
>> +PACKAGECONFIG[macvtap] =
>> "--with-macvtap=yes,--with-macvtap=no,libnl,libnl"
>> +PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd"
>> +PACKAGECONFIG[netcf] = "--with-netcf,--without-netcf,netcf,netcf"
>>
>
> Another random questions. I've got some other libvirt recipes kicking
> around, and
> is it generally frowned upon to trigger options via DISTRO_FEATURES vs
> PACKAGECONFIG ? I'm thinking of bigger scale features like selinux, which
> are
> decided on a distro basis.
>
> Cheers,
>
> Bruce

Thats a good question, CC:ing RP who added the feature in 1.3.

Don't know whats generally frowned upon by the community, I see 
PACKAGECONFIG as a more fine granular way of doing this.
Alot of packages in oe-core do a R/DEPENDS split with:

DEPENDS += ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 
libxtst libice libsm libxcb gtk+', '', d)}"

I see no reason for why DISTRO_FEATURES can't select a PACKAGECONFIG 
setup instead. I'm guessing that's why it was added. i.e.

PACKAGECONFIG += ${@base_contains('DISTRO_FEATURES', 'kvm', 'qemu yajl', 
'', d)}"


>
>
>> +
>> +# Enable the Python tool support
>> +require libvirt-python.inc
>> +
>> +do_install_append() {
>> +       install -d ${D}/etc/init.d
>> +       install -d ${D}/etc/libvirt
>> +
>> +       install -m 0755 ${WORKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd
>> +       install -m 0644 ${WORKDIR}/libvirtd.conf
>> ${D}/etc/libvirt/libvirtd.conf
>> +}
>> --
>> 1.7.9.5
>>
>> _______________________________________________
>> meta-virtualization mailing list
>> meta-virtualization@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-virtualization
>>
>
>
>
>
>
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization
>


  reply	other threads:[~2012-12-06 14:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-06 14:03 [PATCHv3 00/14] Addition of meta-cloud david.c.nystrom
2012-12-06 14:03 ` [PATCHv3 01/14] Added protobuf-c criu dependency david.c.nystrom
2012-12-06 14:03 ` [PATCHv3 02/14] Added protobuf " david.c.nystrom
2012-12-06 14:03 ` [PATCHv3 03/14] Added CRIU recipe david.c.nystrom
2012-12-06 14:03 ` [PATCHv3 04/14] Added lxc recipe david.c.nystrom
2012-12-06 14:15   ` Bruce Ashfield
2012-12-06 14:20     ` David Nyström
2012-12-06 14:03 ` [PATCHv3 05/14] Added netcf recipe, libvirt dependency david.c.nystrom
2012-12-06 14:03 ` [PATCHv3 06/14] Added openbsd-netcat " david.c.nystrom
2012-12-06 14:20   ` Bruce Ashfield
2012-12-06 14:23     ` David Nyström
2012-12-06 14:40       ` Bruce Ashfield
2012-12-06 14:03 ` [PATCHv3 07/14] Added openflow recipe david.c.nystrom
2012-12-06 14:03 ` [PATCHv3 08/14] Added openvswitch recipe david.c.nystrom
2012-12-06 14:03 ` [PATCHv3 09/14] Added .gitignore file david.c.nystrom
2012-12-06 14:03 ` [PATCHv3 10/14] Changed David Nyströms email in README david.c.nystrom
2012-12-06 14:03 ` [PATCHv3 11/14] Added template cloud-* images david.c.nystrom
2012-12-06 14:03 ` [PATCHv3 12/14] Added some details in README, and made the description common david.c.nystrom
2012-12-06 14:03 ` [PATCHv3 13/14] Upgraded to libvirt 1.0.0, and added a more detailed packageconfig david.c.nystrom
2012-12-06 14:26   ` Bruce Ashfield
2012-12-06 14:53     ` David Nyström [this message]
2012-12-06 15:14       ` Saul Wold
2012-12-06 16:11         ` David Nyström
2012-12-06 15:16       ` Richard Purdie
2012-12-06 14:03 ` [PATCHv3 14/14] Added kernel configuration for LxC and in kernel OpenvSwitch david.c.nystrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50C0B185.9050807@enea.com \
    --to=david.nystrom@enea.com \
    --cc=bruce.ashfield@gmail.com \
    --cc=meta-virtualization@yoctoproject.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.