From nobody Sun Feb 8 23:06:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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=1571917884; cv=none; d=zoho.com; s=zohoarc; b=DwKkZaDGerZO5mhx9Le4Gjt10cPfX2CNsql7I3HKI4jUCyOvbhQE22BOAt19bwpSXAhXreZioWLUOrMlFPWDSbnMamRv4F6XjLe0cC225HnU64JSYJtmWgGnJnti/7bNCupbt39LLpJNH5v+FkOrxWfSPUPg62yWjj5eqXq5LEI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571917884; h=Content-Type:Content-Transfer-Encoding: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; bh=WZZu2ktAoUOjNSO1bwx6N/7UBc/uWBaugYjE7PvdLHU=; b=UWH3JmS1UdccvbYKigyOp2BQ4kTYQPc9mG5+eZyoRTzJVfQKkNUcYl2AViqQxgJRrzdJ54+xkfHMkwCZeIvfxt2ogm+ktfn+Aq6vFPa6dqNjvhBY1RhNggmzExd6JrLIScuiKqMyZl8IyrK5XABrjvDwbMwlw6ZecmrLugwBY3U= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1571917884544197.6890155797155; Thu, 24 Oct 2019 04:51:24 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-60-VQ9q7kq9O66NE3Dg1sGTNw-1; Thu, 24 Oct 2019 07:51:19 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C540C107AD33; Thu, 24 Oct 2019 11:51:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 607031001DE4; Thu, 24 Oct 2019 11:51:13 +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 C4C5F1803B4B; Thu, 24 Oct 2019 11:51:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9OBp8sr032342 for ; Thu, 24 Oct 2019 07:51:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 04D8360126; Thu, 24 Oct 2019 11:51:08 +0000 (UTC) Received: from antique-laptop.redhat.com (ovpn-200-50.brq.redhat.com [10.40.200.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 65E81600CC for ; Thu, 24 Oct 2019 11:51:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571917883; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=WZZu2ktAoUOjNSO1bwx6N/7UBc/uWBaugYjE7PvdLHU=; b=I1nGLPvhYW99FoB3th4p6Xu/2/yOSPKM0lJnieQx/JmIQQy6jB7RuqxbZ8ASAeT4FFqbxT atc6etu7nX+4pcIvv+V452NcDTWVUoxJAEI4vH72dRlDQy9L4zlu0P+OeVpIRVEWIEsMcU I3G+b1rCSl3aWKNow40HWzQXynFIqn0= From: Pavel Hrdina To: libvir-list@redhat.com Date: Thu, 24 Oct 2019 13:50:43 +0200 Message-Id: <8e998d23f9e0754cefe385f403c94f357d6e5287.1571917791.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 01/20] 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: VQ9q7kq9O66NE3Dg1sGTNw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) From: Daniel P. Berrang=C3=A9 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 --- Notes: New in v2. configure.ac | 6 ++++++ libvirt.spec.in | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 8b53b6ada9..476bba2800 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.9.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 dcad08cb5f..723ced3535 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1163,7 +1163,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} \ @@ -1232,6 +1238,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 @@ -1313,6 +1320,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