From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
To: isar-users@googlegroups.com
Subject: [PATCH] dpkg class sbuild allows extra arguments by vars
Date: Tue, 3 Jan 2023 20:58:15 +0100 [thread overview]
Message-ID: <CAJGKYO6ijYqooyoKG1mgbH5ysFKbqsL0RMHpXCDkEad+gGkYAA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 467 bytes --]
Hi all,
Sometimes it is necessary to add some extra commands or arguments to sbuild
but create a class into an upper layer just for this breaks the updates.
So, this patch allows setting extra parameters through two variables.
Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
---
meta/classes/dpkg.bbclass | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
https://github.com/ilbers/isar/commit/7e72921747aedf588af492be95fb0b91ad70f455
[-- Attachment #2: 0001-dpkg-class-sbuild-allows-extra-arguments-by-vars.patch --]
[-- Type: text/x-patch, Size: 2336 bytes --]
From 7e72921747aedf588af492be95fb0b91ad70f455 Mon Sep 17 00:00:00 2001
From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Date: Tue, 3 Jan 2023 20:53:00 +0100
Subject: [PATCH] dpkg class sbuild allows extra arguments by vars
Sometimes it is necessary to add some extra commands or arguments to sbuild
but create a class into an upper layer just for this breaks the updates.
So, this patch allows setting extra parameters through two variables.
Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
---
meta/classes/dpkg.bbclass | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 7822b14..bf60a5b 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -23,6 +23,9 @@ do_prepare_build_append() {
env > ${DPKG_PREBUILD_ENV_FILE}
}
+DPKG_SBUILD_EXTRA_ARGS_PRE ?= ""
+DPKG_SBUILD_EXTRA_ARGS_POST ?= ""
+
# Build package from sources using build script
dpkg_runbuild[vardepsexclude] += "${SBUILD_PASSTHROUGH_ADDITIONS}"
dpkg_runbuild() {
@@ -104,7 +107,7 @@ dpkg_runbuild() {
sbuild -A -n -c ${SBUILD_CHROOT} --extra-repository="${ISAR_APT_REPO}" \
--host=${PACKAGE_ARCH} --build=${SBUILD_HOST_ARCH} ${profiles} \
--no-run-lintian --no-run-piuparts --no-run-autopkgtest --resolve-alternatives \
- --no-apt-update \
+ --no-apt-update ${DPKG_SBUILD_EXTRA_ARGS_PRE} \
--chroot-setup-commands="echo \"Package: *\nPin: release n=${DEBDISTRONAME}\nPin-Priority: 1000\" > /etc/apt/preferences.d/isar-apt" \
--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" \
@@ -112,7 +115,7 @@ dpkg_runbuild() {
--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" \
- --debbuildopts="--source-option=-I" \
+ --debbuildopts="--source-option=-I" ${DPKG_SBUILD_EXTRA_ARGS_POST} \
--build-dir=${WORKDIR} --dist="isar" ${DSC_FILE}
sbuild_dpkg_log_export "${WORKDIR}/rootfs/dpkg_partial.log"
--
2.34.1
next reply other threads:[~2023-01-03 19:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-03 19:58 Roberto A. Foglietta [this message]
2023-01-03 20:26 ` Henning Schild
2023-01-03 21:39 ` Roberto A. Foglietta
2023-01-04 7:53 ` Henning Schild
2023-01-05 17:43 ` Roberto A. Foglietta
2023-01-05 18:31 ` Henning Schild
2023-01-05 18:43 ` Roberto A. Foglietta
2023-01-25 12:27 ` Uladzimir Bely
2023-01-25 16:12 ` Roberto A. Foglietta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJGKYO6ijYqooyoKG1mgbH5ysFKbqsL0RMHpXCDkEad+gGkYAA@mail.gmail.com \
--to=roberto.foglietta@gmail.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox