Skip to content

Install the latest documentation toolchain

Ornela Marić edited this page Oct 30, 2024 · 10 revisions
⚠️

This method is deprecated and not supported!

Please use uyuni-docs-helper instead!

Install the latest toolchain

This installation covers installation of the latest 2023 tool-chain on a fresh Leap 15.4 system with no additional packages installed.

Install base requirements

On a fresh system:

  1. Install Git:

    sudo zypper in git
  2. Clone the doc repo:

    git clone [email protected]:uyuni-project/uyuni-docs.git

Install Required openSUSE Patterns

  1. Install the Required patterns:

    sudo zypper in -t pattern devel_C_C++ devel_python3 devel_perl
    Note

    You can search for available patterns with:

    sudo zypper search -t pattern

Install Ruby for building PDF’s

  1. Install required libraries:

    sudo zypper install libyaml-devel sqlite3-devel readline-devel  libopenssl-devel
  2. Install rbenv the ruby version manager:

    git clone https://github.com/rbenv/rbenv.git ~/.rbenv
  3. Add rbenv to path:

    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
  4. Add init to bashrc:

    echo 'eval "$(rbenv init -)"' >> ~/.bashrc
  5. Update terminal with latest bashrc:

    source ~/.bashrc
  6. Install rbenv ruby-build tools:

    git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
  7. List ruby versions:

    > rbenv install -l
    ...
    2.7.7
    3.0.5
    3.1.3
    3.2.0
    ...
  8. Install Ruby:

    rbenv install 3.0.0
    Note

    Ruby 3.0.0 build depends on libopenssl 1.0.0 and libopenssl-devel 1.0.0. If Ruby 3.0.0 installation fails, install libopenssl-devel 1.0.0 with yast or zypper. In case of a package conflict, remove a later devel package temporarily. After Ruby installation you can re-install any other devel version again.

  9. Set global version of ruby:

    rbenv global 3.0.0

Install NVM and Node

  1. Install NVM

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
  2. Update terminal:

    source ~/.bashrc
  3. Install LTS version of node:

    nvm install --lts
  4. Use the latest version of node (prevents conflicts with older versions of antora):

    nvm use --lts

Install Antora 3.1 and Lunrjs extension

  1. Install antora 3.1:

    npm i -g @antora/[email protected] @antora/[email protected]
  2. Install Lunrjs extension:

    npm i -g @antora/lunr-extension

Install Asciidoctor

  1. Install Ruby Asciidoctor:

    gem install asciidoctor -v 2.0.17
  2. Install Asciidoctor tabs

    npm i -g @asciidoctor/tabs

Install Asciidoctor-pdf

  1. Install asciidoctor-pdf:

    gem install asciidoctor-pdf -v 1.6.2
  2. Install pdf support packages:

    gem install rouge coderay rb-pygments concurrent-ruby asciidoctor-diagram
  3. Install image optimization libraries:

    sudo zypper install -n GraphicsMagick GraphicsMagick-devel
  4. Install support library:

    gem install prawn-gmagick -v 0.0.9

Install Po4a translation tools

  1. Install po4a (Requires >= 0.62 or you will encounter build failures):

    sudo zypper install -n po4a

Install required po4a perl libraries

  1. Install perl libraries. Run each of the following commands one at a time:

    sudo cpan install Locale::gettext
    sudo cpan install Text::WrapI18N
    sudo cpan install Term::ReadKey
    sudo cpan install Unicode::GCString

Install Required python 3 libraries:

  1. Install jinja2 and pyyaml:

    sudo zypper install -n python3-Jinja2 python3-PyYAML
Clone this wiki locally