Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Installation

License

This project is licensed under the MIT License, except for the following files:

System Requirements

Dependencies for C and Linux:

Dependencies for deploying in Linux:

Create environment

Firstly you must create the user/group yuneta and the directory /yuneta.

sudo adduser yuneta
sudo mkdir /yuneta
sudo chown yuneta:yuneta /yuneta

Re-enter with the user yuneta

Install system dependencies

Install the C dependencies:

sudo apt -y install --no-install-recommends \
  git mercurial make cmake ninja-build \
  gcc clang g++ \
  python3-dev python3-pip python3-setuptools \
  python3-tk python3-wheel python3-venv \
  libjansson-dev libpcre2-dev liburing-dev libcurl4-openssl-dev \
  libpcre3-dev zlib1g-dev libssl-dev \
  perl dos2unix tree curl \
  postgresql-server-dev-all libpq-dev \
  kconfig-frontends telnet pipx \
  patch gettext fail2ban rsync \
  build-essential pkg-config ca-certificates linux-libc-dev

pipx install kconfiglib
Why these dependencies?
  • libjansson-dev — required for libjwt

  • libpcre2-dev — required by openresty

  • perl dos2unix mercurial — required by openresty

  • pipx kconfiglib — used by yunetas, configuration tool

  • kconfig-frontends — used by yunetas, other configuration tool

  • telnet — required by tests

Install yunetas

With `pipx`
With `conda`

Install pipx

pipx is used to install Python CLI applications globally while still isolating them in virtual environments.

On Linux:

  • Ubuntu 23.04 or above:

    sudo apt install pipx
    pipx ensurepath
  • Ubuntu 22.04 or below

    python3 -m pip install --user pipx
    python3 -m pipx ensurepath

Install yunetas

  • pipx install yunetas

Update or uninstall yunetas

Click to see
  • Update yunetas:

    pipx upgrade yunetas
  • Uninstall yunetas:

    pipx uninstall yunetas

Clone

Clone Yunetas with submodules:

Build your own project directory:

mkdir ~/yunetaprojects
cd ~/yunetaprojects

Get the current version of yunetas:

git clone --recurse-submodules https://github.com/artgins/yunetas.git

Or Get some version of yunetas:

git clone -b <version> --recurse-submodules https://github.com/artgins/yunetas.git <version>

Activating yunetas

Go to the yunetas directory in your project and activate:

cd ~/yunetaprojects/yunetas
source yunetas-env.sh

Configure .bashrc

Next times, to activate yunetas environment, (you can add these lines to ~/.bashrc :

# edit: "vim ~/.bashrc" and add next lines:
cd ~/yunetaprojects/yunetas
source yunetas-env.sh

Configure .yunetasrc

The script source yunetas-env.sh also sources the file

~/.yunetasrc

where you can place your own scripts.

Configuring (Kconfig)

Configuration options are defined in Kconfig file. The output from Kconfig is a header file yuneta_config.h with macros that can be tested at build time.

Goto yunetas directory:

cd ~/yunetaprojects/yunetas

Use this utility to edit the Kconfig file and to select the compiler, build type, etc:

menuconfig

Options:

(Top) → Compiler Selection
    (X) GCC compiler (default)
    ( ) Clang compiler
    WARNING: Remember to call set_compiler.sh if you change the compiler

(Top) → Build Configuration
    Build Type
        (X) RelWithDebInfo (default)
        ( ) Release
        ( ) Debug
        ( ) MinSizeRel
    [*] Build fully static binaries (default y)

(Top) → TLS Library
    (X) OpenSSL (default)
    ( ) Mbed-TLS

(Top) → Debug Options
    [*] Use backtrace library (default y)
    [ ] Enable track memory
    [ ] Print times of yev_loop

(Top) → Modules
    *** Available modules. ***
    [*] C_CONSOLE support
    [*] C_MQTT support
    [*] C_MODBUS support
    [*] C_POSTGRES support
    [*] C_TEST support

⚠️ Warning: Save the configuration, otherwise the compilation will fail, the .config file is required.

⚠️ Warning: Execute the ./set_compiler.sh to compile the external libs with the same compiler as Yunetas.

Install dependencies

Firstly, install yuneta dependencies:

Goto linux-ext-libs directory:

cd ~/yunetaprojects/yunetas/kernel/c/linux-ext-libs/

Extract, compile and install:

./extrae.sh         # clone libraries
./configure-libs.sh # configure, build and install libraries

ℹ️ Fully static builds (CONFIG_FULLY_STATIC=y) use the same configure-libs.sh with GCC or Clang — no separate toolchain needed. OpenSSL is built with no-dso and no-sock to avoid glibc resolver stubs in the static binary. See kernel/c/linux-ext-libs/HACKS.rst for details.

Compile Yunetas

Compiling and Installing Yunetas

To build and install yunetas:

yunetas init
yunetas build

Test

To test:

yunetas test

By default, the installation directory of include files, libraries and binaries will be in /yuneta/development/outputs/

Want the old /var/log/syslog back?

sudo apt-get update
sudo apt-get install rsyslog
sudo systemctl enable --now rsyslog

How remove warning: Setting locale failed:

dpkg-reconfigure locales