From nobody Tue May 7 14:52:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1640703446; cv=none; d=zohomail.com; s=zohoarc; b=e/nNgoOncZZoOXetQdcbID5YNo2boRUG0UttYS/vjCA5JOaVDcp4LJIoTrC1gQ+WcNo4NniwA8S/qehgbVElPNGD4O+mfcoYbbTdNGLuTjQEAfS8rk57tszqc+f6lFUUxg5NVzajMLAWjKpo22qZwzCRNwCdPg2Lp31dDjQAf10= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640703446; 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=s72Cx+n/D7MfAic0qW0g17U+S5QCJVcWCKZEWyC6tLA=; b=BAEs1KjYKTtQJKXBSsbzCTEZhg5QXaxah+CSIYN12/mJw7q36Zw5e/kn6PUc3NzuO7ZEQgzFyKdEOhUpLxfhwVMwosu/hBQVJHrYbaMD5gciIPIFRsbysHaee/pOtkolmGsx3Wauyosf1wi3v/vjj5cE0gHdJyqZgeyiA8InxQU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1640703446516228.3068509290996; Tue, 28 Dec 2021 06:57:26 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-580-pN8Hc4z0NlSSw4H6u-Ph2g-1; Tue, 28 Dec 2021 09:57:24 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 040D364166; Tue, 28 Dec 2021 14:57:18 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 41739708DD; Tue, 28 Dec 2021 14:57:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 988E04BB7C; Tue, 28 Dec 2021 14:57:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BSEv9mX007132 for ; Tue, 28 Dec 2021 09:57:09 -0500 Received: by smtp.corp.redhat.com (Postfix) id 49BD0782D2; Tue, 28 Dec 2021 14:57:09 +0000 (UTC) Received: from kinshicho.fritz.box (unknown [10.40.192.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5A152782DA for ; Tue, 28 Dec 2021 14:56:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640703445; 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=s72Cx+n/D7MfAic0qW0g17U+S5QCJVcWCKZEWyC6tLA=; b=WeqtWWiXc14mQKe73ARbudBkezb11N9U67S9hWi7XeLUfhwvaiMvPXi2JZ78QUoQNIC4kN 5cLtEqowob3iAJM+iX/a04pIcSWJhdHluebE5gaY27Nrlvt7m60rcsFkLF9I202eFCgnlV ZpUGWYhVZvKxLqP7FZS5E5tJCyYYZN0= X-MC-Unique: pN8Hc4z0NlSSw4H6u-Ph2g-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH] meson: Don't require the parted command at build time Date: Tue, 28 Dec 2021 15:56:25 +0100 Message-Id: <20211228145625.48750-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1640703447215000001 Content-Type: text/plain; charset="utf-8" We need libparted to be available at build time otherwise we can't link against it; we don't, however, need the parted command to be present until runtime and, just as is the case for other commands, we already perform a lookup through the virCommand API so making sure it's available at build time is unnecessary. This doesn't make any difference for platform such as Fedora and CentOS, where both the library and the command are in the same package, but others like Debian, Ubuntu and openSUSE have separate packages for the two components and this change means that we can install one less package at build time. Signed-off-by: Andrea Bolognani --- Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/437853370 meson.build | 8 -------- src/storage/storage_backend_disk.c | 2 ++ src/storage/storage_util.c | 2 ++ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 57561adf51..be51af1934 100644 --- a/meson.build +++ b/meson.build @@ -1043,14 +1043,6 @@ endif =20 libparted_version =3D '1.8.0' libparted_dep =3D dependency('libparted', version: '>=3D' + libparted_vers= ion, required: false) -if libparted_dep.found() - parted_prog =3D find_program('parted', required: false, dirs: libvirt_sb= in_path) - if parted_prog.found() - conf.set_quoted('PARTED', parted_prog.path()) - else - libparted_dep =3D dependency('', required: false) - endif -endif =20 libpcap_version =3D '1.5.0' if not get_option('libpcap').disabled() diff --git a/src/storage/storage_backend_disk.c b/src/storage/storage_backe= nd_disk.c index 97554e2576..be8a535570 100644 --- a/src/storage/storage_backend_disk.c +++ b/src/storage/storage_backend_disk.c @@ -40,6 +40,8 @@ VIR_LOG_INIT("storage.storage_backend_disk"); =20 #define SECTOR_SIZE 512 =20 +#define PARTED "parted" + static bool virStorageVolPartFindExtended(virStorageVolDef *def, const void *opaque G_GNUC_UNUSED) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index 03874d6ca3..728710153e 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -85,6 +85,8 @@ VIR_LOG_INIT("storage.storage_util"); # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) #endif =20 +#define PARTED "parted" + /* virStorageBackendNamespaceInit: * @poolType: virStoragePoolType * @xmlns: Storage Pool specific namespace callback methods --=20 2.31.1