[{"id":38896,"web_url":"https://patchwork.libcamera.org/comment/38896/","msgid":"<1e55eadd-104c-4f2a-9b99-f818b6ae728e@ideasonboard.com>","date":"2026-05-14T08:48:33","subject":"Re: [libcamera-ci] [PATCH v3 2/2] Deploy docs to docs.libcamera.org","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 05. 13. 23:26 keltezéssel, Laurent Pinchart írta:\n> From: Stefan Klug <stefan.klug@ideasonboard.com>\n> \n> Add a build step that deploys the docs to a server. This step\n> only runs on pushes to master and on tag builds. It requires three\n> external variables:\n> \n> DEPLOY_SSH_KEY_BASE64: base64 encoded private deploy key\n> DEPLOY_KNOWN_HOSTS: Known hosts containing the destination\n> DEPLOY_DESTINAION: user@host:/ for the rsync push\n\nNote that having the user, host, and destination together means that in\nerror messages one or the other will likely be unmasked. I assume the\nuser can only log in with a public key or only run a chrooted rsync.\nSo while probably not ideal, leaking the user name and host does not\nseem like a serious issue.\n\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\n\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> ---\n>   .gitlab-ci/deploy-libcamera-docs.sh | 23 +++++++++++++++++++++++\n>   .gitlab-ci/setup-container.sh       |  2 ++\n>   gitlab-ci.yml                       | 29 ++++++++++++++++++++++++++++-\n>   3 files changed, 53 insertions(+), 1 deletion(-)\n>   create mode 100755 .gitlab-ci/deploy-libcamera-docs.sh\n> \n> diff --git a/.gitlab-ci/deploy-libcamera-docs.sh b/.gitlab-ci/deploy-libcamera-docs.sh\n> new file mode 100755\n> index 000000000000..a6936728c4a9\n> --- /dev/null\n> +++ b/.gitlab-ci/deploy-libcamera-docs.sh\n> @@ -0,0 +1,23 @@\n> +#!/bin/bash\n> +\n> +# SPDX-License-Identifier: GPL-2.0-or-later\n> +# SPDX-FileCopyrightText: © 2026 Ideas on Board\n> +#\n> +# Deploy libcamera docs\n> +\n> +set -e\n> +\n> +source \"$(dirname \"$0\")/lib.sh\"\n> +\n> +libcamera_deploy_docs() {\n> +\techo \"Deploying libcamera docs\"\n> +\n> +\trsync -rlz --delete --chmod=Do=rx,Fo=r \\\n> +          --exclude .doctrees \\\n> +          --exclude .buildinfo \\\n> +          --exclude objects.inv \\\n> +          docs/ \\\n> +          \"${DEPLOY_DESTINATION}${CI_COMMIT_REF_NAME}\"\n> +}\n> +\n> +run libcamera_deploy_docs\n> diff --git a/.gitlab-ci/setup-container.sh b/.gitlab-ci/setup-container.sh\n> index c7ca6426c3ab..6c4b439b887b 100755\n> --- a/.gitlab-ci/setup-container.sh\n> +++ b/.gitlab-ci/setup-container.sh\n> @@ -132,6 +132,8 @@ case $FDO_DISTRIBUTION_VERSION in\n>   \t\tpython3-sphinxcontrib.doxylink\n>   \t\ttexlive-latex-extra\n>   \t)\n> +\t# Packages required to deploy the documentation\n> +\tPKGS_LIBCAMERA_RUNTIME+=( openssh-client rsync )\n>   \t# Tools requires by the lint jobs.\n>   \tPKGS_LIBCAMERA_RUNTIME+=( clang-format jq python3-autopep8 reuse shellcheck )\n>   \t# libclang-rt-dev for the clang ASan runtime.\n> diff --git a/gitlab-ci.yml b/gitlab-ci.yml\n> index 278e69079c15..e363d2908240 100644\n> --- a/gitlab-ci.yml\n> +++ b/gitlab-ci.yml\n> @@ -5,6 +5,7 @@ stages:\n>     - build\n>     - lint\n>     - test\n> +  - deploy\n>   \n>   variables:\n>     FDO_UPSTREAM_REPO: 'camera/libcamera'\n> @@ -74,7 +75,7 @@ include:\n>   .libcamera-ci.debian:13:\n>     variables:\n>       FDO_DISTRIBUTION_VERSION: 'trixie'\n> -    FDO_DISTRIBUTION_TAG: '2026-04-24.0'\n> +    FDO_DISTRIBUTION_TAG: '2026-05-06.0'\n>   \n>   .container-debian:\n>     extends:\n> @@ -440,3 +441,29 @@ test-lc-compliance:virtual:\n>     artifacts:\n>       reports:\n>         junit: build/lc-compliance-report.xml\n> +\n> +# ------------------------------------------------------------------------------\n> +# Deploy stage - deploy docs if we are building master or a tag\n> +# ------------------------------------------------------------------------------\n> +\n> +deploy-docs:\n> +  extends:\n> +    - .fdo.distribution-image@debian\n> +    - .libcamera-ci.debian:13\n> +    - .libcamera-ci.scripts\n> +  rules:\n> +    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH\n> +    - if: $CI_COMMIT_TAG =~ /^v([0-9]+\\.)*[0-9]+$/\n> +  environment: deploy\n> +  stage: deploy\n> +  needs:\n> +    - job: build-docs\n> +  script:\n> +    - |\n> +      mkdir -p ~/.ssh\n> +      chmod 700 ~/.ssh\n> +      echo \"${DEPLOY_KNOWN_HOSTS}\" > ~/.ssh/known_hosts\n> +      eval $(ssh-agent -s)\n> +      echo \"${DEPLOY_SSH_KEY_BASE64}\" | base64 -d | ssh-add -\n> +\n> +    - $CI_PROJECT_DIR/.gitlab-ci/deploy-libcamera-docs.sh","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 39DADBDCBC\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 May 2026 08:48:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 028B363022;\n\tThu, 14 May 2026 10:48:39 +0200 (CEST)","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 BD49862FE8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 May 2026 10:48:37 +0200 (CEST)","from [192.168.33.26] (185.182.215.166.nat.pool.zt.hu\n\t[185.182.215.166])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A58E3454;\n\tThu, 14 May 2026 10:48:28 +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=\"VIuk5b9p\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1778748508;\n\tbh=G3EyBO/jVHorSE508wFgExnLxFaQEWSqXDtcSeg6/Po=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=VIuk5b9pNy3ECkbw1xdrAxeY4h0qL5i6pUy+kBreyrCmqbzj+JF5E75rQn8Z7Og4x\n\tJXY9LFsWHJetJv/QE/aK/7TFYFUMx1r0jg4u3yZKEl+BRNsCvO0CRjBj9kdxuofxLZ\n\tA4zRuijlbIpFggr2yznIrwKunu8ZfX+3kS5WOsQw=","Message-ID":"<1e55eadd-104c-4f2a-9b99-f818b6ae728e@ideasonboard.com>","Date":"Thu, 14 May 2026 10:48:33 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [libcamera-ci] [PATCH v3 2/2] Deploy docs to docs.libcamera.org","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Cc":"Stefan Klug <stefan.klug@ideasonboard.com>","References":"<20260513212613.362445-1-laurent.pinchart@ideasonboard.com>\n\t<20260513212613.362445-3-laurent.pinchart@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":"<20260513212613.362445-3-laurent.pinchart@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":38901,"web_url":"https://patchwork.libcamera.org/comment/38901/","msgid":"<20260514121352.GB3724@killaraus.ideasonboard.com>","date":"2026-05-14T12:13:52","subject":"Re: [libcamera-ci] [PATCH v3 2/2] Deploy docs to docs.libcamera.org","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Thu, May 14, 2026 at 10:48:33AM +0200, Barnabás Pőcze wrote:\n> 2026. 05. 13. 23:26 keltezéssel, Laurent Pinchart írta:\n> > From: Stefan Klug <stefan.klug@ideasonboard.com>\n> > \n> > Add a build step that deploys the docs to a server. This step\n> > only runs on pushes to master and on tag builds. It requires three\n> > external variables:\n> > \n> > DEPLOY_SSH_KEY_BASE64: base64 encoded private deploy key\n> > DEPLOY_KNOWN_HOSTS: Known hosts containing the destination\n> > DEPLOY_DESTINAION: user@host:/ for the rsync push\n> \n> Note that having the user, host, and destination together means that in\n> error messages one or the other will likely be unmasked. I assume the\n> user can only log in with a public key or only run a chrooted rsync.\n> So while probably not ideal, leaking the user name and host does not\n> seem like a serious issue.\n\nThat's a good point. The risk is low, but I'll still see if I can\nimprove this.\n\n> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> \n> > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> > ---\n> >   .gitlab-ci/deploy-libcamera-docs.sh | 23 +++++++++++++++++++++++\n> >   .gitlab-ci/setup-container.sh       |  2 ++\n> >   gitlab-ci.yml                       | 29 ++++++++++++++++++++++++++++-\n> >   3 files changed, 53 insertions(+), 1 deletion(-)\n> >   create mode 100755 .gitlab-ci/deploy-libcamera-docs.sh\n> > \n> > diff --git a/.gitlab-ci/deploy-libcamera-docs.sh b/.gitlab-ci/deploy-libcamera-docs.sh\n> > new file mode 100755\n> > index 000000000000..a6936728c4a9\n> > --- /dev/null\n> > +++ b/.gitlab-ci/deploy-libcamera-docs.sh\n> > @@ -0,0 +1,23 @@\n> > +#!/bin/bash\n> > +\n> > +# SPDX-License-Identifier: GPL-2.0-or-later\n> > +# SPDX-FileCopyrightText: © 2026 Ideas on Board\n> > +#\n> > +# Deploy libcamera docs\n> > +\n> > +set -e\n> > +\n> > +source \"$(dirname \"$0\")/lib.sh\"\n> > +\n> > +libcamera_deploy_docs() {\n> > +\techo \"Deploying libcamera docs\"\n> > +\n> > +\trsync -rlz --delete --chmod=Do=rx,Fo=r \\\n> > +          --exclude .doctrees \\\n> > +          --exclude .buildinfo \\\n> > +          --exclude objects.inv \\\n> > +          docs/ \\\n> > +          \"${DEPLOY_DESTINATION}${CI_COMMIT_REF_NAME}\"\n> > +}\n> > +\n> > +run libcamera_deploy_docs\n> > diff --git a/.gitlab-ci/setup-container.sh b/.gitlab-ci/setup-container.sh\n> > index c7ca6426c3ab..6c4b439b887b 100755\n> > --- a/.gitlab-ci/setup-container.sh\n> > +++ b/.gitlab-ci/setup-container.sh\n> > @@ -132,6 +132,8 @@ case $FDO_DISTRIBUTION_VERSION in\n> >   \t\tpython3-sphinxcontrib.doxylink\n> >   \t\ttexlive-latex-extra\n> >   \t)\n> > +\t# Packages required to deploy the documentation\n> > +\tPKGS_LIBCAMERA_RUNTIME+=( openssh-client rsync )\n> >   \t# Tools requires by the lint jobs.\n> >   \tPKGS_LIBCAMERA_RUNTIME+=( clang-format jq python3-autopep8 reuse shellcheck )\n> >   \t# libclang-rt-dev for the clang ASan runtime.\n> > diff --git a/gitlab-ci.yml b/gitlab-ci.yml\n> > index 278e69079c15..e363d2908240 100644\n> > --- a/gitlab-ci.yml\n> > +++ b/gitlab-ci.yml\n> > @@ -5,6 +5,7 @@ stages:\n> >     - build\n> >     - lint\n> >     - test\n> > +  - deploy\n> >   \n> >   variables:\n> >     FDO_UPSTREAM_REPO: 'camera/libcamera'\n> > @@ -74,7 +75,7 @@ include:\n> >   .libcamera-ci.debian:13:\n> >     variables:\n> >       FDO_DISTRIBUTION_VERSION: 'trixie'\n> > -    FDO_DISTRIBUTION_TAG: '2026-04-24.0'\n> > +    FDO_DISTRIBUTION_TAG: '2026-05-06.0'\n> >   \n> >   .container-debian:\n> >     extends:\n> > @@ -440,3 +441,29 @@ test-lc-compliance:virtual:\n> >     artifacts:\n> >       reports:\n> >         junit: build/lc-compliance-report.xml\n> > +\n> > +# ------------------------------------------------------------------------------\n> > +# Deploy stage - deploy docs if we are building master or a tag\n> > +# ------------------------------------------------------------------------------\n> > +\n> > +deploy-docs:\n> > +  extends:\n> > +    - .fdo.distribution-image@debian\n> > +    - .libcamera-ci.debian:13\n> > +    - .libcamera-ci.scripts\n> > +  rules:\n> > +    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH\n> > +    - if: $CI_COMMIT_TAG =~ /^v([0-9]+\\.)*[0-9]+$/\n> > +  environment: deploy\n> > +  stage: deploy\n> > +  needs:\n> > +    - job: build-docs\n> > +  script:\n> > +    - |\n> > +      mkdir -p ~/.ssh\n> > +      chmod 700 ~/.ssh\n> > +      echo \"${DEPLOY_KNOWN_HOSTS}\" > ~/.ssh/known_hosts\n> > +      eval $(ssh-agent -s)\n> > +      echo \"${DEPLOY_SSH_KEY_BASE64}\" | base64 -d | ssh-add -\n> > +\n> > +    - $CI_PROJECT_DIR/.gitlab-ci/deploy-libcamera-docs.sh","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 18CE7BDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 May 2026 12:13:56 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CA0D463022;\n\tThu, 14 May 2026 14:13:55 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0A15D62FE8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 May 2026 14:13:54 +0200 (CEST)","from killaraus.ideasonboard.com\n\t(2001-14ba-70f3-e800--a06.rev.dnainternet.fi\n\t[IPv6:2001:14ba:70f3:e800::a06])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CE9CC56D;\n\tThu, 14 May 2026 14:13:44 +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=\"iyQ540Ac\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1778760825;\n\tbh=A/zNTrSGQuI4HgL4i1u3TOXMMBWFvrf0+rjM9z2BkFg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=iyQ540AcaST4+kPukXDuJUrvV+VGMk6CmDap2RGpOILCBQoZZ6gJzTK0REcsA1R5S\n\tMlkbsw/LBlKn2z8mAXQqswk/n7hjmxLfKR6YREa4y4buFy1uF2pSs7jwpS7z/aRGtf\n\tiCkL+vbvUWi8KsI4T8S3qR5mTAyl/4h574Y1ZkDc=","Date":"Thu, 14 May 2026 15:13:52 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tStefan Klug <stefan.klug@ideasonboard.com>","Subject":"Re: [libcamera-ci] [PATCH v3 2/2] Deploy docs to docs.libcamera.org","Message-ID":"<20260514121352.GB3724@killaraus.ideasonboard.com>","References":"<20260513212613.362445-1-laurent.pinchart@ideasonboard.com>\n\t<20260513212613.362445-3-laurent.pinchart@ideasonboard.com>\n\t<1e55eadd-104c-4f2a-9b99-f818b6ae728e@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<1e55eadd-104c-4f2a-9b99-f818b6ae728e@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>"}}]