From patchwork Wed Jan 25 16:42:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: roberto.foglietta@linuxteam.org X-Patchwork-Id: 2539 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 25 Jan 2023 17:42:38 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f56.google.com (mail-wm1-f56.google.com [209.85.128.56]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 30PGgcEC027899 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Jan 2023 17:42:38 +0100 Received: by mail-wm1-f56.google.com with SMTP id m10-20020a05600c3b0a00b003dafe7451desf11198350wms.4; Wed, 25 Jan 2023 08:42:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674664952; cv=pass; d=google.com; s=arc-20160816; b=B2g8YTyM5W8gDvckkpbgHv+KIfLxArFc9FCuWjV0bIZQh1PDVUES7KaI91x9SSHTGe rtTilbzHOCUp8i6cQjY6AaErSYpAgNUe1suviSWdEmPXDICEYBKLKGAlzw/6yKgO+tD3 JN/V8AgC2y9VwIQg9aPAwH8O5TmRNNdus8d9J/ddtjrWVuSxKiFnCB5amD5M2qQxfmgC HL9L4a2b/AmeJ+zm+HmlDo8K/AXU9ayC5u41og4Oo8lwOkdjTKLr4kFszJi9LcUSPNzl EY9puhYfAUD9wYYGkhvAI+mb+r6x7btn300W83Dhj/rawqwWc4KyUm+fdF6+wRwtiZfj wQFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=2XUpu1VndOiU0TVNXI0Mdu/KR7QOZmy4T2tTW0Z1itQ=; b=nrm9ML6DYKKrKlZkFQH0VmmfNM7hJNuqG4kafq1pmzlN64EpU0f3dQ5NLRKF7ghAgX Slzmk6jOWx2KlF9RAnDzNvwI09JXCtALCXV2JXXgglWRkrY1Ljct7bdoXnaXNI+11MD+ zYNKhoz7d1DWChIU6yyn/hEb8Cbd+CNVbsePyiaIRYYVyAJifiZDYMtiqlc58NACRkjk 3BL95Ipl5p8qRhXzJ8z5o6xxbm2B52+sXNzv7uQNnz+CYYHns+YKOzUmteL6N5/qhU9B fJ7ubBrJkUgv4BosoKZ98r8noHVyGl90P4U7cD6tTU1hU9eXg1YWF6oLt/nwSqGNvuH/ 5kog== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of roberto.foglietta@linuxteam.org designates 5.144.164.164 as permitted sender) smtp.mailfrom=roberto.foglietta@linuxteam.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :sender:from:to:cc:subject:date:message-id:reply-to; bh=2XUpu1VndOiU0TVNXI0Mdu/KR7QOZmy4T2tTW0Z1itQ=; b=LJLkBLn1L/V2JSk3MKpvHWLLJdNiBxybOWEIogCtv7raWmioeQgv/LG30B2p9qD/Zo vude6qBh90GfuqsLPwxU3HV/dcO2oXeUiwOLjpjcrkokmJsoXGgBDvwZZpAYtVVznLRg tULRRLGSyH40de8DV8KvHpQfLT/fM2jGcdKLb1w9m6SauDutpudRYdueI8Z5TpGpPvk0 cGCZRMfPSr4BLGIe/yYGVy2UNGhwaZ6YRhZ9antCiYfSTcp8qvcXkQtjtqrbQyb1AtdV KIQTw0+dCcFMoqxzb9Tj0xgw2ro65rNlURt345zTGuorq6jG0Vy87cRAW2y45JCgqQ1E SVdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=2XUpu1VndOiU0TVNXI0Mdu/KR7QOZmy4T2tTW0Z1itQ=; b=awPTscE3aqYbRL5WZ/HlMMEkC3euTX0CLSX73+uHqO4N6DmabJ3a+Uvy1+oL48RvQG TSr1vnv0qA2a583nSwG5G+I46huIoWjKFzg7WUjh6eDzUBEDgA9f2hrHJRF9Xkr6Lt+D TM5vJnAp7aVbufTvwfFokUHy7iJOU3pEf53FPjhdNN1xyKILlpL1t8iSvzFOTcdGqscr lwZSFNVm9ZAN38mJLHd8HZeTYM1rqvhJYoFOd6TzhysSVcgwR1b++wkwEmF3NtYF/Yhx OtQ52cTS1kRcjlFy63hGk851ofyX+IDv7afrDr/bnd8sniK/rBJd2IXtIL+lOegSH+UZ 2NrQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AFqh2kr7UDXrHK5LUKDRWxLp/qvj8O1QHTpmAuZ77ujxF0iubv8DamFT 1f6oqinkMTfdHBU8W0/YzSM= X-Google-Smtp-Source: AMrXdXviJD3luyuuOeic5zirzhs5w3KtmAeYyDDfEcBTHi/gXQO1qJkSVAgLmWlB9X/FQNKgJ/iNsQ== X-Received: by 2002:adf:dc4a:0:b0:2be:cf0:34ec with SMTP id m10-20020adfdc4a000000b002be0cf034ecmr1540525wrj.35.1674664952615; Wed, 25 Jan 2023 08:42:32 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:3509:b0:3cf:72dc:df8 with SMTP id h9-20020a05600c350900b003cf72dc0df8ls1486877wmq.0.-pod-canary-gmail; Wed, 25 Jan 2023 08:42:31 -0800 (PST) X-Received: by 2002:a05:600c:a11:b0:3db:f1f:bc31 with SMTP id z17-20020a05600c0a1100b003db0f1fbc31mr29494225wmp.16.1674664951651; Wed, 25 Jan 2023 08:42:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674664951; cv=none; d=google.com; s=arc-20160816; b=GrUXhI4XkjVYEoJd5RlaPQjT3NIRNUwpQiKzJHj+rZiFwZmih119+DX2jcvJfSeR2i rSV/s+nShlohTb75Rz41FSj83d7PeLWr1Hg7wyeAbUaThfOT+p5Vlf7p8VTHT9J5cgcD lH6xfcB4HJwDU0JwEU1mIi7GphS4+vMXoCuKMY4zHMU4DlZ1DmNnR3y8+ypRAs+kee0C 5Rs1dstH7crXEFilYTCwceHo8xSfYgLK7R4Q0UozAHjW+uvefdMAc0Y7Mv9tKgT2cOWQ amJx6i0g+uUvJI8IRp1lbrmGbTwU/3SlxF0nunUIQYUKUkMhaXWIoPj80ax3C5JBMTZ7 +wfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=fEMlcIi32QEW4NGTXTZIVGVB5225afJNcJuCJuI1CoY=; b=Jw4Q7hbQ4+cDqOv7Zcyp5oaieD9ImNhKb/uLfyrzQBXdxZxkiodAWHAVst8WfF/i7h Yb+t2puCWoiEzgmoi+rMVa+/YXZgi94dswbXjyZQqN6MG9V9475VQRbGCZLS+BxKWRUb 8y6KHW0eFR1m1t6O/Lgz9fXhIYFOVBSrIY4ltI+X+QIzL/J2eD6TZwS3o92lUH3xe+Jj uStnzXgXm7PHMWhm/TKNoKuB4u9hhD4pdzyYtOxMoCwyBhn6nf10QFHq8htBleSZow70 s8Tr5S9R9SY/8lq4ZIjEWMFhCLvR0MLyONLBTW6oJsZdVh1CV9V0rZ89N7E0xnbS0wQq Ljvw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of roberto.foglietta@linuxteam.org designates 5.144.164.164 as permitted sender) smtp.mailfrom=roberto.foglietta@linuxteam.org Received: from relay03.th.seeweb.it (relay03.th.seeweb.it. [5.144.164.164]) by gmr-mx.google.com with ESMTPS id p33-20020a05600c1da100b003d9ae6cfd2esi159759wms.2.2023.01.25.08.42.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 08:42:31 -0800 (PST) Received-SPF: pass (google.com: domain of roberto.foglietta@linuxteam.org designates 5.144.164.164 as permitted sender) client-ip=5.144.164.164; Received: from localhost.localdomain (unknown [IPv6:2a02:8071:3187:7b80:5bc6:8011:a795:4b12]) by m-r1.th.seeweb.it (Postfix) with ESMTPA id 12FDE231E1; Wed, 25 Jan 2023 17:42:30 +0100 (CET) From: roberto.foglietta@linuxteam.org To: isar-users@googlegroups.com Cc: roberto.foglietta@gmail.com Subject: [PATCH v3] dpkg: sbuild allows extra arguments via DPKG_SBUILD_EXTRA_ARGS v3 Date: Wed, 25 Jan 2023 17:42:27 +0100 Message-Id: <20230125164227.1448218-1-roberto.foglietta@linuxteam.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Original-Sender: roberto.foglietta@linuxteam.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of roberto.foglietta@linuxteam.org designates 5.144.164.164 as permitted sender) smtp.mailfrom=roberto.foglietta@linuxteam.org Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: "Roberto A. Foglietta" Sometimes it is necessary to add some extra commands or arguments for the sbuild process which produces customs packages but creating a class into an upper layer just for this will create difficulties in managing the updates from the upstream project. So, this patch allows setting extra parameters via this variable: DPKG_SBUILD_EXTRA_ARGS v.2: just a single variable and not anymore two of them v.3: the variable is set in the middle, just in case order matters, it is the last of 'setup chroot' and the first of 'final build' commands Signed-off-by: Roberto A. Foglietta --- v.2: just a single variable and not anymore two of them v.3: the variable is set in the middle, just in case order matters, it is the last of 'setup chroot' and the first of 'final build' commands meta/classes/dpkg.bbclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass index 7822b14d..8785237c 100644 --- a/meta/classes/dpkg.bbclass +++ b/meta/classes/dpkg.bbclass @@ -23,6 +23,8 @@ do_prepare_build_append() { env > ${DPKG_PREBUILD_ENV_FILE} } +DPKG_SBUILD_EXTRA_ARGS ?= "" + # Build package from sources using build script dpkg_runbuild[vardepsexclude] += "${SBUILD_PASSTHROUGH_ADDITIONS}" dpkg_runbuild() { @@ -109,6 +111,7 @@ dpkg_runbuild() { --chroot-setup-commands="echo \"APT::Get::allow-downgrades 1;\" > /etc/apt/apt.conf.d/50isar-apt" \ --chroot-setup-commands="rm -f /var/log/dpkg.log" \ --chroot-setup-commands="cp -n --no-preserve=owner ${ext_deb_dir}/*.deb -t ${deb_dir}/ || :" \ + ${DPKG_SBUILD_EXTRA_ARGS} \ --finished-build-commands="rm -f ${deb_dir}/sbuild-build-depends-main-dummy_*.deb" \ --finished-build-commands="cp -n --no-preserve=owner ${deb_dir}/*.deb -t ${ext_deb_dir}/ || :" \ --finished-build-commands="cp /var/log/dpkg.log ${ext_root}/dpkg_partial.log" \