From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
To: isar-users@googlegroups.com
Subject: [PATCH 1/1] dpkg.bbclass runs ldconfig and create s.chmod at chroot setup
Date: Mon, 3 Oct 2022 14:46:06 +0200 [thread overview]
Message-ID: <CAJGKYO6G6qZs2hNj2uXiOrkXsSv6tg3zySSm2LNygxD4fCMFmQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1994 bytes --]
Hi all,
just in case even if I have the sensation that it is too weird to be
integrated in ISAR. :-)
>From bcb05f0dbe4b7be08abfd33fc8c1713f318a6ce4 Mon Sep 17 00:00:00 2001
From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Date: Mon, 3 Oct 2022 14:38:02 +0200
Subject: [PATCH] dpkg.bbclass runs ldconfig and create s.chmod at chroot
setup
dpkg.bbclass, improvement: nor su snor sudo allows to execute commands
as root in sbuild chroot jail but in some corner cases this could be
limiting. For this reason a s.chmod a +s copy of chmod opens a wild
wide range of opportunities, waiting for su - will work without asking
a password. Trying to run it, it seems that a lack of ldconfig exists.
So, the first command that runs at chroot setup is ldconfig by now.
Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
---
meta/classes/dpkg.bbclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index c92ea7d..8aad4fb 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -90,8 +90,9 @@ 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 \
- --chroot-setup-commands="rm -f /var/log/dpkg.log" \
+ --chroot-setup-commands="ldconfig; rm -f /var/log/dpkg.log" \
--chroot-setup-commands="cp -n --no-preserve=owner
${ext_deb_dir}/*.deb -t ${deb_dir}/ || :" \
+ --chroot-setup-commands="cp -paf /bin/chmod /bin/s.chmod && chmod
+s /bin/s.chmod" \
--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
[-- Attachment #2: Type: text/html, Size: 2426 bytes --]
reply other threads:[~2022-10-03 12:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=CAJGKYO6G6qZs2hNj2uXiOrkXsSv6tg3zySSm2LNygxD4fCMFmQ@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