From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Mon, 31 Aug 2026 11:29:12 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-ed1-f59.google.com (mail-ed1-f59.google.com [209.85.208.59]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 67V9TCK5016057 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 31 Aug 2026 11:29:12 +0200 Received: by mail-ed1-f59.google.com with SMTP id 4fb4d7f45d1cf-6a57aa074f7sf4224238a12.0 for ; Mon, 31 Aug 2026 02:29:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1788168547; cv=pass; d=google.com; s=arc-20260327; b=KkvTF2z9Jt503S1KeOFWiceIyWySYZ9t+J2ivXLBrSYoXblIM9VHp1iag2SalNN+/l ZNbtHX28YyKKmCOCaRgHlLLJHSHXxm2eIVTnJs7oewdlOwxTAB2b0PCYWZ6U1as8rYoF 5mW1sT+1Jwz8bPXue2aBpUOEocKJVm0iJ17Qc/vqkP0x56Jsge1bd4ipHWigXrQn0A7j H1mHC5x5IhlYRQUle+SR6IhjY+PtW2igHX7ApACdIwtWXmzx4LR2UjiVKb3iIsHgPwE5 T5Cc8fenDQX8bQLBdJosAZ9DpPoG61rtxoeb4kCfATnMjDpmzmwfko3dE3JL5mmpw0uW mX5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:dkim-signature; bh=d4lgcbL6tNUiKsWmv5PoUqxsfevYHBJbnVwNh5spbFw=; fh=106nIXeJXNnL+KMgt6SQ4CJx6RKgEuVaoEk9iCR+ECw=; b=nGTz9BT2ySyXb8K11zX+EeDVtKo16yqCM90Xlau/UARETM9sjcHPmgiiQwp9pr7znv 5YwFTLo2Y7cYDowfxklmou47lX/0ZQhvR+TPPlMJNClEo413NKSHUE4buKWvM7Kih099 6spI4KQvoe74yFwJYjkIRqpDWNrjV4LD37NfXKr3G7ZUm1wcGWl3QZCWThPpGx4LDWvo 0OGSdf+c+/VpeX73QInncR94hg6mgI4Ojr7umasCZtSIY2McuIfXKrNz9ge03K9oFXGO +RswdLsznSR73cqd8cDW9ALx8LNQKMrdlque6R8NyT7hdMXP2lZAXFGEiG8dGAf0kreh eQQQ==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20251104; t=1788168547; x=1788773347; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:content-type:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to:content-type; bh=d4lgcbL6tNUiKsWmv5PoUqxsfevYHBJbnVwNh5spbFw=; b=b3GloOD2vKyKcJ89aiBc9gq4myi9gQZIB1GDzMJn0KQzyBOK9ftCgyjIoYUUDJGT7n FP5gExJL0MqsaJrRhAjE6TsQWTdSOcLN5byybdutSr7vWQJbO+Qg80/IUS9Jali7yRh1 oayfbiB7YVNr55ANC23z3ekdPSSTfMb1ySkGzw7b/Q6nNha4+1iXbefqKcdB/S1LZVj1 phFwjpcoqXbVsA04JAkPFOzxW0qWkB5RW0ViZH5Cg7bI6PjyMNXzP1OOIQS88KCbwxcP fjTQuHSF+y7RSRCDcJUQxmrVLiltLZXTFwf5LXFn7EuC2VDOogW5BHjD7jXHm+put8yc OG0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788168547; x=1788773347; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:content-type :in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to:content-type; bh=d4lgcbL6tNUiKsWmv5PoUqxsfevYHBJbnVwNh5spbFw=; b=Q1ND4aAlH82pq7XH7cVb/Ql9dLNPzJU0pt6U2qX42CtvqbTteBD2cmImSz8QgSmpQz OXjcJHmjRiHsdYjgeKK/1hftgVU83UHXzMxiOEgAO/PzT15OwgV1vPLdJxCVmHAVbifj +CBKTEPhqY03vJNbe8NSr/nDJ8XSx+yS0wrANut/qngW6d46i2RZ4hF7f1d3NHHFNyMC i2x70qWjD4y4oj5rsenPuh+kwY133np/D2P+AFBJW9T79DvhfQnHrLgRc/58uWrTWi/D fcK6rhcagsRkhL9n0SgbHG5aX54X8sP5yd+N7cWUX9WShaOEIqo+XDFHYoM9NAe6/VsP BhzQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AKwUvBweLJYPNBnt/d1k+1eju/VcwuQoLHO7RPua80UJQXKD65UTxrD6OQrjZEdFMt7SHewsHJfd@ilbers.de X-Gm-Message-State: AFuF++kd126LLgYBBoe/WPNvwEABGKa7C4ZSN2Xze0qHh7Abnvxc5C2e BKCaSg9l51kVQKV9XVOI0c7TN7I949DLDIijU9im3phl2P5QqcMI29+t X-Received: by 2002:a05:6402:a218:20b0:6a3:ec9f:7e3d with SMTP id 4fb4d7f45d1cf-6a64773fc6fmr2525601a12.6.1788168546609; Mon, 31 Aug 2026 02:29:06 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="ATskLddp6w0A+v7xg+vA9/KBFuOehDbii6NItW7dSrZhVaFRwg==" Received: by 2002:a05:6402:22f0:b0:698:9724:a95 with SMTP id 4fb4d7f45d1cf-6a5f7966bc6ls2103358a12.0.-pod-prod-00-eu; Mon, 31 Aug 2026 02:29:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBz/WGC/omTQB8i32PV8gTTY/M9BuIxeAcI0n5Gyi1tQbIsTwqHALcPJKU2xYa43YvxUxnSf6sdvkc49@googlegroups.com X-Received: by 2002:a05:6402:4403:b0:6a5:f4dd:9ee3 with SMTP id 4fb4d7f45d1cf-6a647769007mr3943963a12.8.1788168544193; Mon, 31 Aug 2026 02:29:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1788168544; cv=none; d=google.com; s=arc-20260327; b=rZRzlX1AyN8ue9ONbvrPnhj40BwpJR18JuZNqPEzQ4IBYpR3N2fks2QvaBleNf9KEt TOMY8EmG48LpjDZUksESIGJiwgNWTCTyPfV0WPxLO0TGPbaEXKIO3UVoXnawHYMM7NBv JTkUMg5RITci6DsV2pGULUwXlWqtr+YfAvOD23z7HZrA89tlXs7BVPLv9C7a2KiRC9L1 3fHVZZ1qAzAYpQYjXsUwmpc/PxJ2zkUHgD+fWe4h8lBbDTsj5+GOlBy7vYP1Ln8sS7N1 ne0aNRRIW+ieW0lfoATTEv3RLYRwf8e+jnA1TXfC9R+6SfBxwffreBLHvehM4dR/3l+0 wQGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=wDuO4iNnSmBGAq+estbBKbPYTnnkARhC/PWIXtTcwUY=; fh=qBk2Tf5DFUDXPo1sNrmg/93MNVD6fbLAwok13G8WbM0=; b=OxvQVdm+20umIjQ4jce7NQgRFdANkaDJIJfMsqHJnTnvV+7aHl1bFADZlZLqG2tw4m MYipjpHxOitLVPjmlUJRYnQq+AG5b9CDDcIVlaQBDM06yuYGlPlU/YscJnlKoRaSNZLf JzPNnF7lrW5nZIB03p7LgVIuJwjhaJEQeFipilAQh4/NsASNvCppaF0tDx60LuArzPqf fDI96WskwaqXTIcserLXFlnmvlQiV594LwaL+4Xm2TULVHuG6Zmh9gjtNaQAfLxWcYEQ 9KrottH3cee5+ymL7PAtdJsTsGVD74sfvXkk8yU5gaSUeGhcQ5uWTI2q2n95cLahEGUF fWlQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 4fb4d7f45d1cf-6a611c13201si216307a12.3.2026.08.31.02.29.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 31 Aug 2026 02:29:04 -0700 (PDT) Received-SPF: pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from [192.168.178.139] ([88.130.203.42]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 67V9T3dI016051 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Aug 2026 11:29:03 +0200 Message-ID: Date: Mon, 31 Aug 2026 11:29:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] add script to check if the current environment supports rootless builds To: Felix Moessbauer , isar-users@googlegroups.com Cc: michael.adler@siemens.com, jan.kiszka@siemens.com References: <20260821131229.2235147-1-felix.moessbauer@siemens.com> Content-Language: en-US From: Zhihang Wei In-Reply-To: <20260821131229.2235147-1-felix.moessbauer@siemens.com> Content-Type: text/plain; charset="UTF-8"; format=flowed X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: wzh@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-TUID: 8n/ap2IxumGb Applied to next, thanks. Zhihang On 8/21/26 15:12, 'Felix Moessbauer' via isar-users wrote: > Running builds in rootless mode has a lot of non obvious pre conditions. > To help the user check if his system is configured correctly, we provide > a script that checks the needed features. If a feature is missing, it > issues an error regarding what likely is the root cause. > > Signed-off-by: Felix Moessbauer > --- > Changes since v1: > - ensure rootless is enabled before calling bitbake-getvar > - add -v option to print the RUN_PRIVILEGED_CMD variable > scripts/isar-check-rootless | 55 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 55 insertions(+) > create mode 100755 scripts/isar-check-rootless > > diff --git a/scripts/isar-check-rootless b/scripts/isar-check-rootless > new file mode 100755 > index 00000000..b5197111 > --- /dev/null > +++ b/scripts/isar-check-rootless > @@ -0,0 +1,55 @@ > +#!/bin/sh > +# Copyright (C) 2026 Siemens AG > +# SPDX-License-Identifier: MIT > +# > +# Helper script to check if the current environment supports unprivileged > +# rootless builds with unshare. > +# Returns 0 if supported, otherwise returns 1 and prints an error message to stderr. > + > +verbose=0 > +if [ "$1" = "-v" ]; then > + verbose=1 > +fi > + > +if ! run_privileged_cmd=$( \ > + BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS} ISAR_ROOTLESS" \ > + ISAR_ROOTLESS=1 bitbake-getvar -q --value RUN_PRIVILEGED_CMD); then > + echo "error: cannot determine RUN_PRIVILEGED_CMD from BitBake" >&2 > + exit 1 > +fi > + > +[ "$verbose" = 0 ] || echo "RUN_PRIVILEGED_CMD: $run_privileged_cmd" >&2 > + > +if ! ${run_privileged_cmd} /bin/sh <<'EOF' > + failed=0 > + > + fail() { > + echo "error: $1" >&2 > + echo " likely cause: $2" >&2 > + failed=1 > + } > + > + mountpoint=$(mktemp -d) > + if [ -n "$mountpoint" ]; then > + if ! mount -t proc proc "$mountpoint"; then > + fail "cannot mount procfs in the user namespace" \ > + "procfs is over-mounted by the container runtime, or the host security policy blocks procfs mounts" > + else > + umount "$mountpoint" > + fi > + rmdir "$mountpoint" > + fi > + > + if ! setpriv --reuid=nobody --regid=nogroup --clear-groups /usr/bin/true; then > + fail "cannot execute as nobody:nogroup in the user namespace" \ > + "the subuid / subgid ID range is too small or incomplete" > + fi > + > + exit "$failed" > +EOF > +then > + echo "error: unprivileged rootless builds are not supported; see the checks above" >&2 > + exit 1 > +fi > + > +echo "unprivileged rootless builds are supported" -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/aa0eb471-8aa9-4ca8-aaab-a010aaecb0d5%40ilbers.de.