All of lore.kernel.org
 help / color / mirror / Atom feed
From: ddu <dengke.du@windriver.com>
To: Mark Hatle <mark.hatle@windriver.com>,
	<meta-virtualization@yoctoproject.org>
Subject: Re: [m-c-s][PATCH] libvirt: fix GROUPADD_PARAM override conflict
Date: Fri, 8 Mar 2019 10:44:24 +0800	[thread overview]
Message-ID: <2e9b71b6-1a22-bc54-9acc-6499351359f2@windriver.com> (raw)
In-Reply-To: <c7e7d530-742d-744e-bbff-615347e1f5d4@windriver.com>

[-- Attachment #1: Type: text/plain, Size: 2565 bytes --]


在 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.

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

[-- Attachment #2: Type: text/html, Size: 4111 bytes --]

  reply	other threads:[~2019-03-08  2:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07  2:58 [m-c-s][PATCH] libvirt: fix GROUPADD_PARAM override conflict Dengke Du
2019-03-07 14:00 ` Mark Hatle
2019-03-08  2:44   ` ddu [this message]
2019-03-08  3:26     ` ddu
2019-03-08  6:00   ` ddu
2019-03-14  8:33     ` ddu
2019-03-14  0:11 ` ddu
2019-03-14  2:59   ` Bruce Ashfield
2019-03-14 14:18     ` Mark Hatle
2019-03-15  1:33       ` Bruce Ashfield
2019-03-17  0:22         ` Bruce Ashfield

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=2e9b71b6-1a22-bc54-9acc-6499351359f2@windriver.com \
    --to=dengke.du@windriver.com \
    --cc=mark.hatle@windriver.com \
    --cc=meta-virtualization@yoctoproject.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.