]> git.puffer.fish Git - mirror/frr.git/commitdiff
build: protobuf is required so update building docs 15071/head
authorChristian Hopps <chopps@labn.net>
Sat, 30 Dec 2023 22:40:07 +0000 (22:40 +0000)
committerChristian Hopps <chopps@labn.net>
Sun, 31 Dec 2023 13:51:21 +0000 (13:51 +0000)
- recommend using libyang 2.1.128 but accept 2.0.0 for now.
- update ubuntu building doc to add GRPC section
- update ubuntu reference docker builds to match grpc doc change

Signed-off-by: Christian Hopps <chopps@labn.net>
configure.ac
doc/developer/building-frr-for-archlinux.rst
doc/developer/building-frr-for-ubuntu1404.rst
doc/developer/building-frr-for-ubuntu1604.rst
doc/developer/building-frr-for-ubuntu1804.rst
doc/developer/building-frr-for-ubuntu2004.rst
doc/developer/building-frr-for-ubuntu2204.rst
doc/developer/building-libyang.rst
docker/ubuntu-ci/Dockerfile

index fc3775857f4d6bae89f06857fb546d32ee62fd5f..a3b0370ec05623c7b68616bd6b62c3de7fd881d3 100644 (file)
@@ -1953,6 +1953,10 @@ AC_SUBST([SNMP_CFLAGS])
 dnl ---------------
 dnl libyang
 dnl ---------------
+PKG_CHECK_MODULES([LIBYANG], [libyang >= 2.1.128], , [
+  AC_MSG_WARN([Recommended libyang version is >= 2.1.128.])
+])
+
 PKG_CHECK_MODULES([LIBYANG], [libyang >= 2.0.0], , [
   AC_MSG_ERROR([libyang (>= 2.0.0) was not found on your system.])
 ])
index 406d22d6180e51b3cf2d019f9697e5b6edf8408b..8b0df217a0b7a5184b67b6ca7e80abc27781f3c8 100644 (file)
@@ -11,18 +11,12 @@ Installing Dependencies
       git autoconf automake libtool make cmake pcre readline texinfo \
       pkg-config pam json-c bison flex python-pytest \
       c-ares python python2-ipaddress python-sphinx \
-      net-snmp perl libcap libelf libunwind
+      net-snmp perl libcap libelf libunwind protobuf-c
 
 .. include:: building-libunwind-note.rst
 
 .. include:: building-libyang.rst
 
-Protobuf
-^^^^^^^^
-
-.. code-block:: console
-
-   sudo pacman -S protobuf-c
 
 ZeroMQ
 ^^^^^^
index cc6c3c03f3838848ba5138ad0f2b4e27a4577ffd..dd3f98a58e34905957004813e78ad46f8baa3a47 100644 (file)
@@ -14,16 +14,11 @@ Installing Dependencies
       git autoconf automake libtool make libreadline-dev texinfo \
       pkg-config libpam0g-dev libjson-c-dev bison flex python3-pytest \
       libc-ares-dev python3-dev python3-sphinx install-info build-essential \
+      protobuf-c-compiler libprotobuf-c-dev \
       libsnmp-dev perl libcap-dev libelf-dev
 
 .. include:: building-libyang.rst
 
-Protobuf
-^^^^^^^^
-
-.. code-block:: console
-
-   sudo apt-get install protobuf-c-compiler libprotobuf-c-dev
 
 Building & Installing FRR
 -------------------------
index e5c2389f399c67487d430957a82561f6357a389b..f3b6aa0de9734b8de259efd9cf09459a7a4c090c 100644 (file)
@@ -19,12 +19,6 @@ Installing Dependencies
 
 .. include:: building-libyang.rst
 
-Protobuf
-^^^^^^^^
-
-.. code-block:: console
-
-   sudo apt-get install protobuf-c-compiler libprotobuf-c-dev
 
 Building & Installing FRR
 -------------------------
index fcfd94ec2cabe4d0b6b90c051cff771fc91b3ace..b4880e26be7e0d214419848335b4ce9abc7232ea 100644 (file)
@@ -15,18 +15,13 @@ Installing Dependencies
       pkg-config libpam0g-dev libjson-c-dev bison flex \
       libc-ares-dev python3-dev python3-sphinx \
       install-info build-essential libsnmp-dev perl libcap-dev \
+      protobuf-c-compiler libprotobuf-c-dev \
       libelf-dev libunwind-dev
 
 .. include:: building-libunwind-note.rst
 
 .. include:: building-libyang.rst
 
-Protobuf
-^^^^^^^^
-
-.. code-block:: console
-
-   sudo apt-get install protobuf-c-compiler libprotobuf-c-dev
 
 ZeroMQ
 ^^^^^^
index a37b5140bae04528774f47e66bb5e8ed8b97c19d..7c23469897bb639e4a109c304aee63bff9d00095 100644 (file)
@@ -15,22 +15,33 @@ Installing Dependencies
       pkg-config libpam0g-dev libjson-c-dev bison flex \
       libc-ares-dev python3-dev python3-sphinx \
       install-info build-essential libsnmp-dev perl \
+      protobuf-c-compiler libprotobuf-c-dev \
       libcap-dev libelf-dev libunwind-dev
 
 .. include:: building-libunwind-note.rst
 
-Note that Ubuntu 20 no longer installs python 2.x, so it must be
-installed explicitly. Ensure that your system has a symlink named
-``/usr/bin/python`` pointing at ``/usr/bin/python3``.
-
 .. include:: building-libyang.rst
 
-Protobuf
-^^^^^^^^
+GRPC
+^^^^
+If GRPC is enabled using ``--enable-grpc`` the following packages should be
+installed.
+
+.. code-block:: console
+
+   sudo apt-get install libgrpc++-dev protobuf-compiler-grpc \
+
+
+Config Rollbacks
+^^^^^^^^^^^^^^^^
+
+If config rollbacks are enabled using ``--enable-config-rollbacks``
+the sqlite3 developer package also should be installed.
 
 .. code-block:: console
 
-   sudo apt-get install protobuf-c-compiler libprotobuf-c-dev
+   sudo apt install libsqlite3-dev
+
 
 ZeroMQ
 ^^^^^^
index f7c30498eca97c0b7f97f9429cbb0d7f505c1ea5..4a8de280b52f3abd455ae38b2340e761bc9f488b 100644 (file)
@@ -16,27 +16,19 @@ Installing Dependencies
       libc-ares-dev python3-dev python3-sphinx \
       install-info build-essential libsnmp-dev perl \
       libcap-dev libelf-dev libunwind-dev \
+      protobuf-c-compiler libprotobuf-c-dev \
       libyang2 libyang2-dev
 
 .. include:: building-libunwind-note.rst
 
-Note that Ubuntu >= 20 no longer installs python 2.x, so it must be
-installed explicitly. Ensure that your system has a symlink named
-``/usr/bin/python`` pointing at ``/usr/bin/python3``.
-
-.. code-block:: shell
-
-   sudo ln -s /usr/bin/python3 /usr/bin/python
-   python --version
-
-
-Protobuf
-^^^^^^^^
-This is optional
+GRPC
+^^^^
+If GRPC is enabled using ``--enable-grpc`` the following packages should be
+installed.
 
 .. code-block:: console
 
-   sudo apt-get install protobuf-c-compiler libprotobuf-c-dev
+   sudo apt-get install libgrpc++-dev protobuf-compiler-grpc \
 
 
 Config Rollbacks
index c36cd34287cfe1e00317d46ed63ec1f62a944711..71577b10ceb42efb10e63f8c187ec42d9828c9c8 100644 (file)
@@ -14,7 +14,8 @@ DEB packages are available as CI artifacts `here
 
 .. warning::
 
-   ``libyang`` version 2.0.0 or newer is required to build FRR.
+   ``libyang`` version 2.0.0 or newer is required to build FRR, version 2.1.128
+   or newer is recommended.
 
 .. note::
 
@@ -39,7 +40,7 @@ DEB packages are available as CI artifacts `here
 
    git clone https://github.com/CESNET/libyang.git
    cd libyang
-   git checkout v2.0.0
+   git checkout v2.1.128
    mkdir build; cd build
    cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr \
          -D CMAKE_BUILD_TYPE:String="Release" ..
index f228fe808e4998f48b6e5fc15cd691bbb268a213..5cdbdb0f3dc004df403401f037523588ac7fcc49 100644 (file)
@@ -41,6 +41,12 @@ RUN apt update && apt upgrade -y && \
         cmake \
         libpcre2-dev \
     && \
+    # GRPC extra build requirements
+    apt-get install -y \
+        libgrpc-dev \
+        libgrpc++-dev \
+        protobuf-compiler-grpc \
+    && \
     # Runtime/triage/testing requirements
     apt-get install -y \
         curl \
@@ -91,7 +97,7 @@ USER frr:frr
 RUN cd && pwd && ls -al && \
     git clone https://github.com/CESNET/libyang.git && \
     cd libyang && \
-    git checkout v2.1.80 && \
+    git checkout v2.1.128 && \
     mkdir build; cd build && \
     cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \
           -DCMAKE_BUILD_TYPE:String="Release" .. && \
@@ -112,6 +118,7 @@ RUN cd ~/frr && \
        --enable-user=frr \
        --enable-group=frr \
        --enable-config-rollbacks \
+       --enable-grpc \
        --enable-vty-group=frrvty \
        --enable-snmp=agentx \
        --enable-scripting \