public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: "'Felix Moessbauer' via isar-users" <isar-users@googlegroups.com>
Cc: Felix Moessbauer <felix.moessbauer@siemens.com>, jan.kiszka@siemens.com
Subject: Re: [PATCH 2/2] add example how to use derived sbuild chroots
Date: Wed, 21 Jun 2023 14:33:24 +0200	[thread overview]
Message-ID: <20230621143324.05ae1e49@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20230413070026.3511123-2-felix.moessbauer@siemens.com>

Am Thu, 13 Apr 2023 07:00:26 +0000
schrieb "'Felix Moessbauer' via isar-users"
<isar-users@googlegroups.com>:

> This patch extends the samefile recipe to use a derived sbuild chroot
> to compile the tool using clang instead of gcc. While there are
> easier ways to achive this goal, it is still valuable to demonstrate
> how to use the infrastructure.
> 
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
>  meta-isar/recipes-app/samefile/samefile_2.14.bb       |  8 ++++++++
>  .../sbuild-chroot/sbuild-chroot-target-clang.bb       | 11
> +++++++++++ 2 files changed, 19 insertions(+)
>  create mode 100644
> meta-isar/recipes-devtools/sbuild-chroot/sbuild-chroot-target-clang.bb
> 
> diff --git a/meta-isar/recipes-app/samefile/samefile_2.14.bb
> b/meta-isar/recipes-app/samefile/samefile_2.14.bb index
> c53c9445..989e1983 100644 ---
> a/meta-isar/recipes-app/samefile/samefile_2.14.bb +++
> b/meta-isar/recipes-app/samefile/samefile_2.14.bb @@ -5,6 +5,9 @@
>  
>  inherit dpkg
>  
> +# for demo reasons, we compile with clang if not cross-compiling
> +SBUILD_FLAVOR = "${@ 'clang' if d.getVar('ISAR_CROSS_COMPILE') !=
> '1' else '' }" +
>  DEBIAN_DEPENDS = "\${misc:Depends}"
>  DESCRIPTION = "utility that finds files with identical contents"
>  
> @@ -42,4 +45,9 @@ EOF
>  
>      # We can also customize afterwards, in this case change the
> package section. sed -i -e 's/Section: misc/Section: utils/g'
> ${S}/debian/control +
> +    # use clang to compile (no cross support yet)
> +    if [ "${SBUILD_FLAVOR}" = "clang" ]; then
> +        sed -i -e 's/\(#\!.*\)/\1\nexport CC=clang/g'
> ${S}/debian/rules

This is going pretty far to demo the case. Even so far that
Build-Depends might be wrong and only satisfied with the magic.

You do not demo speed-ups by preinstalled build-deps, you demo hackery.

> +    fi
>  }
> diff --git
> a/meta-isar/recipes-devtools/sbuild-chroot/sbuild-chroot-target-clang.bb
> b/meta-isar/recipes-devtools/sbuild-chroot/sbuild-chroot-target-clang.bb
> new file mode 100644 index 00000000..3df16368 --- /dev/null
> +++
> b/meta-isar/recipes-devtools/sbuild-chroot/sbuild-chroot-target-clang.bb
> @@ -0,0 +1,11 @@ +# Root filesystem for packages building with clang
> +#
> +# This software is a part of ISAR.
> +# Copyright (C) 2023 Siemens AG
> +
> +DESCRIPTION = "Isar sbuild/schroot filesystem for target (clang
> variant)" +
> +require recipes-devtools/sbuild-chroot/sbuild-chroot-target.bb
> +
> +SBUILD_FLAVOR = "clang"
> +SBUILD_CHROOT_PREINSTALL_COMMON += "clang"

A bit unfortunate that the only one package name was also chosen as the
flavor name.

Maybe add some comments here, which one is a "name" and which one is a
"package list", or try to pick different strings as name.

Does that package benefit in any way from clang being preinstalled? I
guess only artificially because you patched in the CC=clang ...

Henning


  parent reply	other threads:[~2023-06-21 12:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13  7:00 [PATCH 1/2] add support for " Felix Moessbauer
2023-04-13  7:00 ` [PATCH 2/2] add example how to use " Felix Moessbauer
2023-04-14  8:46   ` Jan Kiszka
2023-06-21 12:33   ` Henning Schild [this message]
2023-05-29  7:14 ` [PATCH 1/2] add support for " Uladzimir Bely
2023-06-13  6:24 ` Uladzimir Bely
2023-06-19  5:58   ` Jan Kiszka
2023-06-19 13:10     ` Moessbauer Felix
2023-06-20  6:25       ` Uladzimir Bely
2023-06-20  8:05         ` Uladzimir Bely
2023-06-20  8:51           ` Moessbauer Felix
2023-06-21 12:42     ` Henning Schild
2023-06-21 13:22       ` Moessbauer Felix
2023-06-21 13:34         ` Henning Schild
2023-06-21 13:54 ` Henning Schild

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=20230621143324.05ae1e49@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.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