From nobody Thu May 2 04:40:06 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=1660148245; cv=none; d=zohomail.com; s=zohoarc; b=hi+UQPNq51Qxls5OuES9CW0Hf+vsGFQQi4RgPLpDT5lQY0aXGIH2GAxaDz3pAUb1jjm9iQXutL0PxVdF3ZQ9Tw6y9akz9JMHnqfh+xUAz82oVQQGzxxV4oGcbO1dzgqDrCJ5xp8iIbXWvHKGaEkMb9QiP1jNg84g6GCL7LdKn10= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660148245; 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=dgRChK8JfIhkMsgqE18YDhW7fvyQXGc2BF9QOhCQSHg=; b=Fd7gev32p849qyQXdMntm2Ca6Jw42UI95Uh6Y83Sx5IK/TN8mQ0OnFmVgKokl3BQYhvfmF3l7kWbisuxpQQG9QLQDslJXRXt9ICl04Tg+Ql3DpmaqmXKBuaAcd1zjWOudJ6jHRgzxr/NFpxnWQzHfTnu6dHfVYXrQo9xQq9Xq3o= 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 1660148245408843.5075414191247; Wed, 10 Aug 2022 09:17:25 -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-167-zTBjqo7fPUy3W9mo4th1wg-1; Wed, 10 Aug 2022 12:17:22 -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 4FD4C38107A0; Wed, 10 Aug 2022 16:17:19 +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 3CB5F492C3B; Wed, 10 Aug 2022 16:17:19 +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 F11451946A59; Wed, 10 Aug 2022 16:17:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 68EFA1946A4F for ; Wed, 10 Aug 2022 16:17:16 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 4944218EAA; Wed, 10 Aug 2022 16:17:16 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.193.88]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CCD899457F for ; Wed, 10 Aug 2022 16:17:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660148244; 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=dgRChK8JfIhkMsgqE18YDhW7fvyQXGc2BF9QOhCQSHg=; b=ZWCL5wsrnjzE1LcztGmNUUGgR3pNUh+vp8Q7BxvPEMOLUQjz7+uEKPI86musa4HMQ2f0w8 QsJYv2q3XdS8eN9SGQwv+sYyfVT/7QkBxJuJY47DwQqHtRzfeklMjgGkvB0Kr1D4DC+Lu/ yKtRIkBCyCWba3lPwNTtHbLf2C4X5oQ= X-MC-Unique: zTBjqo7fPUy3W9mo4th1wg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 1/2] scripts: Add $DESTDIR support to meson-install-web.py Date: Wed, 10 Aug 2022 18:17:12 +0200 Message-Id: <20220810161713.121711-2-abologna@redhat.com> In-Reply-To: <20220810161713.121711-1-abologna@redhat.com> References: <20220810161713.121711-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 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 2.85 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: 1660148246527100001 Content-Type: text/plain; charset="utf-8"; x-default="true" meson already supports $DESTDIR natively, but in this case we're using a custom script and so we have to do some extra work ourselves. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- scripts/meson-install-web.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/meson-install-web.py b/scripts/meson-install-web.py index a03f8523cd..086d465ae4 100755 --- a/scripts/meson-install-web.py +++ b/scripts/meson-install-web.py @@ -4,7 +4,11 @@ import os import shutil import sys =20 +destdir =3D os.environ.get('DESTDIR', os.sep) + for desc in sys.argv[1:]: inst =3D desc.split(':') - os.makedirs(inst[1], exist_ok=3DTrue) - shutil.copy(inst[0], inst[1]) + src =3D inst[0] + dst =3D os.path.join(destdir, inst[1].strip(os.sep)) + os.makedirs(dst, exist_ok=3DTrue) + shutil.copy(src, dst) --=20 2.37.1 From nobody Thu May 2 04:40:06 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=1660148248; cv=none; d=zohomail.com; s=zohoarc; b=hexwJGemMwIuu7u8au48zKtwyQvFiE2Bq/yeqbdNzODajxN/aAOEdkwPkcsSXXIhUkivx7LteSP6ZOAzS3EuiuoRlK5I3+YuqerMbydt3TWyiMiC8LZibVH3kzKmAY/m5Xdn69A1u8vP/toptNFxpkpbsyHx/xMKifyZ+MEiz+Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660148248; 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=EyOfwwz4FzNM59vt6ALW/guFR2yQt8VGDIq7LE1EFJA=; b=Vpi3pQzkNwEMFZIXumQPwx+cXXQ2XoG3/Zknm7uMtWNPU5i9IxqjBoH25K+6FBCpHawM0axkb/AQDm55nn1wfz9t4S8E20AswDWMeTGn0h3fm7iEs+lL1IM4dyCw8L7Ye8RmN1DU+wEabdkuk3f7FzUWK79W6q+URtsJge10dZs= 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 1660148248292606.6205410311325; Wed, 10 Aug 2022 09:17:28 -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-394-9V8CcOglOuyK_E3_kMSdRg-1; Wed, 10 Aug 2022 12:17:23 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A0D4929DD998; Wed, 10 Aug 2022 16:17:20 +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 8A2C8945D1; Wed, 10 Aug 2022 16:17:20 +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 9CEFF1932226; Wed, 10 Aug 2022 16:17:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1967B194F841 for ; Wed, 10 Aug 2022 16:17:17 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0D36794585; Wed, 10 Aug 2022 16:17:17 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.193.88]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 923A59457F for ; Wed, 10 Aug 2022 16:17:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660148246; 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=EyOfwwz4FzNM59vt6ALW/guFR2yQt8VGDIq7LE1EFJA=; b=fixqgJ9jHngk9d7Ivh9ig0PjI3uMhRuMynAj28UEuyYp9qRPS60DWfl7KWAFFmsoKoG1XF lcz5I3h33SQDddLmgMjjHR/5adLqjPgxlj1EHdDYlaUSjCipfQLTg0MfcFTd4WHEh0y2wI ToJChV90isSib5zkGrF4TIr4tdFIyRU= X-MC-Unique: 9V8CcOglOuyK_E3_kMSdRg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 2/2] ci: Fix paths shown in the website Date: Wed, 10 Aug 2022 18:17:13 +0200 Message-Id: <20220810161713.121711-3-abologna@redhat.com> In-Reply-To: <20220810161713.121711-1-abologna@redhat.com> References: <20220810161713.121711-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 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 2.79 on 10.11.54.5 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: 1660148248579100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Right now we're setting the prefix to a custom path, which results in paths like /builds/libvirt/libvirt/vroot/etc/libvirt/virtqemud.conf ending up in the generated HTML. In order to avoid that, set the prefix and other installation paths to reasonable default values by passing -Dsystem=3Dtrue and then take advantage of $DESTDIR support to still be able to write the HTML files without requiring root privileges. Reported-by: Martin Kletzander Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 39c5f8fb6d..f6ed14bf65 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,9 +67,9 @@ website: before_script: - *script_variables script: - - meson setup build --werror --prefix=3D$(pwd)/vroot || (cat build/mes= on-logs/meson-log.txt && exit 1) - - ninja -C build install-web - - mv vroot/share/doc/libvirt/html/ website + - meson setup build --werror -Dsystem=3Dtrue || (cat build/meson-logs/= meson-log.txt && exit 1) + - DESTDIR=3D$(pwd)/install ninja -C build install-web + - mv install/usr/share/doc/libvirt/html/ website artifacts: expose_as: 'Website' name: 'website' --=20 2.37.1