Skip to content

Commit

Permalink
Code autogenerated from Kurento/doc-kurento@575f5d8
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkinskurento committed Jun 23, 2020
1 parent bff2356 commit a744eef
Show file tree
Hide file tree
Showing 28 changed files with 181 additions and 181 deletions.
44 changes: 22 additions & 22 deletions source/dev/dev_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ It is not a trivial task to configure the compiler to use a set of libraries bec

For example, if you want to compile a C program which depends on GLib 2.0, you can run:

.. code-block:: bash
.. code-block:: console
gcc -o program program.c $(pkg-config --libs --cflags glib-2.0)
Expand Down Expand Up @@ -173,7 +173,7 @@ Install required tools

This command will install the basic set of tools that are needed for the next steps:

.. code-block:: bash
.. code-block:: console
sudo apt-get update && sudo apt-get install --no-install-recommends --yes \
build-essential \
Expand All @@ -189,7 +189,7 @@ Add Kurento repository

Run these commands to add the Kurento repository to your system configuration:

.. code-block:: text
.. code-block:: console
# Import the Kurento repository signing key
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5AFA7A83
Expand All @@ -212,7 +212,7 @@ Install build dependencies

Run:

.. code-block:: bash
.. code-block:: console
sudo apt-get update && sudo apt-get install --no-install-recommends --yes \
kurento-media-server-dev
Expand All @@ -224,7 +224,7 @@ Download KMS source code

Run:

.. code-block:: bash
.. code-block:: console
git clone https://github.com/Kurento/kms-omni-build.git
cd kms-omni-build
Expand All @@ -237,7 +237,7 @@ Run:

*OPTIONAL*: Change to the *master* branch of each submodule, if you will be working with the latest version of the code:

.. code-block:: text
.. code-block:: console
REF=master
git checkout "$REF" || true
Expand All @@ -252,7 +252,7 @@ Build and run KMS

Make sure your current directory is already *kms-omni-build*, then run this command:

.. code-block:: text
.. code-block:: console
export MAKEFLAGS="-j$(nproc)"
./bin/kms-build-run.sh
Expand All @@ -270,7 +270,7 @@ To leave the system in a clean state, remove all KMS packages and related develo

Run:

.. code-block:: text
.. code-block:: console
PACKAGES=(
# KMS main components + extra modules
Expand Down Expand Up @@ -310,7 +310,7 @@ Whenever working with KMS source code itself, of during any analysis of crash in

After having :doc:`installed Kurento </user/installation>`, first thing to do is to enable the Ubuntu's official **Debug Symbol Packages** repository:

.. code-block:: text
.. code-block:: console
# Import the Ubuntu debug repository signing key
sudo apt-key adv \
Expand All @@ -329,7 +329,7 @@ After having :doc:`installed Kurento </user/installation>`, first thing to do is
Now, install all debug symbols that are relevant to KMS:

.. code-block:: text
.. code-block:: console
sudo apt-get update && sudo apt-get install --no-install-recommends --yes \
kurento-dbg
Expand Down Expand Up @@ -401,7 +401,7 @@ From sources

For this step, the easiest method is to use our launch script, *kms-build-run.sh*. It builds all sources, configures the environment, and starts up the debugger:

.. code-block:: bash
.. code-block:: console
./bin/kms-build-run.sh --gdb
# [... wait for build ...]
Expand All @@ -424,21 +424,21 @@ You don't *have* to build KMS from sources in order to run it with the GDB debug

This helps capturing assertions from 3rd-party libraries used by Kurento, such as *GLib* and *GStreamer*:

.. code-block:: bash
.. code-block:: console
export G_DEBUG=fatal-warnings
4. Load your service settings.

You possibly did some changes in the KMS service settings file, */etc/default/kurento-media-server*. This file contains shell code that can be sourced directly into your current session:

.. code-block:: bash
.. code-block:: console
source /etc/default/kurento-media-server
5. Ensure KMS is not already running as a service, and run it with GDB.

.. code-block:: bash
.. code-block:: console
sudo service kurento-media-server stop
Expand All @@ -455,7 +455,7 @@ GDB commands

Once you see the ``(gdb)`` command prompt, you're already running a `GDB session <https://www.cprogramming.com/gdb.html>`__, and you can start issuing debug commands. Here, the most useful ones are ``backtrace`` and ``info`` variants (`Examining the Stack <https://sourceware.org/gdb/current/onlinedocs/gdb/Stack.html>`__). When you want to finish, stop execution with *Ctrl+C*, then type the ``quit`` command:

.. code-block:: bash
.. code-block:: console
# Actually start running the KMS process
(gdb) run
Expand Down Expand Up @@ -529,7 +529,7 @@ You can also use *kurento-buildpackage* locally, to build test packages while wo

For example, say you want to build the current *kms-core* development branch against Kurento 6.12.0. Run these commands:

.. code-block:: text
.. code-block:: console
git clone https://github.com/Kurento/adm-scripts.git
git clone https://github.com/Kurento/kms-core.git
Expand All @@ -549,7 +549,7 @@ To use the `kurento-buildpackage Docker image <https://hub.docker.com/r/kurento/

For example, say you want to build the current *kms-core* development branch against Kurento 6.12.0, for *Ubuntu 16.04 (Xenial)* systems. Run these commands:

.. code-block:: text
.. code-block:: console
git clone https://github.com/Kurento/kms-core.git
cd kms-core/
Expand All @@ -571,7 +571,7 @@ KMS uses the Check unit testing framework for C (https://libcheck.github.io/chec

The complete command would look like this:

.. code-block:: bash
.. code-block:: console
export GST_DEBUG_NO_COLOR=1
export GST_DEBUG="3,check:5"
Expand All @@ -585,13 +585,13 @@ The log output of the whole test suite will get saved into the file *./Testing/T
To build and run one specific test, use ``make {TestName}.check``. For example:

.. code-block:: text
.. code-block:: console
make test_agnosticbin.check
If you want to analyze memory usage with Valgrind, use ``make {TestName}.valgrind``. For example:

.. code-block:: text
.. code-block:: console
make test_agnosticbin.valgrind
Expand Down Expand Up @@ -638,7 +638,7 @@ What to do when you are developing a new feature that spans across KMS and the p

2. Generate client SDK dependencies:

.. code-block:: bash
.. code-block:: console
cd <module> # E.g. kms-filters
rm -rf build
Expand All @@ -649,7 +649,7 @@ What to do when you are developing a new feature that spans across KMS and the p
3. Generate client SDK:

.. code-block:: bash
.. code-block:: console
cd kurento-java
mvn clean install
Expand Down
4 changes: 2 additions & 2 deletions source/dev/hardening.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Hardening validation

Debian-based distributions provide the *hardening-check* tool (package *hardening-includes*), which can be used to check if a binary file (either an executable or a shared library) was properly hardened:

.. code-block:: bash
.. code-block:: console
$ hardening-check /usr/sbin/sshd
/usr/sbin/sshd:
Expand Down Expand Up @@ -111,7 +111,7 @@ However, CMake is lacking that it *does not* add the flag ``-pie`` to the linker

Kurento Media Server works around this limitation of CMake by doing this in the CMake configuration:

.. code-block:: text
.. code-block:: cmake
# Use "-fPIC" / "-fPIE" for all targets by default, including static libs
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down

0 comments on commit a744eef

Please sign in to comment.