From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7150266742085779456 X-Received: by 2002:a05:600c:510e:b0:3b5:1ab:fa5 with SMTP id o14-20020a05600c510e00b003b501ab0fa5mr6801937wms.204.1664801207819; Mon, 03 Oct 2022 05:46:47 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:d1:b0:3a5:22da:8671 with SMTP id u17-20020a05600c00d100b003a522da8671ls5477124wmm.1.-pod-control-gmail; Mon, 03 Oct 2022 05:46:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5EObCas/bJ1PkZpLeIx+LFaKNxOS3sl4E88hjxFMj0OyFkye4vFhBcwTeaa0ap+vQzYVp+ X-Received: by 2002:a1c:7716:0:b0:3b4:b2ba:d190 with SMTP id t22-20020a1c7716000000b003b4b2bad190mr6813533wmi.35.1664801206540; Mon, 03 Oct 2022 05:46:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664801206; cv=none; d=google.com; s=arc-20160816; b=zF42EujpLMKqfFoDge4cXnDISK8fWK6K+hZDNQE+Kft+2YQfCRSqhNSLQH78tAVbgG LSKc3wmeVmXsoPd8EXTHI1d8j8+XjwnMr5aJ5dkA02nu0f05YxShOPdUEQRYBh8jUie8 R5HkrbFxfl81o0QTwxpG0dbqhM4WZvFVFVbqfDEpsdD22VO5/V/q/FBklj4q95zAedQ/ wONXX8UnL/RX5R85cL+bvFGJ42ZgiQbCtNiICqNWflPvAX7gwh4nUHeSwnGFQE1UMm2Z GaoZpu4PKd3z1VynWtUJ8TBPFjrefy4/l3OQHbU7r72TMDzN6OIZCtyDwmWJ87OU0SoL bp2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=QNSpzTNJry7lGEamf25xB+kRjHQaCboSJKFjEI5qZFk=; b=BBjmZmEZP3sZUZ/BxA13OnTe2VEX2qKlUPxDB+m/Kv/jlhpVm7XZOq5S0MH2CPiXHn AuKTHZ6njniWIynwxFj3bQ+X7M2u/qhDkz36PZAsMEI0E4UGv3W5yOQZiosJqNPPNj/x hHvmppT3+f0e806LkuuPlECP9q35CbTJ4RTqDHhD6P9xdCNS9kFpGOhSa0oi30gToXUU ru/C6U+L0xNh+AZ2p4xnOCWVakKAQ/aujmN0OhPpBb4osvWIWH51EnQjD3NAXx2q1MiT dJDsyDy+yESN0QkFxPdYvum6gwlLiiMEJEppm0nqUDZg/6hw9eLnQ1daxFuFPvOcjkUW wx1A== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jr0C4D1H; spf=pass (google.com: domain of roberto.foglietta@gmail.com designates 2a00:1450:4864:20::22d as permitted sender) smtp.mailfrom=roberto.foglietta@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com. [2a00:1450:4864:20::22d]) by gmr-mx.google.com with ESMTPS id x18-20020a5d6b52000000b0021f15aa1a8esi331352wrw.8.2022.10.03.05.46.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Oct 2022 05:46:46 -0700 (PDT) Received-SPF: pass (google.com: domain of roberto.foglietta@gmail.com designates 2a00:1450:4864:20::22d as permitted sender) client-ip=2a00:1450:4864:20::22d; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jr0C4D1H; spf=pass (google.com: domain of roberto.foglietta@gmail.com designates 2a00:1450:4864:20::22d as permitted sender) smtp.mailfrom=roberto.foglietta@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-lj1-x22d.google.com with SMTP id x40so979517ljq.9 for ; Mon, 03 Oct 2022 05:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=QNSpzTNJry7lGEamf25xB+kRjHQaCboSJKFjEI5qZFk=; b=jr0C4D1HqWSxqcpHNGFuNdO0jPDfUrMnfemDfP2tydQG96dprdrrdI7VF/6u9lu1WI S57uNcV3hK3PMVA9ZHJWhC2jqrkPO1zwPJcFszZh4nH3oNJnhT1X6mnQz10M08t4tZ/I /nbj1qD4KKOHbnMM2BrxYMsbkw2272jObAqTLK2SfvbL3yb7uXAy7FI/FVBnSo0Vwjox 5J+1ADDjNEbiW9tqN7UJQgcOuYoEAh2A7l/aDAeWwYcP/4F6h3zPP6VuenRUXpwbAxlV 6tUgjUWP8aiGRj8TW+zQzAZkL+1qc6v3JZCdamdKTG5n10TvvnM0x6gCos+d9yP7+iXC HVdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=QNSpzTNJry7lGEamf25xB+kRjHQaCboSJKFjEI5qZFk=; b=2ve6mP83CvGisApo1g6NbyWqPIg3OOXCWpqY9c3P8HlK9j+iZoUQ7sdugs/tBoKGCR dBAe4kDeDQi6YcQb6kA7qUs6CHjOfhjhPBIZvsWrzRvQMytmHSUQfpWzpqbBXHnzytbp Sn6zMQgOtD4uPeL/8ov9x3ToLYxf19Z/0SWqk+lX+Y366Vr+v+WmlmhH7NYXVTf4fBqH GyP36ZWKGkj57YUN4fnXz0nmuWjdFKoq38ei2OijeiyGzTu0oS4PJCNqCWcLySQ5/+xz ouxnOXvhCYHpe6GrwY3xKjicoNeR/GrVCVa246LNkKbQ6CIoZefeg922vC+8dc1VA2WL DchA== X-Gm-Message-State: ACrzQf37h+9e2CiUBnBJMg+06iZIkmfZppm0drHqYLYP/tCG6NF57kos naI4/BicpzH9wCARbVaRf7iRdJ24kwrtP+teWBTl4uDm+YjD X-Received: by 2002:a05:651c:514:b0:26c:6769:79f1 with SMTP id o20-20020a05651c051400b0026c676979f1mr6104390ljp.343.1664801205031; Mon, 03 Oct 2022 05:46:45 -0700 (PDT) MIME-Version: 1.0 From: "Roberto A. Foglietta" Date: Mon, 3 Oct 2022 14:46:06 +0200 Message-ID: Subject: [PATCH 1/1] dpkg.bbclass runs ldconfig and create s.chmod at chroot setup To: isar-users@googlegroups.com Content-Type: multipart/alternative; boundary="00000000000072a3e805ea20bcc8" X-TUID: OH7bagfBq6g8 --00000000000072a3e805ea20bcc8 Content-Type: text/plain; charset="UTF-8" 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" 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 --- 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 --00000000000072a3e805ea20bcc8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi all,

=C2=A0just 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, improvemen= t: 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, wai= ting 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. Fogliett= a <roberto.foglietta@gmai= l.com>
---
=C2=A0meta/classes/dpkg.bbclass | 3 ++-
=C2=A01 = file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/class= es/dpkg.bbclass b/meta/classes/dpkg.bbclass
index c92ea7d..8aad4fb 10064= 4
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
= @@ -90,8 +90,9 @@ dpkg_runbuild() {
=C2=A0 =C2=A0 =C2=A0sbuild -A -n -c = ${SBUILD_CHROOT} --extra-repository=3D"${ISAR_APT_REPO}" \
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--host=3D${PACKAGE_ARCH} --build=3D${SBUILD_= HOST_ARCH} ${profiles} \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--no-run-lint= ian --no-run-piuparts --no-run-autopkgtest --resolve-alternatives \
- = =C2=A0 =C2=A0 =C2=A0 =C2=A0--chroot-setup-commands=3D"rm -f /var/log/d= pkg.log" \
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0--chroot-setup-commands=3D&= quot;ldconfig; rm -f /var/log/dpkg.log" \
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0--chroot-setup-commands=3D"cp -n --no-preserve=3Downer ${ext= _deb_dir}/*.deb -t ${deb_dir}/ || :" \
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0--chroot-setup-commands=3D"cp -paf /bin/chmod /bin/s.chmod &&am= p; chmod +s /bin/s.chmod" \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--fin= ished-build-commands=3D"rm -f ${deb_dir}/sbuild-build-depends-main-dum= my_*.deb" \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--finished-build-comm= ands=3D"cp -n --no-preserve=3Downer ${deb_dir}/*.deb -t ${ext_deb_dir}= / || :" \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--finished-build-comman= ds=3D"cp /var/log/dpkg.log ${ext_root}/dpkg_partial.log" \
-- =
2.34.1
--00000000000072a3e805ea20bcc8--