About
libresolvconf is a C library that parses resolv.conf files and can load ENVIRONMENTAL variables into a predefined structure. It uses ragel to build FSM that parse and validate the input, while striving for performance and reliability. It also comes with utility resolvconf-checker, that check syntax of resolv.conf file.
It supports multiple resolv.conf file standards and is syntax compatible under Linux and OpenBSD. Tested platrofms are Ubuntu and MacOS.
Install
Build from source
This guide outlines the process of building the software from its source code using the CMake build system.
Prior to initiating the build, ensure that you have the necessary dependencies installed, including
cmake, a C compiler (such asgccorclang),libcriterion-dev, andragel.Navigate to your desired working directory and clone the source code repository:
cd <working directory>
git clone https://github.com/Payne-X6/libresolvconf.git
Create a dedicated build directory:
cd libresolvconf
mkdir build
Proceed to build the software from source:
cd build
cmake ..
make -j`nproc`
Testing (Optional)
If you wish to run tests, use the test target from the build directory:
make test
Documentation (Optional)
To generate documentation, you can utilize the doc target from the build directory. However, be sure to install the required Python packages as specified in docs/requirements.txt beforehand. You can install them using pip, either within a virtual environment (venv) or directly into your system.
To install the necessary dependencies in a virtual environment:
python3 -m venv .env
. .env/bin/activate
pip install -r docs/requirements.txt
Alternatively, if you prefer a system-wide installation:
pip install --user -r docs/requirements.txt
After satisfying the dependencies, proceed to build the documentation:
make doc
Installation (Optional)
If you choose to, you can use the following command to perform an installation, which will include both the library and its associated binaries:
sudo make install