Show a patch.

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

{
    "id": 23978,
    "url": "https://patchwork.libcamera.org/api/patches/23978/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23978/",
    "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": "<20250727011123.31634-3-laurent.pinchart@ideasonboard.com>",
    "date": "2025-07-27T01:11:22",
    "name": "[libcamera-ci,2/3] setup-container: Generalize package installation through pip",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "945ece23ad19c24c24b7be4cc7b2872c15bd5261",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23978/mbox/",
    "series": [
        {
            "id": 5339,
            "url": "https://patchwork.libcamera.org/api/series/5339/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5339",
            "date": "2025-07-27T01:11:20",
            "name": "Prepare CI for Sphinx doxylink usage",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5339/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23978/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23978/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 2AAD9BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 27 Jul 2025 01:11:41 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6B9A769126;\n\tSun, 27 Jul 2025 03:11:39 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4FEDC69119\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 27 Jul 2025 03:11:33 +0200 (CEST)",
            "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 4C7866A8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 27 Jul 2025 03:10:52 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"pAStOFRt\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753578652;\n\tbh=FuQc/soNymejiq1pykKxrxb9d9wSGOetoEUMzTSkT1c=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=pAStOFRtOGy8q58PjUYLz3SJ19aaNfC2xmZvjiM+NcNVuJ9Ztr5Opyf9RO6WTmAEq\n\tjurA7znoV2iuu95wbfse4Ojo8RnUoxCdBHelPAbFG4JtUoj7TkAp19GbUNmvJBtKmZ\n\tdO3vAIzVKigGUwMMl1V/VQ/6TVWybwPaQriBshXM=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[libcamera-ci] [PATCH 2/3] setup-container: Generalize package\n\tinstallation through pip",
        "Date": "Sun, 27 Jul 2025 04:11:22 +0300",
        "Message-ID": "<20250727011123.31634-3-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.49.1",
        "In-Reply-To": "<20250727011123.31634-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20250727011123.31634-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "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": "When building containers, we favour packages from the Debian\nrepositories, and fall back to pip when minimum version requirements are\nnot met by Debian. This is open-coded for two packages (meson and\npython3-pygments). Generalize the mechanism in preparation for adding\nmore packages.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n .gitlab-ci/setup-container.sh | 43 +++++++++++++++++++----------------\n 1 file changed, 24 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/.gitlab-ci/setup-container.sh b/.gitlab-ci/setup-container.sh\nindex 5e9b89da8431..c8b631c387b5 100755\n--- a/.gitlab-ci/setup-container.sh\n+++ b/.gitlab-ci/setup-container.sh\n@@ -93,6 +93,11 @@ PKGS_VIRTME_RUNTIME=(\n \tudev\n )\n \n+PKGS_PIP_MIN_VERSIONS=(\n+\t'meson meson 1.2.0 remove'\n+\t'python3-pygments pygments 2.10.0 keep'\n+)\n+\n archs=( amd64 )\n \n declare -A components\n@@ -192,34 +197,34 @@ dpkg_check_version() {\n cbuild_fixups() {\n \techo \"Applying miscellaneous fixups\"\n \n-\tlocal min_version\n \tlocal pip3_options\n-\tlocal version\n+\tlocal pkg\n \n \tif [[ $FDO_DISTRIBUTION_VERSION != 'bullseye' ]] ; then\n \t\tpip3_options=--break-system-packages\n \tfi\n \n-\t# Install meson from pip.\n-\tmin_version=1.2.0\n-\tversion=$(dpkg_version meson)\n-\tif dpkg_check_version $version $min_version ; then\n-\t\techo \"meson $version too old, installing $min_version from pip\"\n+\t# Install packages from pip to ensure minimum versions.\n+\tfor pkg in \"${PKGS_PIP_MIN_VERSIONS[@]}\" ; do\n+\t\tpkg=($pkg)\n+\t\tlocal pkg_name=${pkg[0]}\n+\t\tlocal pip_name=${pkg[1]}\n+\t\tlocal min_version=${pkg[2]}\n+\t\tlocal action=${pkg[3]}\n \n-\t\tapt remove -y meson\n-\t\tapt install -y python3-pip\n-\t\tpip3 install ${pip3_options} meson==${min_version}\n-\tfi\n+\t\tlocal version=$(dpkg_version $pkg_name)\n \n-\t# Install pygments from pip.\n-\tmin_version=2.10.0\n-\tversion=$(dpkg_version python3-pygments)\n-\tif dpkg_check_version $version $min_version ; then\n-\t\techo \"pygments $version too old, installing $min_version from pip\"\n+\t\tif dpkg_check_version $version $min_version ; then\n+\t\t\techo \"$pkg_name $version too old, installing $min_version from pip\"\n \n-\t\tapt install -y python3-pip\n-\t\tpip3 install ${pip3_options} pygments==${min_version}\n-\tfi\n+\t\t\tif [[ $action == 'remove' ]] ; then\n+\t\t\t\tapt remove -y ${pkg_name}\n+\t\t\tfi\n+\n+\t\t\tapt install -y python3-pip\n+\t\t\tpip3 install ${pip3_options} ${pip_name}==${min_version}\n+\t\tfi\n+\tdone\n \n \t# Create pybind11.pc manually if not provided by the distribution\n \t# package.\n",
    "prefixes": [
        "libcamera-ci",
        "2/3"
    ]
}