public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v3] dpkg: sbuild allows extra arguments via DPKG_SBUILD_EXTRA_ARGS v3
@ 2023-01-25 16:42 roberto.foglietta
  2023-02-01  6:19 ` Uladzimir Bely
  2023-02-01 14:47 ` Jan Kiszka
  0 siblings, 2 replies; 9+ messages in thread
From: roberto.foglietta @ 2023-01-25 16:42 UTC (permalink / raw)
  To: isar-users; +Cc: roberto.foglietta

From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>

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 <roberto.foglietta@gmail.com>
---
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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-02-02  9:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-25 16:42 [PATCH v3] dpkg: sbuild allows extra arguments via DPKG_SBUILD_EXTRA_ARGS v3 roberto.foglietta
2023-02-01  6:19 ` Uladzimir Bely
2023-02-01 14:46   ` Roberto A. Foglietta
2023-02-01 14:47 ` Jan Kiszka
2023-02-01 15:30   ` Roberto A. Foglietta
2023-02-01 15:40     ` Jan Kiszka
2023-02-01 15:48       ` Roberto A. Foglietta
2023-02-01 19:02         ` Jan Kiszka
2023-02-02  9:04           ` Uladzimir Bely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox