From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id AE664E00D11; Thu, 7 Mar 2019 19:27:31 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, * medium trust * [192.103.53.11 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id BF0C6E00D04 for ; Thu, 7 Mar 2019 19:27:27 -0800 (PST) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id x283R6jS004769 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL) for ; Thu, 7 Mar 2019 19:27:17 -0800 Received: from [128.224.162.184] (128.224.162.184) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 Mar 2019 19:26:56 -0800 To: References: <1551927535-18666-1-git-send-email-dengke.du@windriver.com> <2e9b71b6-1a22-bc54-9acc-6499351359f2@windriver.com> From: ddu Message-ID: <228fa874-4fc7-decb-b85c-e74cb9f8f7f3@windriver.com> Date: Fri, 8 Mar 2019 11:26:53 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <2e9b71b6-1a22-bc54-9acc-6499351359f2@windriver.com> X-Originating-IP: [128.224.162.184] Subject: Re: [m-c-s][PATCH] libvirt: fix GROUPADD_PARAM override conflict X-BeenThere: meta-virtualization@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Discussion of layer enabling hypervisor, virtualization tool stack, and cloud support" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 03:27:31 -0000 Content-Type: multipart/alternative; boundary="------------78D57B5DD8772C593574A346" Content-Language: en-US --------------78D57B5DD8772C593574A346 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit 在 2019/3/8 上午10:44, ddu 写道: > > > 在 2019/3/7 下午10:00, Mark Hatle 写道: >> On 3/6/19 8:58 PM, Dengke Du wrote: >>> The libvirt recipe in meta-virtualization already define the GROUPADD_PARAM, >>> so we should append it, not override. >>> >>> Signed-off-by: Dengke Du >>> --- >>> meta-openstack/recipes-extended/libvirt/libvirt_4.%.bbappend | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/meta-openstack/recipes-extended/libvirt/libvirt_4.%.bbappend b/meta-openstack/recipes-extended/libvirt/libvirt_4.%.bbappend >>> index b55f9a9..0b0f011 100644 >>> --- a/meta-openstack/recipes-extended/libvirt/libvirt_4.%.bbappend >>> +++ b/meta-openstack/recipes-extended/libvirt/libvirt_4.%.bbappend >>> @@ -5,7 +5,7 @@ PACKAGECONFIG ?= "qemu lxc test remote macvtap libvirtd udev yajl \ >>> >>> inherit useradd >>> USERADD_PACKAGES = "${PN}" >>> -GROUPADD_PARAM_${PN} = "--system libvirt" >>> +GROUPADD_PARAM_${PN}_append = " ;--system libvirt" >> The __append should be fine then, but why the ';'? That part looks wrong, since >> typically the PARAM is the parameters passed directly to the groupadd program. >> I don't believe ';' is a valid parameter. > > First, adding ';' or not adding ';' are the same for building libvirt, > the group: qemu, kvm, libvirt are all created successfully. > > Second, adding ';' just according to some processing rule from the link: > > https://git.openembedded.org/openembedded-core/tree/meta/classes/useradd.bbclass#n54 > > ----------------------------------------------------------------------------------------------------------------------- > > if test "x`echo $GROUPADD_PARAM | tr -d '[:space:]'`" != "x"; then > echo "Running groupadd commands..." > # Invoke multiple instances of groupadd for parameter lists > # separated by ';' > opts=`echo "$GROUPADD_PARAM" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'` > remaining=`echo "$GROUPADD_PARAM" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'` > while test "x$opts" != "x"; do > perform_groupadd "$SYSROOT" "$OPT $opts" > if test "x$opts" = "x$remaining"; then > break > fi > opts=`echo "$remaining" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'` > remaining=`echo "$remaining" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'` > done > fi > > ----------------------------------------------------------------------------------------------------------------------- > > Maybe in order to let the codes see more orderly. > Please ignore this. Thanks. > >> --Mark >> >>> do_install_append() { >>> sed -e "s:^#unix_sock_group =:unix_sock_group =:g" -i ${D}/etc/libvirt/libvirtd.conf >>> > --------------78D57B5DD8772C593574A346 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 8bit


在 2019/3/8 上午10:44, ddu 写道:


在 2019/3/7 下午10:00, Mark Hatle 写道:
On 3/6/19 8:58 PM, Dengke Du wrote:
The libvirt recipe in meta-virtualization already define the GROUPADD_PARAM,
so we should append it, not override.

Signed-off-by: Dengke Du <dengke.du@windriver.com>
---
 meta-openstack/recipes-extended/libvirt/libvirt_4.%.bbappend | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-openstack/recipes-extended/libvirt/libvirt_4.%.bbappend b/meta-openstack/recipes-extended/libvirt/libvirt_4.%.bbappend
index b55f9a9..0b0f011 100644
--- a/meta-openstack/recipes-extended/libvirt/libvirt_4.%.bbappend
+++ b/meta-openstack/recipes-extended/libvirt/libvirt_4.%.bbappend
@@ -5,7 +5,7 @@ PACKAGECONFIG ?= "qemu lxc test remote macvtap libvirtd udev yajl \
 
 inherit useradd
 USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "--system libvirt"
+GROUPADD_PARAM_${PN}_append = " ;--system libvirt"
The __append should be fine then, but why the ';'?  That part looks wrong, since
typically the PARAM is the parameters passed directly to the groupadd program.
I don't believe ';' is a valid parameter.

First, adding ';' or not adding ';' are the same for building libvirt, the group: qemu, kvm, libvirt are all created successfully.

Second, adding ';' just according to some processing rule from the link:

    https://git.openembedded.org/openembedded-core/tree/meta/classes/useradd.bbclass#n54

-----------------------------------------------------------------------------------------------------------------------

if test "x`echo $GROUPADD_PARAM | tr -d '[:space:]'`" != "x"; then
	echo "Running groupadd commands..."
	# Invoke multiple instances of groupadd for parameter lists
	# separated by ';'
	opts=`echo "$GROUPADD_PARAM" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'`
	remaining=`echo "$GROUPADD_PARAM" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
	while test "x$opts" != "x"; do
		perform_groupadd "$SYSROOT" "$OPT $opts"
		if test "x$opts" = "x$remaining"; then
			break
		fi
		opts=`echo "$remaining" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'`
		remaining=`echo "$remaining" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
	done
fi 

-----------------------------------------------------------------------------------------------------------------------

Maybe in order to let the codes see more orderly.

Please ignore this. Thanks.

--Mark

 do_install_append() {
 	sed -e "s:^#unix_sock_group =:unix_sock_group =:g" -i ${D}/etc/libvirt/libvirtd.conf


--------------78D57B5DD8772C593574A346--