From patchwork Mon Jul 28 15:31:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 24007 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 72BB9C3237 for ; Mon, 28 Jul 2025 15:32:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2565A691C3; Mon, 28 Jul 2025 17:32:16 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="JPzZAmp2"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 303CE691B9 for ; Mon, 28 Jul 2025 17:32:10 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id BF94D42B for ; Mon, 28 Jul 2025 17:31:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1753716688; bh=vluVAcZ8nSC+8W9SO9WpWmyINfs0wXFE3OmRrNq5m+s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JPzZAmp28jvHgtVPLRmua2otaCMIo7J53ynttU5NQqyF4vtWxe7GsxStD7VrgpMUA 4Ysiigp1sRu0j/UCQuKi0CCe1+VUG5ZTuz3lfGfkx4IIL5/8KeZvug23GuC60BFB6D ifmlqAWZmivVDbkppxFg5sseV+2MuwgEtF1WewXY= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [libcamera-ci] [PATCH v2 1/3] Avoid duplicated documentation builds Date: Mon, 28 Jul 2025 18:31:59 +0300 Message-ID: <20250728153201.7843-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.49.1 In-Reply-To: <20250728153201.7843-1-laurent.pinchart@ideasonboard.com> References: <20250728153201.7843-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The libcamera documentation is built as part of every build job. This wastes CPU cycles. Build it only in the gcc 12 debug job, chosen semi-randomly. We could also split the documentation build to a separate job, but short-running jobs are discouraged as they waste significant amount of resources to spawn the container in the runner. Signed-off-by: Laurent Pinchart Reviewed-by: Barnabás Pőcze --- gitlab-ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gitlab-ci.yml b/gitlab-ci.yml index cad4c2b0c445..03ea7795f3ff 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -16,7 +16,7 @@ variables: -D b_sanitize=address -D cam=enabled -D cpp_debugstl=true - -D documentation=enabled + -D documentation=disabled -D gstreamer=enabled -D lc-compliance=enabled -D pipelines=['all'] @@ -170,13 +170,16 @@ build-full:debian:12: variables: MESON_OPTIONS: >- ${MESON_ALL_OPTIONS} - -D doc_werror=true parallel: matrix: - ARCH: amd64 BUILD_TYPE: debug CC: gcc-12 CXX: g++-12 + MESON_OPTIONS: >- + ${MESON_ALL_OPTIONS} + -D documentation=enabled + -D doc_werror=true - ARCH: amd64 BUILD_TYPE: release CC: gcc-12 From patchwork Mon Jul 28 15:32:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 24008 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 3EFF9C3237 for ; Mon, 28 Jul 2025 15:32:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4A619691C6; Mon, 28 Jul 2025 17:32:17 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="deEWN5cw"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 11CA7691B9 for ; Mon, 28 Jul 2025 17:32:12 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id D73CC465 for ; Mon, 28 Jul 2025 17:31:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1753716690; bh=w0uuYjIldZzneg9RMX85eMNsxXRUHqWbR3uoeupia6o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=deEWN5cw9TXarQfjcxOQ96p1yFyeS60eyzdSxlVjujh0oy7Jz9nWssz8XWWJL8StC XsryKqcr8JDlYytDQlg74IjJguFwQSsEzcz4H334TfjCG7OS+up20ZeSRa0w8PJxbq kqjQ+Ts4ndVE+O1f7d1Qy3XNK9Uf/crim11ks9pY= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [libcamera-ci] [PATCH v2 2/3] setup-container: Generalize package installation through pip Date: Mon, 28 Jul 2025 18:32:00 +0300 Message-ID: <20250728153201.7843-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.49.1 In-Reply-To: <20250728153201.7843-1-laurent.pinchart@ideasonboard.com> References: <20250728153201.7843-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" When building containers, we favour packages from the Debian repositories, and fall back to pip when minimum version requirements are not met by Debian. This is open-coded for two packages (meson and python3-pygments). Generalize the mechanism in preparation for adding more packages. Signed-off-by: Laurent Pinchart Reviewed-by: Barnabás Pőcze --- Changes since v1: - Document the PKGS_PIP_MIN_VERSIONS array --- .gitlab-ci/setup-container.sh | 56 +++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci/setup-container.sh b/.gitlab-ci/setup-container.sh index 5e9b89da8431..7fdac1f9fb66 100755 --- a/.gitlab-ci/setup-container.sh +++ b/.gitlab-ci/setup-container.sh @@ -93,6 +93,24 @@ PKGS_VIRTME_RUNTIME=( udev ) +# Each entry in the PKGS_PIP_MIN_VERSIONS array describes one package and +# contains 4 space-separated fields: +# +# - The Debian package name +# - The PyPI package name +# - The minimum version +# - Whether to keep or remove the Debian package if a newer version is +# installed from PyPI +# +# Keeping Debian packages is sometimes needed due to dependencies. For +# instance, uninstalling python3-pygments would also uninstall python3-sphinx +# that depends on it. + +PKGS_PIP_MIN_VERSIONS=( + 'meson meson 1.2.0 remove' + 'python3-pygments pygments 2.10.0 keep' +) + archs=( amd64 ) declare -A components @@ -192,34 +210,34 @@ dpkg_check_version() { cbuild_fixups() { echo "Applying miscellaneous fixups" - local min_version local pip3_options - local version + local pkg if [[ $FDO_DISTRIBUTION_VERSION != 'bullseye' ]] ; then pip3_options=--break-system-packages fi - # Install meson from pip. - min_version=1.2.0 - version=$(dpkg_version meson) - if dpkg_check_version $version $min_version ; then - echo "meson $version too old, installing $min_version from pip" + # Install packages from pip to ensure minimum versions. + for pkg in "${PKGS_PIP_MIN_VERSIONS[@]}" ; do + pkg=($pkg) + local pkg_name=${pkg[0]} + local pip_name=${pkg[1]} + local min_version=${pkg[2]} + local action=${pkg[3]} - apt remove -y meson - apt install -y python3-pip - pip3 install ${pip3_options} meson==${min_version} - fi + local version=$(dpkg_version $pkg_name) - # Install pygments from pip. - min_version=2.10.0 - version=$(dpkg_version python3-pygments) - if dpkg_check_version $version $min_version ; then - echo "pygments $version too old, installing $min_version from pip" + if dpkg_check_version $version $min_version ; then + echo "$pkg_name $version too old, installing $min_version from pip" - apt install -y python3-pip - pip3 install ${pip3_options} pygments==${min_version} - fi + if [[ $action == 'remove' ]] ; then + apt remove -y ${pkg_name} + fi + + apt install -y python3-pip + pip3 install ${pip3_options} ${pip_name}==${min_version} + fi + done # Create pybind11.pc manually if not provided by the distribution # package. From patchwork Mon Jul 28 15:32:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 24009 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id E2531C3323 for ; Mon, 28 Jul 2025 15:32:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 15B07691BF; Mon, 28 Jul 2025 17:32:21 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="FrRwOj2P"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D0917691B9 for ; Mon, 28 Jul 2025 17:32:13 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id B959542B for ; Mon, 28 Jul 2025 17:31:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1753716691; bh=bEqlKmJ1a9ntQSoH8eCoG7kZRJM0vWsjgxNxzwHyBjQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FrRwOj2PNAdH5hvlGvvoWoKshOgna0uJXwbkbVxHLwLR2mNbeLK6ubVgu8vVMEnBO 2LKZhn1ji3gusnxWO64UdRAJTAihevfhPD2cJfNZDB0uyVzxTz5CL3+risHqYAf3j4 V869FMn4TuDUGpa0SzHR2eUT861p34MJSTxv+xkY= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [libcamera-ci] [PATCH v2 3/3] Add python3-sphinxcontrib.doxylink package to container images Date: Mon, 28 Jul 2025 18:32:01 +0300 Message-ID: <20250728153201.7843-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.49.1 In-Reply-To: <20250728153201.7843-1-laurent.pinchart@ideasonboard.com> References: <20250728153201.7843-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" libcamera will soon require python3-sphinxcontrib.doxylink to build the documentation. Add it to the container images. We also add python3-pyparsing to the list of runtime packages. python3-pyparsing is a dependency of python3-sphinxcontrib.doxylink and would get pulled in automatically, but it would also then get automatically uninstalled if python3-sphinxcontrib.doxylink is replaced by the PyPI version. Signed-off-by: Laurent Pinchart Reviewed-by: Barnabás Pőcze --- Changes since v1: - Improve commit message --- .gitlab-ci/setup-container.sh | 3 +++ gitlab-ci.yml | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/setup-container.sh b/.gitlab-ci/setup-container.sh index 7fdac1f9fb66..7029919c509c 100755 --- a/.gitlab-ci/setup-container.sh +++ b/.gitlab-ci/setup-container.sh @@ -49,8 +49,10 @@ PKGS_LIBCAMERA_RUNTIME=( python3-autopep8 python3-dev python3-jinja2 + python3-pyparsing python3-ply python3-sphinx + python3-sphinxcontrib.doxylink python3-yaml qt6-tools-dev-tools shellcheck @@ -109,6 +111,7 @@ PKGS_VIRTME_RUNTIME=( PKGS_PIP_MIN_VERSIONS=( 'meson meson 1.2.0 remove' 'python3-pygments pygments 2.10.0 keep' + 'python3-sphinxcontrib.doxylink sphinxcontrib-doxylink 1.6.1 remove' ) archs=( amd64 ) diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 03ea7795f3ff..57607dbfe7e4 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -59,17 +59,17 @@ include: .libcamera-ci.debian:11: variables: FDO_DISTRIBUTION_VERSION: 'bullseye' - FDO_DISTRIBUTION_TAG: '2025-07-25.1' + FDO_DISTRIBUTION_TAG: '2025-07-27.1' .libcamera-ci.debian:12: variables: FDO_DISTRIBUTION_VERSION: 'bookworm' - FDO_DISTRIBUTION_TAG: '2025-02-27.1' + FDO_DISTRIBUTION_TAG: '2025-07-27.1' .libcamera-ci.debian:13: variables: FDO_DISTRIBUTION_VERSION: 'trixie' - FDO_DISTRIBUTION_TAG: '2025-07-25.1' + FDO_DISTRIBUTION_TAG: '2025-07-27.1' .container-debian: extends: