Coder Social home page Coder Social logo

Comments (3)

syspect-sec avatar syspect-sec commented on June 22, 2024

It looks like the error is occurring because the report.pdf file is not generated from the generate script.
The report.pdf file should be generated the first time this command is run:

pdflatex -interaction batchmode -output-directory ${TMP} ${TMP}/report.tex

On CentOS the output from the command is below, but no report.pdf file is created:

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode

However, on a working distribution such as Kali Linux, the command ouput is much more extensive and successfully creates the report.pdf file. Here is just the start of the output from Kali linux:

This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode

kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 ecsl1000
mktexpk: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1+0/600; nonstopmode; input ecsl1000
This is METAFONT, Version 2.71828182 (TeX Live 2022/Debian) (preloaded base=mf)

(/usr/share/texlive/texmf-dist/fonts/source/jknappen/ec/ecsl1000.mf
(/usr/share/texlive/texmf-dist/fonts/source/jknappen/ec/exbase.mf)
(/usr/share/texlive/texmf-dist/fonts/source/jknappen/ec/ecsl.mf
(/usr/share/texlive/texmf-dist/fonts/source/jknappen/ec/exroman.mf

[...TRUNCATED...]

Maybe the version on CentOS is too old and causing an issue?

from gvmd.

syspect-sec avatar syspect-sec commented on June 22, 2024

I can confirm that upgrading to texlive 2023 is able to compile PDF files as expected.

Even CentOS 9 only has the TeX Live 2020 version available in the native repositories. The 2020 version's error is reported in the report.log file as:

! LaTeX Error: File `comment.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 

I guess the 2020 version could be patched by installing the comments.sty package. It is available from CTAN here: https://www.ctan.org/pkg/comment but not sure whether its easier to do that or to just install the 2023 version and replace the pdflatex binary.

from gvmd.

syspect-sec avatar syspect-sec commented on June 22, 2024

Finally, I have also solved this issue by just installing the Latex comment package into CentOS's default Tex Live package (Tex Live 2020). I think that this is in fact a better solution than installing Tex Live 2023 considering the complexity of installing 2023 over top of 2020. Also, the first part of the upgrade instructions are a bit ominous.

So, after looking at both potential solutions for this issue just adding the Latex comment package to the 2020 version looks like the best solution. The main source of information for creating this process can be found here

Unfortunately, the first suggested solution, to install via the sudo tlmgr -ignore-warning install comment command did not work, for some reason, it reports as already being installed, however, when trying to compile the PDF file it is reported as missing. The second method does not work because no .ins file is provided with the comment package.

$ sudo tlmgr -ignore-warning install comment
TeX Live 2020 is frozen and will no longer
be routinely updated. This happens in preparation for a new release.

If you're willing to help with pretesting the new release, and we hope
you are, (when pretests are available), please read
https://tug.org/texlive/pretest.html.

Otherwise, just wait, and the new release will be ready in due time.
tlmgr: package repository /usr/share/texlive (not verified: unknown)
tlmgr install: package already present: comment

Here are the instructions that can be added to the CentOS source code install documentation to enable the Latex comment.sty package:

Download and unzip the comment .ZIP package from CTAN

curl -f -L https://mirrors.ctan.org/macros/latex/contrib/comment.zip -o /tmp/comment.zip
unzip /tmp/comment.zip

Find the appropriate system-wide install directory for Tex Live

kpsewhich -var-value TEXMFLOCAL
Output: 
/usr/share/texlive/texmf-local//

The path /tex/latex/ should be appended to the TEXMFLOCAL path to follow convention, making the final destination path = /usr/share/texlive/texmf-local/tex/latex/comment.

Make the directory path and copy the comment package to the final destination path:

sudo mkdir -p /usr/share/texlive/texmf-local/tex/latex/
sudo cp -r /tmp/comment /usr/share/texlive/texmf-local/tex/latex/

The texlive package cache must be refreshed

sudo texhash

Greenbone should now be able to compile PDF report files for CentOS source code installations.

from gvmd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.