From nobody Sun Feb 8 04:12:19 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1569582729; cv=none; d=zoho.com; s=zohoarc; b=oAHlZ9dTU3DfE/tTDo2yhMcPUk20Lf1aEd415wPfGc5AN2H/dz5wVc5XUDMyBAw3Wc7FJNDeODQd+3csb8XvctmLl6Tun5XsQoZ4pYSQiOe8pq+xhOEF2ZYCr4r5Is/+Gi/RXS5L1e5RCwZlvwpF12fGTwxWpaKX6h8ueMfUMbI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569582729; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=pbZznwIhKJ14vdNWi0qldHf7lbyR5layGjPDdA+G9Pc=; b=i+C+i9BX1XmihCUO8c3T/ylnw8tQYQDd8BE7yzakLG3HzCGaw9A6Xs4ADS/35aKw3KBeHRF0tCeGOSt3jaStjz3PwYj68hyfYgIVrysczddhOkAL0uJwHKtFWZ3VRYCr/t8wfPc3wSZAOnNESH8nV4h0kciup28ZlKJVAJL/W1E= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1569582729021869.6766238556147; Fri, 27 Sep 2019 04:12:09 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DDD663099F56; Fri, 27 Sep 2019 11:12:06 +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 AA02260126; Fri, 27 Sep 2019 11:12:06 +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 4A69683542; Fri, 27 Sep 2019 11:12:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x8RBC3pp028187 for ; Fri, 27 Sep 2019 07:12:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id E476560C18; Fri, 27 Sep 2019 11:12:03 +0000 (UTC) Received: from domokun.gsslab.fab.redhat.com (dhcp-94.gsslab.fab.redhat.com [10.33.9.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 34C1260BE2; Fri, 27 Sep 2019 11:12:03 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Fri, 27 Sep 2019 12:11:48 +0100 Message-Id: <20190927111158.20653-2-berrange@redhat.com> In-Reply-To: <20190927111158.20653-1-berrange@redhat.com> References: <20190927111158.20653-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Pavel Hrdina Subject: [libvirt] [PATCH 01/11] build: mandate use of a build dir != src dir 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Fri, 27 Sep 2019 11:12:07 +0000 (UTC) Historically we've allowed builds in the main src dir, but meson does not support this. Explicitly force separate build dir in autotools to align with meson. We must re-enable dependency tracking which the RPM %configure macro turns off. Without this, the build dir doesn't get the source directory tree mirrored. Signed-off-by: Daniel P. Berrang=C3=A9 --- configure.ac | 6 ++++++ libvirt.spec.in | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index af8cbcdfd8..2855d8cab0 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,12 @@ dnl License along with this library. If not, see dnl . =20 AC_INIT([libvirt], [5.8.0], [libvir-list@redhat.com], [], [https://libvirt= .org]) + +if test $srcdir =3D "." +then + AC_MSG_ERROR([Build directory must be different from source directory]) +fi + AC_CONFIG_SRCDIR([src/libvirt.c]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) diff --git a/libvirt.spec.in b/libvirt.spec.in index 7f5183f341..29839fad77 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1162,7 +1162,13 @@ export SOURCE_DATE_EPOCH=3D$(stat --printf=3D'%Y' %{= _specdir}/%{name}.spec) %endif =20 rm -f po/stamp-po -%configure --with-runstatedir=3D%{_rundir} \ + +%define _configure ../configure +mkdir %{_vpath_builddir} +cd %{_vpath_builddir} + +%configure --enable-dependency-tracking \ + --with-runstatedir=3D%{_rundir} \ %{?arg_qemu} \ %{?arg_openvz} \ %{?arg_lxc} \ @@ -1231,6 +1237,7 @@ rm -fr %{buildroot} =20 export SOURCE_DATE_EPOCH=3D$(stat --printf=3D'%Y' %{_specdir}/%{name}.spec) =20 +cd %{_vpath_builddir} %make_install %{?_smp_mflags} SYSTEMD_UNIT_DIR=3D%{_unitdir} V=3D1 =20 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la @@ -1312,6 +1319,7 @@ mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvir= t_qemu_probes.stp \ %endif =20 %check +cd %{_vpath_builddir} if ! make %{?_smp_mflags} check VIR_TEST_DEBUG=3D1 then cat test-suite.log || true --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list