public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: roberto.foglietta@linuxteam.org, isar-users@googlegroups.com,
	 Uladzimir Bely <ubely@ilbers.de>
Subject: Re: [PATCH v3] dpkg: sbuild allows extra arguments via DPKG_SBUILD_EXTRA_ARGS v3
Date: Wed, 1 Feb 2023 16:30:08 +0100	[thread overview]
Message-ID: <CAJGKYO6VR05JveN=dhzZGegquPV0T_kkAfij_KSS1RS+VmvfZw@mail.gmail.com> (raw)
In-Reply-To: <845939bb-2968-64ed-13d7-a3e69c08c69e@siemens.com>

On Wed, 1 Feb 2023 at 15:47, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> On 25.01.23 17:42, roberto.foglietta@linuxteam.org wrote:
> > 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" \
>
> I'm seeing this in next, but it seems everyone missed that this should
> not go in like this:
>
> Missing elaborated reasoning. No in-tree use case or at least some
> explanation why we should open such a low-level interface to recipes.

At least one Siemens project uses it, unless it has been changed after
I left. In general there is no reason to exclude that building a
custom .deb package does not require to use this variable. If not
used, it does not hurt. If used, avoid duplicating the dpkg class in
the top layer and go out of the upstream. Moreover, ISAR has plenty of
variables that modify the low-level interface or its behaviour. After
all, flexibility is what makes ISAR valuable.

Best regards, R-

  reply	other threads:[~2023-02-01 15:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-25 16:42 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 [this message]
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

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='CAJGKYO6VR05JveN=dhzZGegquPV0T_kkAfij_KSS1RS+VmvfZw@mail.gmail.com' \
    --to=roberto.foglietta@gmail.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    --cc=roberto.foglietta@linuxteam.org \
    --cc=ubely@ilbers.de \
    /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