Show a patch.

GET /api/patches/26062/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 26062,
    "url": "https://patchwork.libcamera.org/api/patches/26062/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/26062/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20260130160254.1770742-6-barnabas.pocze@ideasonboard.com>",
    "date": "2026-01-30T16:02:54",
    "name": "[libcamera-ci,RFC,v2,5/5] Add description about debian rootfs setup for testing",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "74aaf23be2f3f898b4f6151a4e57566836094af9",
    "submitter": {
        "id": 216,
        "url": "https://patchwork.libcamera.org/api/people/216/?format=api",
        "name": "Barnabás Pőcze",
        "email": "barnabas.pocze@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/26062/mbox/",
    "series": [
        {
            "id": 5763,
            "url": "https://patchwork.libcamera.org/api/series/5763/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5763",
            "date": "2026-01-30T16:02:49",
            "name": "on-device-testing proof of concept",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/5763/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/26062/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/26062/checks/",
    "tags": {},
    "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 E1B7FC3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 30 Jan 2026 16:03:07 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6FBA561FDE;\n\tFri, 30 Jan 2026 17:03:07 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0405061FCF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 Jan 2026 17:02:58 +0100 (CET)",
            "from pb-laptop.local (185.221.142.123.nat.pool.zt.hu\n\t[185.221.142.123])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8D1AF55C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 Jan 2026 17:02:19 +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=\"iHFEVCBe\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769788939;\n\tbh=B8O1Hzig9CTHv+hyFnQEbslVqByVqv4RDA+lKKCsfjU=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=iHFEVCBeIX8nMypk6QfT1V8mODouPASr3OORYaS81gS6x07WtuhFXlRbEAKEjsEU7\n\tH68wmg4b+M8tKDkdehT/zOVau/QrAVNwzk1XgQPN5W38/NkP20T+L/4xmma5H/wqjw\n\tRWqXaxD5+s7bhel35KPIU0R1Ot6nlAc9Si9rRt/A=",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[libcamera-ci] [RFC PATCH v2 5/5] Add description about debian\n\trootfs setup for testing",
        "Date": "Fri, 30 Jan 2026 17:02:54 +0100",
        "Message-ID": "<20260130160254.1770742-6-barnabas.pocze@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20260130160254.1770742-1-barnabas.pocze@ideasonboard.com>",
        "References": "<20260130160254.1770742-1-barnabas.pocze@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "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>"
    },
    "content": "Add a document that describes how the debian based root file system can be\nbuilt and where it needs to be deployed.\n\nSigned-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--\n2.52.0",
    "diff": "diff --git a/containers/debian-rootfs/build-debian-rootfs.sh b/containers/debian-rootfs/build-debian-rootfs.sh\nnew file mode 100755\nindex 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\"\ndiff --git a/containers/debian-rootfs/build.sh b/containers/debian-rootfs/build.sh\nnew file mode 100755\nindex 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\ndiff --git a/containers/debian-rootfs/overlay/opt/test-libcamera.sh b/containers/debian-rootfs/overlay/opt/test-libcamera.sh\nnew file mode 100755\nindex 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\"\ndiff --git a/doc/debian-rootfs.rst b/doc/debian-rootfs.rst\nnew file mode 100644\nindex 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",
    "prefixes": [
        "libcamera-ci",
        "RFC",
        "v2",
        "5/5"
    ]
}