From patchwork Wed Oct 30 16:35:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 51561 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2044AD6B6AD for ; Wed, 30 Oct 2024 16:35:50 +0000 (UTC) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mx.groups.io with SMTP id smtpd.web11.19513.1730306139723612345 for ; Wed, 30 Oct 2024 09:35:40 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=Y0/hUYuW; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.47, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4316cce103dso75635e9.3 for ; Wed, 30 Oct 2024 09:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1730306138; x=1730910938; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=zGxrn/+FoHaGIZy9j0BmZBOy+GafmVctF5DJFiJ3Up8=; b=Y0/hUYuWHM/rAUhN+02HCw0iPzAorf0wR/xS+o0OSYILGqvL6zkbv8yk++0z+sKLO3 6YEBzolbs73gun3k1VXkffcZetRtCPE1Qou6yJUzRfrojVqqPeCnSd7DRJoil0I7MARN NcnhHnRkV+lPV9t3SHQJcSnwrcmbLuF6rcqso= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730306138; x=1730910938; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zGxrn/+FoHaGIZy9j0BmZBOy+GafmVctF5DJFiJ3Up8=; b=CfirdHlwN74aeGsnGyIFEwG0fCZF32Q86XCqom40EpWAMWttPiXymeDeb3CiWpkVeX An4egYYC6Lk54h6+rnht1qhJXHVyfPNBsiwNTGkFi1U5KRXNvPZRPdwrKmM96FdPKo9p kaQqMKy7CfgoOqlLTaG6t70eOAAFzW/wL/rBN8CFK6RoxQCGZ6xinJ0QKKc/M/H49BJ9 vBM8rR+tYzcKxyW3oysOb0HXt1YcgQLLdrVARHRVcysRfgHz8j+CAr6l5h/DtGB3ZOBt ac32p5E8gwCdoj1gh0hkDTEmee5ntp86j5tKfobFNQG/EzY/SwDPVdGCSuExkYBTMOyR rwyg== X-Gm-Message-State: AOJu0Yyf74yQ0c8RgZry57w358o6z/AKZdSmp4QGhmSw9uZBMnv3jAlH 52zg3Z4YQ8KEQYCQgEDYbq/alLvKYDZXzNB0HyTZyW/7Nnh2odydjfw7rTV8hpmUnnQGVF6RWDG IsgM= X-Google-Smtp-Source: AGHT+IFSC8/Sw6yg2/GPGI4I05OWjizBZl7h+2s7wtvmj2SQ7VLbyuVpcS9/JaH9BEeIETtvRji01w== X-Received: by 2002:a05:600c:35c2:b0:431:5533:8f0d with SMTP id 5b1f17b1804b1-4319ad26eafmr166071165e9.30.1730306137713; Wed, 30 Oct 2024 09:35:37 -0700 (PDT) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:65f1:8463:55dd:142d]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b132fbsm15827411f8f.4.2024.10.30.09.35.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 09:35:37 -0700 (PDT) From: Richard Purdie To: yocto-patches@lists.yoctoproject.org Cc: docs@lists.yoctoproject.org Subject: [yocto-autobuilder-helper] [PATCH v2] scripts/run-docs-build: Add support for installing texlive for pdf generation Date: Wed, 30 Oct 2024 16:35:36 +0000 Message-ID: <20241030163536.437177-1-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 30 Oct 2024 16:35:50 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/5624 To build the latexpdf output for the docs, we need Xetex (which can handle international characters). Rather than require it on all autobuilder workers, along with dependencies, we install a copy onto NFS which the workers can use. The full install is 6GB so just install the pieces we've found we need via tlmgr on top of a small install. This script creates the install if it isn't present. For local docs builds, we assume the user has the tools available from the host OS. It is unlikely most users using this script would have the NAS path present so this seems like a reasonable compromise. Signed-off-by: Richard Purdie --- scripts/run-docs-build | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/scripts/run-docs-build b/scripts/run-docs-build index 2e7298e..3348378 100755 --- a/scripts/run-docs-build +++ b/scripts/run-docs-build @@ -42,6 +42,26 @@ mkdir buildtools ${buildtools_localpath} -y -d $builddir/buildtools . $builddir/buildtools/environment-setup* +# To build the latexpdf output we need Xetex (which can handle international characters) +# Rather than require it on all autobuilder workers, along with dependencies, we install +# a copy onto NFS which the workers can use. The full install is 6GB so just install +# the pieces we've found we need via tlmgr on top of a small install. This script +# creates the install if it isn't present. +# For local docs builds, we assume the user has the tools available. +if [ -e /srv/autobuilder/valkyrie.yocto.io/ ]; then + textooldir=/srv/autobuilder/valkyrie.yocto.io/docs-build-tex-tools + if [ ! -e ${textooldir} ]; then + mkdir -p /tmp/textemp + pushd /tmp/textemp + wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz + zcat < install-tl-unx.tar.gz | tar xf - + cd install-tl-*/ + ./install-tl --scheme=small --texdir=${textooldir} --no-interaction + PATH=$PATH:${textooldir}/bin/x86_64-linux tlmgr install titlesec varwidth tabulary needspace upquote framed capt-of wrapfig fncychap gnu-freefont ctex + popd + PATH=$PATH:${textooldir}/bin/x86_64-linux +fi + # Getting the old docbook built docs from an archive. Not rebuilding them. docbookarchive_localpath=${sharedir}/cluster-downloads-cache/`basename ${docbookarchive_url}` if [ ! -e ${docbookarchive_localpath} ]; then