From: "Koch, Stefan" <stefan-koch@siemens.com>
To: "isar-users@googlegroups.com" <isar-users@googlegroups.com>
Cc: "Kiszka, Jan" <jan.kiszka@siemens.com>,
"ubely@ilbers.de" <ubely@ilbers.de>,
"Storm, Christian" <christian.storm@siemens.com>,
"Adler, Michael" <michael.adler@siemens.com>,
"Sudler, Simon" <simon.sudler@siemens.com>,
"Koch, Stefan" <stefan-koch@siemens.com>
Subject: [PATCH v2 2/5] sbuild: Support overwriting configured schroot dir
Date: Tue, 20 Dec 2022 17:09:28 +0000 [thread overview]
Message-ID: <20221220170921.1718503-3-stefan-koch@siemens.com> (raw)
In-Reply-To: <20221220170921.1718503-1-stefan-koch@siemens.com>
This brings support to specify an other than the default schroot dir
as argument when creating the schroot configs.
Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
---
meta/classes/sbuild.bbclass | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/meta/classes/sbuild.bbclass b/meta/classes/sbuild.bbclass
index a29b745..ad9f72f 100644
--- a/meta/classes/sbuild.bbclass
+++ b/meta/classes/sbuild.bbclass
@@ -31,14 +31,19 @@ SCHROOT_CONF_FILE ?= "${SCHROOT_CONF}/chroot.d/${SBUILD_CHROOT}"
SBUILD_CONFIG="${WORKDIR}/sbuild.conf"
schroot_create_configs() {
+ schroot_dir="${SCHROOT_DIR}"
+ if [ -n "${1}" ]; then
+ schroot_dir="${1}"
+ fi
+
mkdir -p "${TMPDIR}/schroot-overlay"
- sudo -s <<'EOSUDO'
+ schroot_dir="${schroot_dir}" sudo --preserve-env=schroot_dir -s <<'EOSUDO'
set -e
cat << EOF > "${SCHROOT_CONF_FILE}"
[${SBUILD_CHROOT}]
type=directory
-directory=${SCHROOT_DIR}
+directory=${schroot_dir}
profile=${SBUILD_CHROOT}
users=${SCHROOT_USER}
groups=root,sbuild
--
2.30.2
next prev parent reply other threads:[~2022-12-20 17:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-20 17:09 [PATCH v2 0/5] linux-custom: Split up binaries from kernel headers to kbuild packages Koch, Stefan
2022-12-20 17:09 ` [PATCH v2 1/5] linux-custom: Split up binaries from kernel headers to kbuild package Koch, Stefan
2023-03-17 8:18 ` Jan Kiszka
2023-03-17 8:32 ` cedric.hombourger
2023-03-17 9:20 ` Koch, Stefan
2023-03-17 9:38 ` Jan Kiszka
2022-12-20 17:09 ` [PATCH v2 3/5] dpkg: Add support for additional target and host builds Koch, Stefan
2022-12-20 17:09 ` Koch, Stefan [this message]
2022-12-20 17:09 ` [PATCH v2 4/5] linux-custom: Provide host and target specific kernel kbuild packages Koch, Stefan
2022-12-20 17:09 ` [PATCH v2 5/5] docs: Update custom_kernel docs for split up of kernel scripts and tools Koch, Stefan
2023-03-17 7:41 ` [PATCH v2 0/5] linux-custom: Split up binaries from kernel headers to kbuild packages Uladzimir Bely
2023-03-17 8:06 ` Jan Kiszka
2023-08-16 11:29 ` Koch, Stefan
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=20221220170921.1718503-3-stefan-koch@siemens.com \
--to=stefan-koch@siemens.com \
--cc=christian.storm@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
--cc=michael.adler@siemens.com \
--cc=simon.sudler@siemens.com \
--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