From nobody Sat May 4 13:53:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1665665869; cv=none; d=zohomail.com; s=zohoarc; b=KfvngMwOZur2h/XymJRmotCYR5uRggORu1vNpFR34spd0ejgy+e0PF+qJAeFtNmTryKFMlTXxNmi4bwBiVKmP5nk67pbVbnFr0ywW0jZw1GYFEdK9YvfeBeqajhw/nFdsIDj97H8fdwWTfv1QW9N3HBoXYkwqlcgVbqzxjirVBs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665665869; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=QTacsNzFNnE63oiAZu1zl9Nr9wEPFDkarNDRXaNrygc=; b=U/BXF7FZk5wmcY9Vvw59xR+RaSAB8YOAcBiSIDq1A9cyUQ5NEba/vFgaB5vhk+tN/JcF8Y7XzU3swkMKPoQVsn4AtODXCzXVmH32TgaCwx0HavUTXyocmaoqBWYWCIbbNCw/E0jq2utk+MOMju29cp+vWWN8eJqjlIMlWhapdRQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1665665869499948.0606155178198; Thu, 13 Oct 2022 05:57:49 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-597-ftV8QJolOlSd_58COtyxOA-1; Thu, 13 Oct 2022 08:57:47 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4EE0A2932482; Thu, 13 Oct 2022 12:57:44 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2820F4B4019; Thu, 13 Oct 2022 12:57:42 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E955F1946588; Thu, 13 Oct 2022 12:57:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9BDE21946587 for ; Thu, 13 Oct 2022 12:57:35 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7A1601415102; Thu, 13 Oct 2022 12:57:35 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-39.brq.redhat.com [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id A30771415108 for ; Thu, 13 Oct 2022 12:57:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665665868; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=QTacsNzFNnE63oiAZu1zl9Nr9wEPFDkarNDRXaNrygc=; b=eHZT8Y5oGi4SqeRsFM1B2KYjVl90W10366pXpBAIJYwsZ7hofi++6vTZy3Rk0qDCNbH9kJ jMl855o5IgOJzpB/2NyXE6XCp1X7zX8yeoKZUttwbLwDzSUzpD/xa5DKuthWH9dAJms1Xz H4vlPuFHE/FX1q9WSZ9Pwmvjm4P6Z0g= X-MC-Unique: ftV8QJolOlSd_58COtyxOA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH] schema: Re-structure schema for to avoid broken validation Date: Thu, 13 Oct 2022 14:57:33 +0200 Message-Id: <9571d42fedbe898bb445c022c6bd9f18578b5a16.1665665853.git.pkrempa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1665665871255100001 Content-Type: text/plain; charset="utf-8" The validation of a '' device fails if the elements inside are not ordered in the order in the schema despite using . This is a bug in libxml2's validator as removing the '' property from the definition of the 'type' attribute with 'mount' variable fixes the problem. I've reported it as another instance of a seemingly related issue: https://gitlab.gnome.org/GNOME/libxml2/-/issues/131 Meanwhile libvirt can re-arrange the schema by extracting the common bits into a new definition and referencing them from each of the choice groups explicitly. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/392 Signed-off-by: Peter Krempa Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: J=C3=A1n Tomko --- src/conf/schemas/domaincommon.rng | 365 +++++++++++++++--------------- 1 file changed, 186 insertions(+), 179 deletions(-) diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index 5ff15e8787..d346442510 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -2860,205 +2860,212 @@ + + + + + + + + + + + passthrough + mapped + squash + + + + + + + default + remap + forbid + warn + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - file - - - - - - - - - - - - - - - - block - - - - - - - - - - - - - - - + + + + virtio + virtio-transitional + virtio-non-transitional + + + + + + + file + + - - mount - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - bind + + + + + + + + + + + block + + + + - - - - - - - - - - - - - - - template - - - - - - - - - - - - - - - - ram - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - passthrough - mapped - squash - + + mount - - + + + + + + + + - default - remap - forbid - warn + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + - + + bind + - - - - - + + + + + + + + + - - - - + + + + + + template + + + + + + + + + + - - - - - - virtio - virtio-transitional - virtio-non-transitional - + + + + + + ram - - + + + + + + + + + + + + + + + + + + + +