From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7192631200934002688 X-Received: by 2002:a05:600c:538e:b0:3d2:3e2a:d377 with SMTP id hg14-20020a05600c538e00b003d23e2ad377mr2373072wmb.118.1674664952712; 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-Google-Smtp-Source: AMrXdXuDvgaC1/qlLjYO8r2ZSQMdelqiLeKR++7E3LxUCC4gcu2BQxQjn4hSTUH2nPMu5phn90YX 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 Return-Path: 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; 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 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 Content-Transfer-Encoding: 8bit X-TUID: 2JtobZ3J4/fa 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" \ -- 2.34.1