From nobody Sun Feb 8 15:18:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1599514264; cv=none; d=zohomail.com; s=zohoarc; b=Xn4PzHCBW4tblvUzisix+2tEG3xaC8/C8662+lyLqPvRkOXGXH0rvRGjt+z8jJtbE3W92/oF1uXsGs9e7AIB1dAqT5mISlmCLG030Yb0O3e0X5JC0nGumNWEh6b5OgQxQdOnRBHjjCJMP/tQy/kkPcWAXjKyzI0NZY866sMp+sg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599514264; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=uyNGckucKwRej99wW/RzKHSJgJ0LapiCVjZExQJeoRE=; b=JocugTS16vjxPbTGGmlEhCpetYCBXdF+MWhMKBIDW1McyF8m9QiwO7kvx0BHPvxlX4YJ/Ye0tbcmjkz3R5aIFFG3/XBgaBIpIJ5qoiy9DhzBlXY7YCMbBUJ6nfXF2ZczaR/WDnC+qvFUSCEOezsB6Ik6mx79/nNrqL7XkzjXQJo= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1599514264063219.55349277530559; Mon, 7 Sep 2020 14:31:04 -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-139-yR3UQjlJOWC_HHAhT_BbyA-1; Mon, 07 Sep 2020 17:30:58 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 73C1981C478; Mon, 7 Sep 2020 21:30:51 +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 724F986582; Mon, 7 Sep 2020 21:30:50 +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 488A5181A06B; Mon, 7 Sep 2020 21:30:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 087LUiZi004418 for ; Mon, 7 Sep 2020 17:30:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 161B8202450A; Mon, 7 Sep 2020 21:30:44 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 114602028E91 for ; Mon, 7 Sep 2020 21:30:41 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 99247856DE8 for ; Mon, 7 Sep 2020 21:30:41 +0000 (UTC) Received: from mout.web.de (mout.web.de [212.227.15.14]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-260-sI72xXyTPpaSlaHNZ0do2g-1; Mon, 07 Sep 2020 17:30:39 -0400 Received: from [192.168.10.10] ([88.215.87.53]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MV2OY-1k4ylt111i-00S6X0; Mon, 07 Sep 2020 23:25:35 +0200 X-MC-Unique: yR3UQjlJOWC_HHAhT_BbyA-1 X-MC-Unique: sI72xXyTPpaSlaHNZ0do2g-1 X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 From: Jan Kiszka Subject: [PATCH] meson: src: Fix DESTDIR handling while creating dirs To: "libvir-list@redhat.com" Message-ID: Date: Mon, 7 Sep 2020 23:25:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:NSbktan70yNfcZm+WXsGvrgPWmJpYZ7AW5WGypP2l2eweQk4cle v7ba8GXMJTVGlS5KvCwmPTj/4WccWHnUiO1cCZEKfReaEvkGKaPUQj6z81Pds9nm+SGL8hm D7T6wPr9KYT1ZJoToiwymriWGj3Bc+r8eL+fPoPgC7qGt59ctJNuNSDWsW8lA7oEcouwk8f /f8wK3ZgyFDMrG39CXaZQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:/nX5WiO85HE=:kxTWM0IXC2eWtSq5NneTyr FHmgZewIVnha4dNBGsIlw9vHbobZalwzNOtWqg54zNSojcaILNQEPsJWZVJ2odFpph+6lxUSE Dx7FPEIUfhnT5BzCSonTMcPJ4hP+Cdfkd8rsXbzMdJ0DznRys19EpgEoQrzgfkclAjmsW7ZWn ngxWJG7tJ+6e4OsnczMlF7EIqAAk3+RQa7k5IFwrXTqmcTjQDuQIWh5iGUgWvufd/hcbx9ByM klZ6r9/tNayqpTn12r1YVDplDWENbJyDLKR4oak0c2I8lcddA9ovKqZD8/1871dhxrcbZ1g3G x/DbC5jMGm5Bq4nKVjRLOGemxpAf6p2ywzGbDBPFT1eZ1rZJGAhWUw9y1tVTSP8la7rTxKQQ6 SC69ZHGLGL1yv/ZCa8UuKqLrhdCTsBgMrEKe3zLJTzszqT04q3oog/wHvAF3PhX8K0pbRLJ7D 0jaskkHTAnwFDYGgLJQdE6q5wzisMofN9BpyKPHJ/7ytzZYTh9j0WLoOAKaT/4HK+g6aSXam5 qVpM5Z/cruKFudegret2EMVUFmgwcnFX30Q4MZ99/WdyLRXSH6Lxc+7tkh9Ju6TXfGYrWPhvj 7j8+ObOve13tuckq7otmmfLBZ/AI0HPhDjLTkY5KXjP2jB+6pPYhsvDFu/5rrP0JnbHQjLhee 8V3egF3vtz4dxdApFAXnVQtkl5DAISBedlYMM6N7JQjGr4YgL/esSfuaMkAxTlCSti5rY6u4W J6ldUueu8XOazqpgXcfDnf2e0tS70gRJe1NzEeDFbRK3zjb14aoZlqO4rykkm1xmYwD5znfeA JMOMeRAIyzSEEaZ35VYLtttntOTJwy/Rz3rUcXBqRAsrlxGhz69H/S57eRYuzY+Y6iVOF3Lj3 5mKGv4NG4hIIe7xqseCVrl7FI2hCb4MoAQBe0qn1HMoh0/3zVIyqAILj9nalMXLdLqfn9Z5Pf RrGqEfzeDDrUDru/rnltIbgKgNkhOxd4MVngcpMhmsz6jmhv3nEERUfJBPK7GB2H6MPB3yfCi ctcrcrSg0KO682ipeGGGZ2ZJf9vJStRbbKgvcUpi8SIPGr34uptzrPMz95R9+ovPO0h4NT9pk MjFSWcT2/yxJPG6bEyEOl/cQzZczKIiECJRf6KZ1RD7yup6Y60flCeW4D8MXtknxat4dfo5DK Ck/2v9o9Xp2KCsdX5uLaFc9OxAW7fvWj+HHfNHdTk/No/QZrLuUH/MYIlGukyK/Btcm01Pr8R 4AmLvzcsI6q6MuGxuao6bpbYbApxD4k/zvAZVBw== X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false; X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 087LUiZi004418 X-loop: libvir-list@redhat.com Cc: Michal Privoznik 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.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Language: en-US Content-Type: text/plain; charset="utf-8" From: Jan Kiszka If the target path contains a link with an absolute path (e.g. /var/run -> /run), makedirs will target the wrong location. Resolve the path first, then append DESTDIR again if needed. Signed-off-by: Jan Kiszka --- scripts/meson-install-dirs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/meson-install-dirs.py b/scripts/meson-install-dirs.py index 14ec6b93e8..e762e44712 100644 --- a/scripts/meson-install-dirs.py +++ b/scripts/meson-install-dirs.py @@ -6,4 +6,7 @@ import sys destdir =3D os.environ.get('DESTDIR', os.sep) for dirname in sys.argv[1:]: - os.makedirs(os.path.join(destdir, dirname.strip(os.sep)), exist_ok=3DT= rue) + realdir =3D os.path.realpath(os.path.join(destdir, dirname.strip(os.se= p))) + if not realdir.startswith(destdir): + realdir =3D os.path.join(destdir, realdir.strip(os.sep)) + os.makedirs(realdir, exist_ok=3DTrue) -- 2.26.2