[{"id":38070,"web_url":"https://patchwork.libcamera.org/comment/38070/","msgid":"<aYMTsDnnFbCav1Ks@zed>","date":"2026-02-04T09:43:40","subject":"Re: [libcamera-ci] [RFC PATCH v2 5/5] Add description about debian\n\trootfs setup for testing","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Barnabás\n\nOn Fri, Jan 30, 2026 at 05:02:54PM +0100, Barnabás Pőcze wrote:\n> Add a document that describes how the debian based root file system can be\n> built and where it needs to be deployed.\n\nI wonder if this is the right place where to store this..\n\nThis very much depend on the architecture of the LAVA lab instance,\nthe container image that has to be run by the board has to live in a\nregistry within the same network as the DUT, it's all very specific to\na LAB installation which makes me wonder if libcamera-ci is the right\nplace where to store this..\n\nTrue, the lava job description strictly depend on what we run on the\ndevice and this provides a blueprint for replicating it.\n\nI'm a bit in two minds here\n\n>\n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  .../debian-rootfs/build-debian-rootfs.sh      | 62 +++++++++++++++++++\n>  containers/debian-rootfs/build.sh             |  9 +++\n>  .../overlay/opt/test-libcamera.sh             | 18 ++++++\n>  doc/debian-rootfs.rst                         | 47 ++++++++++++++\n>  4 files changed, 136 insertions(+)\n>  create mode 100755 containers/debian-rootfs/build-debian-rootfs.sh\n>  create mode 100755 containers/debian-rootfs/build.sh\n>  create mode 100755 containers/debian-rootfs/overlay/opt/test-libcamera.sh\n>  create mode 100644 doc/debian-rootfs.rst\n>\n> diff --git a/containers/debian-rootfs/build-debian-rootfs.sh b/containers/debian-rootfs/build-debian-rootfs.sh\n> new file mode 100755\n> index 0000000..af9db02\n> --- /dev/null\n> +++ b/containers/debian-rootfs/build-debian-rootfs.sh\n> @@ -0,0 +1,62 @@\n> +#!/bin/bash\n> +# based on https://gitlab.freedesktop.org/freedesktop/ci-templates/-/blob/fb9d50ccb3cbbb4c6dc5f9ef53a0ad3cb0d8a177/bootstrap/cbuild\n> +\n> +set -ex\n> +\n> +packages=(\n> +\t# misc.\n> +\tca-certificates\n> +\tcoreutils\n> +\tchrony\n> +\tcurl\n> +\tiproute2\n> +\tkmod\n> +\tmoreutils\n> +\topenssh-server\n> +\tv4l-utils\n> +\twget\n> +\n> +\t# runtime dependencies\n> +\t# ensure that it is in sync with the `build-deb-for-lc-compliance-testing` job\n> +\tlibevent-2.1-7\n> +\tlibevent-pthreads-2.1-7\n> +\tlibssl3t64\n> +\tlibudev1\n> +\tlibyaml-0-2\n> +\tudev\n> +)\n> +\n> +deb_distribution=\"$1\"\n> +deb_arch=\"$2\"\n> +container_image_name=\"$3\"\n> +overlay_dir=\"$4\"\n> +\n> +newcontainer=$(buildah from scratch)\n> +scratchmnt=$(buildah mount \"$newcontainer\")\n> +\n> +debootstrap --arch=\"$deb_arch\" --variant=minbase \"$deb_distribution\" \"$scratchmnt\"\n> +\n> +buildah run --isolation=chroot \"$newcontainer\" apt update -y\n> +buildah run --isolation=chroot \"$newcontainer\" apt install -y --no-install-recommends systemd systemd-sysv\n> +buildah run --isolation=chroot \"$newcontainer\" apt install -y --no-install-recommends \"${packages[@]}\"\n> +buildah run --isolation=chroot \"$newcontainer\" bash -c 'printf \"root\\nroot\\n\" | passwd root'\n> +buildah run --isolation=chroot \"$newcontainer\" bash -c 'echo \"PermitRootLogin yes\" > /etc/ssh/sshd_config.d/10-allow-root-password.conf'\n> +buildah run --isolation=chroot \"$newcontainer\" apt autoclean -y\n> +buildah run --isolation=chroot \"$newcontainer\" apt autopurge -y\n> +\n> +buildah run --isolation=chroot \"$newcontainer\" rm -rf /var/cache/\n> +buildah run --isolation=chroot \"$newcontainer\" rm -rf /var/lib/apt/\n> +\n> +if [[ -d \"$overlay_dir\" ]]; then\n> +\trsync -av --chown=root:root \"$overlay_dir/\" \"$scratchmnt/\"\n> +fi\n> +\n> +buildah unmount \"$newcontainer\"\n> +\n> +buildah config --entrypoint '[\"/sbin/init\"]' \"$newcontainer\"\n> +buildah config --os linux \"$newcontainer\"\n> +buildah config --arch \"$deb_arch\" \"$newcontainer\"\n> +\n> +buildah commit --format=docker \"$newcontainer\" \"$container_image_name\"\n> +\n> +podman image inspect \"$container_image_name\"\n> diff --git a/containers/debian-rootfs/build.sh b/containers/debian-rootfs/build.sh\n> new file mode 100755\n> index 0000000..71c9fa2\n> --- /dev/null\n> +++ b/containers/debian-rootfs/build.sh\n> @@ -0,0 +1,9 @@\n> +#!/bin/bash\n> +\n> +set -ex\n> +\n> +exec buildah unshare ./build-debian-rootfs.sh \\\n> +\ttrixie \\\n> +\tarm64 \\\n> +\tlocalhost/libcamera-ci/debian-rootfs:arm64 \\\n> +\t./overlay\n> diff --git a/containers/debian-rootfs/overlay/opt/test-libcamera.sh b/containers/debian-rootfs/overlay/opt/test-libcamera.sh\n> new file mode 100755\n> index 0000000..a22a17d\n> --- /dev/null\n> +++ b/containers/debian-rootfs/overlay/opt/test-libcamera.sh\n> @@ -0,0 +1,18 @@\n> +#!/bin/bash\n> +\n> +set -ex\n> +\n> +pkg_source=\"$1\"\n> +camera_id=\"$2\"\n> +\n> +trap 'rm -rf /tmp/libcamera.deb' EXIT\n> +curl --retry 3 -f -o /tmp/libcamera.deb -- \"$pkg_source\"\n> +dpkg -i /tmp/libcamera.deb\n> +rm -rf /tmp/libcamera.deb\n> +\n> +env \\\n> +        LIBCAMERA_LOG_COLOR=no \\\n> +        GTEST_COLOR=no \\\n> +        ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 \\\n> +        UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 \\\n> +                lc-compliance -c \"$camera_id\"\n> diff --git a/doc/debian-rootfs.rst b/doc/debian-rootfs.rst\n> new file mode 100644\n> index 0000000..1cb45a1\n> --- /dev/null\n> +++ b/doc/debian-rootfs.rst\n> @@ -0,0 +1,47 @@\n> +.. SPDX-License-Identifier: CC-BY-SA-4.0\n> +\n> +Creating the root file system for on device testing\n> +===================================================\n> +\n> +At the moment, the root file system used with boot2container for testing\n> +needs to be built and deployed manually.\n> +\n> +Building\n> +--------\n> +\n> +Some dependencies that might need to be installed:\n> +\n> +   * `buildah`_\n> +   * debootstrap\n> +   * rsync\n> +   * qemu user emulation for aarch64 with binfmt setup\n> +\n> +.. _buildah: https://buildah.io/\n> +\n> +Simply ``cd`` into the ``containers/debian-rootfs`` directory, and execute the ``build.sh``:\n> +\n> +.. code:: shell\n> +\n> +   $ ./build.sh\n> +\n> +If everything succeeds, a new image tagged as ``localhost/libcamera-ci/debian-rootfs:arm64``\n> +should be available.\n> +\n> +Deployment\n> +----------\n> +\n> +The ``localhost/libcamera-ci/debian-rootfs:arm64`` image must be pushed to the internal\n> +registry running alongside the LAVA services. After starting SSH forwarding:\n> +\n> +.. code:: shell\n> +\n> +   $ ssh -N -v -L 127.0.0.1:5000:${REGISTRY_LOCAL_ADDR}:5000 ssh://${REGISTRY_REMOTE_ADDR}\n> +\n> +the image must be tagged for the registry and pushed:\n> +\n> +.. code:: shell\n> +\n> +   $ podman image tag localhost/libcamera-ci/debian-rootfs:arm64 localhost:5000/libcamera-ci/debian-rootfs-arm64:latest\n> +   $ podman image push --tls-verify=false localhost:5000/libcamera-ci/debian-rootfs-arm64\n> +\n> +Internal documentation describes how to gain access.\n> --\n> 2.52.0","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id ACDF7BD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  4 Feb 2026 09:43:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 595506202B;\n\tWed,  4 Feb 2026 10:43:44 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EEF9662024\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  4 Feb 2026 10:43:42 +0100 (CET)","from ideasonboard.com (net-93-65-100-155.cust.vodafonedsl.it\n\t[93.65.100.155])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 09F0D46F;\n\tWed,  4 Feb 2026 10:43:01 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Rj0YhESS\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1770198181;\n\tbh=aswqdhHO+IoguTXblbBVzdBqk0jPgzDb91/Z5lVRntw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Rj0YhESSOI8ulNcCj1PxTHy1+30dCrincHCOz7oONH/uKdsDvFqYhT1A+rQA+ldZu\n\t+5sStBw/CJmBhPjzOU2Jy29+ZmlG4cSic1yZ2SR0TKG22T13+y3C2zLc4p/+BibgF2\n\tVCmX/Ghd8AaEs6tCZ6akm7GOODv7fv9mylcDLQZU=","Date":"Wed, 4 Feb 2026 10:43:40 +0100","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-ci] [RFC PATCH v2 5/5] Add description about debian\n\trootfs setup for testing","Message-ID":"<aYMTsDnnFbCav1Ks@zed>","References":"<20260130160254.1770742-1-barnabas.pocze@ideasonboard.com>\n\t<20260130160254.1770742-6-barnabas.pocze@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20260130160254.1770742-6-barnabas.pocze@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38099,"web_url":"https://patchwork.libcamera.org/comment/38099/","msgid":"<20260205141044.GM156228@killaraus>","date":"2026-02-05T14:10:44","subject":"Re: [libcamera-ci] [RFC PATCH v2 5/5] Add description about debian\n\trootfs setup for testing","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Wed, Feb 04, 2026 at 10:43:40AM +0100, Jacopo Mondi wrote:\n> Hi Barnabás\n> \n> On Fri, Jan 30, 2026 at 05:02:54PM +0100, Barnabás Pőcze wrote:\n> > Add a document that describes how the debian based root file system can be\n> > built and where it needs to be deployed.\n> \n> I wonder if this is the right place where to store this..\n> \n> This very much depend on the architecture of the LAVA lab instance,\n> the container image that has to be run by the board has to live in a\n> registry within the same network as the DUT, it's all very specific to\n> a LAB installation which makes me wonder if libcamera-ci is the right\n> place where to store this..\n> \n> True, the lava job description strictly depend on what we run on the\n> device and this provides a blueprint for replicating it.\n> \n> I'm a bit in two minds here\n\nIt may not be the perfect place, but I think it's fine to start with. We\ncan move the documentation later if needed.\n\n> > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> > ---\n> >  .../debian-rootfs/build-debian-rootfs.sh      | 62 +++++++++++++++++++\n> >  containers/debian-rootfs/build.sh             |  9 +++\n> >  .../overlay/opt/test-libcamera.sh             | 18 ++++++\n> >  doc/debian-rootfs.rst                         | 47 ++++++++++++++\n> >  4 files changed, 136 insertions(+)\n> >  create mode 100755 containers/debian-rootfs/build-debian-rootfs.sh\n> >  create mode 100755 containers/debian-rootfs/build.sh\n> >  create mode 100755 containers/debian-rootfs/overlay/opt/test-libcamera.sh\n> >  create mode 100644 doc/debian-rootfs.rst\n> >\n> > diff --git a/containers/debian-rootfs/build-debian-rootfs.sh b/containers/debian-rootfs/build-debian-rootfs.sh\n> > new file mode 100755\n> > index 0000000..af9db02\n> > --- /dev/null\n> > +++ b/containers/debian-rootfs/build-debian-rootfs.sh\n> > @@ -0,0 +1,62 @@\n> > +#!/bin/bash\n\nPlease add an SPDX license tag. Same for the other files.\n\n> > +# based on https://gitlab.freedesktop.org/freedesktop/ci-templates/-/blob/fb9d50ccb3cbbb4c6dc5f9ef53a0ad3cb0d8a177/bootstrap/cbuild\n> > +\n> > +set -ex\n> > +\n> > +packages=(\n> > +\t# misc.\n> > +\tca-certificates\n> > +\tcoreutils\n> > +\tchrony\n> > +\tcurl\n> > +\tiproute2\n> > +\tkmod\n> > +\tmoreutils\n> > +\topenssh-server\n> > +\tv4l-utils\n> > +\twget\n> > +\n> > +\t# runtime dependencies\n> > +\t# ensure that it is in sync with the `build-deb-for-lc-compliance-testing` job\n> > +\tlibevent-2.1-7\n> > +\tlibevent-pthreads-2.1-7\n> > +\tlibssl3t64\n> > +\tlibudev1\n> > +\tlibyaml-0-2\n> > +\tudev\n> > +)\n> > +\n> > +deb_distribution=\"$1\"\n> > +deb_arch=\"$2\"\n> > +container_image_name=\"$3\"\n> > +overlay_dir=\"$4\"\n> > +\n> > +newcontainer=$(buildah from scratch)\n> > +scratchmnt=$(buildah mount \"$newcontainer\")\n> > +\n> > +debootstrap --arch=\"$deb_arch\" --variant=minbase \"$deb_distribution\" \"$scratchmnt\"\n\nI was going to say that depending on debootstrap is a bit annoying, but\nI then noticed it's packaged by Gentoo, so I suppose it doesn't restrict\nthe host system to being Debian-based.\n\nDid you get to try using a Containerfile, as per the review discussion\nin v1 ? I'm not saying we have to switch, but I'd like to know if you've\ninvestigated and decided to keep buildah for specific reasons.\n\n> > +\n> > +buildah run --isolation=chroot \"$newcontainer\" apt update -y\n> > +buildah run --isolation=chroot \"$newcontainer\" apt install -y --no-install-recommends systemd systemd-sysv\n> > +buildah run --isolation=chroot \"$newcontainer\" apt install -y --no-install-recommends \"${packages[@]}\"\n> > +buildah run --isolation=chroot \"$newcontainer\" bash -c 'printf \"root\\nroot\\n\" | passwd root'\n> > +buildah run --isolation=chroot \"$newcontainer\" bash -c 'echo \"PermitRootLogin yes\" > /etc/ssh/sshd_config.d/10-allow-root-password.conf'\n> > +buildah run --isolation=chroot \"$newcontainer\" apt autoclean -y\n> > +buildah run --isolation=chroot \"$newcontainer\" apt autopurge -y\n> > +\n> > +buildah run --isolation=chroot \"$newcontainer\" rm -rf /var/cache/\n> > +buildah run --isolation=chroot \"$newcontainer\" rm -rf /var/lib/apt/\n> > +\n> > +if [[ -d \"$overlay_dir\" ]]; then\n> > +\trsync -av --chown=root:root \"$overlay_dir/\" \"$scratchmnt/\"\n> > +fi\n> > +\n> > +buildah unmount \"$newcontainer\"\n> > +\n> > +buildah config --entrypoint '[\"/sbin/init\"]' \"$newcontainer\"\n> > +buildah config --os linux \"$newcontainer\"\n> > +buildah config --arch \"$deb_arch\" \"$newcontainer\"\n> > +\n> > +buildah commit --format=docker \"$newcontainer\" \"$container_image_name\"\n> > +\n> > +podman image inspect \"$container_image_name\"\n> > diff --git a/containers/debian-rootfs/build.sh b/containers/debian-rootfs/build.sh\n> > new file mode 100755\n> > index 0000000..71c9fa2\n> > --- /dev/null\n> > +++ b/containers/debian-rootfs/build.sh\n> > @@ -0,0 +1,9 @@\n> > +#!/bin/bash\n> > +\n> > +set -ex\n> > +\n> > +exec buildah unshare ./build-debian-rootfs.sh \\\n> > +\ttrixie \\\n> > +\tarm64 \\\n> > +\tlocalhost/libcamera-ci/debian-rootfs:arm64 \\\n> > +\t./overlay\n> > diff --git a/containers/debian-rootfs/overlay/opt/test-libcamera.sh b/containers/debian-rootfs/overlay/opt/test-libcamera.sh\n> > new file mode 100755\n> > index 0000000..a22a17d\n> > --- /dev/null\n> > +++ b/containers/debian-rootfs/overlay/opt/test-libcamera.sh\n> > @@ -0,0 +1,18 @@\n> > +#!/bin/bash\n> > +\n> > +set -ex\n> > +\n> > +pkg_source=\"$1\"\n> > +camera_id=\"$2\"\n> > +\n> > +trap 'rm -rf /tmp/libcamera.deb' EXIT\n> > +curl --retry 3 -f -o /tmp/libcamera.deb -- \"$pkg_source\"\n> > +dpkg -i /tmp/libcamera.deb\n> > +rm -rf /tmp/libcamera.deb\n> > +\n> > +env \\\n> > +        LIBCAMERA_LOG_COLOR=no \\\n> > +        GTEST_COLOR=no \\\n> > +        ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 \\\n> > +        UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 \\\n> > +                lc-compliance -c \"$camera_id\"\n> > diff --git a/doc/debian-rootfs.rst b/doc/debian-rootfs.rst\n> > new file mode 100644\n> > index 0000000..1cb45a1\n> > --- /dev/null\n> > +++ b/doc/debian-rootfs.rst\n> > @@ -0,0 +1,47 @@\n> > +.. SPDX-License-Identifier: CC-BY-SA-4.0\n> > +\n> > +Creating the root file system for on device testing\n> > +===================================================\n> > +\n> > +At the moment, the root file system used with boot2container for testing\n> > +needs to be built and deployed manually.\n> > +\n> > +Building\n> > +--------\n> > +\n> > +Some dependencies that might need to be installed:\n\n\"might\" ? I'd write\n\nThe following dependencies need to be installed:\n\n> > +\n> > +   * `buildah`_\n> > +   * debootstrap\n> > +   * rsync\n> > +   * qemu user emulation for aarch64 with binfmt setup\n> > +\n> > +.. _buildah: https://buildah.io/\n> > +\n> > +Simply ``cd`` into the ``containers/debian-rootfs`` directory, and execute the ``build.sh``:\n\ns/execute the/execute/ (or add \"script\" after build.sh)\n\n> > +\n> > +.. code:: shell\n> > +\n> > +   $ ./build.sh\n> > +\n> > +If everything succeeds, a new image tagged as ``localhost/libcamera-ci/debian-rootfs:arm64``\n> > +should be available.\n> > +\n> > +Deployment\n> > +----------\n> > +\n> > +The ``localhost/libcamera-ci/debian-rootfs:arm64`` image must be pushed to the internal\n> > +registry running alongside the LAVA services. After starting SSH forwarding:\n> > +\n> > +.. code:: shell\n> > +\n> > +   $ ssh -N -v -L 127.0.0.1:5000:${REGISTRY_LOCAL_ADDR}:5000 ssh://${REGISTRY_REMOTE_ADDR}\n> > +\n> > +the image must be tagged for the registry and pushed:\n\ns/^the/The/\n\n> > +\n> > +.. code:: shell\n> > +\n> > +   $ podman image tag localhost/libcamera-ci/debian-rootfs:arm64 localhost:5000/libcamera-ci/debian-rootfs-arm64:latest\n> > +   $ podman image push --tls-verify=false localhost:5000/libcamera-ci/debian-rootfs-arm64\n> > +\n> > +Internal documentation describes how to gain access.\n\nI'd drop this last line.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id BF9DFBD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  5 Feb 2026 14:10:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E6EB66206A;\n\tThu,  5 Feb 2026 15:10:46 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F343762010\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  5 Feb 2026 15:10:45 +0100 (CET)","from killaraus.ideasonboard.com\n\t(2001-14ba-703d-e500--2a1.rev.dnainternet.fi\n\t[IPv6:2001:14ba:703d:e500::2a1])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id B237A3A4;\n\tThu,  5 Feb 2026 15:10:02 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"UQnMV+DZ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1770300602;\n\tbh=5m2tezPXw0EL5lgWjEeRpq8bPplcAHyF+LPpAFRMYMs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=UQnMV+DZ82erqewUEUI4Ov/eMAFBxY5iNjXHvtgfVWaQLUQZ0f6TOB114rY1Rp3f7\n\t+nUidGUQU1QSoyPYKx/b9iUt9174t77Svr/V8Rj1drimMiWtf75/MVUjjUZVpyMeyx\n\t6YRp9ROB2gwBzhoSmO/CRy6COd/OK3Q8GA1Cd1vY=","Date":"Thu, 5 Feb 2026 16:10:44 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-ci] [RFC PATCH v2 5/5] Add description about debian\n\trootfs setup for testing","Message-ID":"<20260205141044.GM156228@killaraus>","References":"<20260130160254.1770742-1-barnabas.pocze@ideasonboard.com>\n\t<20260130160254.1770742-6-barnabas.pocze@ideasonboard.com>\n\t<aYMTsDnnFbCav1Ks@zed>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<aYMTsDnnFbCav1Ks@zed>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38146,"web_url":"https://patchwork.libcamera.org/comment/38146/","msgid":"<1dab56ec-bf0c-41c4-8c69-8494bde8032d@ideasonboard.com>","date":"2026-02-09T10:36:10","subject":"Re: [libcamera-ci] [RFC PATCH v2 5/5] Add description about debian\n\trootfs setup for testing","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 02. 05. 15:10 keltezéssel, Laurent Pinchart írta:\n> On Wed, Feb 04, 2026 at 10:43:40AM +0100, Jacopo Mondi wrote:\n>> Hi Barnabás\n>>\n>> On Fri, Jan 30, 2026 at 05:02:54PM +0100, Barnabás Pőcze wrote:\n>>> Add a document that describes how the debian based root file system can be\n>>> built and where it needs to be deployed.\n>>\n>> I wonder if this is the right place where to store this..\n>>\n>> This very much depend on the architecture of the LAVA lab instance,\n>> the container image that has to be run by the board has to live in a\n>> registry within the same network as the DUT, it's all very specific to\n>> a LAB installation which makes me wonder if libcamera-ci is the right\n>> place where to store this..\n>>\n>> True, the lava job description strictly depend on what we run on the\n>> device and this provides a blueprint for replicating it.\n>>\n>> I'm a bit in two minds here\n> \n> It may not be the perfect place, but I think it's fine to start with. We\n> can move the documentation later if needed.\n> \n>>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>>> ---\n>>>   .../debian-rootfs/build-debian-rootfs.sh      | 62 +++++++++++++++++++\n>>>   containers/debian-rootfs/build.sh             |  9 +++\n>>>   .../overlay/opt/test-libcamera.sh             | 18 ++++++\n>>>   doc/debian-rootfs.rst                         | 47 ++++++++++++++\n>>>   4 files changed, 136 insertions(+)\n>>>   create mode 100755 containers/debian-rootfs/build-debian-rootfs.sh\n>>>   create mode 100755 containers/debian-rootfs/build.sh\n>>>   create mode 100755 containers/debian-rootfs/overlay/opt/test-libcamera.sh\n>>>   create mode 100644 doc/debian-rootfs.rst\n>>>\n>>> diff --git a/containers/debian-rootfs/build-debian-rootfs.sh b/containers/debian-rootfs/build-debian-rootfs.sh\n>>> new file mode 100755\n>>> index 0000000..af9db02\n>>> --- /dev/null\n>>> +++ b/containers/debian-rootfs/build-debian-rootfs.sh\n>>> @@ -0,0 +1,62 @@\n>>> +#!/bin/bash\n> \n> Please add an SPDX license tag. Same for the other files.\n> \n>>> +# based on https://gitlab.freedesktop.org/freedesktop/ci-templates/-/blob/fb9d50ccb3cbbb4c6dc5f9ef53a0ad3cb0d8a177/bootstrap/cbuild\n>>> +\n>>> +set -ex\n>>> +\n>>> +packages=(\n>>> +\t# misc.\n>>> +\tca-certificates\n>>> +\tcoreutils\n>>> +\tchrony\n>>> +\tcurl\n>>> +\tiproute2\n>>> +\tkmod\n>>> +\tmoreutils\n>>> +\topenssh-server\n>>> +\tv4l-utils\n>>> +\twget\n>>> +\n>>> +\t# runtime dependencies\n>>> +\t# ensure that it is in sync with the `build-deb-for-lc-compliance-testing` job\n>>> +\tlibevent-2.1-7\n>>> +\tlibevent-pthreads-2.1-7\n>>> +\tlibssl3t64\n>>> +\tlibudev1\n>>> +\tlibyaml-0-2\n>>> +\tudev\n>>> +)\n>>> +\n>>> +deb_distribution=\"$1\"\n>>> +deb_arch=\"$2\"\n>>> +container_image_name=\"$3\"\n>>> +overlay_dir=\"$4\"\n>>> +\n>>> +newcontainer=$(buildah from scratch)\n>>> +scratchmnt=$(buildah mount \"$newcontainer\")\n>>> +\n>>> +debootstrap --arch=\"$deb_arch\" --variant=minbase \"$deb_distribution\" \"$scratchmnt\"\n> \n> I was going to say that depending on debootstrap is a bit annoying, but\n> I then noticed it's packaged by Gentoo, so I suppose it doesn't restrict\n> the host system to being Debian-based.\n\nPackaged by Arch as well, otherwise I'd have used something different.\nI think it is packaged by most: https://repology.org/project/debootstrap/versions\n\n\n> \n> Did you get to try using a Containerfile, as per the review discussion\n> in v1 ? I'm not saying we have to switch, but I'd like to know if you've\n> investigated and decided to keep buildah for specific reasons.\n\nI wanted to keep the option of using an \"overlay\" directory with rsync\n(although at the moment only a single file is really needed, so it's a\nbit of an overkill), and I don't know if it could be easily done in a\nContainerfile. I have not investigated it in depth, though. Apart from that,\nI think it shouldn't be too hard to change (not tested).\n\n\n> \n>>> +\n>>> +buildah run --isolation=chroot \"$newcontainer\" apt update -y\n>>> +buildah run --isolation=chroot \"$newcontainer\" apt install -y --no-install-recommends systemd systemd-sysv\n>>> +buildah run --isolation=chroot \"$newcontainer\" apt install -y --no-install-recommends \"${packages[@]}\"\n>>> +buildah run --isolation=chroot \"$newcontainer\" bash -c 'printf \"root\\nroot\\n\" | passwd root'\n>>> +buildah run --isolation=chroot \"$newcontainer\" bash -c 'echo \"PermitRootLogin yes\" > /etc/ssh/sshd_config.d/10-allow-root-password.conf'\n>>> +buildah run --isolation=chroot \"$newcontainer\" apt autoclean -y\n>>> +buildah run --isolation=chroot \"$newcontainer\" apt autopurge -y\n>>> +\n>>> +buildah run --isolation=chroot \"$newcontainer\" rm -rf /var/cache/\n>>> +buildah run --isolation=chroot \"$newcontainer\" rm -rf /var/lib/apt/\n>>> +\n>>> +if [[ -d \"$overlay_dir\" ]]; then\n>>> +\trsync -av --chown=root:root \"$overlay_dir/\" \"$scratchmnt/\"\n>>> +fi\n>>> +\n>>> +buildah unmount \"$newcontainer\"\n>>> +\n>>> +buildah config --entrypoint '[\"/sbin/init\"]' \"$newcontainer\"\n>>> +buildah config --os linux \"$newcontainer\"\n>>> +buildah config --arch \"$deb_arch\" \"$newcontainer\"\n>>> +\n>>> +buildah commit --format=docker \"$newcontainer\" \"$container_image_name\"\n>>> +\n>>> +podman image inspect \"$container_image_name\"\n>>> diff --git a/containers/debian-rootfs/build.sh b/containers/debian-rootfs/build.sh\n>>> new file mode 100755\n>>> index 0000000..71c9fa2\n>>> --- /dev/null\n>>> +++ b/containers/debian-rootfs/build.sh\n>>> @@ -0,0 +1,9 @@\n>>> +#!/bin/bash\n>>> +\n>>> +set -ex\n>>> +\n>>> +exec buildah unshare ./build-debian-rootfs.sh \\\n>>> +\ttrixie \\\n>>> +\tarm64 \\\n>>> +\tlocalhost/libcamera-ci/debian-rootfs:arm64 \\\n>>> +\t./overlay\n>>> diff --git a/containers/debian-rootfs/overlay/opt/test-libcamera.sh b/containers/debian-rootfs/overlay/opt/test-libcamera.sh\n>>> new file mode 100755\n>>> index 0000000..a22a17d\n>>> --- /dev/null\n>>> +++ b/containers/debian-rootfs/overlay/opt/test-libcamera.sh\n>>> @@ -0,0 +1,18 @@\n>>> +#!/bin/bash\n>>> +\n>>> +set -ex\n>>> +\n>>> +pkg_source=\"$1\"\n>>> +camera_id=\"$2\"\n>>> +\n>>> +trap 'rm -rf /tmp/libcamera.deb' EXIT\n>>> +curl --retry 3 -f -o /tmp/libcamera.deb -- \"$pkg_source\"\n>>> +dpkg -i /tmp/libcamera.deb\n>>> +rm -rf /tmp/libcamera.deb\n>>> +\n>>> +env \\\n>>> +        LIBCAMERA_LOG_COLOR=no \\\n>>> +        GTEST_COLOR=no \\\n>>> +        ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 \\\n>>> +        UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 \\\n>>> +                lc-compliance -c \"$camera_id\"\n>>> diff --git a/doc/debian-rootfs.rst b/doc/debian-rootfs.rst\n>>> new file mode 100644\n>>> index 0000000..1cb45a1\n>>> --- /dev/null\n>>> +++ b/doc/debian-rootfs.rst\n>>> @@ -0,0 +1,47 @@\n>>> +.. SPDX-License-Identifier: CC-BY-SA-4.0\n>>> +\n>>> +Creating the root file system for on device testing\n>>> +===================================================\n>>> +\n>>> +At the moment, the root file system used with boot2container for testing\n>>> +needs to be built and deployed manually.\n>>> +\n>>> +Building\n>>> +--------\n>>> +\n>>> +Some dependencies that might need to be installed:\n> \n> \"might\" ? I'd write\n> \n> The following dependencies need to be installed:\n> \n>>> +\n>>> +   * `buildah`_\n>>> +   * debootstrap\n>>> +   * rsync\n>>> +   * qemu user emulation for aarch64 with binfmt setup\n>>> +\n>>> +.. _buildah: https://buildah.io/\n>>> +\n>>> +Simply ``cd`` into the ``containers/debian-rootfs`` directory, and execute the ``build.sh``:\n> \n> s/execute the/execute/ (or add \"script\" after build.sh)\n> \n>>> +\n>>> +.. code:: shell\n>>> +\n>>> +   $ ./build.sh\n>>> +\n>>> +If everything succeeds, a new image tagged as ``localhost/libcamera-ci/debian-rootfs:arm64``\n>>> +should be available.\n>>> +\n>>> +Deployment\n>>> +----------\n>>> +\n>>> +The ``localhost/libcamera-ci/debian-rootfs:arm64`` image must be pushed to the internal\n>>> +registry running alongside the LAVA services. After starting SSH forwarding:\n>>> +\n>>> +.. code:: shell\n>>> +\n>>> +   $ ssh -N -v -L 127.0.0.1:5000:${REGISTRY_LOCAL_ADDR}:5000 ssh://${REGISTRY_REMOTE_ADDR}\n>>> +\n>>> +the image must be tagged for the registry and pushed:\n> \n> s/^the/The/\n> \n>>> +\n>>> +.. code:: shell\n>>> +\n>>> +   $ podman image tag localhost/libcamera-ci/debian-rootfs:arm64 localhost:5000/libcamera-ci/debian-rootfs-arm64:latest\n>>> +   $ podman image push --tls-verify=false localhost:5000/libcamera-ci/debian-rootfs-arm64\n>>> +\n>>> +Internal documentation describes how to gain access.\n> \n> I'd drop this last line.\n\nDone, all of the above.\n\n\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 80504BD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  9 Feb 2026 10:36:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 75DA1620CB;\n\tMon,  9 Feb 2026 11:36:15 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 64DB3615B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Feb 2026 11:36:14 +0100 (CET)","from [192.168.33.63] (185.221.141.206.nat.pool.zt.hu\n\t[185.221.141.206])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7DA2463F;\n\tMon,  9 Feb 2026 11:35:28 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Sv/XNRGR\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1770633328;\n\tbh=1slziIW4Iajy7CJd9rTsVG1R77TghASXC9y6Zy9LGu4=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=Sv/XNRGR2qdKgE59LHo0v06jd4UJPfYIx42ppvqxa8GGm2ncLNtnJ2RxmrD+eKH30\n\tvzf6+ioG5fMTDmRjJXzSmnyZBH8rqXrLYyE0nzAPPD1JKvFlwcfG90L4VeDSEB3crg\n\tpalITS3MWV2yfOT266/Onx7BD0pAdDRgU+3evKbs=","Message-ID":"<1dab56ec-bf0c-41c4-8c69-8494bde8032d@ideasonboard.com>","Date":"Mon, 9 Feb 2026 11:36:10 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [libcamera-ci] [RFC PATCH v2 5/5] Add description about debian\n\trootfs setup for testing","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20260130160254.1770742-1-barnabas.pocze@ideasonboard.com>\n\t<20260130160254.1770742-6-barnabas.pocze@ideasonboard.com>\n\t<aYMTsDnnFbCav1Ks@zed> <20260205141044.GM156228@killaraus>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260205141044.GM156228@killaraus>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38148,"web_url":"https://patchwork.libcamera.org/comment/38148/","msgid":"<20260209110157.GD2302514@killaraus.ideasonboard.com>","date":"2026-02-09T11:01:57","subject":"Re: [libcamera-ci] [RFC PATCH v2 5/5] Add description about debian\n\trootfs setup for testing","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Feb 09, 2026 at 11:36:10AM +0100, Barnabás Pőcze wrote:\n> 2026. 02. 05. 15:10 keltezéssel, Laurent Pinchart írta:\n> > On Wed, Feb 04, 2026 at 10:43:40AM +0100, Jacopo Mondi wrote:\n> >> On Fri, Jan 30, 2026 at 05:02:54PM +0100, Barnabás Pőcze wrote:\n> >>> Add a document that describes how the debian based root file system can be\n> >>> built and where it needs to be deployed.\n> >>\n> >> I wonder if this is the right place where to store this..\n> >>\n> >> This very much depend on the architecture of the LAVA lab instance,\n> >> the container image that has to be run by the board has to live in a\n> >> registry within the same network as the DUT, it's all very specific to\n> >> a LAB installation which makes me wonder if libcamera-ci is the right\n> >> place where to store this..\n> >>\n> >> True, the lava job description strictly depend on what we run on the\n> >> device and this provides a blueprint for replicating it.\n> >>\n> >> I'm a bit in two minds here\n> > \n> > It may not be the perfect place, but I think it's fine to start with. We\n> > can move the documentation later if needed.\n> > \n> >>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> >>> ---\n> >>>   .../debian-rootfs/build-debian-rootfs.sh      | 62 +++++++++++++++++++\n> >>>   containers/debian-rootfs/build.sh             |  9 +++\n> >>>   .../overlay/opt/test-libcamera.sh             | 18 ++++++\n> >>>   doc/debian-rootfs.rst                         | 47 ++++++++++++++\n> >>>   4 files changed, 136 insertions(+)\n> >>>   create mode 100755 containers/debian-rootfs/build-debian-rootfs.sh\n> >>>   create mode 100755 containers/debian-rootfs/build.sh\n> >>>   create mode 100755 containers/debian-rootfs/overlay/opt/test-libcamera.sh\n> >>>   create mode 100644 doc/debian-rootfs.rst\n> >>>\n> >>> diff --git a/containers/debian-rootfs/build-debian-rootfs.sh b/containers/debian-rootfs/build-debian-rootfs.sh\n> >>> new file mode 100755\n> >>> index 0000000..af9db02\n> >>> --- /dev/null\n> >>> +++ b/containers/debian-rootfs/build-debian-rootfs.sh\n> >>> @@ -0,0 +1,62 @@\n> >>> +#!/bin/bash\n> > \n> > Please add an SPDX license tag. Same for the other files.\n> > \n> >>> +# based on https://gitlab.freedesktop.org/freedesktop/ci-templates/-/blob/fb9d50ccb3cbbb4c6dc5f9ef53a0ad3cb0d8a177/bootstrap/cbuild\n> >>> +\n> >>> +set -ex\n> >>> +\n> >>> +packages=(\n> >>> +\t# misc.\n> >>> +\tca-certificates\n> >>> +\tcoreutils\n> >>> +\tchrony\n> >>> +\tcurl\n> >>> +\tiproute2\n> >>> +\tkmod\n> >>> +\tmoreutils\n> >>> +\topenssh-server\n> >>> +\tv4l-utils\n> >>> +\twget\n> >>> +\n> >>> +\t# runtime dependencies\n> >>> +\t# ensure that it is in sync with the `build-deb-for-lc-compliance-testing` job\n> >>> +\tlibevent-2.1-7\n> >>> +\tlibevent-pthreads-2.1-7\n> >>> +\tlibssl3t64\n> >>> +\tlibudev1\n> >>> +\tlibyaml-0-2\n> >>> +\tudev\n> >>> +)\n> >>> +\n> >>> +deb_distribution=\"$1\"\n> >>> +deb_arch=\"$2\"\n> >>> +container_image_name=\"$3\"\n> >>> +overlay_dir=\"$4\"\n> >>> +\n> >>> +newcontainer=$(buildah from scratch)\n> >>> +scratchmnt=$(buildah mount \"$newcontainer\")\n> >>> +\n> >>> +debootstrap --arch=\"$deb_arch\" --variant=minbase \"$deb_distribution\" \"$scratchmnt\"\n> > \n> > I was going to say that depending on debootstrap is a bit annoying, but\n> > I then noticed it's packaged by Gentoo, so I suppose it doesn't restrict\n> > the host system to being Debian-based.\n> \n> Packaged by Arch as well, otherwise I'd have used something different.\n> I think it is packaged by most: https://repology.org/project/debootstrap/versions\n> \n> > Did you get to try using a Containerfile, as per the review discussion\n> > in v1 ? I'm not saying we have to switch, but I'd like to know if you've\n> > investigated and decided to keep buildah for specific reasons.\n> \n> I wanted to keep the option of using an \"overlay\" directory with rsync\n> (although at the moment only a single file is really needed, so it's a\n> bit of an overkill), and I don't know if it could be easily done in a\n> Containerfile.\n\nIsn't it what the COPY instruction does ?\n\n> I have not investigated it in depth, though. Apart from that,\n> I think it shouldn't be too hard to change (not tested).\n> \n> >>> +\n> >>> +buildah run --isolation=chroot \"$newcontainer\" apt update -y\n> >>> +buildah run --isolation=chroot \"$newcontainer\" apt install -y --no-install-recommends systemd systemd-sysv\n> >>> +buildah run --isolation=chroot \"$newcontainer\" apt install -y --no-install-recommends \"${packages[@]}\"\n> >>> +buildah run --isolation=chroot \"$newcontainer\" bash -c 'printf \"root\\nroot\\n\" | passwd root'\n> >>> +buildah run --isolation=chroot \"$newcontainer\" bash -c 'echo \"PermitRootLogin yes\" > /etc/ssh/sshd_config.d/10-allow-root-password.conf'\n> >>> +buildah run --isolation=chroot \"$newcontainer\" apt autoclean -y\n> >>> +buildah run --isolation=chroot \"$newcontainer\" apt autopurge -y\n> >>> +\n> >>> +buildah run --isolation=chroot \"$newcontainer\" rm -rf /var/cache/\n> >>> +buildah run --isolation=chroot \"$newcontainer\" rm -rf /var/lib/apt/\n> >>> +\n> >>> +if [[ -d \"$overlay_dir\" ]]; then\n> >>> +\trsync -av --chown=root:root \"$overlay_dir/\" \"$scratchmnt/\"\n> >>> +fi\n> >>> +\n> >>> +buildah unmount \"$newcontainer\"\n> >>> +\n> >>> +buildah config --entrypoint '[\"/sbin/init\"]' \"$newcontainer\"\n> >>> +buildah config --os linux \"$newcontainer\"\n> >>> +buildah config --arch \"$deb_arch\" \"$newcontainer\"\n> >>> +\n> >>> +buildah commit --format=docker \"$newcontainer\" \"$container_image_name\"\n> >>> +\n> >>> +podman image inspect \"$container_image_name\"\n> >>> diff --git a/containers/debian-rootfs/build.sh b/containers/debian-rootfs/build.sh\n> >>> new file mode 100755\n> >>> index 0000000..71c9fa2\n> >>> --- /dev/null\n> >>> +++ b/containers/debian-rootfs/build.sh\n> >>> @@ -0,0 +1,9 @@\n> >>> +#!/bin/bash\n> >>> +\n> >>> +set -ex\n> >>> +\n> >>> +exec buildah unshare ./build-debian-rootfs.sh \\\n> >>> +\ttrixie \\\n> >>> +\tarm64 \\\n> >>> +\tlocalhost/libcamera-ci/debian-rootfs:arm64 \\\n> >>> +\t./overlay\n> >>> diff --git a/containers/debian-rootfs/overlay/opt/test-libcamera.sh b/containers/debian-rootfs/overlay/opt/test-libcamera.sh\n> >>> new file mode 100755\n> >>> index 0000000..a22a17d\n> >>> --- /dev/null\n> >>> +++ b/containers/debian-rootfs/overlay/opt/test-libcamera.sh\n> >>> @@ -0,0 +1,18 @@\n> >>> +#!/bin/bash\n> >>> +\n> >>> +set -ex\n> >>> +\n> >>> +pkg_source=\"$1\"\n> >>> +camera_id=\"$2\"\n> >>> +\n> >>> +trap 'rm -rf /tmp/libcamera.deb' EXIT\n> >>> +curl --retry 3 -f -o /tmp/libcamera.deb -- \"$pkg_source\"\n> >>> +dpkg -i /tmp/libcamera.deb\n> >>> +rm -rf /tmp/libcamera.deb\n> >>> +\n> >>> +env \\\n> >>> +        LIBCAMERA_LOG_COLOR=no \\\n> >>> +        GTEST_COLOR=no \\\n> >>> +        ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 \\\n> >>> +        UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 \\\n> >>> +                lc-compliance -c \"$camera_id\"\n> >>> diff --git a/doc/debian-rootfs.rst b/doc/debian-rootfs.rst\n> >>> new file mode 100644\n> >>> index 0000000..1cb45a1\n> >>> --- /dev/null\n> >>> +++ b/doc/debian-rootfs.rst\n> >>> @@ -0,0 +1,47 @@\n> >>> +.. SPDX-License-Identifier: CC-BY-SA-4.0\n> >>> +\n> >>> +Creating the root file system for on device testing\n> >>> +===================================================\n> >>> +\n> >>> +At the moment, the root file system used with boot2container for testing\n> >>> +needs to be built and deployed manually.\n> >>> +\n> >>> +Building\n> >>> +--------\n> >>> +\n> >>> +Some dependencies that might need to be installed:\n> > \n> > \"might\" ? I'd write\n> > \n> > The following dependencies need to be installed:\n> > \n> >>> +\n> >>> +   * `buildah`_\n> >>> +   * debootstrap\n> >>> +   * rsync\n> >>> +   * qemu user emulation for aarch64 with binfmt setup\n> >>> +\n> >>> +.. _buildah: https://buildah.io/\n> >>> +\n> >>> +Simply ``cd`` into the ``containers/debian-rootfs`` directory, and execute the ``build.sh``:\n> > \n> > s/execute the/execute/ (or add \"script\" after build.sh)\n> > \n> >>> +\n> >>> +.. code:: shell\n> >>> +\n> >>> +   $ ./build.sh\n> >>> +\n> >>> +If everything succeeds, a new image tagged as ``localhost/libcamera-ci/debian-rootfs:arm64``\n> >>> +should be available.\n> >>> +\n> >>> +Deployment\n> >>> +----------\n> >>> +\n> >>> +The ``localhost/libcamera-ci/debian-rootfs:arm64`` image must be pushed to the internal\n> >>> +registry running alongside the LAVA services. After starting SSH forwarding:\n> >>> +\n> >>> +.. code:: shell\n> >>> +\n> >>> +   $ ssh -N -v -L 127.0.0.1:5000:${REGISTRY_LOCAL_ADDR}:5000 ssh://${REGISTRY_REMOTE_ADDR}\n> >>> +\n> >>> +the image must be tagged for the registry and pushed:\n> > \n> > s/^the/The/\n> > \n> >>> +\n> >>> +.. code:: shell\n> >>> +\n> >>> +   $ podman image tag localhost/libcamera-ci/debian-rootfs:arm64 localhost:5000/libcamera-ci/debian-rootfs-arm64:latest\n> >>> +   $ podman image push --tls-verify=false localhost:5000/libcamera-ci/debian-rootfs-arm64\n> >>> +\n> >>> +Internal documentation describes how to gain access.\n> > \n> > I'd drop this last line.\n> \n> Done, all of the above.\n> \n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 730A6BD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  9 Feb 2026 11:02:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7ACB4620F0;\n\tMon,  9 Feb 2026 12:02:00 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4E17961FA0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Feb 2026 12:01:59 +0100 (CET)","from killaraus.ideasonboard.com\n\t(2001-14ba-703d-e500--2a1.rev.dnainternet.fi\n\t[IPv6:2001:14ba:703d:e500::2a1])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 51A9EC6C;\n\tMon,  9 Feb 2026 12:01:13 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"QLAWNa2D\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1770634873;\n\tbh=VN15IR3NUpgp2ykaOC8jWoEuQ5CC7xVQg3aUHDW3g90=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=QLAWNa2DiucxEL4k120C9gvahJv++zw9LgngOWTNud3cEX5VZO5ggfdQIvlpJAOXo\n\t0ZVPE4wjD3oc04lEjqE+DlPrf4QxdeKcLvtAIsP5rcpj4V1dtMvkcDpymBLMNKU1MR\n\tA8F6EVKWfbZX7eByx+m/aSWW995aIHEVs27bWpO4=","Date":"Mon, 9 Feb 2026 13:01:57 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-ci] [RFC PATCH v2 5/5] Add description about debian\n\trootfs setup for testing","Message-ID":"<20260209110157.GD2302514@killaraus.ideasonboard.com>","References":"<20260130160254.1770742-1-barnabas.pocze@ideasonboard.com>\n\t<20260130160254.1770742-6-barnabas.pocze@ideasonboard.com>\n\t<aYMTsDnnFbCav1Ks@zed> <20260205141044.GM156228@killaraus>\n\t<1dab56ec-bf0c-41c4-8c69-8494bde8032d@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<1dab56ec-bf0c-41c4-8c69-8494bde8032d@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38152,"web_url":"https://patchwork.libcamera.org/comment/38152/","msgid":"<9b5bf65f-eb27-4bbd-b815-b0af6b50a4eb@ideasonboard.com>","date":"2026-02-09T12:31:10","subject":"Re: [libcamera-ci] [RFC PATCH v2 5/5] Add description about debian\n\trootfs setup for testing","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 02. 09. 12:01 keltezéssel, Laurent Pinchart írta:\n> On Mon, Feb 09, 2026 at 11:36:10AM +0100, Barnabás Pőcze wrote:\n>> 2026. 02. 05. 15:10 keltezéssel, Laurent Pinchart írta:\n>>> On Wed, Feb 04, 2026 at 10:43:40AM +0100, Jacopo Mondi wrote:\n>>>> On Fri, Jan 30, 2026 at 05:02:54PM +0100, Barnabás Pőcze wrote:\n>>>>> Add a document that describes how the debian based root file system can be\n>>>>> built and where it needs to be deployed.\n>>>>\n>>>> I wonder if this is the right place where to store this..\n>>>>\n>>>> This very much depend on the architecture of the LAVA lab instance,\n>>>> the container image that has to be run by the board has to live in a\n>>>> registry within the same network as the DUT, it's all very specific to\n>>>> a LAB installation which makes me wonder if libcamera-ci is the right\n>>>> place where to store this..\n>>>>\n>>>> True, the lava job description strictly depend on what we run on the\n>>>> device and this provides a blueprint for replicating it.\n>>>>\n>>>> I'm a bit in two minds here\n>>>\n>>> It may not be the perfect place, but I think it's fine to start with. We\n>>> can move the documentation later if needed.\n>>>\n>>>>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>>>>> ---\n>>>>>    .../debian-rootfs/build-debian-rootfs.sh      | 62 +++++++++++++++++++\n>>>>>    containers/debian-rootfs/build.sh             |  9 +++\n>>>>>    .../overlay/opt/test-libcamera.sh             | 18 ++++++\n>>>>>    doc/debian-rootfs.rst                         | 47 ++++++++++++++\n>>>>>    4 files changed, 136 insertions(+)\n>>>>>    create mode 100755 containers/debian-rootfs/build-debian-rootfs.sh\n>>>>>    create mode 100755 containers/debian-rootfs/build.sh\n>>>>>    create mode 100755 containers/debian-rootfs/overlay/opt/test-libcamera.sh\n>>>>>    create mode 100644 doc/debian-rootfs.rst\n>>>>>\n>>>>> diff --git a/containers/debian-rootfs/build-debian-rootfs.sh b/containers/debian-rootfs/build-debian-rootfs.sh\n>>>>> new file mode 100755\n>>>>> index 0000000..af9db02\n>>>>> --- /dev/null\n>>>>> +++ b/containers/debian-rootfs/build-debian-rootfs.sh\n>>>>> @@ -0,0 +1,62 @@\n>>>>> +#!/bin/bash\n>>>\n>>> Please add an SPDX license tag. Same for the other files.\n>>>\n>>>>> +# based on https://gitlab.freedesktop.org/freedesktop/ci-templates/-/blob/fb9d50ccb3cbbb4c6dc5f9ef53a0ad3cb0d8a177/bootstrap/cbuild\n>>>>> +\n>>>>> +set -ex\n>>>>> +\n>>>>> +packages=(\n>>>>> +\t# misc.\n>>>>> +\tca-certificates\n>>>>> +\tcoreutils\n>>>>> +\tchrony\n>>>>> +\tcurl\n>>>>> +\tiproute2\n>>>>> +\tkmod\n>>>>> +\tmoreutils\n>>>>> +\topenssh-server\n>>>>> +\tv4l-utils\n>>>>> +\twget\n>>>>> +\n>>>>> +\t# runtime dependencies\n>>>>> +\t# ensure that it is in sync with the `build-deb-for-lc-compliance-testing` job\n>>>>> +\tlibevent-2.1-7\n>>>>> +\tlibevent-pthreads-2.1-7\n>>>>> +\tlibssl3t64\n>>>>> +\tlibudev1\n>>>>> +\tlibyaml-0-2\n>>>>> +\tudev\n>>>>> +)\n>>>>> +\n>>>>> +deb_distribution=\"$1\"\n>>>>> +deb_arch=\"$2\"\n>>>>> +container_image_name=\"$3\"\n>>>>> +overlay_dir=\"$4\"\n>>>>> +\n>>>>> +newcontainer=$(buildah from scratch)\n>>>>> +scratchmnt=$(buildah mount \"$newcontainer\")\n>>>>> +\n>>>>> +debootstrap --arch=\"$deb_arch\" --variant=minbase \"$deb_distribution\" \"$scratchmnt\"\n>>>\n>>> I was going to say that depending on debootstrap is a bit annoying, but\n>>> I then noticed it's packaged by Gentoo, so I suppose it doesn't restrict\n>>> the host system to being Debian-based.\n>>\n>> Packaged by Arch as well, otherwise I'd have used something different.\n>> I think it is packaged by most: https://repology.org/project/debootstrap/versions\n>>\n>>> Did you get to try using a Containerfile, as per the review discussion\n>>> in v1 ? I'm not saying we have to switch, but I'd like to know if you've\n>>> investigated and decided to keep buildah for specific reasons.\n>>\n>> I wanted to keep the option of using an \"overlay\" directory with rsync\n>> (although at the moment only a single file is really needed, so it's a\n>> bit of an overkill), and I don't know if it could be easily done in a\n>> Containerfile.\n> \n> Isn't it what the COPY instruction does ?\n\nHuh, I was under the impression that it won't \"merge\" already existing\ndirectories... but it seems it does do that. So I suppose it could be used.\nShould I convert it then?\n\n\n> \n>> I have not investigated it in depth, though. Apart from that,\n>> I think it shouldn't be too hard to change (not tested).\n>>\n>>>>> +\n>>>>> +buildah run --isolation=chroot \"$newcontainer\" apt update -y\n>>>>> +buildah run --isolation=chroot \"$newcontainer\" apt install -y --no-install-recommends systemd systemd-sysv\n>>>>> +buildah run --isolation=chroot \"$newcontainer\" apt install -y --no-install-recommends \"${packages[@]}\"\n>>>>> +buildah run --isolation=chroot \"$newcontainer\" bash -c 'printf \"root\\nroot\\n\" | passwd root'\n>>>>> +buildah run --isolation=chroot \"$newcontainer\" bash -c 'echo \"PermitRootLogin yes\" > /etc/ssh/sshd_config.d/10-allow-root-password.conf'\n>>>>> +buildah run --isolation=chroot \"$newcontainer\" apt autoclean -y\n>>>>> +buildah run --isolation=chroot \"$newcontainer\" apt autopurge -y\n>>>>> +\n>>>>> +buildah run --isolation=chroot \"$newcontainer\" rm -rf /var/cache/\n>>>>> +buildah run --isolation=chroot \"$newcontainer\" rm -rf /var/lib/apt/\n>>>>> +\n>>>>> +if [[ -d \"$overlay_dir\" ]]; then\n>>>>> +\trsync -av --chown=root:root \"$overlay_dir/\" \"$scratchmnt/\"\n>>>>> +fi\n>>>>> +\n>>>>> +buildah unmount \"$newcontainer\"\n>>>>> +\n>>>>> +buildah config --entrypoint '[\"/sbin/init\"]' \"$newcontainer\"\n>>>>> +buildah config --os linux \"$newcontainer\"\n>>>>> +buildah config --arch \"$deb_arch\" \"$newcontainer\"\n>>>>> +\n>>>>> +buildah commit --format=docker \"$newcontainer\" \"$container_image_name\"\n>>>>> +\n>>>>> +podman image inspect \"$container_image_name\"\n>>>>> diff --git a/containers/debian-rootfs/build.sh b/containers/debian-rootfs/build.sh\n>>>>> new file mode 100755\n>>>>> index 0000000..71c9fa2\n>>>>> --- /dev/null\n>>>>> +++ b/containers/debian-rootfs/build.sh\n>>>>> @@ -0,0 +1,9 @@\n>>>>> +#!/bin/bash\n>>>>> +\n>>>>> +set -ex\n>>>>> +\n>>>>> +exec buildah unshare ./build-debian-rootfs.sh \\\n>>>>> +\ttrixie \\\n>>>>> +\tarm64 \\\n>>>>> +\tlocalhost/libcamera-ci/debian-rootfs:arm64 \\\n>>>>> +\t./overlay\n>>>>> diff --git a/containers/debian-rootfs/overlay/opt/test-libcamera.sh b/containers/debian-rootfs/overlay/opt/test-libcamera.sh\n>>>>> new file mode 100755\n>>>>> index 0000000..a22a17d\n>>>>> --- /dev/null\n>>>>> +++ b/containers/debian-rootfs/overlay/opt/test-libcamera.sh\n>>>>> @@ -0,0 +1,18 @@\n>>>>> +#!/bin/bash\n>>>>> +\n>>>>> +set -ex\n>>>>> +\n>>>>> +pkg_source=\"$1\"\n>>>>> +camera_id=\"$2\"\n>>>>> +\n>>>>> +trap 'rm -rf /tmp/libcamera.deb' EXIT\n>>>>> +curl --retry 3 -f -o /tmp/libcamera.deb -- \"$pkg_source\"\n>>>>> +dpkg -i /tmp/libcamera.deb\n>>>>> +rm -rf /tmp/libcamera.deb\n>>>>> +\n>>>>> +env \\\n>>>>> +        LIBCAMERA_LOG_COLOR=no \\\n>>>>> +        GTEST_COLOR=no \\\n>>>>> +        ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 \\\n>>>>> +        UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 \\\n>>>>> +                lc-compliance -c \"$camera_id\"\n>>>>> diff --git a/doc/debian-rootfs.rst b/doc/debian-rootfs.rst\n>>>>> new file mode 100644\n>>>>> index 0000000..1cb45a1\n>>>>> --- /dev/null\n>>>>> +++ b/doc/debian-rootfs.rst\n>>>>> @@ -0,0 +1,47 @@\n>>>>> +.. SPDX-License-Identifier: CC-BY-SA-4.0\n>>>>> +\n>>>>> +Creating the root file system for on device testing\n>>>>> +===================================================\n>>>>> +\n>>>>> +At the moment, the root file system used with boot2container for testing\n>>>>> +needs to be built and deployed manually.\n>>>>> +\n>>>>> +Building\n>>>>> +--------\n>>>>> +\n>>>>> +Some dependencies that might need to be installed:\n>>>\n>>> \"might\" ? I'd write\n>>>\n>>> The following dependencies need to be installed:\n>>>\n>>>>> +\n>>>>> +   * `buildah`_\n>>>>> +   * debootstrap\n>>>>> +   * rsync\n>>>>> +   * qemu user emulation for aarch64 with binfmt setup\n>>>>> +\n>>>>> +.. _buildah: https://buildah.io/\n>>>>> +\n>>>>> +Simply ``cd`` into the ``containers/debian-rootfs`` directory, and execute the ``build.sh``:\n>>>\n>>> s/execute the/execute/ (or add \"script\" after build.sh)\n>>>\n>>>>> +\n>>>>> +.. code:: shell\n>>>>> +\n>>>>> +   $ ./build.sh\n>>>>> +\n>>>>> +If everything succeeds, a new image tagged as ``localhost/libcamera-ci/debian-rootfs:arm64``\n>>>>> +should be available.\n>>>>> +\n>>>>> +Deployment\n>>>>> +----------\n>>>>> +\n>>>>> +The ``localhost/libcamera-ci/debian-rootfs:arm64`` image must be pushed to the internal\n>>>>> +registry running alongside the LAVA services. After starting SSH forwarding:\n>>>>> +\n>>>>> +.. code:: shell\n>>>>> +\n>>>>> +   $ ssh -N -v -L 127.0.0.1:5000:${REGISTRY_LOCAL_ADDR}:5000 ssh://${REGISTRY_REMOTE_ADDR}\n>>>>> +\n>>>>> +the image must be tagged for the registry and pushed:\n>>>\n>>> s/^the/The/\n>>>\n>>>>> +\n>>>>> +.. code:: shell\n>>>>> +\n>>>>> +   $ podman image tag localhost/libcamera-ci/debian-rootfs:arm64 localhost:5000/libcamera-ci/debian-rootfs-arm64:latest\n>>>>> +   $ podman image push --tls-verify=false localhost:5000/libcamera-ci/debian-rootfs-arm64\n>>>>> +\n>>>>> +Internal documentation describes how to gain access.\n>>>\n>>> I'd drop this last line.\n>>\n>> Done, all of the above.\n>>\n>>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 4A76FBD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  9 Feb 2026 12:31:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 376AF62104;\n\tMon,  9 Feb 2026 13:31:15 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5B98A61FA0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Feb 2026 13:31:13 +0100 (CET)","from [192.168.33.63] (185.221.141.206.nat.pool.zt.hu\n\t[185.221.141.206])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5507063F;\n\tMon,  9 Feb 2026 13:30:27 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"S9NBZ3hP\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1770640227;\n\tbh=ijIY+rTe4TaJCLRaUuTOawQdRXV4kIen46pIhZvJf+8=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=S9NBZ3hP00NxDrVNFbe2ZD7QV5VqZrxBsKVO5kBPsP9YB8h28AHb5aMFT9Y2ZAmCR\n\tIJ+wQjLwrt+JyvbYsr3ibiI9YxkaFAN6axBWO17v9U5pS6ux7gnbxnBSvdIPbfOuRW\n\tcFx4OhmAA0/m6US6sC5Lo9UAlS/8Ouzz7M0VIDCc=","Message-ID":"<9b5bf65f-eb27-4bbd-b815-b0af6b50a4eb@ideasonboard.com>","Date":"Mon, 9 Feb 2026 13:31:10 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [libcamera-ci] [RFC PATCH v2 5/5] Add description about debian\n\trootfs setup for testing","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20260130160254.1770742-1-barnabas.pocze@ideasonboard.com>\n\t<20260130160254.1770742-6-barnabas.pocze@ideasonboard.com>\n\t<aYMTsDnnFbCav1Ks@zed> <20260205141044.GM156228@killaraus>\n\t<1dab56ec-bf0c-41c4-8c69-8494bde8032d@ideasonboard.com>\n\t<20260209110157.GD2302514@killaraus.ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260209110157.GD2302514@killaraus.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38161,"web_url":"https://patchwork.libcamera.org/comment/38161/","msgid":"<20260209220254.GB2405149@killaraus.ideasonboard.com>","date":"2026-02-09T22:02:54","subject":"Re: [libcamera-ci] [RFC PATCH v2 5/5] Add description about debian\n\trootfs setup for testing","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Feb 09, 2026 at 01:31:10PM +0100, Barnabás Pőcze wrote:\n> 2026. 02. 09. 12:01 keltezéssel, Laurent Pinchart írta:\n> > On Mon, Feb 09, 2026 at 11:36:10AM +0100, Barnabás Pőcze wrote:\n> >> 2026. 02. 05. 15:10 keltezéssel, Laurent Pinchart írta:\n> >>> On Wed, Feb 04, 2026 at 10:43:40AM +0100, Jacopo Mondi wrote:\n> >>>> On Fri, Jan 30, 2026 at 05:02:54PM +0100, Barnabás Pőcze wrote:\n> >>>>> Add a document that describes how the debian based root file system can be\n> >>>>> built and where it needs to be deployed.\n> >>>>\n> >>>> I wonder if this is the right place where to store this..\n> >>>>\n> >>>> This very much depend on the architecture of the LAVA lab instance,\n> >>>> the container image that has to be run by the board has to live in a\n> >>>> registry within the same network as the DUT, it's all very specific to\n> >>>> a LAB installation which makes me wonder if libcamera-ci is the right\n> >>>> place where to store this..\n> >>>>\n> >>>> True, the lava job description strictly depend on what we run on the\n> >>>> device and this provides a blueprint for replicating it.\n> >>>>\n> >>>> I'm a bit in two minds here\n> >>>\n> >>> It may not be the perfect place, but I think it's fine to start with. We\n> >>> can move the documentation later if needed.\n> >>>\n> >>>>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> >>>>> ---\n> >>>>>    .../debian-rootfs/build-debian-rootfs.sh      | 62 +++++++++++++++++++\n> >>>>>    containers/debian-rootfs/build.sh             |  9 +++\n> >>>>>    .../overlay/opt/test-libcamera.sh             | 18 ++++++\n> >>>>>    doc/debian-rootfs.rst                         | 47 ++++++++++++++\n> >>>>>    4 files changed, 136 insertions(+)\n> >>>>>    create mode 100755 containers/debian-rootfs/build-debian-rootfs.sh\n> >>>>>    create mode 100755 containers/debian-rootfs/build.sh\n> >>>>>    create mode 100755 containers/debian-rootfs/overlay/opt/test-libcamera.sh\n> >>>>>    create mode 100644 doc/debian-rootfs.rst\n> >>>>>\n> >>>>> diff --git a/containers/debian-rootfs/build-debian-rootfs.sh b/containers/debian-rootfs/build-debian-rootfs.sh\n> >>>>> new file mode 100755\n> >>>>> index 0000000..af9db02\n> >>>>> --- /dev/null\n> >>>>> +++ b/containers/debian-rootfs/build-debian-rootfs.sh\n> >>>>> @@ -0,0 +1,62 @@\n> >>>>> +#!/bin/bash\n> >>>\n> >>> Please add an SPDX license tag. Same for the other files.\n> >>>\n> >>>>> +# based on https://gitlab.freedesktop.org/freedesktop/ci-templates/-/blob/fb9d50ccb3cbbb4c6dc5f9ef53a0ad3cb0d8a177/bootstrap/cbuild\n> >>>>> +\n> >>>>> +set -ex\n> >>>>> +\n> >>>>> +packages=(\n> >>>>> +\t# misc.\n> >>>>> +\tca-certificates\n> >>>>> +\tcoreutils\n> >>>>> +\tchrony\n> >>>>> +\tcurl\n> >>>>> +\tiproute2\n> >>>>> +\tkmod\n> >>>>> +\tmoreutils\n> >>>>> +\topenssh-server\n> >>>>> +\tv4l-utils\n> >>>>> +\twget\n> >>>>> +\n> >>>>> +\t# runtime dependencies\n> >>>>> +\t# ensure that it is in sync with the `build-deb-for-lc-compliance-testing` job\n> >>>>> +\tlibevent-2.1-7\n> >>>>> +\tlibevent-pthreads-2.1-7\n> >>>>> +\tlibssl3t64\n> >>>>> +\tlibudev1\n> >>>>> +\tlibyaml-0-2\n> >>>>> +\tudev\n> >>>>> +)\n> >>>>> +\n> >>>>> +deb_distribution=\"$1\"\n> >>>>> +deb_arch=\"$2\"\n> >>>>> +container_image_name=\"$3\"\n> >>>>> +overlay_dir=\"$4\"\n> >>>>> +\n> >>>>> +newcontainer=$(buildah from scratch)\n> >>>>> +scratchmnt=$(buildah mount \"$newcontainer\")\n> >>>>> +\n> >>>>> +debootstrap --arch=\"$deb_arch\" --variant=minbase \"$deb_distribution\" \"$scratchmnt\"\n> >>>\n> >>> I was going to say that depending on debootstrap is a bit annoying, but\n> >>> I then noticed it's packaged by Gentoo, so I suppose it doesn't restrict\n> >>> the host system to being Debian-based.\n> >>\n> >> Packaged by Arch as well, otherwise I'd have used something different.\n> >> I think it is packaged by most: https://repology.org/project/debootstrap/versions\n> >>\n> >>> Did you get to try using a Containerfile, as per the review discussion\n> >>> in v1 ? I'm not saying we have to switch, but I'd like to know if you've\n> >>> investigated and decided to keep buildah for specific reasons.\n> >>\n> >> I wanted to keep the option of using an \"overlay\" directory with rsync\n> >> (although at the moment only a single file is really needed, so it's a\n> >> bit of an overkill), and I don't know if it could be easily done in a\n> >> Containerfile.\n> > \n> > Isn't it what the COPY instruction does ?\n> \n> Huh, I was under the impression that it won't \"merge\" already existing\n> directories... but it seems it does do that. So I suppose it could be used.\n> Should I convert it then?\n\nUp to you. I think my preference for Containerfile comes largely from\nthe fact I have never used buildah. I don't have enough experience to\ntell if one of the two approaches is better in this case, so you can\ndecide.\n\n> >> I have not investigated it in depth, though. Apart from that,\n> >> I think it shouldn't be too hard to change (not tested).\n> >>\n> >>>>> +\n> >>>>> +buildah run --isolation=chroot \"$newcontainer\" apt update -y\n> >>>>> +buildah run --isolation=chroot \"$newcontainer\" apt install -y --no-install-recommends systemd systemd-sysv\n> >>>>> +buildah run --isolation=chroot \"$newcontainer\" apt install -y --no-install-recommends \"${packages[@]}\"\n> >>>>> +buildah run --isolation=chroot \"$newcontainer\" bash -c 'printf \"root\\nroot\\n\" | passwd root'\n> >>>>> +buildah run --isolation=chroot \"$newcontainer\" bash -c 'echo \"PermitRootLogin yes\" > /etc/ssh/sshd_config.d/10-allow-root-password.conf'\n> >>>>> +buildah run --isolation=chroot \"$newcontainer\" apt autoclean -y\n> >>>>> +buildah run --isolation=chroot \"$newcontainer\" apt autopurge -y\n> >>>>> +\n> >>>>> +buildah run --isolation=chroot \"$newcontainer\" rm -rf /var/cache/\n> >>>>> +buildah run --isolation=chroot \"$newcontainer\" rm -rf /var/lib/apt/\n> >>>>> +\n> >>>>> +if [[ -d \"$overlay_dir\" ]]; then\n> >>>>> +\trsync -av --chown=root:root \"$overlay_dir/\" \"$scratchmnt/\"\n> >>>>> +fi\n> >>>>> +\n> >>>>> +buildah unmount \"$newcontainer\"\n> >>>>> +\n> >>>>> +buildah config --entrypoint '[\"/sbin/init\"]' \"$newcontainer\"\n> >>>>> +buildah config --os linux \"$newcontainer\"\n> >>>>> +buildah config --arch \"$deb_arch\" \"$newcontainer\"\n> >>>>> +\n> >>>>> +buildah commit --format=docker \"$newcontainer\" \"$container_image_name\"\n> >>>>> +\n> >>>>> +podman image inspect \"$container_image_name\"\n> >>>>> diff --git a/containers/debian-rootfs/build.sh b/containers/debian-rootfs/build.sh\n> >>>>> new file mode 100755\n> >>>>> index 0000000..71c9fa2\n> >>>>> --- /dev/null\n> >>>>> +++ b/containers/debian-rootfs/build.sh\n> >>>>> @@ -0,0 +1,9 @@\n> >>>>> +#!/bin/bash\n> >>>>> +\n> >>>>> +set -ex\n> >>>>> +\n> >>>>> +exec buildah unshare ./build-debian-rootfs.sh \\\n> >>>>> +\ttrixie \\\n> >>>>> +\tarm64 \\\n> >>>>> +\tlocalhost/libcamera-ci/debian-rootfs:arm64 \\\n> >>>>> +\t./overlay\n> >>>>> diff --git a/containers/debian-rootfs/overlay/opt/test-libcamera.sh b/containers/debian-rootfs/overlay/opt/test-libcamera.sh\n> >>>>> new file mode 100755\n> >>>>> index 0000000..a22a17d\n> >>>>> --- /dev/null\n> >>>>> +++ b/containers/debian-rootfs/overlay/opt/test-libcamera.sh\n> >>>>> @@ -0,0 +1,18 @@\n> >>>>> +#!/bin/bash\n> >>>>> +\n> >>>>> +set -ex\n> >>>>> +\n> >>>>> +pkg_source=\"$1\"\n> >>>>> +camera_id=\"$2\"\n> >>>>> +\n> >>>>> +trap 'rm -rf /tmp/libcamera.deb' EXIT\n> >>>>> +curl --retry 3 -f -o /tmp/libcamera.deb -- \"$pkg_source\"\n> >>>>> +dpkg -i /tmp/libcamera.deb\n> >>>>> +rm -rf /tmp/libcamera.deb\n> >>>>> +\n> >>>>> +env \\\n> >>>>> +        LIBCAMERA_LOG_COLOR=no \\\n> >>>>> +        GTEST_COLOR=no \\\n> >>>>> +        ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 \\\n> >>>>> +        UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 \\\n> >>>>> +                lc-compliance -c \"$camera_id\"\n> >>>>> diff --git a/doc/debian-rootfs.rst b/doc/debian-rootfs.rst\n> >>>>> new file mode 100644\n> >>>>> index 0000000..1cb45a1\n> >>>>> --- /dev/null\n> >>>>> +++ b/doc/debian-rootfs.rst\n> >>>>> @@ -0,0 +1,47 @@\n> >>>>> +.. SPDX-License-Identifier: CC-BY-SA-4.0\n> >>>>> +\n> >>>>> +Creating the root file system for on device testing\n> >>>>> +===================================================\n> >>>>> +\n> >>>>> +At the moment, the root file system used with boot2container for testing\n> >>>>> +needs to be built and deployed manually.\n> >>>>> +\n> >>>>> +Building\n> >>>>> +--------\n> >>>>> +\n> >>>>> +Some dependencies that might need to be installed:\n> >>>\n> >>> \"might\" ? I'd write\n> >>>\n> >>> The following dependencies need to be installed:\n> >>>\n> >>>>> +\n> >>>>> +   * `buildah`_\n> >>>>> +   * debootstrap\n> >>>>> +   * rsync\n> >>>>> +   * qemu user emulation for aarch64 with binfmt setup\n> >>>>> +\n> >>>>> +.. _buildah: https://buildah.io/\n> >>>>> +\n> >>>>> +Simply ``cd`` into the ``containers/debian-rootfs`` directory, and execute the ``build.sh``:\n> >>>\n> >>> s/execute the/execute/ (or add \"script\" after build.sh)\n> >>>\n> >>>>> +\n> >>>>> +.. code:: shell\n> >>>>> +\n> >>>>> +   $ ./build.sh\n> >>>>> +\n> >>>>> +If everything succeeds, a new image tagged as ``localhost/libcamera-ci/debian-rootfs:arm64``\n> >>>>> +should be available.\n> >>>>> +\n> >>>>> +Deployment\n> >>>>> +----------\n> >>>>> +\n> >>>>> +The ``localhost/libcamera-ci/debian-rootfs:arm64`` image must be pushed to the internal\n> >>>>> +registry running alongside the LAVA services. After starting SSH forwarding:\n> >>>>> +\n> >>>>> +.. code:: shell\n> >>>>> +\n> >>>>> +   $ ssh -N -v -L 127.0.0.1:5000:${REGISTRY_LOCAL_ADDR}:5000 ssh://${REGISTRY_REMOTE_ADDR}\n> >>>>> +\n> >>>>> +the image must be tagged for the registry and pushed:\n> >>>\n> >>> s/^the/The/\n> >>>\n> >>>>> +\n> >>>>> +.. code:: shell\n> >>>>> +\n> >>>>> +   $ podman image tag localhost/libcamera-ci/debian-rootfs:arm64 localhost:5000/libcamera-ci/debian-rootfs-arm64:latest\n> >>>>> +   $ podman image push --tls-verify=false localhost:5000/libcamera-ci/debian-rootfs-arm64\n> >>>>> +\n> >>>>> +Internal documentation describes how to gain access.\n> >>>\n> >>> I'd drop this last line.\n> >>\n> >> Done, all of the above.\n> >>\n> >>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 0ACCEBD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  9 Feb 2026 22:02:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 61E0A62104;\n\tMon,  9 Feb 2026 23:02:57 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E84CF61FA0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Feb 2026 23:02:55 +0100 (CET)","from killaraus.ideasonboard.com\n\t(2001-14ba-703d-e500--2a1.rev.dnainternet.fi\n\t[IPv6:2001:14ba:703d:e500::2a1])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id ACCAB63F;\n\tMon,  9 Feb 2026 23:02:09 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Gd1lSU8j\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1770674529;\n\tbh=ZJ3XuBRPJnOv3r86calrktx7VnGjK8tPd5e9K2cQH8A=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Gd1lSU8jSMB4hptji7iTm3NwCCLFh9qpgtDlW9/7tX3XnH6EkVwkT2/j6jhVWUQ4M\n\tN27q5q5gzIO1vTfadziCWR0DcoavDbow72oDFWVRdMcbcq7ZvtOcbxdbLtvZeqgTOt\n\tB6t2+0nkhiQ1N5UcEOApGsf7F4ZzoWgOcKfuQ3vs=","Date":"Tue, 10 Feb 2026 00:02:54 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-ci] [RFC PATCH v2 5/5] Add description about debian\n\trootfs setup for testing","Message-ID":"<20260209220254.GB2405149@killaraus.ideasonboard.com>","References":"<20260130160254.1770742-1-barnabas.pocze@ideasonboard.com>\n\t<20260130160254.1770742-6-barnabas.pocze@ideasonboard.com>\n\t<aYMTsDnnFbCav1Ks@zed> <20260205141044.GM156228@killaraus>\n\t<1dab56ec-bf0c-41c4-8c69-8494bde8032d@ideasonboard.com>\n\t<20260209110157.GD2302514@killaraus.ideasonboard.com>\n\t<9b5bf65f-eb27-4bbd-b815-b0af6b50a4eb@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<9b5bf65f-eb27-4bbd-b815-b0af6b50a4eb@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]